From 08a3a0ad4d01cd274d50018125e1559f14f665ca Mon Sep 17 00:00:00 2001 From: "juncheng.li" Date: Wed, 14 Jun 2023 13:07:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=8F=91=E6=96=99=20?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E5=BA=93=E4=BD=8D=E4=B8=8E=E7=9B=AE=E6=A0=87?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=E7=9A=84erp=E5=82=A8=E4=BD=8D=E5=BF=85?= =?UTF-8?q?=E9=A1=BB=E7=9B=B8=E5=90=8C=E6=89=8D=E8=AE=A9=E5=8F=91=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PDA/pages/putaway/purchasePutaway.vue | 1 - fe/PDA/pages/store/issueDirect.vue | 31 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) 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;