From 0c445ac6d2a20153e5eac390555ba88f950d76b0 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 14 八月 2025 17:16:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_7004' into dev_7004

---
 src/views/qualityManagement/rawMaterialInspection/components/formDia.vue |   42 +++++++++---------------------------------
 1 files changed, 9 insertions(+), 33 deletions(-)

diff --git a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
index b61f84a..977b420 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -96,16 +96,14 @@
           </el-col>
         </el-row>
       </el-form>
-      <div style="margin-bottom: 10px;text-align: right">
-        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
-      </div>
+<!--      <div style="margin-bottom: 10px;text-align: right">-->
+<!--        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>-->
+<!--      </div>-->
       <PIMTable
           rowKey="id"
           :column="tableColumn"
           :tableData="tableData"
           :tableLoading="tableLoading"
-          :isSelection="true"
-          @selection-change="handleSelectionChange"
           height="400"
       >
         <template #slot="{ row }">
@@ -200,6 +198,7 @@
   getOptions().then((res) => {
     supplierList.value = res.data;
   });
+	form.value = {}
   getProductOptions();
   if (operationType.value === 'edit') {
     form.value = {...row}
@@ -254,6 +253,11 @@
   proxy.$refs.formRef.validate(valid => {
     if (valid) {
       form.value.inspectType = 0
+			if (operationType.value === "add") {
+				tableData.value.forEach((item) => {
+					delete item.id
+				})
+			}
       const data = {...form.value, qualityInspectParams: tableData.value}
       if (operationType.value === "add") {
         qualityInspectAdd(data).then(res => {
@@ -269,34 +273,6 @@
     }
   })
 }
-
-const handleSelectionChange = (selection) => {
-  selectedRows.value = selection;
-};
-
-const handleDelete = () => {
-  let ids = [];
-  if (selectedRows.value.length > 0) {
-    ids = selectedRows.value.map((item) => item.id);
-  } else {
-    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
-    return;
-  }
-  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
-    confirmButtonText: "纭",
-    cancelButtonText: "鍙栨秷",
-    type: "warning",
-  })
-      .then(() => {
-        qualityInspectParamDel(ids).then((res) => {
-          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-          getList();
-        });
-      })
-      .catch(() => {
-        proxy.$modal.msg("宸插彇娑�");
-      });
-};
 
 const getList = () => {
   qualityInspectDetailByProductId(currentProductId.value).then(res => {

--
Gitblit v1.9.3