spring
2025-04-07 6816ee4cbdaa253c2cd452e0e582a351860ffbe7
src/views/business/productOrder/index.vue
@@ -32,21 +32,27 @@
        </el-form-item>
        <el-form-item>
          <el-button :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text"
                     @click="more = !more">{{ !more ? '更多' : '收起' }}</el-button>
          <el-button size="small" @click="refresh()">重 置</el-button>
          <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
            @click="more = !more">{{ !more ? '更多' : '收起' }}</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>
    </div>
    <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 === 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 === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">待审核
          </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>
        </ul>
      </div>
@@ -86,8 +92,8 @@
      </el-dialog>
      <!-- 撤销 -->
      <el-dialog :before-close="handleClose" :visible.sync="quashDialogVisible" title="下单撤销" width="30%">
        <p v-if="!isQuash" style="font-size:16px;color:#333333">委托编号<span
            style="color:#34BD66">{{ this.insOrderRow.entrustCode }}</span>的信息是否撤销</p>
        <p v-if="!isQuash" style="font-size:16px;color:#333333">委托编号<span style="color:#34BD66">{{
          this.insOrderRow.entrustCode }}</span>的信息是否撤销</p>
        <el-form v-else ref="ruleForm" :label-position="labelPosition" :model="formData" label-width="150px">
          <el-form-item label="请输入撤销原因:">
            <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input>
@@ -105,7 +111,7 @@
        </span>
      </el-dialog>
      <!-- 下发 -->
      <el-dialog :before-close="handleClose" :visible.sync="issuedDialogVisible" title="检验分配" width="400px">
      <!-- <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%;">
@@ -145,7 +151,7 @@
            <el-button :loading="upLoad" type="primary" @click="submitForm2">确 定</el-button>
          </el-row>
        </span>
      </el-dialog>
      </el-dialog> -->
      <el-dialog :visible.sync="dataDialogVisible" title="数据查看" width="80%" @close="closeDia">
        <div v-if="dataDialogVisible">
          <lims-table :tableData="tableDataLook" :column="tableDataLookColumn" @pagination="tableDataLookPagination"
@@ -168,7 +174,8 @@
        <span slot="footer" class="dialog-footer">
          <el-row>
            <el-button @click="handleNo">{{ deleteTilte == '撤销' ? '取 消' : '不通过' }}</el-button>
            <el-button :loading="printLoading" type="primary" @click="submitDelete">{{ deleteTilte == '撤销' ? '确 定' : '通过'}}</el-button>
            <el-button :loading="printLoading" type="primary" @click="submitDelete">{{ deleteTilte == '撤销' ? '确 定' :
              '通过' }}</el-button>
          </el-row>
        </span>
      </el-dialog>
@@ -263,8 +270,8 @@
              <el-row style="margin-top: 0.01cm;font-size: 0.20cm;">
                <el-col style="display: flex;align-items: center;"><span>样品状态:&nbsp;
                  </span>
                  <span style="white-space: nowrap;"><span v-if="item.insState == 0">√</span><span v-if="item.insState != 0"
                      class="scor"></span>待检
                  <span style="white-space: nowrap;"><span v-if="item.insState == 0">√</span><span
                      v-if="item.insState != 0" class="scor"></span>待检
                    <span v-if="item.insState == 1">√</span><span v-if="item.insState != 1" class="scor"></span>在检
                    <span v-if="item.insState == 2">√</span><span v-if="item.insState != 2" class="scor"></span>已检
                    <span v-if="item.isLeave == 1">√</span><span v-if="item.isLeave != 1" class="scor"></span>留样</span>
@@ -293,6 +300,7 @@
      @closePrintDialog="closePrintDialog"></print-dialog>
    <!--添加遗漏检验项弹框-->
    <add-inspection-dia v-if="addInspectionDia" ref="addInspectionDia"></add-inspection-dia>
    <issuedDialog ref="issuedDialog" />
    <!--    <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"-->
    <!--                :sonLaboratory="sonLaboratory" :state="state"-->
    <!--                :typeSource="typeSource" @goback="goback" @refreshView="refreshView"/>-->
