From 7032f4f8d41134f2169191ce0ffa7f7d3fcfe696 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 10 Nov 2025 15:42:21 +0800 Subject: [PATCH] =?UTF-8?q?2025-11-10=20=E7=89=A9=E6=96=99=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E7=AE=A1=E7=90=86=E8=B4=A8=E9=87=8F=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E9=A1=B5=E7=AD=BE=E5=A2=9E=E5=8A=A0=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/qc/qcPartAttribute.vue | 60 ++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue index 708bccd..158839f 100644 --- a/src/views/modules/qc/qcPartAttribute.vue +++ b/src/views/modules/qc/qcPartAttribute.vue @@ -348,12 +348,20 @@ 新增模板 批量编辑 批量保存 + 批量删除 + + { + // 创建删除请求的Promise数组 + const deletePromises = this.selectedTemplates.map(row => { + return deletePartAttributeDetails(row) + }) + + // 并发执行所有删除请求 + Promise.all(deletePromises).then(results => { + // 检查是否所有请求都成功 + const allSuccess = results.every(({data}) => data && data.code === 0) + + if (allSuccess) { + this.$message.success('批量删除成功') + } else { + this.$message.warning('部分删除失败,请重试') + } + + // 刷新列表 + searchPartAttributeDetails(this.detailData).then(({data}) => { + this.detailList = data.rows + }) + + // 清空选中状态 + this.$refs.templateTable.clearSelection() + this.selectedTemplates = [] + }).catch(() => { + this.$message.error('批量删除失败') + // 刷新列表 + searchPartAttributeDetails(this.detailData).then(({data}) => { + this.detailList = data.rows + }) + }) + }) + }, + // ==================== 物料缺陷跟踪 ==================== // 查询物料缺陷跟踪