Crunchy
2025-03-17 0a26d58a3906b9e13946c7cb46fae51a0de98920
src/views/business/productOrder/index.vue
@@ -333,9 +333,21 @@
      tableData: [],
      tableLoading: false,
      column: [
        { label: '委托编号', prop: 'entrustCode', width: '160px' },
        {
          label: "委托编号",
          prop: "entrustCode",
          width: "160px",
          dataType: "link",
          linkMethod: "changeEntrustCode",
        },
        { label: '委托单位', prop: 'company' },
        { label: '样品名称', prop: 'sampleName' },
        {
          label: "样品名称",
          prop: "sampleName",
          width: "160px",
          dataType: "link",
          linkMethod: "selectAllByOne",
        },
        { label: '样品型号', prop: 'sampleModel' },
        { label: '样品数量', prop: 'sampleNum' },
        { label: '检验人', prop: 'testingName' },
@@ -517,7 +529,7 @@
      ],
      page: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      state: 0,// 0:台账页,1:检验页面,2检验页面(复核),默认为0,3数据查看
@@ -546,7 +558,7 @@
      tableDataLook: [],
      tableDataLookPage: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableDataLookColumn: [
@@ -637,7 +649,7 @@
      ],
      pageFile: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      formData: {},
@@ -674,7 +686,7 @@
      ],
      pageDelete: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      deleteDialogVisible: false,
@@ -781,6 +793,9 @@
    },
    // 打开修改委托编号弹框
    changeEntrustCode(row) {
      if (this.tabIndex !== 1) {
        return
      }
      this.entrustCodeVisible = true
      this.entrustCodeInfo = { ...row }
    },
@@ -927,15 +942,13 @@
    },
    // 详情
    selectAllByOne(row) {
      this.active = 2;
      // console.log(row);
      // //打开弹框
      // this.dialogVisible = true;
      // //row = 点击对应行值
      // //复制给formData
      // this.formData = this.HaveJson(row);
      this.currentId = row.id
      this.examine = 1
      this.$router.push({
        path: "/productOrder/add", query: {
          examine: 1,
          active: 2,
          currentId: row.id
        }
      });
    },
    // 数据查看
    handleDataLook(row) {
@@ -963,7 +976,7 @@
    closeDia () {
      this.tableDataLookPage = {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      }
      this.dataDialogVisible = false
@@ -1002,8 +1015,13 @@
    // 下载报告
    download(row) {
      let url = row.urlS ? row.urlS : row.url;
      if (url) {
        this.$download.saveAs(url, row.entrustCode);
      if(url){
        url = url.split('.')[0]+'.pdf'
        const link = document.createElement('a');
        link.href = this.javaApi + url;
        link.target = '_blank';
        document.body.appendChild(link);
        link.click();
      }
    },
    // 撤销