Browse Source

直接发料 来源库位与目标库位的erp储位必须相同才让发料

dev_pda
李俊城 2 years ago
parent
commit
08a3a0ad4d
  1. 1
      fe/PDA/pages/putaway/purchasePutaway.vue
  2. 31
      fe/PDA/pages/store/issueDirect.vue

1
fe/PDA/pages/putaway/purchasePutaway.vue

@ -225,7 +225,6 @@
// //
let purchaseDetail = await getPurchaseDetailAsync(balanceItem.itemCode, balanceItem let purchaseDetail = await getPurchaseDetailAsync(balanceItem.itemCode, balanceItem
.packingCode); .packingCode);
debugger;
if (purchaseDetail.error) { if (purchaseDetail.error) {
that.showScanMessage(purchaseDetail.error.message); that.showScanMessage(purchaseDetail.error.message);
} else { } else {

31
fe/PDA/pages/store/issueDirect.vue

@ -115,6 +115,7 @@
toLocation: null, toLocation: null,
currentLabel: null, currentLabel: null,
reScanItem: null, // reScanItem: null, //
formlocationErpCode:""
}; };
}, },
props: { props: {
@ -238,7 +239,8 @@
this.showScanMessage('箱码【' + that.currentLabel.packingCode + '】在【原料库】【半成品库】未查询到库存信息'); this.showScanMessage('箱码【' + that.currentLabel.packingCode + '】在【原料库】【半成品库】未查询到库存信息');
} else if (res.totalCount === 1) { } else if (res.totalCount === 1) {
let balanceItem = res.items[0]; let balanceItem = res.items[0];
this.createItem(balanceItem); this.checkItem(balanceItem);
// this.createItem(balanceItem);
} else { } else {
this.$refs.balanceItems.openPopup(res.items); this.$refs.balanceItems.openPopup(res.items);
} }
@ -254,8 +256,24 @@
uni.hideLoading(); uni.hideLoading();
}); });
}, },
checkItem(balanceItem){
if(this.itemList.length==0){
this.formlocationErpCode = balanceItem.locationErpCode;
this.createItem(balanceItem)
}else {
if(this.formlocationErpCode==balanceItem.locationErpCode){
this.createItem(balanceItem);
}else {
this.showMessage('箱码【' + balanceItem.packingCode + '】的ERP储位【' + balanceItem.locationErpCode +
'】与默认的ERP储位[' + this
.formlocationErpCode +
'】不是同一ERP储位');
}
}
},
createItem(balanceItem) { createItem(balanceItem) {
let that = this; let that = this;
let label = that.currentLabel; let label = that.currentLabel;
let itemInfo = that.itemList.find(r => { let itemInfo = that.itemList.find(r => {
@ -352,7 +370,8 @@
}, },
selectedBalanceItem(balanceItem) { selectedBalanceItem(balanceItem) {
this.createItem(balanceItem); // this.createItem(balanceItem);
this.checkItem(balanceItem);
}, },
getToLocation(code) { getToLocation(code) {
@ -373,7 +392,12 @@
if (res.type != 5) { if (res.type != 5) {
this.showMessage('目标库位必须是【线边库】') this.showMessage('目标库位必须是【线边库】')
} else { } else {
this.toLocation = res; if(res.erpLocationCode!=this.formlocationErpCode){
this.showMessage('来源库位的ERP储位【'+this.formlocationErpCode+'】与目标库位ERP储位【'+res.erpLocationCode+'】不相等')
}else{
this.toLocation = res;
}
} }
} }
uni.hideLoading(); uni.hideLoading();
@ -456,6 +480,7 @@
}); });
} }
}, },
cancel() { cancel() {
let that = this; let that = this;

Loading…
Cancel
Save