Browse Source

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

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

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

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

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

@ -115,6 +115,7 @@
toLocation: null,
currentLabel: null,
reScanItem: null, //
formlocationErpCode:""
};
},
props: {
@ -238,7 +239,8 @@
this.showScanMessage('箱码【' + that.currentLabel.packingCode + '】在【原料库】【半成品库】未查询到库存信息');
} else if (res.totalCount === 1) {
let balanceItem = res.items[0];
this.createItem(balanceItem);
this.checkItem(balanceItem);
// this.createItem(balanceItem);
} else {
this.$refs.balanceItems.openPopup(res.items);
}
@ -254,8 +256,24 @@
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) {
let that = this;
let label = that.currentLabel;
let itemInfo = that.itemList.find(r => {
@ -352,7 +370,8 @@
},
selectedBalanceItem(balanceItem) {
this.createItem(balanceItem);
// this.createItem(balanceItem);
this.checkItem(balanceItem);
},
getToLocation(code) {
@ -373,8 +392,13 @@
if (res.type != 5) {
this.showMessage('目标库位必须是【线边库】')
} else {
if(res.erpLocationCode!=this.formlocationErpCode){
this.showMessage('来源库位的ERP储位【'+this.formlocationErpCode+'】与目标库位ERP储位【'+res.erpLocationCode+'】不相等')
}else{
this.toLocation = res;
}
}
}
uni.hideLoading();
}).catch(err => {
@ -457,6 +481,7 @@
}
},
cancel() {
let that = this;
showConfirmMsg('是否要清空已扫描的零件和目标库位信息?', confirm => {

Loading…
Cancel
Save