董国庆
2025-06-25 d8d68a0aee93073b5ec3195368ca0ed1076f66a2
laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue
@@ -94,7 +94,6 @@
        planName: '', // 项目课题方案名称
        testCode: '', // 实验编号
        testName: '', // 实验名称
        sampleCode: '' // 取样单编号
      },
      selectedScheduling: null, // 添加选中的实验调度数据
      currentTestItem: null, // 当前编辑的检测项
@@ -147,7 +146,6 @@
        planName: selectedData.projectName || '',
        testCode: selectedData.experimentCode || '',
        testName: selectedData.experimentName || '',
        sampleCode: selectedData.experimentCode || '' // 使用实验编号作为取样单编号
      };
    },
@@ -349,7 +347,6 @@
        planName: this.selectedScheduling.projectName || '', // 所属项目课题方案
        testCode: this.selectedScheduling.experimentCode || '', // 实验编号
        testName: this.selectedScheduling.experimentName || '', // 实验名称
        sampleCode: this.selectedScheduling.experimentCode || '' // 取样单编号
      }
      this.confirmDialogVisible = true
    },
@@ -359,7 +356,7 @@
        const submitData = {
          dispatchId: this.selectedScheduling.id, // 实验调度ID
          auditStatus: 1, // 待确认状态
          confirmSign: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' || signatureImage, // 签字图片
          confirmSign: signatureImage, // 签字图片
          signTime: new Date().toISOString(), // 签字时间
          testMethodConfirmSheetTerms: this.testItems.map(item => ({
            id: item.id, // 保留原有ID(编辑时使用)
@@ -446,6 +443,7 @@
          // 设置实验调度数据
          this.selectedScheduling = {
            id: res.dispatchId,
            ...res
          }
          this.tableData = [{
            // planCode: res.projectName,
@@ -463,6 +461,12 @@
            status: this.getStatusText(res.status) // 状态
          }]
          // this.confirmFormData = {
          //   planName: res.projectName || '',
          //   testCode: res.experimentCode || '',
          //   testName: res.experimentName || '',
          // };
          console.log('confirmFormData confirmFormData ',this.confirmFormData)
          // 设置检测项数据
          this.testItems = res.testMethodConfirmSheetTerms.map(item => ({
@@ -478,6 +482,7 @@
            confirmSign: res.confirmSign,
            signTime: res.signTime
          }
        }
      } catch (error) {
        this.$message.error('获取详情失败:' + (error.message || '未知错误'))