feat(order): 添加订单委托要求字段并优化界面流程
- 新增分包内容、样品处置、结果评价、报告交付方式等委托要求字段
- 添加分包单位信息、报告寄送地址、收件人电话等关联信息录入功能
- 更新订单状态标签,新增作废状态和全部状态页签
- 调整报告准备页面审批流程,防止审核人和批准人为同一人
已添加1个文件
已修改9个文件
1292 ■■■■■ 文件已修改
src/api/business/sampleReceipt.js 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/demand/index.vue 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/disposal/sampleReceipt/index.vue 514 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/index.vue 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionView/index.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/addOrder.vue 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/addView.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/index.vue 276 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/reportPreparation/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/sampleReceipt.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
// æ ·å“æŽ¥æ”¶é¡µé¢ç›¸å…³æŽ¥å£
import request from '@/utils/request'
// æ ·å“æŽ¥æ”¶åˆ†é¡µæŸ¥è¯¢
export function pageSampleReceipt(query) {
  return request({
    url: '/insSampleReceipt/page',
    method: 'get',
    params: query
  })
}
// æ ·å“æŽ¥æ”¶è¯¦æƒ…
export function getSampleReceipt(id) {
  return request({
    url: '/insSampleReceipt/' + id,
    method: 'get'
  })
}
// æäº¤æ£€éªŒ
export function submitSampleReceipt(data) {
  return request({
    url: '/insSampleReceipt/submit',
    method: 'post',
    data: data
  })
}
// æ‹’收样品
export function rejectSampleReceipt(data) {
  return request({
    url: '/insSampleReceipt/reject',
    method: 'post',
    data: data
  })
}
// æ ·å“æŽ¥æ”¶å¯¼å‡º
export function exportSampleReceipt(query) {
  return request({
    url: '/insSampleReceipt/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
src/views/CNAS/process/demand/index.vue
@@ -24,9 +24,6 @@
        </el-form-item>
      </el-form>
    </div>
    <div style="text-align: right; margin-bottom: 10px">
      <el-button size="small" type="primary" @click="goAdd">新增</el-button>
    </div>
    <div class="table">
      <el-table v-loading="tableListLoading" :data="tableList"
                height="630" border :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
@@ -72,32 +69,6 @@
        @current-change="handleCurrentChange1">
      </el-pagination>
    </div>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="orderRowsVisible"
      title="新增检验任务单" width="1000px">
      <div style="display: flex; align-items: center;margin-bottom: 10px">
        <span style="width: 80px">委托编号:</span>
        <el-input v-model="entity.entrustCode" clearable size="small"
          style="width: 300px;margin-right: 10px"></el-input>
        <el-button size="small" type="primary" @click="searchTableData">查询</el-button>
        <el-button size="small" @click="refreshTableData">重 ç½®</el-button>
      </div>
      <el-table v-loading="tableLoading" :data="tableData"
                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
                height="550" style="width: 100%">
        <el-table-column align="center" label="序号" type="index" width="60"></el-table-column>
        <el-table-column label="委托编号" prop="entrustCode"></el-table-column>
        <el-table-column label="样品名称" prop="sample"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button align="center" size="mini" type="text" @click="goAddOrder(scope.row)">新增委托单</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]" :total="total"
        layout="->,total, sizes, prev, pager, next" style="margin-top: 10px" background @size-change="handleSizeChange"
        @current-change="handleCurrentChange">
      </el-pagination>
    </el-dialog>
    <el-dialog :class="{ downPdf: title == '下载' }" :close-on-click-modal="false" :close-on-press-escape="false"
      :modal="title != '下载'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px">
      <div style="max-height: 75vh;overflow-y: auto;">
@@ -386,8 +357,6 @@
      </div>
      <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer">
        <el-button @click="detailDialogVisible = false">取 æ¶ˆ</el-button>
        <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">ç¡®
          å®š</el-button>
        <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">ç¡®
          å®š</el-button>
      </span>
@@ -406,8 +375,8 @@
<script>
import {
  addInspectionOrder, delInspectionOrder, exportInspectionOrder,
  getInsOrderOnInspection, getInspectionOrderByInsOderId, getInspectionOrderOne,
  delInspectionOrder, exportInspectionOrder,
  getInspectionOrderOne,
  pageInspectionOrder,
  updateInspectionOrder
} from "@/api/cnas/process/demand/demand";
@@ -449,7 +418,6 @@
        },
      ],
      operationType: '',
      orderRowsVisible: false,
      tableList: [],
      tableListLoading: false,
      pages: {
@@ -528,47 +496,6 @@
      }
      this.refreshTable()
    },
    // æ‰“开新增弹框
    goAdd() {
      this.operationType = 'add'
      this.title = '新增检验委托单';
      this.orderRowsVisible = true
      this.searchTableData()
    },
    // æŸ¥è¯¢å¯æ–°å¢žçš„æ£€éªŒå•
    searchTableData() {
      this.tableLoading = true
      getInsOrderOnInspection({
        ...this.tableSearch,
        ...this.entity
      }).then(res => {
        this.tableLoading = false
        this.tableData = res.data.records
        this.total = res.data.total
      }).catch(err => {
        this.tableLoading = false
      })
    },
    // é‡ç½®æ£€éªŒå•列表
    refreshTableData() {
      this.entity = {
        entrustCode: ''
      }
      this.tableSearch = {
        current: 1,
        size: 20,
      }
      this.searchTableData()
    },
    // æ£€éªŒå•列表分页
    handleSizeChange(val) {
      this.tableSearch.size = val
      this.searchTableData();
    },
    handleCurrentChange(val) {
      this.tableSearch.current = val
      this.searchTableData();
    },
    // åˆ—表分页
    handleSizeChange1(val) {
      this.pages.size = val
@@ -578,19 +505,6 @@
      this.pages.current = val
      this.refreshTable();
    },
    // æäº¤æ–°å¢ž
    handleAdd() {
      this.buttonLoading = true
      addInspectionOrder(this.currentInfo).then(res => {
        this.buttonLoading = false
        this.$message.success('新增成功')
        this.detailDialogVisible = false
        this.orderRowsVisible = false
        this.refreshTable()
      }).catch(err => {
        this.buttonLoading = false
      })
    },
    // æäº¤ä¿®æ”¹
    handleEdit() {
      this.buttonLoading = true
@@ -598,20 +512,9 @@
        this.buttonLoading = false
        this.$message.success('新增成功')
        this.detailDialogVisible = false
        this.orderRowsVisible = false
        this.refreshTable()
      }).catch(err => {
        this.buttonLoading = false
      })
    },
    // æŸ¥è¯¢éœ€è¦æ–°å¢žçš„委托单详情
    goAddOrder(row) {
      getInspectionOrderByInsOderId({ insOrderId: row.id }).then(res => {
        this.currentInfo = res.data
        this.title = '新增检验委托单';
        this.detailDialogVisible = true
      }).catch(err => {
        console.log('err----', err)
      })
    },
    // æ‰“开编辑弹框
