From d97952e14bd6a6f81e92555f77c18f12d821908d Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 30 Oct 2024 16:04:02 +0800 Subject: [PATCH] =?UTF-8?q?YT-571=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=EF=BC=8C=E4=BB=BB=E5=8A=A1=E5=A6=82=E6=9E=9C=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E7=BC=96=E8=BE=91=EF=BC=8C=E5=B7=A6=E6=BB=91=E8=A6=81=E6=9C=89?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE=EF=BC=8C=E5=B9=B6=E4=B8=94?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseReceipt/job/receiptDetail.vue | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 9f86cf61..7db13922 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -307,8 +307,6 @@ if (this.scanMessage) { this.$refs.scanPopup.simulateScan(this.scanMessage); } - - } else { that.showMessage('列表数据为0'); } @@ -319,11 +317,12 @@ }) }, getScanResult(result) { - if(this.managementType == 'BY_BATCH'){ - this.getScanResultAfterBatch(result) - }else{ - this.getScanResultAfter(result) - } + this.balanceInfo = result.balance + if(this.managementType == 'BY_BATCH'){ + this.getScanResultAfterBatch(result) + }else{ + this.getScanResultAfter(result) + } }, // 包装扫码之后逻辑 getScanResultAfter(result){ @@ -457,6 +456,7 @@ item.scaned = true; itemDetail.scanDate = new Date(); item.handleQty = calc.add(item.handleQty,result.label.qty) + item.balanceQty = balanceInfo.qty; item.toLocationCode = this.toLocationCode; }) // calcHandleQty(this.detailSource); @@ -507,6 +507,7 @@ pack.labelQty = Number(result.label.qty); } } + itemDetail.balanceQty = balanceInfo.qty; calcTreeHandleQty(this.detailSource); itemDetail.packList.sort(compareDesc('scanDate')); //按扫描信息排序 this.$forceUpdate() @@ -538,6 +539,7 @@ console.log(itemDetail.handleQty) itemDetail.toLocationCode = this.toLocationCode; itemDetail.labelQty = Number(result.label.qty); + itemDetail.balanceQty = balanceInfo.qty; itemDetail.packList.forEach(pac => { pac.scaned = true pac.scanDate = new Date(); @@ -568,7 +570,10 @@ }, updateData() { + if(this.managementType == 'BY_BATCH'){ + }else{ calcTreeHandleQty(this.detailSource) + } // calcHandleQty(this.detailSource); }, @@ -710,6 +715,7 @@ var params = this.setParams(); let that = this console.log(params) + return purchaseReceiptJobSubmit(params).then(res => { if (res.data) { let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单 @@ -816,7 +822,7 @@ var subList = [] var createTime = getCurrDateTime(); var creator = this.$store.state.user.id - +console.log(8787,this.detailSource) this.detailSource.forEach(item => { item.subList.forEach(detail => { // if (!detail.scaned) { @@ -828,8 +834,7 @@ } }) detail.toLocationCode = this.toLocationCode ? this.toLocationCode :this.jobToLocationCode - var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, - detail.packingNumber, detail.batch); + var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,detail.packingNumber, detail.batch); detail.toPackingNumber = info.packingNumber; detail.packingNumber = info.packingNumber; detail.formPackingNumber = info.packingNumber;