Merge remote-tracking branch 'origin/bonus-jyy-smart-canteen' into bonus-jyy-smart-canteen

This commit is contained in:
lizhenhua 2025-09-15 16:09:49 +08:00
commit 7d8e93e965
4 changed files with 97 additions and 102 deletions

View File

@ -1,31 +1,31 @@
<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>
<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>
<el-descriptions-item>
<template slot="label">询价标题</template>
{{baseInfo.title}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">联系人</template>
{{ baseInfo.linkMan }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">联系电话</template>
{{ baseInfo.phone }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">送货地址</template>
{{ baseInfo.address }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">交货时间</template>
{{ baseInfo.arrivalTime }}
</el-descriptions-item>
{{ baseInfo.arrivalTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">报价时间</template>
{{ baseInfo.startTime }} - {{ baseInfo.startTime }}
@ -33,62 +33,62 @@
<el-descriptions-item>
<template slot="label">要求到货时间</template>
{{baseInfo.requestArrivalTime}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">总金额</template>
{{ (baseInfo.quoteAmount/100).toFixed(2) }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">备注</template>
{{ baseInfo.remark }}
</el-descriptions-item>
</el-descriptions>
</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>
<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="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>
<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>
<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-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>
</div>
</template>
<script>
<script>
import { getGoodsInquiryDetailInfoApi } from "@/api/foodManage/purchaseManage";
export default {
name: "SupplierQuotationDetail",
@ -98,12 +98,12 @@ export default {
supplierQuotationData:{},//
loading:false,
loadingBtn:false,
baseInfo: {
baseInfo: {
orderTitle:undefined,
contractType:undefined,
areaId:undefined,
canteenId:undefined,
dateRange:[],
canteenId:undefined,
dateRange:[],
},
//
baseRules: {
@ -130,19 +130,19 @@ export default {
canteenOptions:[],
supplierOptions:[],
stallOptions:[],
pickerOptions: {
pickerOptions: {
disabledDate(v) {
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000
}
},
materialList:[],
materialList:[],
openDialog:false,
materialTreeOptions:[],
materialTreeOptions:[],
//
queryParams: {
pageNum: 1,
pageSize: 10,
pageSize: 10,
},
//
total: 0,
@ -152,15 +152,15 @@ export default {
noMaterial:false,
};
},
created() {
if(this.$route.query.supplierQuotationData){
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) {
'$route.query.supplierQuotationData':function(newId, oldId) {
if(newId){
this.supplierQuotationData = JSON.parse(newId)
this.getContractInfo()
@ -170,36 +170,38 @@ export default {
}
},
},
methods: {
methods: {
//
jumpList() {
const obj = { path: "/foodManage/supplierFunction/supplierQuotationDetail" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); //
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); //
},
getContractInfo(){
console.log(this.supplierQuotationData)
console.log(this.supplierQuotationData)
let param = {
inquiryId:this.supplierQuotationData.inquiryId,
inquiryId:this.supplierQuotationData.inquiryId,
supplierId:this.supplierQuotationData.supplierId
}
//
getGoodsInquiryDetailInfoApi(param).then((response) => {
this.baseInfo = this.supplierQuotationData;
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
this.materialList = response.data;
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||[];
// });
});
},
// 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
@ -220,7 +222,7 @@ export default {
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>
@ -262,10 +264,10 @@ export default {
align-items: center;
cursor: pointer;
}
.dish-name:hover{
.dish-name:hover{
background-color:rgba(0, 0, 0, 0.1);
color: #4b80fd;
}
}
.dialog-center{
width: 10%;
@ -317,4 +319,4 @@ export default {
border: 1px solid #fff;
cursor: pointer;
}
</style>
</style>

View File

@ -58,7 +58,7 @@
}" @change="handleAreaChange">
</el-cascader> -->
</el-descriptions-item>
<el-descriptions-item label="邀请供应商" prop="supplierId">
<el-descriptions-item label="邀请供应商" prop="supplierId">
{{ baseInfo.supplierName }}
<!-- <el-select v-model="baseInfo.supplierId" @change="handleSupplierChange" placeholder="请选择供应商" style="width: 100%;">
<el-option v-for="item in supplierOptions"
@ -86,7 +86,9 @@
<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"></el-table-column>
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input v-model="scope.row.singlePrice" placeholder="请输入" maxlength="6" clearable @change="sumAmount" @input="(v)=>(scope.row.singlePrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
@ -289,6 +291,7 @@ export default {
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
this.supplierOptions = response.rows||[];
});
this.handleSupplierChange();
});
},
//
@ -322,11 +325,13 @@ export default {
console.log("detailparam",param)
//
getGoodsInquiryDetailInfoApi(param).then((response) => {
console.log('response',response);
console.log('responseCCCC',response);
this.materialList = response.data;
console.log("this.materialList",this.materialList);
if(this.materialList==null||this.materialList.length==0||this.materialList==undefined){
this.$modal.msgError("该供应商不在询价供应商之类!");
}else{
console.log("获取供应商报价信息");
}
this.baseInfo.arrivalTime=this.materialList[0].arrivalTime
});
@ -352,13 +357,13 @@ export default {
delMaterial(){
this.batchIds.forEach(ID=>{
let index = this.materialList.findIndex(v=>v.materialId==ID)
if(index>-1){
if(index>-1){
this.materialList.splice(index,1)
}
})
setTimeout(()=>{
this.$refs.multipleTable.clearSelection()
},300)
setTimeout(()=>{
this.$refs.multipleTable.clearSelection()
},300)
},
//
addMaterial(){
@ -443,7 +448,7 @@ export default {
obj.quoteNum = Number(obj.purNum)
obj.singlePrice = Number(obj.singlePrice)*100
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.purNum))
param.quoteAmount = param.quoteAmount+obj.totalPrice;
param.quoteAmount = param.quoteAmount+obj.totalPrice;
param.detailList.push(obj)
}
})

View File

@ -1,23 +1,11 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="日期">
<el-date-picker
v-model="dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd" style="width: 220px"
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<!-- SS -->
<el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="queryParams.areaId"
:options="treeOptions" :filterable="true" style="width: 240px;" :show-all-levels="false"
:props="{
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
@ -31,15 +19,15 @@
:label="item.supplierName"
:value="item.supplierId"
></el-option>
</el-select>
</el-form-item>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -48,7 +36,7 @@
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="供应商编号" align="center" prop="supplierCode" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120" />
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
@ -56,17 +44,17 @@
<el-table-column label="累计采购中标金额" align="center" prop="cumulativeBidAmount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.cumulativeBidAmount/100).toFixed(2) }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="产品合格率(%)" align="center" prop="deliveryPassRate" :show-overflow-tooltip="true" />
<el-table-column label="采购订单金额(元)" align="center" prop="orderAmount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="采购订单数量" align="center" prop="orderNum" :show-overflow-tooltip="true" />
<el-table-column label="最近一次采购中标日期" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="最近一次采购中标金额" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="最近一次采购中标日期" align="center" prop="lastBidDate" :show-overflow-tooltip="true"/>
<el-table-column label="最近一次采购中标金额" align="center" prop="lastBidAmount" :show-overflow-tooltip="true"/>
</el-table>
<pagination
@ -84,7 +72,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -94,9 +82,9 @@
</div>
</template>
<script>
<script>
import { systemAreaTreeApi } from "@/api/base/stall";
import { supplyStatisticsPageApi,supplierPageApi } from "@/api/foodManage/supplierManage";
import { supplyStatisticsPageApi,supplierPageApi } from "@/api/foodManage/supplierManage";
export default {
name: "",
@ -150,11 +138,11 @@ export default {
//
title: "",
//
open: false,
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
pageSize: 10,
},
//
form: {},
@ -169,27 +157,27 @@ export default {
}
};
},
created() {
created() {
this.getTreeData();
this.getList();
},
methods: {
methods: {
//
getTreeData() {
systemAreaTreeApi({}).then((response) => {
this.treeOptions = response.data;
this.treeOptions = response.data;
});
},
//-
handleAreaChange(e){
this.getSupplierData()
},
handleAreaChange(e){
this.getSupplierData()
},
/** 查询供应商下拉结构 */
getSupplierData() {
getSupplierData() {
supplierPageApi({ isPaging:1,areaIdList:[this.queryParams.areaId] }).then((response) => {
this.supplierOptions = response.rows||[];
this.$set(this.queryParams,"supplierId",null)
});
});
},
/** 搜索按钮操作 */
@ -198,7 +186,7 @@ export default {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
resetQuery() {
this.dateRange=[new Date(),new Date()]
this.queryParams = {
pageNum: 1,
@ -210,11 +198,11 @@ export default {
/** 查询列表 */
getList() {
this.loading = true;
let param = {
let param = {
"pageNum":this.queryParams.pageNum,
"pageSize":this.queryParams.pageSize,
"supplierId":this.queryParams.supplierId,
"areaIdList":[this.queryParams.areaId],
"areaIdList":[this.queryParams.areaId],
}
if(this.dateRange&&this.dateRange.length>0){
param.startTime=this.formatDate(this.dateRange[0])
@ -228,7 +216,7 @@ export default {
this.total = Number(response.total);
this.loading = false;
});
},
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
@ -254,7 +242,7 @@ export default {
reset() {
this.form = {};
this.resetForm("form");
},
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {

View File

@ -216,6 +216,7 @@
align="center"
key="userName"
prop="userName"
v-if="columns[1].visible"
:show-overflow-tooltip="true"
/>
<el-table-column
@ -223,7 +224,6 @@
align="center"
key="userCode"
prop="userCode"
v-if="columns[2].visible"
:show-overflow-tooltip="true"
/>
<el-table-column