From 44fbb3d85406ff6776769297e6367197070a97f1 Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Tue, 6 Jan 2026 15:08:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E7=BA=A7=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E5=A2=9E=E5=8A=A0=E5=A4=87=E6=B3=A8=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/firstOrder/components/inDialog.vue | 30 ++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/views/firstOrder/components/inDialog.vue b/src/views/firstOrder/components/inDialog.vue index 99a3f3b..e7a1d53 100644 --- a/src/views/firstOrder/components/inDialog.vue +++ b/src/views/firstOrder/components/inDialog.vue @@ -61,7 +61,7 @@ v-if="!allDisabled && sizeForm.option == 2">新增 - + @@ -109,10 +109,16 @@ + + + - + @@ -168,7 +174,7 @@ - + @@ -238,7 +244,7 @@ - + @@ -372,7 +378,7 @@ export default { batchType: '',//批量选择类型 materialsType: '', allDisabled: false, - + } }, computed: { @@ -517,6 +523,9 @@ export default { const res = await getPurchasesByIds(this.batchType); if (res.data.success) { this.sizeForm.inTableData = res.data.result; + this.sizeForm.inTableData.forEach(item => { + item.theInboundQuantity = 0 + }) this.$message.success("数据获取成功"); this.inBatchDialogVisible = false; } else { @@ -571,7 +580,7 @@ export default { this.$message.error("请选择来源"); return; } - if (this.sizeForm.option === 1) { + if (this.sizeForm.option === 1) {//批量选择 if (!this.sizeForm.quarterName) { this.$message.error("请选择采购单名称"); return; @@ -596,7 +605,7 @@ export default { return; } } - if (!row.theInboundQuantity || row.theInboundQuantity < 0) { + if ( row.theInboundQuantity < 0) { this.$message.error("本次入库数量不能为空"); return; } @@ -604,6 +613,11 @@ export default { this.$message.error("请选择类别"); return; } + if ((row.theInboundQuantity+ row.inboundQuantity > row.requiredQuantity)&& !row.remark ) { + + this.$message.error(row.materialName + "本次入库数量不能大于采购单计划数量,请填写备注原因"); + return; + } } } // 单项选择验证 @@ -718,7 +732,7 @@ export default { } ::v-deep.dialog-content { - max-height: calc(100vh - 200px); + max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 10px; }