采购到货登记功能提交

This commit is contained in:
彭枝刚 2024-11-21 11:00:57 +08:00
parent 06a783fb90
commit b75e0b6f63

View File

@ -78,7 +78,7 @@
</template>
</el-table-column>
<el-table-column prop="bseg" width="60" fixed="left" label="序号"></el-table-column>
<el-table-column prop="matnr" label="物料"></el-table-column>
<el-table-column prop="item" label="物料"></el-table-column>
<el-table-column prop="itemDesc" label="物料名称"></el-table-column>
<el-table-column prop="batch" label="供应商批次" width="110">
<template slot-scope="scope">
@ -107,11 +107,11 @@
</el-table-column>
<el-table-column prop="unit" label="单位"></el-table-column>
<el-table-column prop="uebto" label="过量收货比例%" width="130"></el-table-column>
<el-table-column prop="untto" label="交货不足比例%" width="130"></el-table-column>
<el-table-column prop="storagLocation" label="到货仓库"></el-table-column>
<el-table-column prop="eindt" label="计划交货日期" width="110"></el-table-column>
<el-table-column prop="vbeln" label="销售订单号" width="110"></el-table-column>
<el-table-column prop="vbelp" label="销售订单行号" width="110"></el-table-column>
<el-table-column prop="matnr" label="SAP物料" width="150"></el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
@ -460,6 +460,13 @@ export default {
let me = this;
me.documentRegisterList = [];
me.dialogRegisterVisible = true;
me.registerFormObj = {
po: "",
purchaser: "",
procurementDate: "",
customerNo: "",
postingDate: ""
}
},
// 登记提交事件
@ -480,10 +487,14 @@ export default {
let srcMap = new Map();
for (let i = 0; i < dataList.length; i++) {
const rowObj = dataList[i];
if(isBlank(rowObj.actualQuantity)){
this.$message.error('物料'+rowObj.matnr+ '、第'+rowObj.bseg+'行收货数量不能为空');
if(isBlank(rowObj.item)){
this.$message.error('SAP物料'+rowObj.matnr+ '未映射MES中的物料');
return;
}
if(isBlank(rowObj.actualQuantity)){
// this.$message.error('物料'+rowObj.matnr+ '、第'+rowObj.bseg+'行收货数量不能为空');
continue;
}
let key = rowObj.matnr+'-'+rowObj.bseg;
if(rowObj.state != 'SON' && sumMap.get(key) == undefined){
sumMap.set(key,Number(rowObj.actualQuantity));
@ -500,12 +511,14 @@ export default {
postingDate: me.registerFormObj.postingDate,
knttp: rowObj.knttp,
storagLocation: rowObj.storagLocation,
supplierBatch: rowObj.supplierBatch,
vendorBatch: rowObj.supplierBatch,
salesOrder: rowObj.vbeln,
salesOrderSeq: rowObj.vbelp,
productionDate: rowObj.productionDate,
batch: rowObj.batch,
item: rowObj.matnr,
item: rowObj.item,
itemDescription: rowObj.itemDesc,
matnr: rowObj.matnr,
applicationsQuantity: rowObj.actualQuantity,
unitOfMeasure: rowObj.unit
});