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: "提交中....",