From f8fe9753b7216856074049e637cc857bd86929a6 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 23 Aug 2024 09:26:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E4=BB=BB=E5=8A=A1=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E7=89=A9=E6=96=99=E5=8F=91=E8=B4=A7=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=BF=85=E9=A1=BB=E4=B8=80=E8=87=B4=E6=89=8D=E8=83=BD=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deliver/coms/comDeliverDetailCard.vue | 6 +- src/pages/deliver/coms/comScanDeliverPack.vue | 1 + src/pages/deliver/job/deliverDetail.vue | 77 ++++++++++++++++--- 3 files changed, 72 insertions(+), 12 deletions(-) diff --git a/src/pages/deliver/coms/comDeliverDetailCard.vue b/src/pages/deliver/coms/comDeliverDetailCard.vue index 31da1f5c..301bf83e 100644 --- a/src/pages/deliver/coms/comDeliverDetailCard.vue +++ b/src/pages/deliver/coms/comDeliverDetailCard.vue @@ -22,10 +22,10 @@ :isShowLocation="false" :isShowPack="batch.packingNumber!=null && batch.packingNumber!=''"> - - 实际 + + 扫描 - + - + - -
- + + + - + + + -
+
+ @@ -244,6 +248,58 @@ }); } }, + + checkCount(){ + let str="" + this.detailSource.forEach(detail => { + detail.Items.forEach(item => { + var taskQty =0; + item.taskQty =calc.add(taskQty,item.qty) + var totalQty =0; + item.Locations.forEach(lco => { + lco.Batchs.forEach(batch => { + batch.Records.forEach(record => { + // if (batch.qty != record.qty) { + // var tempHandleQty = 0 + // if (record.qty) { + // tempHandleQty = record.qty + // } else { + // tempHandleQty = 0 + // } + // if (batch.qty != 0) { + // str += + // `包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n` + // } + // } + if(record){ + var hanleQty =record.qty?record.qty:0 + totalQty = calc.add(totalQty,hanleQty) + } + + }) + }) + }) + item.totalQty =totalQty + + }) + }) + + this.detailSource.forEach(detail=>{ + detail.Items.forEach(item=>{ + if(item.taskQty!=item.totalQty){ + str += `物料号【${item.itemCode}】提交数量【${item.totalQty}】与任务物料数量【${item.taskQty}】不一致\n` + } + }) + }) + + if(str){ + str = '任务明细未全部完成,请全部扫描后提交\n' + str + this.showErrorMessage(str) + } + + return str?false:true + + }, submitJob() { var params = this.setParams() @@ -254,6 +310,12 @@ this.$refs.comMessage.showConfirmMessageModal('请扫描箱码') return } + + if(!this.checkCount()){ + uni.hideLoading() + return ; + } + deliverJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { @@ -417,9 +479,6 @@ this.scanPopupGetFocus(); }, - showScanMessage(message) { - this.$refs.comMessage.showScanMessage(message); - }, closeScanMessage() { this.scanPopupGetFocus();