src/views/CNAS/process/disposal/sampleReceipt/index.vue
@@ -1,119 +1,102 @@
<template>
  <div class="capacity-scope">
    <div style="display: flex;justify-content: space-between;align-items: flex-start">
      <el-form :model="queryParams0" ref="queryParams0" size="small" :inline="true">
        <el-form-item label="收样日期" prop="receiveDate">
          <el-date-picker v-model="queryParams0.receiveDate" type="date" placeholder="选择日期" format="yyyy-MM-dd"
                          value-format="yyyy-MM-dd" size="small" @change="refreshTable()">
          </el-date-picker>
  <div class="app-container">
    <div class="search">
      <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
        <el-form-item label="委托编号" prop="entrustCode">
          <el-input v-model="queryParams.entrustCode" clearable placeholder="请输入" size="small"
                    @keyup.enter.native="refreshTable"></el-input>
        </el-form-item>
        <el-form-item label="样品编号" prop="sampleCode">
          <el-input v-model="queryParams.sampleCode" clearable placeholder="请输入" size="small"
                    @keyup.enter.native="refreshTable"></el-input>
        </el-form-item>
        <el-form-item label="样品名称" prop="sampleName">
          <el-input v-model="queryParams.sampleName" clearable placeholder="请输入" size="small"
                    @keyup.enter.native="refreshTable"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" size="mini" @click="refreshTable">查询</el-button>
          <el-button size="mini" type="primary" @click="refreshTable">查询</el-button>
          <el-button size="mini" @click="refresh">重置</el-button>
        </el-form-item>
      </el-form>
      <el-button size="small" @click="handleDown0">导出</el-button>
    </div>
    <div class="table">
      <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading0"
                  key="tableData0"
                  :height="'calc(100vh - 240px)'" :page="page0" @pagination="pagination0">
        <div slot="action" slot-scope="scope">
          <el-button type="text" @click="handleAdd(scope.row)">编辑</el-button>
          <el-button type="text" @click="delRow(scope.row)">
            <span style="color: #F56C6C">删除</span>
          </el-button>
    <div class="container">
      <div class="table-tab">
        <div>
          <ul class="tab">
            <li :class="{ active: tabIndex === 0 }" @click="handleTab(0)">待接收</li>
            <li :class="{ active: tabIndex === 1 }" @click="handleTab(1)">已提交</li>
            <li :class="{ active: tabIndex === 2 }" @click="handleTab(2)">已拒收</li>
            <li :class="{ active: tabIndex === 3 }" @click="handleTab(3)">已取消</li>
            <li :class="{ active: tabIndex === 4 }" @click="handleTab(4)">全部</li>
          </ul>
        </div>
        <div>
          <el-button size="small" @click="handleExport">导出</el-button>
        </div>
      </div>
      <div class="table">
        <lims-table :tableData="tableData" :column="column" @pagination="pagination"
                    :height="'calc(100vh - 280px)'" :key="upIndex" :page="page" :tableLoading="tableLoading">
          <template slot="inspectionItem" slot-scope="scope">
            <div style="white-space: pre-line; text-align: left; padding: 4px 0;">{{ scope.row.inspectionItem }}</div>
          </template>
          <template slot="remark" slot-scope="scope">
            <span>{{ scope.row.status === 2 && scope.row.rejectRemark ? scope.row.rejectRemark : scope.row.remark }}</span>
          </template>
          <template slot="action" slot-scope="scope">
            <el-button v-if="scope.row.status === 0" type="text" @click="handleEdit(scope.row)">编辑</el-button>
            <el-button v-else type="text" @click="handleView(scope.row)">查看</el-button>
          </template>
      </lims-table>
    </div>
    <!-- æ–°å¢žæ ·å“ -->
    <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px">
      <el-row>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">收样日期:</div>
            <div class="search_input">
              <el-date-picker v-model="addInfo.receiveDate" type="date" size="small" placeholder="选择日期" format="yyyy-MM-dd"
                              value-format="yyyy-MM-dd" style="width: 100%;">
              </el-date-picker>
            </div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">样品名称:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                                                v-model="addInfo.sampleName"></el-input></div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">样品编号:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                                                v-model="addInfo.sampleCode"></el-input></div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">数量:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                                                v-model="addInfo.num"></el-input>
            </div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">来样单位:</div>
            <div class="search_input">
              <el-select v-model="addInfo.sampleSupplier" size="small">
                <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList"
                           :key="item.id"></el-option>
    <!-- ç¼–辑/查看弹窗 -->
    <el-dialog :title="isEdit ? '编辑' : '查看'" :visible.sync="editDialogVisible" width="500px"
               :close-on-click-modal="false">
      <el-form ref="editForm" :model="currentInfo" label-width="110px" size="small">
        <el-form-item label="样品名称">
          <el-input v-model="currentInfo.sampleName" disabled></el-input>
        </el-form-item>
        <el-form-item label="样品编号">
          <el-input v-model="currentInfo.sampleCode" disabled></el-input>
        </el-form-item>
        <el-form-item label="委托编号">
          <el-input v-model="currentInfo.entrustCode" disabled></el-input>
        </el-form-item>
        <el-form-item label="方法标准">
          <el-input v-model="currentInfo.methodStandard" disabled></el-input>
        </el-form-item>
        <el-form-item label="检测项目">
          <el-input v-model="currentInfo.inspectionItem" type="textarea" :rows="3" disabled></el-input>
        </el-form-item>
        <el-form-item label="主检验人" required>
          <el-select v-model="currentInfo.mainInspectorId" clearable filterable placeholder="请选择" size="small"
                     style="width: 100%;" :disabled="!isEdit">
            <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value"></el-option>
              </el-select>
            </div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">留样日期:</div>
            <div class="search_input">
              <el-date-picker v-model="addInfo.leaveDate" type="date" size="small" placeholder="选择日期" format="yyyy-MM-dd"
                              value-format="yyyy-MM-dd" style="width: 100%;">
              </el-date-picker>
            </div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">样品状态:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                                                v-model="addInfo.sampleState"></el-input></div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
        <div class="search_thing">
          <div class="search_label">处理日期:</div>
          <div class="search_input">
            <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="选择日期" format="yyyy-MM-dd"
                            value-format="yyyy-MM-dd" style="width: 100%;">
            </el-date-picker>
          </div>
        </div>
      </el-col>
      </el-row>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addDialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="submitAdd" :loading="addLoading">ç¡® å®š</el-button>
        <el-button @click="editDialogVisible = false">取 æ¶ˆ</el-button>
        <el-button v-if="isEdit" type="danger" :loading="rejectLoading" @click="openReject">拒收样品</el-button>
        <el-button v-if="isEdit" type="primary" :loading="submitLoading" @click="handleSubmit">提交检验</el-button>
      </span>
    </el-dialog>
    <!-- è¯¦æƒ…/下载/审核/批准 -->
    <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == '下载' }"
               :modal="title0 != '下载'" top="5vh">
      <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}"
                   style="max-height: 70vh;overflow-y: auto;" />
      <span slot="footer" class="dialog-footer" v-if="title0 == '审核' || title0 == '批准'">
        <el-button @click="submitCheck('不通过')" :loading="noCheckLoading">不通过</el-button>
        <el-button type="primary" @click="submitCheck('通过')" :loading="checkLoading">通 è¿‡</el-button>
    <!-- æ‹’收备注弹窗 -->
    <el-dialog title="拒收样品" :visible.sync="rejectDialogVisible" width="400px" :close-on-click-modal="false">
      <el-form ref="rejectForm" :model="rejectInfo" label-width="90px" size="small">
        <el-form-item label="拒收备注" prop="remark" required>
          <el-input v-model="rejectInfo.remark" type="textarea" :rows="3" maxlength="500" show-word-limit
                    placeholder="请输入拒收备注"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="rejectDialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="danger" :loading="rejectLoading" @click="handleReject">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
