From 2a094ec06c5a2a6c6d3b29052898b96e14669293 Mon Sep 17 00:00:00 2001 From: zhangdi <1104545947@qq.com> Date: Wed, 6 May 2026 16:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/batchSelectionDialog.vue | 16 ++++++++++++++++ src/views/firstOrder/outbound.vue | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/views/firstOrder/components/batchSelectionDialog.vue b/src/views/firstOrder/components/batchSelectionDialog.vue index 1ba1185..61e75b0 100644 --- a/src/views/firstOrder/components/batchSelectionDialog.vue +++ b/src/views/firstOrder/components/batchSelectionDialog.vue @@ -92,8 +92,24 @@ export default { // 监听嵌套表格的勾选事件 handleSelectionChange(selection, parentRow) { console.log('666666', selection, parentRow) + const maxAllowed = parentRow.applicationQuantity - parentRow.outboundQuantity; if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){ this.$message.error('勾选数量不能大于申请数量') + const validSelection = selection.slice(0, maxAllowed); + const removedItems = selection.slice(maxAllowed); + const selectionWithParent = validSelection.map(item => ({ + ...item, + parentMaterialId: parentRow.materialId, + parentDepartmentName: parentRow.departmentName, + applicationQuantity: parentRow.applicationQuantity, + ldDemandEndId: parentRow.ldDemandEndId, + outboundQuantity: parentRow.outboundQuantity, + })); + this.selectedRows = this.selectedRows.filter( + item => item.parentMaterialId !== parentRow.materialId + ); + this.selectedRows.push(...selectionWithParent); + return } diff --git a/src/views/firstOrder/outbound.vue b/src/views/firstOrder/outbound.vue index 6c852b5..4ffd95f 100644 --- a/src/views/firstOrder/outbound.vue +++ b/src/views/firstOrder/outbound.vue @@ -41,7 +41,7 @@ > 编辑 @@ -223,7 +223,7 @@ export default { value: 1, }, { - label: "待审批", + label: "待二级库入库", value: 2, }, {