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