@@ -121,220 +104,223 @@
<script>
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from "@/components/Preview/filePreview.vue";
import { selectCustomPageList } from "@/api/system/customer";
import { selectUserCondition } from "@/api/performance/class";
import {
  pageProcessSample,
  delProcessSample,
  addProcessSample,
  exportProcessSample
} from "@/api/cnas/process/sampleDisposal";
  pageSampleReceipt,
  submitSampleReceipt,
  rejectSampleReceipt,
  exportSampleReceipt
} from "@/api/business/sampleReceipt";
export default {
  name: 'SampleReceipt',
  components: {
    limsTable,
    filePreview,
  },
  data() {
    return {
      activeName: '填写',
      title: '新增',
      addDialogVisible: false,
      addLoading: false,
      outLoading: false,
      editDialogVisible: false,
      lookDialogVisible: false,
      title0: '查看',
      noCheckLoading: false,
      checkLoading: false,
      // åŽ†å²åˆ—è¡¨
      addInfo: {},//新增样品
      customPageList: [],
      currentInfo: {
        arr: []
      },//查看的详情
      queryParams0: {
        receiveDate: ''
      },
      tableLoading0: false,
      tableData0: [],
      column0: [
        {
          label: "收样日期",
          prop: "receiveDate",
        },
        {
          label: "样品编号",
          prop: "sampleCode",
        },
        {
          label: "样品名称",
          prop: "sampleName",
        },
        {
          label: "样品数量",
          prop: "num",
        },
        {
          label: "来样单位",
          prop: "sampleSupplier",
        },
        {
          label: "留样日期",
          prop: "leaveDate",
        },
        {
          label: "样品状态",
          prop: "sampleState",
        },
        {
          label: "退样签收/处理日期",
          prop: "dealTime",
        },
        {
          dataType: "slot",
          slot: "action",
          label: "操作",
        }
      tabIndex: 0,
      tabList: [
        { label: '待接收', value: 0 },
        { label: '已提交', value: 1 },
        { label: '已拒收', value: 2 },
        { label: '已取消', value: 3 },
        { label: '全部', value: null },
      ],
      page0: {
      queryParams: {
        entrustCode: '',
        sampleCode: '',
        sampleName: '',
      },
      tableLoading: false,
      upIndex: 0,
      tableData: [],
      page: {
        total: 0,
        size: 10,
        current: 0,
        current: 1,
      },
      column: [
        { label: '样品名称', prop: 'sampleName' },
        { label: '样品编号', prop: 'sampleCode' },
        { label: '检测项目', prop: 'inspectionItem', dataType: 'slot', slot: 'inspectionItem', width: '220px' },
        { label: '委托编号', prop: 'entrustCode' },
        { label: '方法标准', prop: 'methodStandard' },
        { label: '主检人签字', prop: 'mainInspectorName' },
        { label: '备注', prop: 'remark', dataType: 'slot', slot: 'remark', width: '180px' },
        { label: '操作', dataType: 'slot', slot: 'action', width: '120px' },
      ],
      personList: [],
      editDialogVisible: false,
      rejectDialogVisible: false,
      isEdit: true,
      currentInfo: {},
      rejectInfo: {},
      submitLoading: false,
      rejectLoading: false,
    };
  },
  mounted() {
    this.getList0()
    this.getPersonList();
    this.getList();
  },
  methods: {
    // èŽ·å–é€æ ·å•ä½åˆ—è¡¨
    getCustomPageList() {
      selectCustomPageList({
        current: -1,
        size: -1
      }).then(res => {
        this.customPageList = res.data.records
    getPersonList() {
      selectUserCondition({ type: 1 }).then(res => {
        this.personList = (res.data || []).map(a => ({ label: a.name, value: a.id }));
      }).catch(err => { });
    },
    handleTab(i) {
      this.tabIndex = i;
      this.refreshTable();
    },
    refresh() {
      this.queryParams0 = {};
      this.page0.current = 1;
      this.getList0();
      this.queryParams = { entrustCode: '', sampleCode: '', sampleName: '' };
      this.page.current = 1;
      this.getList();
    },
    refreshTable() {
      this.page0.current = 1;
      this.getList0();
      this.page.current = 1;
      this.getList();
    },
    // æŸ¥è¯¢è¡¨æ ¼æ•°æ®
    getList0() {
      this.tableLoading0 = true;
      let param = { ...this.queryParams0, ...this.page0 };
    getList() {
      this.tableLoading = true;
      let param = { ...this.queryParams, ...this.page };
      let status = this.tabList[this.tabIndex].value;
      if (status !== null && status !== undefined) {
        param.status = status;
      }
      delete param.total;
      pageProcessSample({ ...param })
        .then((res) => {
          this.tableLoading0 = false;
      pageSampleReceipt(param).then(res => {
        this.tableLoading = false;
          if (res.code === 200) {
            this.tableData0 = res.data.records;
            this.page0.total = res.data.total;
          this.tableData = res.data.records;
          this.page.total = res.data.total;
          this.upIndex++;
          }
        })
        .catch((err) => {
          this.tableLoading0 = false;
      }).catch(err => {
        this.tableLoading = false;
        });
    },
    pagination0({ page, limit }) {
      this.page0.current = page;
      this.page0.size = limit;
      this.getList0();
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getList();
    },
    // æ‰“开编辑弹框
    handleAdd(row) {
      this.addInfo = this.HaveJson(row)
      this.title = '编辑'
      this.addDialogVisible = true
      this.getCustomPageList()
    handleEdit(row) {
      this.isEdit = true;
      this.currentInfo = { ...row, mainInspectorId: row.mainInspectorId || null };
      this.editDialogVisible = true;
    },
    delRow(row) {
      this.$confirm("是否删除该条数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          delProcessSample({ id: row.id }).then(res => {
            if (res.code == 200) {
              this.$message.success("删除成功");
              this.refreshTable();
    handleView(row) {
      this.isEdit = false;
      this.currentInfo = { ...row, mainInspectorId: row.mainInspectorId || null };
      this.editDialogVisible = true;
    },
    handleSubmit() {
      if (!this.currentInfo.mainInspectorId) {
        this.$message.error('请选择主检验人');
        return;
            }
          }).catch(err => { });
        })
        .catch(() => { });
    },
    // æäº¤æ–°å¢ž
    submitAdd() {
      // ç¼–辑
      this.addLoading = true
      addProcessSample({
        ...this.addInfo
      this.$confirm('确认将该样品提交至检验任务?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      }).then(() => {
        this.submitLoading = true;
        submitSampleReceipt({
          receiptId: this.currentInfo.receiptId,
          mainInspectorId: this.currentInfo.mainInspectorId,
      }).then(res => {
        this.addLoading = false
        this.addDialogVisible = false
        this.$message({
          type: 'success',
          message: '编辑成功!'
        });
        this.page0.current = 1;
          this.submitLoading = false;
          this.editDialogVisible = false;
          this.$message.success('提交成功');
        this.refreshTable();
      }).catch(err => { });
        }).catch(err => {
          this.submitLoading = false;
        });
      }).catch(() => { });
    },
    // å¯¼å‡ºè¯¦æƒ…
    handleDown0() {
      exportProcessSample({ receiveDate: this.queryParams0.receiveDate }).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '样品接收' + '.docx');
      })
    openReject() {
      this.rejectInfo = { remark: '' };
      this.rejectDialogVisible = true;
    },
    handleReject() {
      if (!this.rejectInfo.remark || !this.rejectInfo.remark.trim()) {
        this.$message.error('请填写拒收备注');
        return;
      }
      this.$confirm('拒收后委托将作废且不能进入检验任务,是否继续?', '警告', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      }).then(() => {
        this.rejectLoading = true;
        rejectSampleReceipt({
          receiptId: this.currentInfo.receiptId,
          remark: this.rejectInfo.remark,
        }).then(res => {
          this.rejectLoading = false;
          this.rejectDialogVisible = false;
          this.editDialogVisible = false;
          this.$message.success('拒收成功');
          this.refreshTable();
        }).catch(err => {
          this.rejectLoading = false;
        });
      }).catch(() => { });
    },
    handleExport() {
      let param = { ...this.queryParams };
      let status = this.tabList[this.tabIndex].value;
      if (status !== null && status !== undefined) {
        param.status = status;
      }
      exportSampleReceipt(param).then(res => {
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '样品接收导出.xlsx');
      }).catch(err => {
        console.log('err---', err);
      });
    },
  },
}
</script>
<style scoped>
.search_thing {
  width: 350px;
.table-tab {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.search_label {
  width: 110px;
.tab {
  list-style-type: none;
  display: flex;
  margin-bottom: 12px;
  margin-top: 0;
  padding-left: 0;
}
.tab li {
  line-height: 24px;
  padding: 6px 14px;
  font-size: 14px;
  text-align: right;
  color: #333333;
  border: 1px solid #EEEEEE;
  cursor: pointer;
}
.search_input {
  width: calc(100% - 110px);
.tab li:nth-child(1) {
  border-radius: 8px 0 0 8px;
}
.downPdf {
  opacity: 0 !important;
.tab li:nth-child(5) {
  border-radius: 0 8px 8px 0;
}
.tables td {
  height: 40px;
  width: 100px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
}
.user-info .el-button {
  margin: 0;
}
>>>.el-tabs__content {
  height: 100%;
.tab li.active {
  border-color: #3A7BFA;
  color: #3A7BFA;
}
</style>
src/views/business/inspectionTask/index.vue
@@ -49,7 +49,6 @@
          :rowClassName="rowClassName" :height="'calc(100vh - 300px)'" @pagination="pagination"
          key="tableData0">
          <div slot="action" slot-scope="scope">
            <el-button size="small" type="text" @click="handleDataLook(scope.row)">数据查看</el-button>
            <el-button type="text" size="small"
                       :disabled="(scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5) && checkPermi(['update:product:onPlan'])"
                       @click="editInspection(scope.row)">修改检验值</el-button>
@@ -134,22 +133,6 @@
        <el-button @click="connectVisible = false">取 æ¶ˆ</el-button>
        <el-button :loading="loading" type="primary" @click="confirmConnect">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :visible.sync="dataDialogVisible" title="数据查看" width="80%">
      <div v-if="dataDialogVisible" style="height: 74vh; overflow-y: auto">
        <div>
          <el-form :model="entity" :inline="true">
            <el-form-item label="检验项" prop="outputWorkTime">
              <el-input v-model="entity.inspectionItem" clearable size="small"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button size="small" type="primary" @click="getLookList">查询</el-button>
            </el-form-item>
          </el-form>
        </div>
        <lims-table :tableData="lookTableData" :column="lookColumn" :page="lookPage" :tableLoading="lookTableLoading"
          :height="'60vh'" @pagination="lookPagination" key="tableData1" :key="upIndex"></lims-table>
      </div>
    </el-dialog>
    <el-dialog :visible.sync="bindDialogVisible" title="检验项绑定" width="600px">
      <div slot="title" style="
@@ -241,7 +224,6 @@
  bindingProductTreeByProductId,
  delProductTreeByProductId,
  selectInsOrderPlanList,
  selectSampleAndProductByOrderId,
} from "@/api/business/inspectionTask.js";
import { treeDevice } from "@/api/cnas/resourceDemand/device.js";
import { mapGetters } from "vuex";
@@ -291,7 +273,6 @@
      ],
      active: 1,
      tabIndex: 0,
      dataDialogVisible: false,
      planTotal: 0,
      insStateList: [],
      state: 0, // 0:台账页,1:检验页面,2检验页面(复核),默认为0,3数据查看
@@ -320,7 +301,6 @@
      retestInfo: [],
      isCopper: null,
      bindCurrentInfo: {},
      lookInfo: {},
      orderTypeList: [
        {
          value: "Customer-ordered test",
@@ -466,88 +446,6 @@
          type: "",
        },
      ],
      // æ•°æ®æŸ¥çœ‹ç›¸å…³å­—段---开始
      entity: {
        inspectionItem: "",
      },
      lookTableData: [],
      lookColumn: [
        {
          label: "样品编号",
          prop: "sampleCode",
          width: "140px",
          mergeCol: true, //合并列
        },
        { label: "样品名称", prop: "sample", width: "140px", mergeCol: true },
        { label: "检验项分类", prop: "inspectionItemClass" },
        { label: "检验项", prop: "inspectionItem", width: "140px" },
        { label: "检验子项", prop: "inspectionItemSubclass" },
        { label: "单位", prop: "unit" },
        { label: "样品型号", prop: "model", mergeCol: true },
        { label: "条件", prop: "radius" },
        { label: "电缆标识", prop: "cableTag" },
        { label: "试验要求", prop: "tell" },
        { label: "检验结果", prop: "lastValue" },
        {
          label: "结果判定",
          prop: "insResult",
          dataType: "tag",
          formatData: (params) => {
            let obj = this.insResultList.find((m) => m.value == params)
            if (obj) {
              return this.insResultList.find((m) => m.value == params).label;
            } else {
              return null
            }
          },
          formatType: (params) => {
            let obj = this.insResultList.find((m) => m.value == params)
            if (obj) {
              return this.insResultList.find((m) => m.value == params).type;
            } else {
              return null
            }
          },
        },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "不合格复测查看",
              type: "text",
              clickFun: (row) => {
                this.getRetestResultInfo(row);
              },
              disabled: (row) => {
                return row.insResult!=0
              },
            },
            {
              name: "检验项绑定",
              type: "text",
              clickFun: (row) => {
                this.getBinding(row);
              },
              disabled: (row) => {
                return (
                  this.lookInfo.userName == null ||
                  this.lookInfo.insState == 3 ||
                  this.lookInfo.insState == 5
                );
              },
            },
          ],
        },
      ],
      lookPage: {
        total: 0,
        size: 20,
        current: 0,
      },
      lookTableLoading: false,
      // æ•°æ®æŸ¥çœ‹ç›¸å…³å­—段---结束
      retestVisible: false,
      upIndex: 0,
      tabLabel: ''
@@ -600,29 +498,6 @@
      this.page.size = limit;
      this.getList();
    },
    getLookList() {
      this.lookTableLoading = true;
      let param = { id: this.lookInfo.id, ...this.lookPage, inspectionItem: this.entity.inspectionItem };
      delete param.total;
      selectSampleAndProductByOrderId({ ...param })
        .then((res) => {
          this.lookTableLoading = false;
          if (res.code === 200) {
            this.lookTableData = res.data.records;
            this.lookPage.total = res.data.total;
            this.upIndex++
            this.dataDialogVisible = true;
          }
        })
        .catch((err) => {
          this.lookTableLoading = false;
        });
    },
    lookPagination({ page, limit }) {
      this.lookPage.current = page;
      this.lookPage.size = limit;
      this.getLookList();
    },
    // ä¿®æ”¹æ£€éªŒå€¼
    editInspection(row) {
      this.$refs.editInspectionItem.showDialog(row.id);
@@ -630,11 +505,6 @@
    // æŸ¥çœ‹å·¥æ—¶
    viewManHour(row) {
      this.$refs.viewManHourDia.showDialog(row.id, row.insState);
    },
    // æ•°æ®æŸ¥çœ‹
    handleDataLook(row) {
      this.lookInfo = row;
      this.getLookList();
    },
    changeCheckBox(val) {
      this.queryParams.userId = val ? 0 : null;
src/views/business/inspectionTask/inspection.vue
@@ -872,14 +872,7 @@
  },
  created() {
    this.saveQueue = Promise.resolve();
    let { sonLaboratory, orderId, state, inspectorList, typeSource } =
      this.$route.query;
    this.sonLaboratory = sonLaboratory;
    this.orderId = orderId;
    this.id = this.orderId;
    this.state = state;
    this.inspectorList = inspectorList;
    this.typeSource = typeSource;
    this.syncRouteContext();
  },
  mounted() {
    this.getTypeDicts(); // èŽ·å–ç´§æ€¥ç¨‹åº¦ä¸‹æ‹‰æ¡†é€‰é¡¹
@@ -891,6 +884,7 @@
    this.scrollInit();
  },
  activated() {
    this.syncRouteContext();
    this.getTypeDicts(); // èŽ·å–ç´§æ€¥ç¨‹åº¦ä¸‹æ‹‰æ¡†é€‰é¡¹
    this.getInsStateDicts();
    this.getComparisonList();
@@ -963,6 +957,23 @@
    this.stopWorker();
  },
  methods: {
    syncRouteContext() {
      const { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query;
      const orderChanged = this.id !== orderId;
      this.sonLaboratory = sonLaboratory;
      this.orderId = orderId;
      this.state = state;
      this.inspectorList = inspectorList;
      this.typeSource = typeSource;
      if (orderChanged) {
        this.tableLists = [];
        this.tableList = [];
        this.sampleProduct = [];
        this.currentSample = {};
        this.currentTable = null;
        this.id = orderId;
      }
    },
    standardDisplayName(value) {
      if (!value) return '-';
      const separatorIndex = value.indexOf(' - ');
@@ -1734,9 +1745,7 @@
        repetitionTag: this.repetitionTag
      });
      this.tableLoading = false;
      if (res.data.length > 0) {
        return res.data;
      }
      return Array.isArray(res.data) ? res.data : [];
    },
    // åˆ‡æ¢æ ·å“
    async handleChangeSample(row, column, event) {
src/views/business/inspectionView/index.vue
@@ -763,14 +763,7 @@
  },
  created() {
    this.saveQueue = Promise.resolve();
    let { sonLaboratory, orderId, state, inspectorList, typeSource } =
      this.$route.query;
    this.sonLaboratory = sonLaboratory;
    this.orderId = orderId;
    this.id = this.orderId;
    this.state = state;
    this.inspectorList = inspectorList;
    this.typeSource = typeSource;
    this.syncRouteContext();
  },
  mounted() {
    this.getTypeDicts(); // èŽ·å–ç´§æ€¥ç¨‹åº¦ä¸‹æ‹‰æ¡†é€‰é¡¹
@@ -782,6 +775,7 @@
    this.scrollInit();
  },
  activated() {
    this.syncRouteContext();
    this.getTypeDicts(); // èŽ·å–ç´§æ€¥ç¨‹åº¦ä¸‹æ‹‰æ¡†é€‰é¡¹
    this.getInsStateDicts();
    this.getComparisonList();
@@ -851,6 +845,23 @@
    this.stopWorker();
  },
  methods: {
    syncRouteContext() {
      const { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query;
      const orderChanged = this.id !== orderId;
      this.sonLaboratory = sonLaboratory;
      this.orderId = orderId;
      this.state = state;
      this.inspectorList = inspectorList;
      this.typeSource = typeSource;
      if (orderChanged) {
        this.tableLists = [];
        this.tableList = [];
        this.sampleProduct = [];
        this.currentSample = {};
        this.currentTable = null;
        this.id = orderId;
      }
    },
    // æ–‡ä»¶ç®¡ç†--开始
    getList() {
      this.tableLoading = true;
@@ -1520,9 +1531,7 @@
        repetitionTag: this.repetitionTag
      });
      this.tableLoading = false;
      if (res.data.length > 0) {
        return res.data;
      }
      return Array.isArray(res.data) ? res.data : [];
    },
    // åˆ‡æ¢æ ·å“
    async handleChangeSample(row, column, event) {
src/views/business/productOrder/components/addOrder.vue
@@ -147,9 +147,67 @@
            </el-col>
          </el-row>
          <el-row :gutter="16">
            <el-col :span="6">
              <el-form-item label="分包内容">
                <el-radio-group v-model="addObj.subcontractType" :disabled="active>1" size="mini">
                  <el-radio :label="1" border style="margin-right: 0">有</el-radio>
                  <el-radio :label="0" border>无</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="样品处置">
                <el-radio-group v-model="addObj.sampleDisposal" :disabled="active>1" size="mini">
                  <el-radio :label="1" border style="margin-right: 0">委托方取回</el-radio>
                  <el-radio :label="2" border>检测方处置</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="对结果评价">
                <el-radio-group v-model="addObj.resultEvaluation" :disabled="active>1" size="mini">
                  <el-radio :label="1" border style="margin-right: 0">是</el-radio>
                  <el-radio :label="0" border>否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="报告交付方式">
                <el-radio-group v-model="addObj.reportDelivery" :disabled="active>1" size="mini">
                  <el-radio :label="1" border style="margin-right: 0">自取</el-radio>
                  <el-radio :label="2" border>快递</el-radio>
                  <el-radio :label="3" border>电子传送</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="addObj.subcontractType === 1" :gutter="16">
            <el-col :span="12">
              <el-form-item label="分包单位信息">
                <el-input v-model="addObj.subcontractCompany" :disabled="active>1" size="small"
                          placeholder="请填写分包单位信息"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="addObj.reportDelivery === 2" :gutter="16">
            <el-col :span="12">
              <el-form-item label="报告寄送地址">
                <el-input v-model="addObj.reportAddress" :disabled="active>1" size="small"
                          placeholder="请填写报告寄送地址"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="收件人及电话">
                <el-input v-model="addObj.reportReceiver" :disabled="active>1" size="small"
                          placeholder="请填写收件人及电话"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="16">
            <el-col :span="24">
              <el-form-item label="备注">
                <el-input v-model="addObj.remark" :disabled="active>1" size="small"/>
                <el-input v-model="addObj.remark" :disabled="active>1" size="small"
                          placeholder="可选,补充说明委托事项"/>
              </el-form-item>
            </el-col>
          </el-row>
@@ -768,7 +826,6 @@
import {
  addInsOrder, addInsOrderTemplate, delInsOrderTemplate,
  getQuarterOnOrder, judgeNotSpotCheckOrder, selectInsOrderTemplateById,
  selectOrderManDay,
  updateInsOrder,
  upInsOrder,
  upInsOrderOfState
@@ -855,6 +912,13 @@
        sampleViewEn: '', // æ ·å“åç§°è‹±æ–‡ï¼ˆæŠ¥å‘Šå±•示字段)
        productionDate: null,
        sampleDate: null,
        subcontractType: 0,
        subcontractCompany: '',
        sampleDisposal: 1,
        resultEvaluation: 0,
        reportDelivery: 1,
        reportAddress: '',
        reportReceiver: '',
      },
      addObjRules: { // è¡¨å•校验规则
        orderType: [
@@ -1348,6 +1412,19 @@
          this.$message.error('请填写检测依据、委托单位、检验类别和样品数量');
          return;
        }
        if (this.addObj.subcontractType == null || this.addObj.sampleDisposal == null
          || this.addObj.resultEvaluation == null || this.addObj.reportDelivery == null) {
          this.$message.error('请选择分包内容、样品处置、对结果评价和报告交付方式');
          return;
        }
        if (this.addObj.subcontractType === 1 && !this.addObj.subcontractCompany) {
          this.$message.error('分包内容为有时,请填写分包单位信息');
          return;
        }
        if (this.addObj.reportDelivery === 2 && (!this.addObj.reportAddress || !this.addObj.reportReceiver)) {
          this.$message.error('报告交付方式为快递时,请填写报告寄送地址和收件人及电话');
          return;
        }
        this.saveData([]);
        return;
      }
@@ -1619,17 +1696,10 @@
          company: this.addObj.company
        }).then(res => {
          this.saveLoad = false
          this.$message.success('提交成功')
          selectOrderManDay({
            id: this.currentId
          }).then(ress => {
            this.distributeData.orderId = this.currentId
            this.distributeData.appointed = ress.data
          })
          setTimeout(() => {
            this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
            this.issuedDialogVisible = true;
          }, 1000)
          this.$message.success('审核通过')
          this.closeOpenPage()
        }).catch(() => {
          this.saveLoad = false
        })
      } else {
        // ä¸é€šè¿‡
@@ -1973,6 +2043,7 @@
        this.templateLoading = true;
        addInsOrderTemplate({
          name: this.templateName,
          standardTreeId: this.addObj.standardTreeId || null,
          thing: JSON.stringify({
            addObj: this.addObj,
            sampleList: this.sampleList,
@@ -1994,7 +2065,8 @@
    // æŸ¥è¯¢æ¨¡æ¿
    selectInsOrderTemplateById(e) {
      selectInsOrderTemplateById({id: e}).then(res => {
        let obj = JSON.parse(res.data)
        const detail = res.data || {}
        let obj = JSON.parse(detail.thing)
        //制单人设置为当前登录用户
        let user = this.nickName
        obj.addObj.custom = user.name
@@ -2002,6 +2074,11 @@
        this.addObj = obj.addObj;
        this.sampleList = obj.sampleList;
        this.selectTree = obj.selectTree
        // backend already resolved the bound record templates by standard
        if (detail.standardTreeId) {
          this.$set(this.addObj, 'standardTreeId', detail.standardTreeId)
        }
        this.boundTemplateList = this.sortTemplateList(detail.templateBindings)
        this.rowClick(this.sampleList[0])
      })
    },
src/views/business/productOrder/components/addView.vue
@@ -70,6 +70,13 @@
            </div>
            <span v-else class="order-detail__empty">暂未绑定原始记录模板</span>
          </el-descriptions-item>
          <el-descriptions-item v-if="isNewJuOrder" label="分包内容">{{ subcontractTypeLabel }}</el-descriptions-item>
          <el-descriptions-item v-if="isNewJuOrder" label="样品处置">{{ sampleDisposalLabel }}</el-descriptions-item>
          <el-descriptions-item v-if="isNewJuOrder" label="对结果评价">{{ resultEvaluationLabel }}</el-descriptions-item>
          <el-descriptions-item v-if="isNewJuOrder" label="报告交付方式">{{ reportDeliveryLabel }}</el-descriptions-item>
          <el-descriptions-item v-if="isNewJuOrder && addObj.subcontractType === 1" label="分包单位信息" :span="4">{{ addObj.subcontractCompany || '-' }}</el-descriptions-item>
          <el-descriptions-item v-if="isNewJuOrder && addObj.reportDelivery === 2" label="报告寄送地址" :span="2">{{ addObj.reportAddress || '-' }}</el-descriptions-item>
          <el-descriptions-item v-if="isNewJuOrder && addObj.reportDelivery === 2" label="收件人及电话" :span="2">{{ addObj.reportReceiver || '-' }}</el-descriptions-item>
          <el-descriptions-item label="备注" :span="4">{{ addObj.remark || '-' }}</el-descriptions-item>
        </el-descriptions>
        <el-form v-show="false" ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px"
@@ -677,7 +684,6 @@
import {
  addInsOrder, addInsOrderTemplate, delInsOrderTemplate,
  getQuarterOnOrder, selectInsOrderTemplateById,
  selectOrderManDay,
  updateInsOrder,
  upInsOrder,
  upInsOrderOfState
@@ -706,6 +712,28 @@
        item => String(item.value) === String(this.addObj.orderType)
      )
      return hit ? hit.label : (this.addObj.orderType || '-')
    },
    // æ–°èšç›´ç»‘模板下单:展示委托要求字段
    isNewJuOrder() {
      return (this.boundTemplateList || []).length > 0
    },
    subcontractTypeLabel() {
      if (this.addObj.subcontractType === 1) return '有'
      if (this.addObj.subcontractType === 0) return '无'
      return '-'
    },
    sampleDisposalLabel() {
      const map = {1: '委托方取回', 2: '检测方处置'}
      return map[this.addObj.sampleDisposal] || '-'
    },
    resultEvaluationLabel() {
      if (this.addObj.resultEvaluation === 1) return '是'
      if (this.addObj.resultEvaluation === 0) return '否'
      return '-'
    },
    reportDeliveryLabel() {
      const map = {1: '自取', 2: '快递', 3: '电子传送'}
      return map[this.addObj.reportDelivery] || '-'
    },
  },
  dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list', 'sys_sub_lab'],
@@ -1415,17 +1443,10 @@
          company: this.addObj.company
        }).then(res => {
          this.saveLoad = false
          this.$message.success('提交成功')
          selectOrderManDay({
            id: this.currentId
          }).then(ress => {
            this.distributeData.orderId = this.currentId
            this.distributeData.appointed = ress.data
          })
          setTimeout(() => {
            this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
            this.issuedDialogVisible = true;
          }, 1000)
          this.$message.success('审核通过')
          this.closeOpenPage()
        }).catch(() => {
          this.saveLoad = false
        })
      } else {
        // ä¸é€šè¿‡
src/views/business/productOrder/index.vue
@@ -43,17 +43,16 @@
      <div class="table-tab">
        <div>
          <ul class="tab">
            <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">待审核</li>
            <li :class="{ active: tabIndex === 7 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(7)">全部</li>
            <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:insOrder:checkout'])" @click="handleTab(1)">检验中</li>
            <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:insOrder:customerOrdered'])" @click="handleTab(2)">委托已检</li>
            <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:insOrder:spotCheck'])" @click="handleTab(3)">抽样已检</li>
            <li :class="{ active: tabIndex === 4 }" v-if="checkPermi(['get:insOrder:sendBack'])" @click="handleTab(4)">退回</li>
            <li :class="{ active: tabIndex === 5 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(5)">撤销</li>
            <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(6)">全部</li>
            <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(6)">作废</li>
          </ul>
        </div>
        <div>
          <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small"
          <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 7" size="small"
                     @click="downLoad">导出</el-button>
          <el-button size="small" type="primary" @click="openPrint">标签打印</el-button>
          <el-button v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">下单</el-button>
@@ -105,55 +104,6 @@
            <el-button :loading="upLoad" type="primary" @click="submitForm">ç¡® å®š</el-button>
          </el-row>
        </span>
      </el-dialog>
      <!-- ä¸‹å‘ -->
      <el-dialog :before-close="handleClose" :visible.sync="issuedDialogVisible" title="检验分配" width="400px">
        <div class="body" style="max-height: 60vh;">
          <el-row>
            <el-col class="search_thing" style="width: 95%;">
              <div class="search_label"><span class="required-span">* </span>约定时间:</div>
              <div class="search_input">
                <el-date-picker v-model="distributeData.appointed" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                  style="width: 100%;" type="date" value-format="yyyy-MM-dd">
                </el-date-picker>
              </div>
            </el-col>
            <el-col class="search_thing" style="width: 95%;">
              <div class="search_label"><span class="required-span">* </span>指派人员:</div>
              <div class="search_input">
                <el-select v-model="distributeData.userId" clearable filterable placeholder="请选择" size="small"
                  style="width: 100%;" @change="changeUser">
                  <el-option v-for="(item, i) in personList" :key="i + 'gbnm.'" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </div>
            </el-col>
            <el-col class="search_thing" style="width: 95%;">
              <div class="search_label">试验室:</div>
              <div class="search_input">
                <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="请选择" size="small"
                  style="width: 100%;">
                  <el-option v-for="(item, i) in newJuLaboratoryList" :key="i + 'oooo'" :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
              </div>
            </el-col>
          </el-row>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-row>
            <el-button @click="handleClose2">取 æ¶ˆ</el-button>
            <el-button :loading="upLoad" type="primary" @click="submitForm2">ç¡® å®š</el-button>
          </el-row>
        </span>
      </el-dialog>
      <el-dialog :visible.sync="dataDialogVisible" title="数据查看" width="80%" @close="closeDia">
        <div v-if="dataDialogVisible">
          <lims-table :tableData="tableDataLook" :column="tableDataLookColumn" @pagination="tableDataLookPagination"
            height="500px" key="tableDataLook" :page="tableDataLookPage"
            :tableLoading="tableDataLookTableLoading"></lims-table>
        </div>
      </el-dialog>
      <el-dialog :visible.sync="filesDialogVisible" title="附件查看" width="80%">
        <div v-if="filesDialogVisible">
@@ -329,12 +279,10 @@
  selectInsOrderParameter,
  selectNoProducts,
  getRevocationInsProductList,
  selectOrderManDay,
  updateInspected,
  updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder
  updateOrderEntrustCode, updateSampleModel, updateStatus
} from "@/api/business/productOrder";
import { selectUserCondition } from "@/api/performance/class";
import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
import { downFile, getFileList } from "@/api/business/rawMaterialOrder";
import {mapGetters} from "vuex";
export default {
  name: 'ProductOrder',
@@ -386,6 +334,7 @@
        { label: '下单时间', prop: 'createTime' },
        { label: '下发时间', prop: 'sendTime' },
        { label: '退回理由', prop: 'tell' },
        { label: '拒收原因', prop: 'sampleRejectRemark' },
        { label: '委托人', prop: 'prepareUser' },
        {
          dataType: 'action',
@@ -400,29 +349,16 @@
              }
            },
            {
              name: '数据查看',
              type: 'text',
              clickFun: (row) => {
                this.handleDataLook(row);
              },
              disabled: (row, index) => {
                return row.state != 1 && row.state != 4
              },
              showHide: (row) => {
                return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
              }
            },
            {
              name: '附件查看',
              type: 'text',
              clickFun: (row) => {
                this.handleFileLook(row);
              },
              disabled: (row, index) => {
                return row.state != 1 && row.state != 4
                return row.state != 1 && row.state != 4 && row.state != 5
              },
              showHide: (row) => {
                return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
                return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6 || this.tabIndex === 7
              }
            },
            {
@@ -432,7 +368,7 @@
                this.download(row);
              },
              showHide: (row) => {
                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 7
              }
            },
            {
@@ -475,19 +411,6 @@
              }
            },
            {
              name: '分配',
              type: 'text',
              clickFun: (row) => {
                this.handleIssued(row);
              },
              disabled: (row, index) => {
                return row.state != 1 || !!row.assign
              },
              showHide: (row) => {
                return this.tabIndex === 1
              }
            },
            {
              name: '删除',
              type: 'text',
              clickFun: (row) => {
@@ -504,7 +427,7 @@
                this.viewInspectInfo(row);
              },
              showHide: (row) => {
                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 7
              }
            },
          ]
