From fb941952ff7d5c03bc2251ec7e5ba0b498987894 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 14 三月 2025 19:31:31 +0800
Subject: [PATCH] 检验任务搬迁
---
src/views/business/inspectionTask/index.vue | 2065 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 2,062 insertions(+), 3 deletions(-)
diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index c4c94aa..329d4e4 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -1,9 +1,2068 @@
<template>
- <div>妫�楠屼换鍔�</div>
+ <div class="bg-1" style="padding: 15px 5px">
+ <basic-container>
+ <div class="search" :style="`height: ${more ? 100 : 50}px;`">
+ <el-row :gutter="10" style="width: 100%">
+ <el-col :span="16" style="display: flex; flex-wrap: wrap">
+ <div
+ class="search_thing"
+ style="margin-left: 20px"
+ v-if="maxNum > 1"
+ >
+ <div class="search_label">濮旀墭缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="queryParams.entrustCode"
+ @keyup.enter.native="refreshTable()"
+ ></el-input>
+ </div>
+ </div>
+ <div
+ class="search_thing"
+ style="margin-left: 20px"
+ v-if="maxNum > 2"
+ >
+ <div class="search_label">鏍峰搧缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="queryParams.sampleCode"
+ @keyup.enter.native="refreshTable()"
+ ></el-input>
+ </div>
+ </div>
+ <div
+ class="search_thing"
+ style="margin-left: 20px"
+ v-if="maxNum > 3"
+ >
+ <div class="search_label">鏍峰搧鍚嶇О锛�</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="鏍峰搧澶х被/鏍峰搧鍚嶇О"
+ clearable
+ v-model="queryParams.sample"
+ @keyup.enter.native="refreshTable()"
+ ></el-input>
+ </div>
+ </div>
+ <div
+ class="search_thing"
+ style="margin-left: 20px"
+ v-if="maxNum >= 4 || more"
+ >
+ <div class="search_label">妫�楠岀姸鎬侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ v-model="queryParams.insState"
+ style="width: 100%"
+ clearable
+ @change="refreshTable()"
+ >
+ <el-option
+ v-for="(a, i) in insStateList"
+ :key="i"
+ :label="a.dictLabel"
+ :value="a.dictValue"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div
+ class="search_thing"
+ style="margin-left: 20px"
+ v-if="maxNum >= 5 || more"
+ >
+ <div class="search_label">涓嬪彂鏃堕棿锛�</div>
+ <div class="search_input">
+ <div class="search_input">
+ <el-date-picker
+ size="small"
+ clearable
+ @change="refreshTable()"
+ v-model="queryParams.sendTimeRange"
+ type="daterange"
+ value-format="yyyy-MM-dd[T]HH:mm:ss"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ :default-time="['00:00:00', '23:59:59']"
+ >
+ </el-date-picker>
+ </div>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="search_thing">
+ <el-button
+ v-if="maxNum < 5"
+ type="text"
+ :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
+ style="color: #3a7bfa"
+ @click="more = !more"
+ >{{ !more ? "鏇村" : "鏀惰捣" }}</el-button
+ >
+ <div class="search_thing" style="padding-left: 10px">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()"
+ >鏌� 璇�</el-button
+ >
+ <template>
+ <el-button size="small" type="primary" @click="excelExport"
+ >鏌ョ湅缁撴灉</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="unInsDialogVisible = true"
+ >瀵煎嚭寰呮淇℃伅</el-button
+ >
+ </template>
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ </basic-container>
+ <basic-container>
+ <div class="center">
+ <div class="center-options">
+ <el-row>
+ <el-col :span="24">
+ <div
+ style="
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ "
+ >
+ <div style="display: flex; align-items: center">
+ <ul class="tab">
+ <li
+ v-for="(m, i) in tabList"
+ :key="i"
+ :class="{ active: i == tabIndex }"
+ @click="handleTab(m, i)"
+ >
+ {{ m.label.replace("璇曢獙瀹�", "") }}
+ </li>
+ </ul>
+ <div>
+ <el-checkbox
+ @change="changeCheckBox"
+ class="view-self-checkbox"
+ v-model="alone"
+ ><span>鎴戠殑浠诲姟</span></el-checkbox
+ >
+ </div>
+ </div>
+ <div class="center-title">
+ <p>
+ <span>鏈湀浠诲姟鏁伴噺:</span>
+ <span v-if="currentMonthPlanTotal != undefined">{{
+ currentMonthPlanTotal
+ }}</span>
+ </p>
+ <p>
+ <span>鎬昏浠诲姟鏁伴噺:</span>
+ <span v-if="$refs.insOrderPlan != undefined">{{
+ $refs.insOrderPlan.page.total
+ }}</span>
+ </p>
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <lims-table
+ ref="insOrderPlan"
+ highlightCurrentRow
+ :rowClassName="changeRowClass"
+ :tableData="tableData"
+ :height="tableMainHeight + ''"
+ :column="column"
+ @pagination="pagination"
+ :page="page"
+ :tableLoading="tableLoading"
+ >
+ </lims-table>
+ </div>
+ </basic-container>
+ <div v-show="activeFace == 0 && state == 0" style="height: 100%"></div>
+
+ <el-dialog title="鎻愮ず" :visible.sync="claimVisible" width="400px">
+ 鏄惁璁ら濮旀墭缂栧彿<span style="color: #33c130">{{
+ sampleUserForm.entrustCode
+ }}</span
+ >鐨勪换鍔�
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="claimVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="confirmClaim" :loading="loading"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog title="妫�楠屼氦鎺�" :visible.sync="connectVisible" width="400px">
+ <div class="search_thing">
+ <div class="search_label" style="width: 90px">
+ <span class="required-span">* </span>浜ゆ帴浜哄憳锛�
+ </div>
+ <div class="search_input">
+ <el-select
+ v-model="connect.connectPerson"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ :disabled="
+ userNameList.filter((name) => name == op.name).length > 0
+ "
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label" style="width: 90px">
+ <span class="required-span">* </span>璇曢獙瀹わ細
+ </div>
+ <div class="search_input">
+ <el-select
+ v-model="connect.sonLaboratory"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option
+ v-for="item in sonLaboratoryList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="connectVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="confirmConnect" :loading="loading"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <div style="width: 100%; height: 100%" v-if="activeFace > 0">
+ <Add :active="activeFace" :currentId="currentId" :examine="examine" />
+ </div>
+ <Inspection
+ v-if="state > 0"
+ @goback="goback"
+ :handover="personList"
+ :sonLaboratoryList="sonLaboratoryList"
+ :orderId="orderId"
+ :inspectorList="inspectorList"
+ :sonLaboratory="componentData.entity.sonLaboratory"
+ :state="state"
+ />
+ <el-dialog
+ title="鏁版嵁鏌ョ湅"
+ :visible.sync="dataDialogVisible"
+ width="100%"
+ fullscreen
+ >
+ <!-- <div
+ style="width: 100%; text-align: right; margin-bottom: 10px"
+ v-if="premissionReviewFun()"
+ >
+ <el-button type="primary" size="small" @click="goReview(currentRow)"
+ >鍓嶅線澶嶆牳</el-button
+ >
+ </div> -->
+ <lims-table
+ ref="dataLookTable"
+ highlightCurrentRow
+ :tableData="dataLooktableData"
+ height="80vh"
+ :column="dataLookColumn"
+ :tableLoading="dataLookTableLoading"
+ >
+ </lims-table>
+ </el-dialog>
+ <!-- 瀵煎嚭寮规 -->
+ <el-dialog
+ :title="title"
+ :visible.sync="dialogVisibleExcel"
+ fullscreen
+ :before-close="handleClose"
+ >
+ <div class="search">
+ <div style="display: flex">
+ <div style="margin-right: 20px">
+ <span>濮旀墭鍗曞彿锛�</span>
+ <el-input
+ size="mini"
+ placeholder="璇疯緭鍏�"
+ clearable
+ style="width: 180px"
+ v-model="excelForm.entrustCode"
+ @keyup.enter.native="refreshTable()"
+ ></el-input>
+ </div>
+ <div style="margin-right: 20px">
+ <span>鏍峰搧缂栧彿锛�</span>
+ <el-input
+ size="mini"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="excelForm.sampleCode"
+ style="width: 180px"
+ @keyup.enter.native="refreshTable()"
+ ></el-input>
+ </div>
+ <div style="margin-right: 20px">
+ <span>妫�楠屼汉锛�</span>
+ <el-select
+ size="mini"
+ v-model="excelForm.sampleName"
+ placeholder="璇烽�夋嫨"
+ @keyup.enter.native="refreshTable()"
+ style="width: 120px"
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </div>
+ <div style="margin-right: 20px">
+ <span>鏃ユ湡锛�</span>
+ <el-date-picker
+ size="mini"
+ v-model="excelForm.dateTime"
+ type="daterange"
+ range-separator="鑷�"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ format="yyyy-MM-dd"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ >
+ </el-date-picker>
+ </div>
+ </div>
+ <div class="search_thing">
+ <el-button
+ size="mini"
+ type="primary"
+ icon="el-icon-search"
+ @click="excelSearch"
+ >鏌� 璇�</el-button
+ >
+ <el-button
+ size="mini"
+ icon="el-icon-download"
+ type="primary"
+ @click="excelExportTrends"
+ :loading="outLoading"
+ >瀵� 鍑�</el-button
+ >
+ </div>
+ </div>
+ <!-- 琛ㄦ牸鍐呭 -->
+ <el-divider content-position="left">妫�楠岀粨鏋�</el-divider>
+ <br />
+ <div>
+ <el-tabs
+ type="border-card"
+ v-model="activeName"
+ @tab-click="handleClick"
+ >
+ <el-tab-pane
+ v-for="(v, i) in tabs"
+ :key="i"
+ :label="v"
+ :name="i.toString()"
+ >
+ <el-table
+ :data="tabsData"
+ border
+ ref="showResultTable"
+ v-loading="loadingTable"
+ :height="tableHeight"
+ element-loading-text="鍔犺浇涓�"
+ element-loading-spinner="el-icon-loading"
+ element-loading-background="rgba(255, 255, 255, 1)"
+ >
+ <el-table-column
+ label="搴忓彿"
+ type="index"
+ width="60"
+ ></el-table-column>
+ <el-table-column
+ label="濮旀墭鍗曞彿"
+ show-overflow-tooltip
+ prop="entrustCode"
+ width="180"
+ ></el-table-column>
+ <el-table-column
+ show-overflow-tooltip
+ label="鏍峰搧缂栧彿"
+ prop="sampleCode"
+ width="180"
+ ></el-table-column>
+ <el-table-column
+ label="绠¤壊鏍�"
+ prop="bushing"
+ width="80"
+ ></el-table-column>
+ <el-table-column
+ label="鍏夌氦甯﹁壊鏍�"
+ prop="fibers"
+ width="110"
+ ></el-table-column>
+ <el-table-column
+ label="鍏夌氦鑹叉爣"
+ prop="fiber"
+ width="100"
+ ></el-table-column>
+ <el-table-column
+ label="妫�娴嬮」鐩垎绫�"
+ show-overflow-tooltip
+ prop="inspectionItem"
+ v-if="tabName != '娓╁害寰幆'"
+ width="180"
+ ></el-table-column>
+ <el-table-column
+ label="妫�娴嬩汉"
+ prop="userName"
+ width="80"
+ ></el-table-column>
+ <el-table-column
+ label="妫�娴嬫椂闂�"
+ prop="insTime"
+ width="180"
+ ></el-table-column>
+ <el-table-column
+ label="涓嬪彂鏃堕棿"
+ prop="sendTime"
+ width="180"
+ ></el-table-column>
+ <el-table-column
+ v-for="(v, i) in tableHeader"
+ :label="v.label"
+ :prop="v.prop"
+ :key="i"
+ min-width="120"
+ show-overflow-tooltip
+ :width="calcTableColumnWidth(v.label)"
+ >
+ </el-table-column>
+ </el-table>
+ <el-pagination
+ background
+ style="text-align: right; margin-top: 20px"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ :current-page="currentPage"
+ :page-sizes="[10, 20, 50, 100, 200]"
+ :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="total"
+ >
+ </el-pagination>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+ </el-dialog>
+ <!-- 瀵煎嚭濮旀墭璐圭敤寮规 -->
+ <el-dialog
+ title="濮旀墭璐圭敤缁熻瀵煎嚭"
+ :visible.sync="commissionFeesDialogVisible"
+ width="30%"
+ :before-close="handleCloseCommissionFees"
+ >
+ <el-form :model="exportFees" ref="exportFees" :rules="feesRule">
+ <el-form-item label="涓嬪崟鏃ユ湡" prop="commissionFeesDate">
+ <el-date-picker
+ v-model="exportFees.commissionFeesDate"
+ type="daterange"
+ format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="handleCloseCommissionFees">鍙� 娑�</el-button>
+ <el-button type="primary" @click="exportcommissionFees"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 瀵煎嚭寰呮淇℃伅寮规 -->
+ <el-dialog
+ title="寰呮浠诲姟瀵煎嚭"
+ :visible.sync="unInsDialogVisible"
+ width="30%"
+ :before-close="handleCloseUnInsDialog"
+ >
+ <el-form
+ :model="unInsProductsData"
+ ref="exportUnInsProducts"
+ :rules="unInsRule"
+ >
+ <el-form-item label="涓嬪彂鏃ユ湡" prop="sendTime">
+ <el-date-picker
+ v-model="unInsProductsData.sendTime"
+ type="daterange"
+ format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="handleCloseUnInsDialog">鍙� 娑�</el-button>
+ <el-button type="primary" @click="exportUnInsProductsFun"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 鏁版嵁鏌ョ湅璇︽儏 -->
+ <el-dialog
+ title="鏌ョ湅璇︽儏"
+ :visible.sync="dialogVisible"
+ width="70%"
+ :before-close="handleClose3"
+ >
+ <el-table
+ v-if="type == '鍗曟牴鍨傜洿鐕冪儳' || type == '鏉惧绠�'"
+ :data="viewDetailsList"
+ border
+ height="400px"
+ style="width: 100%"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="80px"
+ ></el-table-column>
+ <el-table-column prop="entrustCode" label="濮旀墭鍗曞彿"></el-table-column>
+ <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿"></el-table-column>
+ <el-table-column
+ prop="color"
+ label="濂楃"
+ v-if="viewDetailsList.filter((ele) => ele.color !== '').length > 0"
+ ></el-table-column>
+ <!-- <el-table-column prop="inspectionItem" label="妫�楠岄」"></el-table-column> -->
+ <el-table-column prop="insValue" label="妫�楠岀粨鏋�"></el-table-column>
+ </el-table>
+
+ <el-table
+ v-if="type == '鎶楁媺寮哄害'"
+ :data="viewDetailsList"
+ height="400px"
+ border
+ style="width: 100%"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="80px"
+ ></el-table-column>
+ <el-table-column prop="inspectionItem" label="妫�楠岄」"></el-table-column>
+ <el-table-column
+ prop="inspectionItemSubclass"
+ label="妫�楠屽瓙椤�"
+ ></el-table-column>
+ <el-table-column prop="width" label="瀹藉害"></el-table-column>
+ <el-table-column prop="thickness" label="鍘氬害"></el-table-column>
+ <el-table-column prop="testValue" label="妫�楠屽��"></el-table-column>
+ </el-table>
+
+ <el-table
+ v-if="type == '鏂浼搁暱鐜�'"
+ :data="viewDetailsList"
+ height="400px"
+ border
+ style="width: 100%"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="80px"
+ ></el-table-column>
+ <el-table-column prop="inspectionItem" label="妫�楠岄」"></el-table-column>
+ <el-table-column
+ prop="inspectionItemSubclass"
+ label="妫�楠屽瓙椤�"
+ ></el-table-column>
+ <el-table-column
+ v-for="(v, i) in tableHeader"
+ :key="i"
+ :prop="`testValue${i}`"
+ :label="`妫�楠屽��${i + 1}`"
+ ></el-table-column>
+ </el-table>
+ </el-dialog>
+ <!-- 璁㈠崟鍩烘湰淇℃伅寮规 -->
+ <el-dialog
+ title="濮旀墭鍗曚俊鎭�"
+ :visible.sync="orderInfoDialog"
+ top="5vh"
+ width="70%"
+ >
+ <el-divider content-position="left">妫�楠屾牱鍝佺紪鍙峰垪琛�</el-divider>
+ <el-table
+ :data="insSampleListData"
+ border
+ height="200"
+ :cell-style="{ textAlign: 'center' }"
+ :header-cell-style="{ textAlign: 'center' }"
+ >
+ <el-table-column label="鏍峰搧缂栧彿" prop="sampleCode"></el-table-column>
+ <el-table-column label="鐘舵��" prop="state">
+ <template slot-scope="scope">
+ <el-tag type="danger" v-if="scope.row.state == 0">寰呮</el-tag>
+ <el-tag type="warning" v-if="scope.row.state == 1">鍦ㄦ</el-tag>
+ <el-tag type="success" v-if="scope.row.state == 2">宸叉</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="妫�娴嬩汉" prop="inspectName"></el-table-column>
+ </el-table>
+ <br />
+ <el-divider content-position="left">濮旀墭鍗曞唴瀹�</el-divider>
+ <el-table
+ :data="insProductVOSData"
+ border
+ height="300"
+ :cell-style="{ textAlign: 'center' }"
+ :header-cell-style="{ textAlign: 'center' }"
+ >
+ <el-table-column
+ label="鏍峰搧缂栧彿"
+ prop="sampleCode"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ label="鏍峰搧鍨嬪彿"
+ prop="model"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ label="妫�娴嬮」鐩�"
+ prop="testItem"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ label="妫�娴嬪瓙椤�"
+ prop="testItemChildren"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ label="璇曢獙鏂规硶"
+ prop="testMethod"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ label="鏍囧噯瑕佹眰"
+ prop="requirement"
+ show-overflow-tooltip
+ ></el-table-column>
+ </el-table>
+ </el-dialog>
+ </div>
</template>
<script>
-export default {};
+import { mapGetters } from "vuex";
+import Inspection from "./Inspection.vue";
+import { getYearAndMonthAndDays } from "@/utils/date";
+import { transformExcel } from "@/utils/file";
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+ getCurrentMonthPlanTotal,
+ exportCommissionFees,
+ exportUnInsProducts,
+ exportInsOrderPlanResult,
+ getTabHeader,
+ getInsOrderTemList,
+ getInsOrderPlanList,
+ claimInsOrderPlan,
+ getSampleInfoByOrderId,
+ selectInsOrderPlanList,
+ upPlanUser2,
+ upPlanUser,
+} from "@/api/business/inspectionTask";
+import {
+ selectSampleAndProductByOrderId,
+ viewDetails,
+} from "@/api/business/inspectionOrder";
+import { getDicts } from "@/api/system/dict/data";
+import { getLaboratoryPersonList } from "@/api/system/user";
+import LimsTable from "../../../components/Table/lims-table.vue";
+export default {
+ components: {
+ Inspection,
+ limsTable,
+ LimsTable,
+ },
+ computed: {
+ ...mapGetters(["permissions", "nickName"]),
+ },
+ data() {
+ return {
+ insStateList: [],
+ urgencyDictList: [],
+ tableData: [],
+ column: [
+ {
+ label: "濮旀墭缂栧彿",
+ prop: "entrustCode",
+ minWidth: "160px",
+ width: "160px",
+ dataType: "link",
+ linkEvent: {
+ method: "selectAllByOne",
+ vueComponent: this,
+ },
+ },
+ {
+ label: "濮旀墭鍗曚綅",
+ prop: "company",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧鍚嶇О",
+ prop: "sample",
+ minWidth: "140px",
+ width: "140px",
+ dataType: "link",
+ linkEvent: {
+ method: "selectOrderInfo",
+ vueComponent: this,
+ },
+ },
+ {
+ label: "鏍峰搧鍨嬪彿",
+ prop: "model",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "绱ф�ョ▼搴�",
+ prop: "type",
+ dataType: "tag",
+ minWidth: "90px",
+ width: "90px",
+ formatData: (params) => {
+ let index = this.urgencyDictList.findIndex(
+ (item) => item.dictValue == params
+ );
+ if (index > -1) {
+ return this.urgencyDictList[index].dictLabel;
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ let index = this.urgencyDictList.findIndex(
+ (item) => item.dictValue == params
+ );
+ if (index > -1) {
+ return this.urgencyDictList[index].listClass;
+ } else {
+ return null;
+ }
+ },
+ },
+ {
+ label: "鐘舵��",
+ prop: "insState",
+ dataType: "tag",
+ minWidth: "100px",
+ width: "100px",
+ formatData: (params) => {
+ let index = this.insStateList.findIndex(
+ (item) => item.dictValue == params
+ );
+ if (index > -1) {
+ return this.insStateList[index].dictLabel;
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ let index = this.insStateList.findIndex(
+ (item) => item.dictValue == params
+ );
+ if (index > -1) {
+ return this.insStateList[index].listClass;
+ } else {
+ return null;
+ }
+ },
+ },
+ {
+ label: "妫�楠屼汉",
+ prop: "userName",
+ minWidth: "140px",
+ width: "140px",
+ },
+ {
+ label: "澶嶆牳浜�",
+ prop: "checkName",
+ minWidth: "100px",
+ width: "100px",
+ },
+ {
+ label: "绾﹀畾鏃堕棿",
+ prop: "appointed",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "涓嬪彂鏃堕棿",
+ prop: "sendTime",
+ minWidth: "140px",
+ width: "140px",
+ },
+ {
+ label: "妫�楠屽紑濮嬫椂闂�",
+ prop: "insTime",
+ minWidth: "140px",
+ width: "140px",
+ },
+ {
+ label: "鐞嗙敱",
+ prop: "verifyTell",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "鎿嶄綔",
+ dataType: "action",
+ fixed: "right",
+ operation: [
+ {
+ name: "鏁版嵁鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDataLook(row);
+ },
+ },
+ {
+ name: "妫�楠�",
+ type: "text",
+ clickFun: (row) => {
+ this.handleInspection(row);
+ },
+ disabled: (row, index) => {
+ return (
+ row.userName == null ||
+ row.insState == 3 ||
+ row.insState == 5 ||
+ (row.userName && !row.userName.includes(this.nickName))
+ );
+ },
+ },
+ {
+ name: "浜ゆ帴",
+ type: "text",
+ clickFun: (row) => {
+ this.handleConnect(row);
+ },
+ disabled: (row, index) => {
+ return (
+ row.userName == null ||
+ row.insState == 5 ||
+ row.insState == 3 ||
+ (row.userName &&
+ !row.userName.includes(this.nickName) &&
+ !this.isLeader)
+ );
+ },
+ },
+ {
+ name: "澶嶆牳",
+ type: "text",
+ clickFun: (row) => {
+ this.handleReview(row);
+ },
+ disabled: (row, userName) => {
+ return (
+ row.userName == null ||
+ row.insState != 3 ||
+ (row.checkName && !row.checkName.includes(this.nickName))
+ );
+ },
+ },
+ {
+ name: "璁ら",
+ type: "text",
+ clickFun: (row) => {
+ this.claimFun(row);
+ },
+ disabled: (row, index) => {
+ return row.userName != null || row.checkName != null;
+ },
+ },
+ ],
+ },
+ ],
+ dataLooktableData: [],
+ insResultList: [
+ {
+ value: 1,
+ label: "鍚堟牸",
+ type: "success",
+ },
+ {
+ value: 0,
+ label: "涓嶅悎鏍�",
+ type: "danger",
+ },
+ {
+ value: 3,
+ label: "涓嶅垽瀹�",
+ type: "",
+ },
+ ],
+ dataLookColumn: [
+ {
+ label: "濮旀墭缂栧彿",
+ prop: "entrustCode",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧缂栧彿",
+ prop: "sampleCode",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "绠″鑹叉爣",
+ prop: "bushColor",
+ minWidth: "100px",
+ width: "100px",
+ },
+ {
+ label: "鍏夌氦甯︾紪鍙�",
+ prop: "code",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "鍏夌氦鑹叉爣",
+ prop: "color",
+ minWidth: "100px",
+ width: "100px",
+ },
+ {
+ label: "妫�楠岄」",
+ prop: "inspectionItem",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屽瓙椤�",
+ prop: "inspectionItemSubclass",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠岀粨鏋�",
+ prop: "lastValue",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "缁撴灉鍒ゅ畾",
+ prop: "insResult",
+ minWidth: "100px",
+ width: "100px",
+ dataType: "tag",
+ formatData: (params) => {
+ let index = this.insResultList.findIndex(
+ (item) => item.value == params
+ );
+ if (index > -1) {
+ return this.insResultList[index].label;
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ let index = this.insResultList.findIndex(
+ (item) => item.value == params
+ );
+ if (index > -1) {
+ return this.insResultList[index].type;
+ } else {
+ return null;
+ }
+ },
+ },
+ {
+ label: "鍗曚綅",
+ prop: "unit",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "璇曢獙瑕佹眰",
+ prop: "tell",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屼汉",
+ prop: "checkName",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屾棩鏈�",
+ prop: "checkTime",
+ minWidth: "140px",
+ width: "140px",
+ },
+ {
+ label: "鏍峰搧鍚嶇О",
+ prop: "sample",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧鍨嬪彿",
+ prop: "model",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "璇曢獙瀹�",
+ prop: "sonLaboratory",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ dataType: "action",
+ label: "鎿嶄綔",
+ fixed: "right",
+ operation: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.viewDetails(row);
+ },
+ // showHide: (row) => {
+ // return (
+ // row.inspectionItem == "鍗曟牴鍨傜洿鐕冪儳" ||
+ // row.inspectionItem.includes("鏉惧绠�") ||
+ // row.inspectionItemSubclass.includes("鏉惧绠�") ||
+ // (row.inspectionItem == "鎶楁媺寮哄害" &&
+ // (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
+ // row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�")) ||
+ // (row.inspectionItem == "鏂浼搁暱鐜�" &&
+ // (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
+ // row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�"))
+ // );
+ // },
+ },
+ ],
+ },
+ ],
+ dataLookTableLoading: false,
+ queryParams: {
+ entrustCode: null,
+ sampleCode: null,
+ sample: null,
+ insState: null,
+ sendTimeRange: [],
+ },
+ page: {
+ total: 0,
+ size: 20,
+ current: 1,
+ },
+ tableLoading: false,
+
+ //old
+ tableHeader: [],
+ type: "",
+ maxNum: 1,
+ isShowMore: false,
+ more: false,
+ dialogVisible: false,
+ viewDetailsList: [],
+ unInsDialogVisible: false,
+ unInsProductsData: {
+ sendTime: [],
+ },
+ exportFees: {
+ commissionFeesDate: [],
+ },
+ feesRule: {
+ commissionFeesDate: {
+ required: true,
+ message: "璇烽�夋嫨涓嬪崟鏃ユ湡",
+ trigger: "change",
+ },
+ },
+ unInsRule: {
+ sendTime: {
+ required: true,
+ message: "璇烽�夋嫨涓嬪彂鏃ユ湡",
+ trigger: "change",
+ },
+ },
+ commissionFeesDialogVisible: false,
+ commissionFeesDate: null,
+ orderInfoDialog: false, //璁㈠崟鍩烘湰淇℃伅寮规
+ tableHeight: 0,
+ tableMainHeight: 0,
+ outLoading: false,
+ trendsTable: [],
+ pageSize: 20,
+ total: 0,
+ currentPage: 1,
+ loadingTable: true,
+ activeName: "0",
+ tabName: null,
+ tabsData: [],
+ tabs: [],
+ selectTab: "",
+ excelForm: {
+ entrustCode: null,
+ sampleCode: null,
+ sampleName: null,
+ dateTime: null,
+ },
+ dialogVisibleExcel: false,
+ examine: null,
+ inspectorList: [], //妫�楠屼汉鍛樺垪琛�
+ alone: false,
+ sampleUserForm: {
+ entrustCode: null,
+ insSampleId: null,
+ userId: null,
+ },
+ claimVisible: false,
+ tabList: [],
+ active: 1,
+ tabIndex: 0,
+ componentDataDataLook: {
+ isPage: false,
+ entity: {
+ id: 0,
+ orderBy: {
+ field: "sampleCode",
+ order: "asc",
+ },
+ },
+ isIndex: false,
+ showSelect: false,
+ select: false,
+ do: [
+ {
+ id: "",
+ font: "鏌ョ湅",
+ type: "text",
+ method: "viewDetails",
+ showFun: (row, index) => {
+ return (
+ row.inspectionItem == "鍗曟牴鍨傜洿鐕冪儳" ||
+ row.inspectionItem.includes("鏉惧绠�") ||
+ row.inspectionItemSubclass.includes("鏉惧绠�") ||
+ (row.inspectionItem == "鎶楁媺寮哄害" &&
+ (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
+ row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�")) ||
+ (row.inspectionItem == "鏂浼搁暱鐜�" &&
+ (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
+ row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�"))
+ );
+ },
+ },
+ ],
+ tagField: {
+ insState: {
+ select: [],
+ },
+ insResult: {
+ select: [
+ {
+ value: 1,
+ label: "鍚堟牸",
+ type: "success",
+ },
+ {
+ value: 0,
+ label: "涓嶅悎鏍�",
+ type: "danger",
+ },
+ {
+ value: 3,
+ label: "涓嶅垽瀹�",
+ type: "",
+ },
+ ],
+ },
+ },
+ selectField: {},
+ spanConfig: {
+ rows: [
+ // {
+ // name: "entrustCode",
+ // index: 0,
+ // },
+ // {
+ // name: "sampleCode",
+ // index: 1,
+ // },
+ ],
+ },
+ requiredAdd: [],
+ requiredUp: [],
+ },
+ dataDialogVisible: false,
+
+ upIndex: 0,
+ planTotal: 0,
+ state: 0, //0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0
+ activeFace: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝榛樿涓�0
+ currentId: null,
+ entityCopy: {},
+ orderId: 0,
+ personList: [],
+ connectVisible: false,
+ connect: {
+ connectPerson: "",
+ sonLaboratory: "",
+ },
+ loading: false,
+ currentTime: null,
+ sonLaboratoryList: [],
+ userNameList: [],
+ currentRow: null,
+ insProductVOSData: [],
+ insSampleListData: [],
+ currentMonthPlanTotal: 0,
+ };
+ },
+ created() {
+ this.getLaboratoryDicts();
+ this.getTypeDicts();
+ this.getInsStateDicts();
+ this.getAuthorizedPerson();
+ this.currentTime = getYearAndMonthAndDays();
+ this.getTableHeight();
+ this.handleResize();
+ },
+ mounted() {
+ window.addEventListener("resize", this.getTableHeight);
+ // 鐩戝惉绐楀彛澶у皬鏀瑰彉浜嬩欢
+ window.addEventListener("resize", this.handleResize);
+ },
+ beforeDestroy() {
+ window.removeEventListener("resize", this.getTableHeight);
+ window.removeEventListener("resize", this.handleResize);
+ },
+ watch: {
+ more() {
+ this.getTableHeight();
+ },
+ tabsData() {
+ this.$nextTick(() => {
+ this.$refs.showResultTable &&
+ this.$refs.showResultTable.forEach((e) => e.doLayout());
+ });
+ },
+ },
+ computed: {
+ title() {
+ return this.selectTab + "妫�楠岀粨鏋滄樉绀�";
+ },
+ isLeader() {
+ const power = JSON.parse(sessionStorage.getItem("power"));
+ if (power) {
+ const filterList = power.filter((ele) => ele.menuMethod == "leader");
+ return filterList.length > 0;
+ }
+ return false;
+ },
+ },
+ methods: {
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ getList() {
+ this.tableLoading = true;
+ selectInsOrderPlanList({ ...this.queryParams, ...this.page })
+ .then((res) => {
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ this.tableLoading = false;
+ })
+ .catch((error) => {
+ this.tableLoading = false;
+ console.error(error);
+ });
+ },
+ getCurrentMonthPlanTotal() {
+ let startTime = null;
+ let endTime = null;
+ if (this.queryParams.sendTimeRange.length > 1) {
+ startTime = this.queryParams.sendTimeRange[0].replace("T", " ");
+ endTime = this.queryParams.sendTimeRange[1].replace("T", " ");
+ }
+ getCurrentMonthPlanTotal({
+ sonLaboratory: this.queryParams.sonLaboratory,
+ startTime: startTime,
+ endTime: endTime,
+ })
+ .then((res) => {
+ if (res.code === 200) {
+ this.currentMonthPlanTotal = res.data;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ // 瀹氫箟涓�涓嚱鏁版潵澶勭悊瑙嗗彛瀹藉害鍙樺寲
+ handleResize() {
+ //瑙嗗彛瀹藉害
+ let windowWidth = window.innerWidth;
+ //鍑忓幓宸﹁竟鑿滃崟鏍忓搴�200锛岄〉杈硅窛40,鍙宠竟鐨勬搷浣滄寜閽搴iewportWidth*33.33333%
+ let viewportWidth = windowWidth - 200 - 40;
+ //鎼滅储琛ㄥ崟鏈�澶у搴�
+ let formMaxWidth = viewportWidth - viewportWidth * 0.3333333;
+ //鍗曚釜鎼滅储妗嗗搴︿负230
+ this.maxNum = formMaxWidth / 250;
+ },
+ // 鏌ョ湅璇︽儏
+ viewDetails(row) {
+ this.dialogVisible = true;
+ if (
+ row.inspectionItem.includes("鏉惧绠�") ||
+ row.inspectionItemSubclass.includes("鏉惧绠�")
+ ) {
+ this.type = "鏉惧绠�";
+ } else {
+ this.type = row.inspectionItem;
+ }
+ let data = {
+ inspectionItem: row.inspectionItem,
+ inspectionItemSubclass: row.inspectionItemSubclass,
+ insProductId: row.insProductId,
+ insSampleId: row.insSampleId,
+ entrustCode: row.entrustCode,
+ sampleCode: row.sampleCode,
+ };
+ viewDetails(data)
+ .then((res) => {
+ if (res.code === 200) {
+ this.viewDetailsList = res.data;
+ if (res.data[0].tableHeader) {
+ this.tableHeader = res.data[0].tableHeader;
+ } else {
+ this.tableHeader = [
+ {
+ testValue0: "",
+ },
+ ];
+ }
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ handleCommand(command) {
+ switch (command) {
+ case "showInsResults":
+ //鏌ヨ妫�楠岀粨鏋�
+ this.excelExport();
+ break;
+ case "exportFees":
+ //瀵煎嚭濮旀墭璐圭敤
+ this.commissionFeesDialogVisible = true;
+ break;
+ case "exportUnInsProducts":
+ //瀵煎嚭寰呮淇℃伅
+ this.unInsDialogVisible = true;
+ break;
+ }
+ },
+ // 瀵煎嚭濮旀墭璐圭敤
+ exportcommissionFees() {
+ this.$refs.exportFees.validate((valid) => {
+ if (valid) {
+ let data = {
+ startTime: this.exportFees.commissionFeesDate[0],
+ endTime: this.exportFees.commissionFeesDate[1],
+ };
+ exportCommissionFees(data)
+ .then((res) => {
+ transformExcel(res, "濮旀墭璐圭敤缁熻.xlsx");
+ this.$nextTick(() => {
+ this.$message.success("瀵煎嚭鎴愬姛");
+ this.commissionFeesDate = null;
+ this.commissionFeesDialogVisible = false;
+ });
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ }
+ });
+ },
+ handleCloseCommissionFees() {
+ this.exportFees.commissionFeesDate = null;
+ this.commissionFeesDialogVisible = false;
+ this.$refs.exportFees.resetFields();
+ },
+ // 瀵煎嚭寰呮浠诲姟
+ exportUnInsProductsFun() {
+ this.$refs.exportUnInsProducts.validate((valid) => {
+ if (valid) {
+ let data = {
+ startDate: this.unInsProductsData.sendTime[0],
+ endDate: this.unInsProductsData.sendTime[1],
+ entrustCode: this.queryParams.entrustCode,
+ insState: this.queryParams.insState,
+ sampleCode: this.queryParams.sampleCode,
+ sample: this.queryParams.sample,
+ sonLaboratory: this.queryParams.sonLaboratory,
+ };
+ console.log(data);
+ exportUnInsProducts(data)
+ .then((res) => {
+ transformExcel(res, "寰呮浠诲姟缁熻.xlsx");
+ this.$nextTick(() => {
+ this.$message.success("瀵煎嚭鎴愬姛");
+ this.handleCloseUnInsDialog();
+ });
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ }
+ });
+ },
+ handleCloseUnInsDialog() {
+ this.unInsProductsData.sendTime = [];
+ this.unInsDialogVisible = false;
+ this.$refs.exportUnInsProducts.resetFields();
+ },
+ //鍓嶅線澶嶆牳鎸夐挳鏉冮檺鏍¢獙
+ premissionReviewFun() {
+ if (this.currentRow) {
+ let row = this.currentRow;
+ return !(
+ row.userName == null ||
+ row.insState != 3 ||
+ (row.checkName && !row.checkName.includes(this.nickName))
+ );
+ }
+ },
+ //鍓嶅線澶嶆牳鏂规硶
+ goReview(currentRow) {
+ this.dataDialogVisible = false;
+ this.$nextTick(() => {
+ this.handleReview(currentRow);
+ });
+ },
+ //鏌ョ湅妫�楠岀粨鏋�-璁$畻琛ㄦ牸鍒楀搴�
+ calcTableColumnWidth(columnName) {
+ let width = 120;
+ if (columnName) {
+ let clacWidth = 20 * columnName.length;
+ width = clacWidth > width ? clacWidth : width;
+ }
+ return width;
+ },
+ getTableHeight() {
+ const outherMainHeight = this.more ? 386 : 336; //涓昏〃鏍煎叾浣欓珮搴�
+ const otherHeight = 320; // 鍏朵綑楂樺害
+ const tableH = 50; // 璺濈椤甸潰涓嬫柟鐨勯珮搴�
+ const tableHeightDetil = window.innerHeight - tableH;
+ if (tableHeightDetil <= 300) {
+ this.tableHeight = 200;
+ this.tableMainHeight = 200;
+ } else {
+ this.tableHeight = window.innerHeight - tableH - otherHeight;
+ this.tableMainHeight = window.innerHeight - tableH - outherMainHeight;
+ }
+ },
+ // 瀵煎嚭鏌ョ湅缁撴灉鏁版嵁
+ excelExportTrends() {
+ this.$message.warning("姝e湪瀵煎嚭 璇风◢鍚�...");
+ this.outLoading = true;
+ exportInsOrderPlanResult({
+ sampleType: this.tabName,
+ sonLaboratory: this.selectTab,
+ entrustCode: this.excelForm.entrustCode,
+ sampleCode: this.excelForm.sampleCode,
+ createUser: this.excelForm.sampleName,
+ insTime: this.excelForm.dateTime,
+ headerS: JSON.stringify(this.tableHeader),
+ })
+ .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();
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ handleClose3() {
+ this.dialogVisible = false;
+ },
+ handleSizeChange(val) {
+ this.pageSize = val;
+ let table = JSON.parse(JSON.stringify(this.trendsTable));
+ this.tabsData = table.slice(0, val);
+ console.log(`姣忛〉 ${val} 鏉);
+ },
+ handleCurrentChange(val) {
+ let table = JSON.parse(JSON.stringify(this.trendsTable));
+ this.tabsData = table.slice(
+ (val - 1) * this.pageSize,
+ val * this.pageSize
+ );
+ console.log(`褰撳墠椤�: ${val}`);
+ },
+ handleClick(tab, event) {
+ this.tabName = this.tabs[tab.name];
+ this.getTabHeader(this.tabs[tab.name]);
+ },
+ excelSearch() {
+ this.getTabHeader(this.tabName);
+ },
+ // 瀵煎嚭寮规鑾峰彇tabs椤垫爣绛�
+ excelExport() {
+ this.resetForm();
+ this.outLoading = false;
+ this.activeName = "0";
+ if (this.selectTab == null || this.selectTab == "") {
+ this.selectTab = this.tabList[0].value;
+ }
+ this.loadingTable = true;
+ getTabHeader({
+ sonLaboratory: this.selectTab,
+ samples: "",
+ })
+ .then((res) => {
+ if (res.code === 200) {
+ this.tabs = res.data.tabHeader;
+ this.tabName = this.tabs[0];
+ this.getTabHeader(this.tabs[0]); // 鑾峰彇鍔ㄦ�佽〃澶�
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ this.dialogVisibleExcel = true;
+ },
+ // samples鑾峰彇鍔ㄦ�佽〃澶�
+ getTabHeader(samples) {
+ getTabHeader({
+ sonLaboratory: this.selectTab,
+ samples: samples,
+ })
+ .then((res) => {
+ if (res.code === 200) {
+ this.loadingTable = true;
+ this.tableHeader = [];
+ this.tableHeader = res.data.tableHeader;
+ let data = {
+ sampleType: samples,
+ sonLaboratory: this.selectTab,
+ entrustCode: this.excelForm.entrustCode,
+ sampleCode: this.excelForm.sampleCode,
+ createUser: this.excelForm.sampleName,
+ insTime: this.excelForm.dateTime,
+ headerS: JSON.stringify(this.tableHeader),
+ };
+ if (samples == "娓╁害寰幆") {
+ // 鑾峰彇琛ㄦ牸鏁版嵁
+ getInsOrderTemList(data)
+ .then((res) => {
+ if (res.code === 200) {
+ this.tabsData = [];
+ this.trendsTable = res.data;
+ // 鍒嗛〉
+ this.total = this.trendsTable.length;
+ this.tabsData = res.data.slice(0, this.pageSize);
+ this.loadingTable = false;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ } else {
+ // 鑾峰彇琛ㄦ牸鏁版嵁
+ getInsOrderPlanList(data)
+ .then((res) => {
+ if (res.code === 200) {
+ this.tabsData = [];
+ this.trendsTable = res.data;
+ // 鍒嗛〉
+ this.total = this.trendsTable.length;
+ this.tabsData = res.data.slice(0, this.pageSize);
+ this.loadingTable = false;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ }
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ // 娓呯┖琛ㄥ崟
+ resetForm() {
+ this.excelForm = {
+ entrustCode: null,
+ sampleCode: null,
+ sampleName: null,
+ dateTime: null,
+ };
+ },
+
+ // 鏁版嵁鏌ョ湅
+ handleDataLook(row) {
+ this.dataLookTableLoading = true;
+ selectSampleAndProductByOrderId({ id: row.id })
+ .then((res) => {
+ if (res.code === 200) {
+ this.dataLooktableData = res.data;
+ }
+ this.dataLookTableLoading = false;
+ })
+ .catch((error) => {
+ console.error(error);
+ this.dataLookTableLoading = false;
+ });
+ this.dataDialogVisible = true;
+ },
+ changeCheckBox(val) {
+ this.queryParams.userId = val ? 0 : null;
+ this.refreshTable();
+ },
+ refresh() {
+ if (this.tabList.length > 0) {
+ this.tabIndex = 0;
+ this.queryParams.sonLaboratory = this.tabList[0].value;
+ }
+ this.refreshTable();
+ },
+ claimFun(row) {
+ if (row) {
+ this.sampleUserForm = {
+ entrustCode: row.entrustCode,
+ insSampleId: row.id,
+ sonLaboratory: row.sonLaboratory,
+ };
+ this.claimVisible = true;
+ }
+ },
+ confirmClaim() {
+ this.loading = true;
+ claimInsOrderPlan(this.sampleUserForm)
+ .then((res) => {
+ if (res.code === 200 && res.data) {
+ this.loading = false;
+ this.$message.success("璁ら鎴愬姛");
+ this.claimVisible = false;
+ this.refreshTable("page");
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ this.loading = false;
+ });
+ },
+ refreshTable() {
+ this.getList();
+ this.$nextTick(() => {
+ this.getCurrentMonthPlanTotal();
+ });
+ },
+ changeRowClass({ row, rowIndex }) {
+ if (this.currentTime == row.appointed) {
+ return "highlight-warning-row-border";
+ } else if (this.currentTime > row.appointed) {
+ return "highlight-danger-row-border";
+ }
+ return "";
+ },
+ onReset() {
+ this.searchForm = {
+ sampleName: null,
+ state: null,
+ };
+ this.componentData.entity.insState = null;
+ this.componentData.entity.sampleName = null;
+ this.refreshTable();
+ },
+ onSubmit() {
+ this.componentData.entity.insState = this.searchForm.state;
+ this.componentData.entity.sampleName = this.searchForm.sampleName;
+ this.$nextTick(() => {
+ this.refreshTable();
+ });
+ },
+ handleTab(m, i) {
+ console.log("aaa", m, i);
+ this.selectTab = m.value;
+ this.tabIndex = i;
+ this.queryParams.sonLaboratory = m.value;
+ this.refreshTable();
+ },
+ getTypeDicts() {
+ getDicts("urgency_level")
+ .then((res) => {
+ if (res.code === 200) {
+ this.urgencyDictList = res.data;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ getInsStateDicts() {
+ getDicts("inspection_task_state")
+ .then((res) => {
+ if (res.code === 200) {
+ this.insStateList = res.data;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ // this.$axios
+ // .post(this.$api.enums.selectEnumByCategory, {
+ // category: "",
+ // })
+ // .then((res) => {
+ // let data = res.data;
+
+ // data.forEach((ele) => {
+ // //0:寰呮楠� 1:妫�楠屼腑 2:宸叉楠� 3:寰呭鏍� 4:澶嶆牳鏈�氳繃 5:澶嶆牳閫氳繃
+ // if (["2", "5"].includes(ele.value)) {
+ // ele.type = "success";
+ // } else if (["1", "3"].includes(ele.value)) {
+ // ele.type = "warning";
+ // } else if (["0", "4"].includes(ele.value)) {
+ // ele.type = "danger";
+ // }
+ // });
+ // this.componentData.tagField.insState.select = data;
+ // });
+ },
+ getLaboratoryDicts() {
+ getDicts("sys_sub_lab")
+ .then((res) => {
+ if (res.code === 200) {
+ this.tabList = res.data.map((ele) => {
+ return {
+ label: ele.dictLabel,
+ value: ele.dictValue,
+ };
+ });
+ if (this.tabList.length > 0) {
+ this.queryParams.sonLaboratory = this.tabList[0].value;
+ }
+ this.refreshTable();
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ selectAllByOne(row) {
+ this.$router.push({
+ name: "showDetails",
+ query: {
+ active: 2,
+ currentId: row.id,
+ examine: 1,
+ isPlan: true,
+ },
+ });
+ },
+ //鏌ョ湅濮旀墭鍗曞熀鏈俊鎭�
+ selectOrderInfo(row) {
+ if (row) {
+ getSampleInfoByOrderId({
+ id: row.id,
+ sonLaboratory: row.sonLaboratory,
+ })
+ .then((res) => {
+ if (res.code == 200) {
+ this.insSampleListData = res.data.insSamples;
+ this.insProductVOSData = res.data.insProductVOS;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ }
+ this.$nextTick(() => {
+ this.orderInfoDialog = true;
+ });
+ },
+ playOrder(num) {
+ this.activeFace = num;
+ },
+ goback() {
+ this.state = 0;
+ this.refreshTable("page");
+ },
+ handleInspection(row) {
+ //褰撳墠妫�楠屼换鍔$殑妫�楠屼汉鍒楄〃
+ let inspectorList = [];
+ if (row.userName) {
+ inspectorList = row.userName.split(",");
+ }
+ inspectorList.push(this.nickName);
+ this.inspectorList = inspectorList;
+ this.state = 1;
+ this.orderId = row.id;
+ },
+ handleConnect(row) {
+ this.orderId = row.id;
+ this.connect = {
+ connectPerson: "",
+ sonLaboratory: "",
+ };
+ this.userNameList = row.userName.split(",");
+ this.connectVisible = true;
+ upPlanUser2({
+ orderId: this.orderId,
+ })
+ .then((res) => {
+ if (res.code === 200 && res.data.length > 0) {
+ this.sonLaboratoryList = [];
+ res.data.forEach((m) => {
+ this.sonLaboratoryList.push({
+ value: m,
+ label: m,
+ });
+ });
+ this.connect.sonLaboratory = row.sonLaboratory;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ confirmConnect() {
+ if (
+ this.connect.connectPerson == null ||
+ this.connect.connectPerson == "" ||
+ this.connect.connectPerson == undefined
+ ) {
+ this.$message.error("鏈�夋嫨浜ゆ帴浜哄憳");
+ return;
+ }
+ if (
+ this.connect.sonLaboratory == null ||
+ this.connect.sonLaboratory == "" ||
+ this.connect.sonLaboratory == undefined
+ ) {
+ this.$message.error("鏈�夋嫨璇曢獙瀹�");
+ return;
+ }
+ this.loading = true;
+ upPlanUser({
+ orderId: this.orderId,
+ userId: this.connect.connectPerson,
+ sonLaboratory: this.connect.sonLaboratory,
+ })
+ .then((res) => {
+ if (res.code === 200) {
+ this.loading = false;
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.refreshTable("page");
+ }
+ this.connectVisible = false;
+ })
+ .catch((error) => {
+ console.error(error);
+ this.loading = false;
+ });
+ },
+ handleReview(row) {
+ this.state = 2;
+ this.orderId = row.id;
+ },
+ getAuthorizedPerson() {
+ getLaboratoryPersonList()
+ .then((res) => {
+ if (res.code === 200) {
+ this.personList = res.data;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ handleClose(done) {
+ done();
+ },
+ getStyle() {
+ return "height: calc(100% - " + (this.more ? "94" : "44") + "px)";
+ },
+ },
+};
</script>
-<style></style>
+<style scoped lang="scss">
+.ins-order-plan-main .title {
+ font-size: 20px;
+ color: #3a7bfa;
+}
+
+.search {
+ background-color: #fff;
+ display: flex;
+ align-items: center;
+}
+
+.search_thing {
+ display: flex;
+ align-items: center;
+ height: 50px;
+ width: 230px;
+}
+
+.search_label {
+ /* width: 90px; */
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 70px);
+}
+
+.ins-order-plan-main .search {
+ width: 100%;
+ margin-bottom: 10px;
+ height: 80px;
+ background-color: #fff;
+ border-radius: 3px;
+}
+
+.search .form-inline {
+ height: 50px;
+ padding-top: 20px;
+ padding-left: 20px;
+}
+
+.tab {
+ list-style-type: none;
+ display: flex;
+ padding-inline-start: 0px;
+}
+
+.tab li {
+ line-height: 24px;
+ padding: 6px 14px;
+ font-size: 14px;
+ color: #333333;
+ border: 1px solid #eeeeee;
+ cursor: pointer;
+}
+
+.tab li:nth-child(1) {
+ border-radius: 8px 0 0 8px;
+}
+
+.tab li:nth-last-child(1) {
+ border-radius: 0 8px 8px 0;
+}
+
+.tab li.active {
+ border-color: #3a7bfa;
+ color: #3a7bfa;
+}
+
+.center .center-options .center-title {
+ display: flex;
+ align-items: center;
+ justify-content: right;
+ text-align: right;
+ span:last-child {
+ color: #3a7bfa;
+ font-size: 23px;
+ font-weight: 400;
+ }
+ p:last-child {
+ margin-left: 20px;
+ }
+}
+
+.view-self-checkbox {
+ margin-left: 50px;
+}
+.ins-order-plan-main .el-form-item__label {
+ color: #000;
+}
+
+.ins-order-plan-main .el-table th.el-table__cell > .cell {
+ height: 46px;
+ line-height: 30px;
+}
+</style>
--
Gitblit v1.9.3