diff --git a/fe/PDA/pages/putaway/purchasePutaway.vue b/fe/PDA/pages/putaway/purchasePutaway.vue index 9bb8ca2ec..3df39d74d 100644 --- a/fe/PDA/pages/putaway/purchasePutaway.vue +++ b/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 { diff --git a/fe/PDA/pages/store/issueDirect.vue b/fe/PDA/pages/store/issueDirect.vue index 52086655a..da190f056 100644 --- a/fe/PDA/pages/store/issueDirect.vue +++ b/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,7 +392,12 @@ if (res.type != 5) { this.showMessage('目标库位必须是【线边库】') } else { - this.toLocation = res; + if(res.erpLocationCode!=this.formlocationErpCode){ + this.showMessage('来源库位的ERP储位【'+this.formlocationErpCode+'】与目标库位ERP储位【'+res.erpLocationCode+'】不相等') + }else{ + this.toLocation = res; + } + } } uni.hideLoading(); @@ -456,6 +480,7 @@ }); } }, + cancel() { let that = this;