fix
13404089107
2025-08-15 9cb1c3c39136c89974bc4049fca5e450e757b1be
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,
@@ -478,35 +478,6 @@
        }
      } 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 || '未知错误'))
      }
    },
  },