@@ -534,56 +457,6 @@
      isQuash: false,
      verifyDialogVisible: false,
      quashDialogVisible: false,
      issuedDialogVisible: false,
      dataDialogVisible: false, // æ•°æ®æŸ¥çœ‹å¼¹æ¡†
      currentRow: {}, // æ•°æ®æŸ¥çœ‹å¼¹æ¡†
      tableDataLookTableLoading: false, // æ•°æ®æŸ¥çœ‹å¼¹æ¡†
      tableDataLook: [],
      tableDataLookPage: {
        total: 0,
        size: 20,
        current: 1
      },
      tableDataLookColumn: [
        { label: '样品编号', prop: 'sampleCode', width: '160px' },
        { label: '样品名称', prop: 'sample' },
        { label: '检验项分类', prop: 'inspectionItemClass' },
        { label: '检验项', prop: 'inspectionItem' },
        { label: '检验子项', prop: 'inspectionItemSubclass' },
        { label: '单位', prop: 'unit' },
        { label: '样品型号', prop: 'model' },
        { label: '条件', prop: 'radius' },
        { label: '电缆标识', prop: 'cableTag' },
        { label: '试验要求', prop: 'tell' },
        { label: '检验结果', prop: 'lastValue' },
        {
          dataType: 'tag',
          label: '结果判定',
          prop: 'insResult',
          formatData: (params) => {
            if (params == 1) {
              return '合格'
            } else if (params == 0) {
              return '不合格'
            } else if (params == 3) {
              return '不判定'
            } else {
              return ''
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else if (params == 0) {
              return 'danger'
            } else if (params == 3) {
              return ''
            } else {
              return ''
            }
          }
        },
      ],
      filesDialogVisible: false, // é™„件查看弹框
      tableDataFile: [],
      tableLoadingFile: false,
@@ -638,18 +511,9 @@
      formData: {},
      formData0: {},
      formData1: {},
      distributeData: {
        orderId: '',
        sampleId: '',
        appointed: '',
        userId: '',
        sonLaboratory: ''
      },
      entrustCodeVisible: false, // ä¿®æ”¹å§”托编号弹框
      entrustCodeInfo: {},
      submitCodeLoading: false,
      // äººå‘˜åˆ—表
      personList: [],
      orderId: '',
      revocationInsProductIds: '',
      componentDataDelete: [],
@@ -699,11 +563,15 @@
          value: 3
        },
        {
          label: '作废',
          value: 5
        },
        {
          label: '全部',
          value: -2
        }
      ],
      tabIndex: 0,
      tabIndex: 7,
      active: 0, //1:下单,2:查看,3:审核,4:光纤配置,默认为0
      currentId: null,
      more: false,
