chenrui
2025-02-26 c34fe6f588045e527bccfd4c67b9764b2a141ea2
src/views/business/materialOrder/index.vue
@@ -2,19 +2,23 @@
  <div class="app-container">
    <div>
      <div class="search">
        <el-form :model="entity" ref="entity" size="small" :inline="true"><el-form-item label="批号" prop="updateBatchNo">
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <el-form-item label="批号" prop="updateBatchNo">
            <el-input v-model="entity.updateBatchNo" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="委托编号" prop="entrustCode">
          </el-form-item>
          <el-form-item label="委托编号" prop="entrustCode">
            <el-input v-model="entity.entrustCode" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="零件号" prop="partNo">
          </el-form-item>
          <el-form-item label="零件号" prop="partNo">
            <el-input v-model="entity.partNo" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="零件描述" prop="partDesc">
          </el-form-item>
          <el-form-item label="零件描述" prop="partDesc">
            <el-input v-model="entity.partDesc" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
@@ -273,10 +277,22 @@
      tableLoading1: false,
      column1: [
        { label: '批号', prop: 'updateBatchNo' },
        { label: '委托编号', prop: 'entrustCode' },
        {
          label: '委托编号',
          prop: 'entrustCode',
          width: "160px",
          dataType: "link",
          linkMethod: "changeEntrustCode",
        },
        { label: '零件号', prop: 'partNo' },
        { label: '零件描述', prop: 'partDesc' },
        { label: '样品名称', prop: 'sampleName' },
        {
          label: '样品名称',
          prop: 'sampleName',
          width: "160px",
          dataType: "link",
          linkMethod: "selectAllByOne",
        },
        { label: '样品型号', prop: 'sampleModel' },
        { label: '检验人', prop: 'userName' },
        { label: '下发时间', prop: 'sendTime' },
@@ -898,10 +914,16 @@
    },
    // 季度检验下单
    playOrderSec(row) {
      if (typeof row !== "object") {
        this.$router.push({ path: "/materialOrder/customsInspection", query: { active: row } });
      this.$router.push({ path: "/materialOrder/customsInspection", query: { orderType: 1, customsInspection: row, active: 1 } });
    },
    // 点击样品名称查看详情
    selectAllByOne(row) {
      if (row.isCopper == 1) {
        this.currentId = row.enterOrderId
        this.$router.push({ path: "/materialOrder/copperOrder", query: { customsInspection: row, active: 2, currentId: this.currentId } });
      } else {
        this.$router.push({ path: "/materialOrder/customsInspection", query: { orderType: 1, customsInspection: row, active: 1 } });
        this.currentId = row.insOrderId
        this.$router.push({ path: "/materialOrder/customsInspection", query: { customsInspection: row, active: 2, currentId: this.currentId } });
      }
    },
    // 打开免检弹框
@@ -1007,15 +1029,6 @@
        }).catch(() => { })
      }
    },
    // 点击样品名称查看详情
    selectAllByOne(row) {
      this.currentId = row.insOrderId
      if (row.isCopper == 1) {
        this.currentId = row.enterOrderId
      }
      this.customsInspection = row
      this.active = 2;
    },
    // 数据查看
    handleDataLook(row) {
      this.dataLookInfo = row
@@ -1060,17 +1073,11 @@
      let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, }
      delete entity.orderBy
      this.outLoading = true
      rawAllExport({
        entity: entity
      }, { responseType: "blob" }).then(res => {
      rawAllExport({entity: entity}).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/octet-stream' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '原材料检测信息导出.xlsx';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, '原材料检测信息导出.xlsx');
      })
    },
    // 提交修改委托编号信息
@@ -1085,6 +1092,7 @@
            this.entrustCodeVisible = false
            this.$message.success('修改成功')
          }
          this.refreshTable()
          this.submitCodeLoading = false
        })
      } catch (e) {