@@ -305,6 +313,7 @@
import PrintDialog from "@/views/business/productOrder/components/printDialog.vue";
import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue";
import limsTable from "@/components/Table/lims-table.vue";
import issuedDialog from './components/issuedDialog.vue'
import {
  checkUpdate, delInsOrder,
  rawAllInsOrderExport,
@@ -314,14 +323,15 @@
} from "@/api/business/productOrder";
import { selectUserCondition } from "@/api/performance/class";
import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
import {mapGetters} from "vuex";
import { mapGetters } from "vuex";
export default {
  name: 'ProductOrder',
  components: {
    limsTable,
    AddInspectionDia,
    PrintDialog,
    vueQr
    vueQr,
    issuedDialog
  },
  data() {
    return {
@@ -498,7 +508,7 @@
                this.handleIssued(row);
              },
              disabled: (row, index) => {
                return row.state != 1 || !!row.assign
                return row.state != 1
              },
              showHide: (row) => {
                return this.tabIndex === 1
@@ -529,7 +539,7 @@
      ],
      page: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      state: 0,// 0:台账页,1:检验页面,2检验页面(复核),默认为0,3数据查看
@@ -558,7 +568,7 @@
      tableDataLook: [],
      tableDataLookPage: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableDataLookColumn: [
@@ -600,6 +610,7 @@
            }
          }
        },
        { label: "检验人", prop: "checkUserName" },
      ],
      filesDialogVisible: false, // 附件查看弹框
      tableDataFile: [],
@@ -649,7 +660,7 @@
      ],
      pageFile: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      formData: {},
@@ -666,7 +677,7 @@
      entrustCodeInfo: {},
      submitCodeLoading: false,
      // 人员列表
      personList: [],
      // personList: [],
      orderId: '',
      revocationInsProductIds: '',
      componentDataDelete: [],
@@ -686,7 +697,7 @@
      ],
      pageDelete: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      deleteDialogVisible: false,
@@ -753,7 +764,7 @@
  },
  mounted() {
    this.refreshTable()
    this.getAuthorizedPerson()
    // this.getAuthorizedPerson()
  },
  activated() {
    this.refreshTable()
@@ -772,7 +783,7 @@
      }
      const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
      this.tableLoading = true
      selectInsOrderParameter({...this.page,...params}).then(res => {
      selectInsOrderParameter({ ...this.page, ...params }).then(res => {
        this.upIndex++
        this.tableLoading = false
        if (res.code === 200) {
@@ -914,18 +925,18 @@
      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
      })
    },
    // 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;
@@ -946,7 +957,8 @@
        path: "/productOrder/add", query: {
          examine: 1,
          active: 2,
          currentId: row.id
          currentId: row.id,
          tabIndex: this.tabIndex,
        }
      });
    },
@@ -973,10 +985,10 @@
      this.tableDataLookPage.size = page.limit
      this.getDataTableList(this.currentRow)
    },
    closeDia () {
    closeDia() {
      this.tableDataLookPage = {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      }
      this.dataDialogVisible = false
@@ -1016,7 +1028,12 @@
    download(row) {
      let url = row.urlS ? row.urlS : row.url;
      if (url) {
        this.$download.saveAs(url, row.entrustCode);
        url = url.split('.')[0] + '.pdf'
        const link = document.createElement('a');
        link.href = this.javaApi + url;
        link.target = '_blank';
        document.body.appendChild(link);
        link.click();
      }
    },
    // 撤销
@@ -1034,7 +1051,7 @@
    },
    getDeleteList() {
      this.tableLoadingDelete = true
      selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds }).then(res => {
      selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds, ...this.pageDelete }).then(res => {
        this.tableLoadingDelete = false
        this.componentDataDelete = res.data.records
        this.pageDelete.total = res.data.total
@@ -1098,28 +1115,29 @@
    },
    // 下发
    handleIssued(row) {
      this.issuedDialogVisible = true;
      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
      })
      upPlanUser2({
        orderId: row.id,
      }).then(res => {
        if (res.code === 200 && res.data.length > 0) {
          this.sonLaboratoryList = [];
          res.data.forEach(m => {
            this.sonLaboratoryList.push({
              value: m,
              label: m
            })
          })
        }
      })
      // this.issuedDialogVisible = true;
      this.$refs.issuedDialog.init(row)
      // 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
      // })
      // upPlanUser2({
      //   orderId: row.id,
      // }).then(res => {
      //   if (res.code === 200 && res.data.length > 0) {
      //     this.sonLaboratoryList = [];
      //     res.data.forEach(m => {
      //       this.sonLaboratoryList.push({
      //         value: m,
      //         label: m
      //       })
      //     })
      //   }
      // })
    },
    submitForm2() {
      if (this.distributeData.appointed == null || this.distributeData.appointed == '') {