@@ -732,21 +600,13 @@
      }
    }
  },
  dicts: ['sys_sub_lab'],
  computed: {
    ...mapGetters(["nickName"]),
    newJuLaboratoryList() {
      return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '新聚')
    },
  },
  mounted() {
    if (this.checkPermi(['get:raw:await'])) {
      this.tabIndex = 0
    } else {
      this.tabIndex = 2
    }
    // å…å®¡æ ¸åŽæ²¡æœ‰å¾…审核页签,默认进入全部
    this.tabIndex = this.checkPermi(['get:insOrder:all']) ? 7 : 1
    this.refreshTable()
    this.getAuthorizedPerson()
  },
  activated() {
    this.refreshTable()
@@ -897,31 +757,9 @@
    closePrintDialog() {
      this.printDialog = false
    },
    // èŽ·å–æŒ‡æ´¾äººå‘˜ä¸‹æ‹‰åˆ—è¡¨
    getAuthorizedPerson() {
      selectUserCondition({ type: 1 }).then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
            label: a.name,
            value: a.id
          })
        })
        this.personList = data
      })
    },
    handleClose() {
      this.verifyDialogVisible = false;
      this.quashDialogVisible = false;
      this.issuedDialogVisible = false;
      this.dataDialogVisible = false;
      this.upLoad = false;
    },
    handleClose2() {
      this.verifyDialogVisible = false;
      this.quashDialogVisible = false;
      this.issuedDialogVisible = false;
      this.dataDialogVisible = false;
      this.upLoad = false;
    },
    // ç‚¹å‡»æ ·å“åç§°
