From d81dfb829307f5fbb9f8660e19bbbe61ce07d92c Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 18 Nov 2024 10:32:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=B4=E6=8E=A5=E5=8F=91?= =?UTF-8?q?=E6=96=99=E6=95=B0=E9=87=8F=E5=8F=96=E6=A0=87=E7=AD=BE=E6=95=B0?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/record/directIssueByBatch.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/pages/issue/record/directIssueByBatch.vue b/src/pages/issue/record/directIssueByBatch.vue index 27f1ec27..82413d30 100644 --- a/src/pages/issue/record/directIssueByBatch.vue +++ b/src/pages/issue/record/directIssueByBatch.vue @@ -252,6 +252,7 @@ if (item == undefined) { var itemp = createItemInfo(balance, pack); let newDetail = createDetailInfo(balance, pack,label); + newDetail.handleQty =label.qty itemp.subList.push(newDetail); this.detailSource.push(itemp) } else { @@ -264,6 +265,7 @@ }) if (detail == undefined) { let newDetail = createDetailInfo(balance, pack,label); + newDetail.handleQty =label.qty item.subList.push(newDetail); } else { detail.handleQty =calc.add(detail.handleQty, result.label.qty) @@ -393,6 +395,20 @@ this.showErrorMessage("请选择生产线") return } + var commitHint="" + this.detailSource.forEach((item) => { + item.subList.forEach(cur=>{ + if(cur.scaned){ + if(parseFloat(cur.handleQty)>parseFloat(cur.qty)){ + commitHint += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于库存数量【${cur.qty}】\n` + } + } + }) + }) + if(commitHint){ + this.showErrorMessage(commitHint) + return; + } uni.showLoading({ title: "提交中....",