This commit is contained in:
jiask 2025-09-15 09:17:21 +08:00
parent 7107de85d0
commit eb2a2eb7c9
2 changed files with 41 additions and 48 deletions

View File

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

View File

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