323 lines
12 KiB
Vue
323 lines
12 KiB
Vue
<template>
|
|
<div style="padding: 10px;background: #E5EBF6;min-height: 830px;">
|
|
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
|
|
<el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border>
|
|
<el-descriptions-item>
|
|
<template slot="label">询价单号</template>
|
|
{{baseInfo.inquiryCode}}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">询价标题</template>
|
|
{{baseInfo.title}}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">联系人</template>
|
|
{{ baseInfo.linkMan }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">联系电话</template>
|
|
{{ baseInfo.phone }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">送货地址</template>
|
|
{{ baseInfo.address }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">交货时间</template>
|
|
{{ baseInfo.arrivalTime }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">报价时间</template>
|
|
{{ baseInfo.startTime }} - {{ baseInfo.startTime }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">要求到货时间</template>
|
|
{{baseInfo.requestArrivalTime}}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">总金额</template>
|
|
{{ (baseInfo.quoteAmount/100).toFixed(2) }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">备注</template>
|
|
{{ baseInfo.remark }}
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
</div>
|
|
|
|
<div style="width: 100%;height: 450px;padding: 10px;border-radius: 10px;margin-bottom: 10px;background: #FFF;">
|
|
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
|
|
<div>
|
|
货品信息
|
|
</div>
|
|
</div>
|
|
<div style="width: 100%;height: 400px;overflow-y: auto;">
|
|
<el-table v-loading="loading" :data="materialList" ref="multipleTable" height="380" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
|
|
<!-- <el-table-column type="selection" width="50" align="center" :reserve-selection="true" /> -->
|
|
<el-table-column label="序号" align="center" width="80" type="index" />
|
|
<!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> -->
|
|
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
|
|
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
|
|
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
|
|
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
|
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
|
|
<!-- <template slot-scope="scope">
|
|
<span v-if="scope.row.salesMode==1">按份</span>
|
|
<span v-if="scope.row.salesMode==2">称重</span>
|
|
</template> -->
|
|
</el-table-column>
|
|
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true" />
|
|
<el-table-column label="报价数量" align="center" prop="quoteNum" :show-overflow-tooltip="true" />
|
|
<el-table-column label="中选单价" align="center" prop="singlePrice" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span>{{ (scope.row.singlePrice/100).toFixed(2) }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="中选总价(元)" align="center" prop="totalPrice" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span>{{ (scope.row.totalPrice/100).toFixed(2) }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<div style="width: 100%;height: 80px;padding: 10px;background: #FFF;border-radius: 10px;display: flex;align-items: center;justify-content: center;">
|
|
<!-- <el-button type="primary" @click="confirmSave" :loading="loadingBtn">保存草稿</el-button> -->
|
|
<el-button @click="jumpList">返回</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { getGoodsInquiryDetailInfoApi } from "@/api/foodManage/purchaseManage";
|
|
export default {
|
|
name: "SupplierQuotationDetail",
|
|
dicts: [],
|
|
data() {
|
|
return {
|
|
supplierQuotationData:{},//页面传参
|
|
loading:false,
|
|
loadingBtn:false,
|
|
baseInfo: {
|
|
orderTitle:undefined,
|
|
contractType:undefined,
|
|
areaId:undefined,
|
|
canteenId:undefined,
|
|
dateRange:[],
|
|
},
|
|
// 表单校验
|
|
baseRules: {
|
|
orderTitle: [
|
|
{ required: true, message: "菜谱名称不能为空", trigger: "blur" }
|
|
],
|
|
areaId: [
|
|
{ required: true, message: "所属区域不能为空", trigger: "change" }
|
|
],
|
|
canteenId: [
|
|
{ required: true, message: "所属食堂不能为空", trigger: "change" }
|
|
],
|
|
supplierId: [
|
|
{ required: true, message: "供应商不能为空", trigger: "change" }
|
|
],
|
|
contractSigningTime: [
|
|
{ required: true, message: "签订日期不能为空", trigger: "change" }
|
|
],
|
|
dateRange: [
|
|
{ required: true, message: "合同生效周期不能为空", trigger: "change" }
|
|
]
|
|
},
|
|
treeAreaOptions:[],
|
|
canteenOptions:[],
|
|
supplierOptions:[],
|
|
stallOptions:[],
|
|
|
|
pickerOptions: {
|
|
disabledDate(v) {
|
|
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000是否包括当天
|
|
}
|
|
},
|
|
materialList:[],
|
|
openDialog:false,
|
|
materialTreeOptions:[],
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
},
|
|
// 总条数
|
|
total: 0,
|
|
//表格数据
|
|
tableListData: [],
|
|
batchChosenMaterial:[],
|
|
noMaterial:false,
|
|
};
|
|
},
|
|
created() {
|
|
if(this.$route.query.supplierQuotationData){
|
|
this.supplierQuotationData = JSON.parse(this.$route.query.supplierQuotationData)
|
|
console.log(this.supplierQuotationData)
|
|
this.getContractInfo()
|
|
}
|
|
},
|
|
watch:{
|
|
'$route.query.supplierQuotationData':function(newId, oldId) {
|
|
if(newId){
|
|
this.supplierQuotationData = JSON.parse(newId)
|
|
this.getContractInfo()
|
|
}else{
|
|
this.baseInfo={}
|
|
this.materialList=[]
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
// 返回列表页
|
|
jumpList() {
|
|
const obj = { path: "/foodManage/supplierFunction/supplierQuotationDetail" };
|
|
this.$tab.closeOpenPage(obj);
|
|
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); // 要打开的页面
|
|
},
|
|
getContractInfo(){
|
|
console.log(this.supplierQuotationData)
|
|
let param = {
|
|
inquiryId:this.supplierQuotationData.inquiryId,
|
|
supplierId:this.supplierQuotationData.supplierId
|
|
}
|
|
//查询
|
|
getGoodsInquiryDetailInfoApi(param).then((response) => {
|
|
this.baseInfo = this.supplierQuotationData;
|
|
this.baseInfo.arrivalTime=response.data[0].arrivalTime;
|
|
console.log("this.baseInfo",this.baseInfo)
|
|
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
|
|
this.materialList = response.data;
|
|
// supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
|
// this.supplierOptions = response.rows||[];
|
|
// });
|
|
});
|
|
},
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
// this.batchIds1 = selection.map(item => item.tradeId)
|
|
// this.single = selection.length !== 1
|
|
// this.multiple = !selection.length
|
|
},
|
|
|
|
//日期
|
|
formatDate(date) {
|
|
// 格式化为 YYYY-MM-DD
|
|
date = new Date(date)
|
|
const year = date.getFullYear();
|
|
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
|
const day = String(date.getDate()).padStart(2, '0');
|
|
return `${year}-${month}-${day}`;
|
|
},
|
|
//日期时间
|
|
formatDateTime(date) {
|
|
// 格式化为 YYYY-MM-DD
|
|
date = new Date(date)
|
|
const year = date.getFullYear();
|
|
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
|
const day = String(date.getDate()).padStart(2, '0');
|
|
const hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
|
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
|
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
<style scoped>
|
|
.dishes-card{
|
|
width: 20%;
|
|
height: 100%;
|
|
margin-right: 15px;
|
|
position: relative;
|
|
}
|
|
.body-card{
|
|
width: 96%;
|
|
margin: 10px auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.bottom-card{
|
|
width: 100%;
|
|
height: 60px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: absolute;
|
|
bottom: 0;
|
|
}
|
|
|
|
|
|
.dialog-left{
|
|
width: 20%;
|
|
height: 100%;
|
|
}
|
|
.dish-name{
|
|
width: 100%;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
}
|
|
.dish-name:hover{
|
|
background-color:rgba(0, 0, 0, 0.1);
|
|
color: #4b80fd;
|
|
}
|
|
|
|
.dialog-center{
|
|
width: 10%;
|
|
height: 100%;
|
|
/* background: #4b80fd; */
|
|
border: 1px solid #ccc;
|
|
border-radius: 5px;
|
|
margin: 0 1%;
|
|
}
|
|
.dialog-center-header{
|
|
width: 100%;display: flex;align-items: center;justify-content: center;height: 60px;font-weight: bold;border-bottom: 1px solid #ccc;
|
|
}
|
|
.dialog-right{
|
|
width: 70%;
|
|
height: 100%;
|
|
}
|
|
.primary{
|
|
background: #1890ff!important;
|
|
color: #fff!important;
|
|
}
|
|
.dateTable{
|
|
width: 14%;
|
|
height: 40px;
|
|
color: #9a9da3;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: 1px solid #e6ebf5;
|
|
}
|
|
.dateTable2{
|
|
width: 14%;
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #fff;
|
|
color:#000;
|
|
border: 1px solid #e6ebf5;
|
|
cursor: pointer;
|
|
}
|
|
.bgBlue{
|
|
width: 14%;
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #0c6ccc;
|
|
color:#fff !important;
|
|
border: 1px solid #fff;
|
|
cursor: pointer;
|
|
}
|
|
</style>
|