From 9cb1c3c39136c89974bc4049fca5e450e757b1be Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期五, 15 八月 2025 17:51:03 +0800
Subject: [PATCH] fix

---
 laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue |   37 ++++---------------------------------
 1 files changed, 4 insertions(+), 33 deletions(-)

diff --git a/laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue b/laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue
index 0e6b5ca..8b64ebe 100644
--- a/laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue
+++ b/laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue
@@ -361,7 +361,7 @@
           confirmSign: signatureImage, // 签字图片
           signTime: new Date().toISOString(), // 签字时间
           testMethodConfirmSheetTerms: this.testItems.map(item => ({
-            id: this.formData.id?item.id:'', // 保留原有ID(编辑时使用)
+            id: '', // 保留原有ID(编辑时使用)
             termCode: item.termCode,
             termName: item.termName,
             termType: item.termType,
@@ -406,7 +406,7 @@
           dispatchId: this.selectedScheduling.id,
           auditStatus: -1, // 草稿箱状态
           testMethodConfirmSheetTerms: this.testItems.map(item => ({
-            id: item.id, // 保留原有ID(编辑时使用)
+            id: '', // 保留原有ID(编辑时使用)
             termCode: item.termCode,
             termName: item.termName,
             termType: item.termType,
@@ -440,8 +440,8 @@
         if (res) {
           // 设置实验调度数据
           this.selectedScheduling = {
+            ...res,
             id: res.dispatchId,
-            ...res
           }
           this.tableData = [{
             // planCode: res.projectName,
@@ -477,36 +477,7 @@
 
         }
       } catch (error) {
-        this.$message.error('获取详情失败:' + (error.message || '未知错误'))
-      }
-    },
-
-    async handleEditSubmit(signatureImage) {
-      try {
-        const submitData = {
-          id: this.formData.id,
-          dispatchId: this.selectedScheduling.id,
-          auditStatus: 1,
-          confirmSign: signatureImage,
-          signTime: new Date().toISOString(),
-          testMethodConfirmSheetTerms: this.testItems.map(item => ({
-            id: item.id, // 保留原有ID
-            termCode: item.termCode,
-            termName: item.termName,
-            termType: item.termType,
-            termMethodCode: item.termMethodCode,
-            termMethod: item.termMethod,
-            sampleRequire: item.sampleRequire,
-            status: item.status,
-            testId: item.testId
-          }))
-        }
-
-        await update(submitData)
-        this.$message.success('更新成功')
-        this.$router.push('/dataManagement/confirmation-sheet')
-      } catch (error) {
-        this.$message.error('更新失败:' + (error.message || '未知错误'))
+        // this.$message.error('获取详情失败:' + (error.message || '未知错误'))
       }
     },
   },

--
Gitblit v1.7.1