From 180b83685cb12b3d2255f81c966973a0ec1620c0 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 6 Nov 2024 09:31:22 +0800 Subject: [PATCH] =?UTF-8?q?YT-686=E6=89=AB=E6=8F=8F=E7=AE=B1=E7=A0=81?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E4=B8=8E=E4=BB=BB=E5=8A=A1=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E6=97=B6=EF=BC=8C=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E7=A4=BA=E5=8E=BB=E6=8E=89=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E5=8F=B7YT-687=E9=9A=94=E7=A6=BB=E8=BD=AC=E6=8A=A5=E5=BA=9F?= =?UTF-8?q?=EF=BC=8C=E8=B6=85=E5=87=BA=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=8F=90=E4=BA=A4=EF=BC=8C=E5=BA=94=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventoryMove/job/inventoryMoveDetail.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue index 3787576e..185e2220 100644 --- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -314,6 +314,7 @@ getScanResult(result,managementPrecision) { + this.managementType = managementPrecision if(managementPrecision == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY' ){ this.setDataBatch(result,managementPrecision) }else{ @@ -322,6 +323,7 @@ }, setDataBatch(result,managementPrecision){ + console.log(877,result.balance.qty) try { var packingNumber = result.label.packingNumber; var batch = result.label.batch; @@ -482,6 +484,7 @@ if (res.success) { this.managementList = res.list; this.managementType = this.managementList&& this.managementList[0]&& this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING' + console.log(11,this.managementType) } else { uni.hideLoading(); this.showErrorMessage(res.message); @@ -490,7 +493,7 @@ //允许部分提交 //扫描数量和任务数量相等,直接提交 if (this.scanCount == this.subList.length) { - if(this.managementType == 'BY_BATCH'){ + if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){ this.checkCountBatch(); }else{ this.checkCount(); @@ -545,6 +548,7 @@ checkCountBatch(){ // 提交的数量和任务数量不一致提示 let str = '' + let str1 = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { @@ -556,9 +560,19 @@ } str += `提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` + if( cur.handleQty > cur.balance.balanceQty){ + console.log(2333,cur.handleQty) + console.log(2333,cur.balance.balanceQty) + str1 += + `提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}】` + } } }) }) + if(str1){ + this.$refs.comMessage.showConfirmWarningModal(str1) + return + } if (str) { str = '任务明细未全部完成,是否提交?\n' + str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { @@ -577,6 +591,7 @@ }); var params = this.setParams() console.log("提交" + JSON.stringify(params)) + return inventoryMoveSubmit(params).then(res => { uni.hideLoading() if (res.data) {