zhuo
2025-03-31 2902cd8d2b36f66ea5162ae91d9a5a51912758fa
src/views/business/productOrder/index.vue
@@ -294,9 +294,28 @@
      @closePrintDialog="closePrintDialog"></print-dialog>
    <!--添加遗漏检验项弹框-->
    <add-inspection-dia v-if="addInspectionDia" ref="addInspectionDia"></add-inspection-dia>
    <!--    <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"-->
    <!--                :sonLaboratory="sonLaboratory" :state="state"-->
    <!--                :typeSource="typeSource" @goback="goback" @refreshView="refreshView"/>-->
    <!--修改样品型号弹框-->
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
               :visible.sync="dialogVisible" title="修改样品型号" width="80%">
      <el-table ref="sampleTable" :data="sampleList" border highlight-current-row
                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
                max-height="400px" tooltip-effect="dark">
        <el-table-column align="center" label="序号" type="index" width="65"></el-table-column>
        <el-table-column align="center" label="样品名称" min-width="100" prop="sample"> </el-table-column>
        <el-table-column align="center" label="样品编号" min-width="100" prop="sampleCode"></el-table-column>
        <el-table-column align="center" label="样品型号" min-width="60" prop="model">
          <template slot-scope="scope">
            <el-input v-model="scope.row.model" clearable placeholder="不填写则系统自动生成"
                      size="small"></el-input>
          </template>
        </el-table-column>
        <el-table-column align="center" label="检验标准" min-width="100" prop="standardMethodName"></el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button :loading="submitListLoad" type="primary" @click="submitList">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
@@ -307,11 +326,11 @@
import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {
  checkUpdate, delInsOrder,
  checkUpdate, delInsOrder, getSampleByOrderId,
  rawAllInsOrderExport,
  selectInsOrderParameter, selectNoProducts, selectOrderManDay,
  updateInspected,
  updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2
  updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder, upPlanUser2
} from "@/api/business/productOrder";
import { selectUserCondition } from "@/api/performance/class";
import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
@@ -349,7 +368,13 @@
          dataType: "link",
          linkMethod: "selectAllByOne",
        },
        { label: '样品型号', prop: 'sampleModel' },
        {
          label: "样品型号",
          prop: "sampleModel",
          width: "160px",
          dataType: "link",
          linkMethod: "editSampleModel",
        },
        { label: '样品数量', prop: 'sampleNum' },
        { label: '检验人', prop: 'testingName' },
        {
@@ -736,7 +761,10 @@
      multipleSelection: [],
      sonLaboratoryList: [],
      printDialog: false,
      addInspectionDia: false
      addInspectionDia: false,
      dialogVisible: false,
      submitListLoad: false,
      sampleList: []
    }
  },
  watch: {
@@ -941,16 +969,42 @@
      this.dataDialogVisible = false;
      this.upLoad = false;
    },
    // 详情
    // 点击样品名称
    selectAllByOne(row) {
      this.$router.push({
        path: "/productOrder/add", query: {
        path: "/productOrder/addView", query: {
          examine: 1,
          active: 2,
          currentId: row.id,
          tabIndex: this.tabIndex,
        }
      });
    },
    // 修改样品型号
    editSampleModel (row) {
      if (this.tabIndex !== 1) {
        return
      }
      this.dialogVisible = true
      this.getDataList(row)
    },
    getDataList(row) {
      this.dialogVisible = true
      getSampleByOrderId({insOrderId: row.id}).then(res => {
        this.sampleList = res.data
      })
    },
    // 提交样品型号修改
    submitList () {
      this.submitListLoad = true
      updateSampleModel(this.sampleList).then(res => {
        this.submitListLoad = false
        this.dialogVisible = false
        this.$message.success('修改成功')
        this.refreshTable()
      }).catch(err => {
        this.submitListLoad = false
      })
    },
    // 数据查看
    handleDataLook(row) {
@@ -1189,11 +1243,11 @@
    },
    // 下单
    playOrder(num) {
      this.$router.push({ path: "/productOrder/add", query: { examine: 0, active: num, tabIndex: this.tabIndex } });
      this.$router.push({ path: "/productOrder/addOrder", query: { examine: 0, active: num, tabIndex: this.tabIndex } });
    },
    // 审核
    handleVerify(row) {
      this.$router.push({ path: "/productOrder/add", query: { examine: 1, active: 3, currentId: row.id } });
      this.$router.push({ path: "/productOrder/addView", query: { examine: 1, active: 3, currentId: row.id } });
    },
    handleTab(i) {
      this.tabIndex = i;