From 6b71c5ec1f97f36d5b179d7fff28485a42951ea1 Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Fri, 9 Jan 2026 10:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E7=BA=A7=E5=87=BA=E5=BA=93=E5=92=8C?= =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E5=87=BA=E5=BA=93=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/batchSelectionDialog.vue | 10 +-- src/views/firstOrder/components/inDialog.vue | 5 +- src/views/firstOrder/components/outDialog.vue | 87 ++++++++++--------- src/views/firstOrder/outbound.vue | 18 ++-- 4 files changed, 66 insertions(+), 54 deletions(-) diff --git a/src/views/firstOrder/components/batchSelectionDialog.vue b/src/views/firstOrder/components/batchSelectionDialog.vue index f04bb33..1ba1185 100644 --- a/src/views/firstOrder/components/batchSelectionDialog.vue +++ b/src/views/firstOrder/components/batchSelectionDialog.vue @@ -10,23 +10,19 @@ @selection-change="(val) => handleSelectionChange(val, props.row)" border> - - - - @@ -96,6 +92,11 @@ export default { // 监听嵌套表格的勾选事件 handleSelectionChange(selection, parentRow) { console.log('666666', selection, parentRow) + if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){ + this.$message.error('勾选数量不能大于申请数量') + return + + } // 为勾选的数据补充父行关联信息 const selectionWithParent = selection.map(item => ({ ...item, @@ -112,7 +113,6 @@ export default { ); // 添加当前勾选的新数据 this.selectedRows.push(...selectionWithParent); - console.log('777777', selection, parentRow, this.selectedRows) // 实时传递给父组件(可选,也可以点击确认后传递) }, diff --git a/src/views/firstOrder/components/inDialog.vue b/src/views/firstOrder/components/inDialog.vue index ebf4013..9e5c3d9 100644 --- a/src/views/firstOrder/components/inDialog.vue +++ b/src/views/firstOrder/components/inDialog.vue @@ -652,9 +652,8 @@ export default { this.statisticsList = res.data.result; this.statisticsList = this.statisticsList.map((stat) => { const detail = this.sizeForm.inTableData.find( - (item) => item.materialCode === stat.materialCode + (item) => item.materialCode === stat.materialCode && item.type === stat.type ); - console.log("detail", detail,stat); return { ...stat, theInboundQuantity: detail.theInboundQuantity, //本次入库数量 @@ -670,7 +669,7 @@ export default { this.statisticsList = res.data.result; this.statisticsList = this.statisticsList.map((stat) => { const detail = this.sizeForm.singleData.find( - (item) => item.materialId === stat.materialId + (item) => item.materialId === stat.materialId&& item.type === stat.type ); return { ...stat, diff --git a/src/views/firstOrder/components/outDialog.vue b/src/views/firstOrder/components/outDialog.vue index fa85953..c851f94 100644 --- a/src/views/firstOrder/components/outDialog.vue +++ b/src/views/firstOrder/components/outDialog.vue @@ -148,7 +148,7 @@ }} - + - - - - + --> + - + - + +