@@ -972,37 +810,6 @@
      }).catch(err => {
        this.submitListLoad = false
      })
    },
    // æ•°æ®æŸ¥çœ‹
    handleDataLook(row) {
      this.dataDialogVisible = true;
      this.currentRow = row;
      this.getDataTableList(this.currentRow)
    },
    // æŸ¥è¯¢æ•°æ®æŸ¥çœ‹åˆ—表数据
    getDataTableList(row) {
      this.tableDataLookTableLoading = true
      selectSampleAndProductByOrderId({ id: row.id, ...this.tableDataLookPage }).then(res => {
        this.tableDataLookTableLoading = false
        if (res.code === 200) {
          this.tableDataLook = res.data.records
          this.tableDataLookPage.total = res.data.total
        }
      }).catch(err => {
        this.tableDataLookTableLoading = false
      })
    },
    tableDataLookPagination(page) {
      this.tableDataLookPage.size = page.limit
      this.getDataTableList(this.currentRow)
    },
    closeDia () {
      this.tableDataLookPage = {
        total: 0,
        size: 20,
        current: 1
      }
      this.dataDialogVisible = false
    },
    // é™„件查看
    handleFileLook(row) {
@@ -1137,46 +944,6 @@
        })
      }
    },
    // ä¸‹å‘
    handleIssued(row) {
      this.issuedDialogVisible = true;
      this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
      selectOrderManDay({
        id: row.id
      }).then(res => {
        this.distributeData.orderId = row.id
        this.distributeData.sampleId = row.sampleId
        this.distributeData.appointed = res.data
        this.distributeData.type = row.type
      })
    },
    submitForm2() {
      if (this.distributeData.appointed == null || this.distributeData.appointed == '') {
        this.$message.error('约定时间未填写')
        return
      }
      //
      if (this.distributeData.userId == null || this.distributeData.userId == '') {
        this.$message.error('指派人员未填写')
        return
      }
      this.upLoad = true;
      upInsOrder({
        orderId: this.distributeData.orderId,
        sampleId: this.distributeData.sampleId,
        appointed: this.distributeData.appointed,
        userId: this.distributeData.userId,
        sonLaboratory: this.distributeData.sonLaboratory,
      }).then(res => {
        this.$message.success('修改成功')
        this.upLoad = false
        this.issuedDialogVisible = false
        this.refreshTable()
      }).catch(e => {
        this.$message.error('修改失败')
        this.upLoad = false
      })
    },
    submitForm() {
      this.upLoad = true;
      if (this.tabIndex == 1) {
@@ -1230,7 +997,7 @@
        this.$router.push({
          name: "InspectionView",
          query: {
            sonLaboratory: row.sonLaboratory,
            sonLaboratory: null,
            state: 3,
            typeSource: row.typeSource,
            orderId: row.id,
@@ -1241,7 +1008,7 @@
        this.$router.push({
          path: "/inspectionTask/inspection",
          query: {
            sonLaboratory: row.sonLaboratory,
            sonLaboratory: null,
            state: 3,
            typeSource: row.typeSource,
            orderId: row.id,
@@ -1257,11 +1024,6 @@
    // åˆ·æ–°é¡µé¢
    refreshView() {
      this.InspectionKey++
    },
    changeUser() {
      if (this.newJuLaboratoryList.length > 0) {
        this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value
      }
    },
    handleDelete(row) {
      this.$confirm('是否删除当前数据?', "警告", {
src/views/business/reportPreparation/index.vue
@@ -938,6 +938,10 @@
        this.$message.error('请选择审批人')
        return
      }
      if (this.currentInfo && this.currentInfo.examineUserId != null && Number(this.approver) === Number(this.currentInfo.examineUserId)) {
        this.$message.error('审核人和批准人不能为同一人,请重新选择批准人')
        return
      }
      this.loadingIssued = true;
      examineReport({
        id: this.currentInfo.id,
@@ -951,7 +955,6 @@
        this.addApproverDia = false
        this.issuedVisible = false;
      }).catch(e => {
        this.$message.error('提交失败')
        this.loadingIssued = false;
      })
    },
@@ -961,11 +964,11 @@
    },
    // ç‚¹å‡»é€šè¿‡ï¼Œéœ€è¦é€‰æ‹©æ‰¹å‡†äººå‘˜
    subIssued() {
      this.getAuthorizedPerson()
      this.getAuthorizedPerson(true)
      this.addApproverDia = true
    },
    // èŽ·å–äººå‘˜åˆ—è¡¨
    getAuthorizedPerson() {
    getAuthorizedPerson(filterExamine) {
      selectUserCondition({type: 1}).then((res) => {
        let data = [];
        res.data.forEach((a) => {
@@ -974,6 +977,9 @@
            value: a.id,
          });
        });
        if (filterExamine && this.currentInfo && this.currentInfo.examineUserId != null) {
          data = data.filter((item) => Number(item.value) !== Number(this.currentInfo.examineUserId));
        }
        this.approverList = data;
      })
    },