Merge branch 'dev' of http://10.10.11.66:3000/mes/nalinv-ui into dev
This commit is contained in:
commit
3350b34d5c
@ -25,7 +25,6 @@ export function getDetailByPo(po) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function saveDocumentDetailData(obj) {
|
||||
return request({
|
||||
url: int('/registerDocumentCallErp/saveDocumentDetailData'),
|
||||
@ -33,3 +32,11 @@ export function saveDocumentDetailData(obj) {
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function findPoOrderDataByPo(query) {
|
||||
return request({
|
||||
url: nlv_wms('/zwpoorder/findPoOrderDataByPo/page'),
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
<el-table-column prop="completedQty" label="已入库数量" width="110"></el-table-column>
|
||||
<el-table-column prop="actualQuantity" label="本次到货数量" width="110">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.actualQuantity" clearable></el-input>
|
||||
<el-input v-model="scope.row.actualQuantity" type="number"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位"></el-table-column>
|
||||
@ -146,14 +146,14 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="customerNo">
|
||||
<el-input v-model="searchFormObj.customerNo" clearable>
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showPoDialogVisible = true"></i>
|
||||
<!-- <i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showPoDialogVisible = true"></i>-->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购到货单" prop="fabNo">
|
||||
<el-input v-model="searchFormObj.fabNo" clearable>
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showPoDialogVisible = true"></i>
|
||||
<el-form-item label="采购到货单" prop="documentNo">
|
||||
<el-input v-model="searchFormObj.documentNo" clearable>
|
||||
<!-- <i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showPoDialogVisible = true"></i>-->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -180,16 +180,15 @@
|
||||
highlight-current-row
|
||||
ref="mtrlConsMultipleTable"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<!-- <el-table-column type="selection" width="50"></el-table-column>-->
|
||||
<el-table-column type="index" width="60" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="采购订单号"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="采购到货单号" width="100"></el-table-column>
|
||||
<el-table-column prop="shopOrder" label="到货单状态"></el-table-column>
|
||||
<el-table-column prop="lotNo" label="供应商"></el-table-column>
|
||||
<el-table-column prop="componentItem" label="采购日期"></el-table-column>
|
||||
<el-table-column prop="componentItem" label="采购组"></el-table-column>
|
||||
<el-table-column prop="materialLot" label="登记日期"></el-table-column>
|
||||
<el-table-column prop="mainQty" label="登记人"></el-table-column>
|
||||
<el-table-column prop="po" label="采购订单号"></el-table-column>
|
||||
<el-table-column prop="documentNo" label="采购到货单号" width="120"></el-table-column>
|
||||
<el-table-column prop="state" label="到货单状态"></el-table-column>
|
||||
<el-table-column prop="customerNo" label="供应商"></el-table-column>
|
||||
<el-table-column prop="procurementDate" label="采购日期"></el-table-column>
|
||||
<el-table-column prop="purchaser" label="采购组"></el-table-column>
|
||||
<el-table-column prop="createDate" label="登记日期" width="165"></el-table-column>
|
||||
<el-table-column prop="createUser" label="登记人"></el-table-column>
|
||||
<el-table-column label="操作" width="80" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<!-- 查看 -->
|
||||
@ -237,7 +236,13 @@ import {fetchList as fetchWorkCenterList} from "@/api/mes/prd/work-center";
|
||||
import {copyJSON} from "@/util/util";
|
||||
import moment from 'moment';
|
||||
import {isBlank} from "@/util/string";
|
||||
import {getDetailByPo, getDocumentPage, getPoPage, saveDocumentDetailData} from "@/api/mes/wms-nalinv/poRegister";
|
||||
import {
|
||||
findPoOrderDataByPo,
|
||||
getDetailByPo,
|
||||
getDocumentPage,
|
||||
getPoPage,
|
||||
saveDocumentDetailData
|
||||
} from "@/api/mes/wms-nalinv/poRegister";
|
||||
|
||||
export default {
|
||||
name: 'po-register',
|
||||
@ -302,7 +307,7 @@ export default {
|
||||
site: getStore({name: 'tenantId'}),
|
||||
po: '',
|
||||
customerNo: '',
|
||||
fabNoBo: ''
|
||||
documentNo: ''
|
||||
},
|
||||
|
||||
showDocumentDialogVisible: false,
|
||||
@ -400,7 +405,7 @@ export default {
|
||||
searchFormObjAction() {
|
||||
let me = this;
|
||||
showLoading();
|
||||
getDocumentPage(Object.assign({
|
||||
findPoOrderDataByPo(Object.assign({
|
||||
current: this.page.currentPage,
|
||||
size: this.page.pageSize
|
||||
}, me.searchFormObj))
|
||||
@ -465,17 +470,17 @@ export default {
|
||||
if(srcObj.children===undefined){
|
||||
srcObj.children = [];
|
||||
rowObj.bseg = row.bseg+1;
|
||||
rowObj.batch = '';
|
||||
rowObj.actualQuantity = '';
|
||||
rowObj.productionDate = '';
|
||||
// rowObj.batch = '';
|
||||
// rowObj.actualQuantity = '';
|
||||
// rowObj.productionDate = null;
|
||||
srcObj.children.push(rowObj);
|
||||
}else{
|
||||
delete rowObj.children;
|
||||
const lengdthSon = srcObj.children.length;
|
||||
rowObj.bseg = srcObj.bseg+lengdthSon+1;
|
||||
rowObj.batch = '';
|
||||
rowObj.actualQuantity = '';
|
||||
rowObj.productionDate = '';
|
||||
// rowObj.batch = '';
|
||||
// rowObj.actualQuantity = '';
|
||||
// rowObj.productionDate = null;
|
||||
srcObj.children.push(rowObj);
|
||||
}
|
||||
}
|
||||
@ -530,61 +535,69 @@ export default {
|
||||
for (let i = 0; i < dataList.length; i++) {
|
||||
let sumQty = 0;
|
||||
const rowObj = dataList[i];
|
||||
seq = seq + 10;
|
||||
sumQty = sumQty + rowObj.actualQuantity;
|
||||
newArray.push({
|
||||
externalNo: po,
|
||||
seq: seq,
|
||||
externalSeq: rowObj.bseg,
|
||||
postingDate: me.registerFormObj.postingDate,
|
||||
knttp: rowObj.knttp,
|
||||
storagLocation: rowObj.storagLocation,
|
||||
supplierBatch: rowObj.supplierBatch,
|
||||
salesOrder: rowObj.vbeln,
|
||||
salesOrderSeq: rowObj.vbelp,
|
||||
productionDate: rowObj.productionDate,
|
||||
batch: rowObj.batch,
|
||||
item: rowObj.matnr,
|
||||
applicationsQuantity: rowObj.actualQuantity,
|
||||
unitOfMeasure: rowObj.unit
|
||||
});
|
||||
if(rowObj.children != undefined){
|
||||
for (let j = 0; j < rowObj.children.length; j++) {
|
||||
let currentChildren = rowObj.children[j];
|
||||
seq = seq + 10;
|
||||
sumQty = sumQty+currentChildren.actualQuantity
|
||||
newArray.push({
|
||||
externalNo: po,
|
||||
seq: seq,
|
||||
externalSeq: currentChildren.bseg,
|
||||
postingDate: me.registerFormObj.postingDate,
|
||||
knttp: currentChildren.knttp,
|
||||
storagLocation: currentChildren.storagLocation,
|
||||
supplierBatch: currentChildren.supplierBatch,
|
||||
salesOrder: currentChildren.vbeln,
|
||||
salesOrderSeq: currentChildren.vbelp,
|
||||
productionDate: currentChildren.productionDate,
|
||||
batch: currentChildren.batch,
|
||||
item: currentChildren.matnr,
|
||||
applicationsQuantity: currentChildren.actualQuantity,
|
||||
unitOfMeasure: currentChildren.unit
|
||||
});
|
||||
if(!isBlank(rowObj.actualQuantity)){
|
||||
seq = seq + 10;
|
||||
sumQty = sumQty + rowObj.actualQuantity;
|
||||
newArray.push({
|
||||
externalNo: po,
|
||||
seq: seq,
|
||||
externalSeq: rowObj.bseg,
|
||||
postingDate: me.registerFormObj.postingDate,
|
||||
knttp: rowObj.knttp,
|
||||
storagLocation: rowObj.storagLocation,
|
||||
supplierBatch: rowObj.supplierBatch,
|
||||
salesOrder: rowObj.vbeln,
|
||||
salesOrderSeq: rowObj.vbelp,
|
||||
productionDate: rowObj.productionDate,
|
||||
batch: rowObj.batch,
|
||||
item: rowObj.matnr,
|
||||
applicationsQuantity: rowObj.actualQuantity,
|
||||
unitOfMeasure: rowObj.unit
|
||||
});
|
||||
if(rowObj.children != undefined){
|
||||
for (let j = 0; j < rowObj.children.length; j++) {
|
||||
let currentChildren = rowObj.children[j];
|
||||
if(!isBlank(currentChildren.actualQuantity)){
|
||||
seq = seq + 10;
|
||||
sumQty = sumQty+currentChildren.actualQuantity
|
||||
newArray.push({
|
||||
externalNo: po,
|
||||
seq: seq,
|
||||
externalSeq: currentChildren.bseg,
|
||||
postingDate: me.registerFormObj.postingDate,
|
||||
knttp: currentChildren.knttp,
|
||||
storagLocation: currentChildren.storagLocation,
|
||||
supplierBatch: currentChildren.supplierBatch,
|
||||
salesOrder: currentChildren.vbeln,
|
||||
salesOrderSeq: currentChildren.vbelp,
|
||||
productionDate: currentChildren.productionDate,
|
||||
batch: currentChildren.batch,
|
||||
item: currentChildren.matnr,
|
||||
applicationsQuantity: currentChildren.actualQuantity,
|
||||
unitOfMeasure: currentChildren.unit
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(sumQty>rowObj.qty){
|
||||
this.$message.error(rowObj.matnr+ '收货数量已经大于采购数量之合');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(sumQty>rowObj.qty){
|
||||
this.$message.error(rowObj.matnr+ '收货数量已经大于采购数量之合');
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 发送给后台处理
|
||||
showLoading();
|
||||
saveDocumentDetailData(newArray).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success("执行成功");
|
||||
me.dialogRegisterVisible = false;
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
});
|
||||
if(newArray.length>0){
|
||||
// 发送给后台处理
|
||||
showLoading();
|
||||
saveDocumentDetailData(newArray).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success("执行成功");
|
||||
me.dialogRegisterVisible = false;
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
});
|
||||
}else{
|
||||
this.$message.error("本次到货数量不能为空");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user