From 037a7112a2bc9e38bb2f398ff5ca740ac01a8fb2 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 20 二月 2025 10:21:05 +0800
Subject: [PATCH] 检验任务搬迁30%

---
 src/views/business/inspectionTask/index.vue |  316 +++++++++-------------------------------------------
 1 files changed, 56 insertions(+), 260 deletions(-)

diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 71998c7..6dccaa2 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -89,43 +89,27 @@
 </style>
 <template>
   <div class="ins-order-plan-main">
-    <div v-show="activeFace == 0 && state == 0" style="height: 100%">
+    <div v-show="activeFace == 0" style="height: 100%">
       <div class="search">
         <div class="search_thing">
           <div class="search_label">濮旀墭缂栧彿锛�</div>
           <div class="search_input">
-            <el-input
-              v-model="queryParams.entrustCode"
-              clearable
-              placeholder="璇疯緭鍏�"
-              size="small"
-              @keyup.enter.native="refreshTable()"
-            ></el-input>
+            <el-input v-model="queryParams.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
+              @keyup.enter.native="refreshTable()"></el-input>
           </div>
         </div>
         <div class="search_thing">
           <div class="search_label">妫�楠岀姸鎬侊細</div>
           <div class="search_input">
-            <el-select
-              v-model="queryParams.insState"
-              size="small"
-              style="width: 100%"
-              @change="refreshTable()"
-            >
-              <el-option
-                v-for="(a, i) in dict.type.inspection_task_state"
-                :key="i"
-                :label="a.label"
-                :value="a.value"
-              ></el-option>
+            <el-select v-model="queryParams.insState" size="small" style="width: 100%" @change="refreshTable()">
+              <el-option v-for="(a, i) in dict.type.inspection_task_state" :key="i" :label="a.label"
+                :value="a.value"></el-option>
             </el-select>
           </div>
         </div>
         <div class="search_thing" style="padding-left: 30px">
           <el-button size="small" @click="refresh()">閲� 缃�</el-button>
-          <el-button size="small" type="primary" @click="refreshTable()"
-            >鏌� 璇�</el-button
-          >
+          <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
         </div>
       </div>
       <div class="center">
@@ -135,22 +119,13 @@
               <div style="display: flex; align-items: center">
                 <span style="font-size: 14px">璇曢獙瀹ょ绫�:</span>
                 <ul class="tab">
-                  <li
-                    v-for="(m, i) in tabList"
-                    :key="i"
-                    :class="{ active: i == tabIndex }"
-                    @click="handleTab(m, i)"
-                  >
+                  <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
-                    v-model="alone"
-                    class="view-self-checkbox"
-                    @change="changeCheckBox"
-                    ><span>鎴戠殑浠诲姟</span></el-checkbox
-                  >
+                  <el-checkbox v-model="alone" class="view-self-checkbox"
+                    @change="changeCheckBox"><span>鎴戠殑浠诲姟</span></el-checkbox>
                 </div>
               </div>
             </el-col>
@@ -162,27 +137,17 @@
             </el-col>
           </el-row>
         </div>
-        <lims-table
-          :tableData="tableData"
-          :column="column"
-          :page="page"
-          :tableLoading="tableLoading"
-          :height="'calc(100vh - 300px)'"
-          @pagination="pagination"
-          key="tableData0"
-        ></lims-table>
+        <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+          :height="'calc(100vh - 300px)'" @pagination="pagination" key="tableData0"></lims-table>
       </div>
     </div>
     <el-dialog :visible.sync="claimVisible" title="鎻愮ず" width="400px">
       鏄惁璁ら濮旀墭缂栧彿<span style="color: #33c130">{{
         sampleUserForm.entrustCode
-      }}</span
-      >鐨勪换鍔�
+      }}</span>鐨勪换鍔�
       <span slot="footer" class="dialog-footer">
         <el-button @click="claimVisible = false">鍙� 娑�</el-button>
-        <el-button :loading="loading" type="primary" @click="confirmClaim"
-          >纭� 瀹�</el-button
-        >
+        <el-button :loading="loading" type="primary" @click="confirmClaim">纭� 瀹�</el-button>
       </span>
     </el-dialog>
     <el-dialog :visible.sync="connectVisible" title="妫�楠屼氦鎺�" width="400px">
@@ -191,18 +156,8 @@
           <span class="required-span">* </span>浜ゆ帴浜哄憳锛�
         </div>
         <div class="search_input">
-          <el-select
-            v-model="connect.connectPerson"
-            filterable
-            placeholder="璇烽�夋嫨"
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in personList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <el-select v-model="connect.connectPerson" filterable placeholder="璇烽�夋嫨" style="width: 100%">
+            <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
         </div>
@@ -212,39 +167,21 @@
           <span class="required-span">* </span>璇曢獙瀹わ細
         </div>
         <div class="search_input">
-          <el-select
-            v-model="connect.sonLaboratory"
-            filterable
-            placeholder="璇烽�夋嫨"
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in sonLaboratoryList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <el-select v-model="connect.sonLaboratory" filterable placeholder="璇烽�夋嫨" style="width: 100%">
+            <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 :loading="loading" type="primary" @click="confirmConnect"
-          >纭� 瀹�</el-button
-        >
+        <el-button :loading="loading" type="primary" @click="confirmConnect">纭� 瀹�</el-button>
       </span>
     </el-dialog>
-    <div
-      v-if="activeFace > 0 && isCopper == null"
-      style="width: 100%; height: 100%"
-    >
+    <div v-if="activeFace > 0 && isCopper == null" style="width: 100%; height: 100%">
       <!-- <Add :active="activeFace" :currentId="currentId" :examine="examine" /> -->
     </div>
-    <div
-      v-if="activeFace > 0 && isCopper == 0"
-      style="width: 100%; height: 100%"
-    >
+    <div v-if="activeFace > 0 && isCopper == 0" style="width: 100%; height: 100%">
       <!-- <CustomsInspection
         :active="activeFace"
         :currentId="currentId"
@@ -252,10 +189,7 @@
         :isReport="isReport"
       /> -->
     </div>
-    <div
-      v-if="activeFace > 0 && isCopper == 1"
-      style="width: 100%; height: 100%"
-    >
+    <div v-if="activeFace > 0 && isCopper == 1" style="width: 100%; height: 100%">
       <!-- <CopperOrder :active="activeFace" :currentId="currentId"></CopperOrder> -->
     </div>
     <!--<Inspection
@@ -271,46 +205,23 @@
     />-->
     <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%">
       <div v-if="dataDialogVisible" style="height: 70vh; overflow-y: auto">
-        <lims-table
-          :tableData="lookTableData"
-          :column="lookColumn"
-          :page="lookPage"
-          :tableLoading="lookTableLoading"
-          :height="'60vh'"
-          @pagination="lookPagination"
-          key="tableData1"
-        ></lims-table>
+        <lims-table :tableData="lookTableData" :column="lookColumn" :page="lookPage" :tableLoading="lookTableLoading"
+          :height="'60vh'" @pagination="lookPagination" key="tableData1"></lims-table>
       </div>
     </el-dialog>
-    <el-dialog
-      :visible.sync="bindDialogVisible"
-      title="妫�楠岄」缁戝畾"
-      width="600px"
-    >
-      <div
-        slot="title"
-        style="
+    <el-dialog :visible.sync="bindDialogVisible" title="妫�楠岄」缁戝畾" width="600px">
+      <div slot="title" style="
           display: flex;
           align-items: center;
           justify-content: space-between;
-        "
-      >
+        ">
         <span>妫�楠岄」缁戝畾</span>
-        <el-button
-          style="float: right; margin-left: 360px"
-          size="small"
-          @click="openBindAdd"
-          type="primary"
-        >
+        <el-button style="float: right; margin-left: 360px" size="small" @click="openBindAdd" type="primary">
           鏂板
         </el-button>
       </div>
       <el-table :data="bindTableData" style="width: 100%" height="70vh">
-        <el-table-column
-          prop="inspectionItemClass"
-          label="妫�楠岄」鍒嗙被"
-          width="150"
-        >
+        <el-table-column prop="inspectionItemClass" label="妫�楠岄」鍒嗙被" width="150">
         </el-table-column>
         <el-table-column prop="inspectionItem" label="妫�楠岄」" width="150">
         </el-table-column>
@@ -318,30 +229,16 @@
         </el-table-column>
         <el-table-column label="鎿嶄綔">
           <template slot-scope="scope">
-            <el-button size="mini" type="text" @click="handleDelete(scope.row)"
-              >鍒犻櫎</el-button
-            >
+            <el-button size="mini" type="text" @click="handleDelete(scope.row)">鍒犻櫎</el-button>
           </template>
         </el-table-column>
       </el-table>
     </el-dialog>
-    <el-dialog
-      :visible.sync="bindAddDialogVisible"
-      title="閫夋嫨缁戝畾"
-      width="600px"
-    >
-      <el-table
-        :data="bindAddTableData"
-        style="width: 100%"
-        height="60vh"
-        @selection-change="handleBindAddSelectionChange"
-      >
+    <el-dialog :visible.sync="bindAddDialogVisible" title="閫夋嫨缁戝畾" width="600px">
+      <el-table :data="bindAddTableData" style="width: 100%" height="60vh"
+        @selection-change="handleBindAddSelectionChange">
         <el-table-column type="selection" width="55"> </el-table-column>
-        <el-table-column
-          prop="inspectionItemClass"
-          label="妫�楠岄」鍒嗙被"
-          width="150"
-        >
+        <el-table-column prop="inspectionItemClass" label="妫�楠岄」鍒嗙被" width="150">
         </el-table-column>
         <el-table-column prop="inspectionItem" label="妫�楠岄」" width="150">
         </el-table-column>
@@ -350,17 +247,9 @@
       </el-table>
       <span slot="footer" class="dialog-footer">
         <el-button @click="bindAddDialogVisible = false">鍙� 娑�</el-button>
-        <el-button :loading="loading" type="primary" @click="bindAdd"
-          >缁� 瀹�</el-button
-        >
+        <el-button :loading="loading" type="primary" @click="bindAdd">缁� 瀹�</el-button>
       </span>
     </el-dialog>
-    <!-- <un-pass-retest-result
-      v-if="retestVisible"
-      :retestInfo="retestInfo"
-      :retestVisible="retestVisible"
-      @closeRetestLook="closeRetestLook"
-    ></un-pass-retest-result> -->
     <!--浜т笟閾句俊鎭煡鐪�-->
     <!-- <ShowInfo
       v-if="showInfoDialog"
@@ -379,11 +268,9 @@
 // import Add from "../do/b1-ins-order/add.vue";
 // import ShowInfo from "../do/b1-material-ins-order/showInfo.vue";
 // import CopperOrder from "../do/b1-material-ins-order/copper-order.vue";
-// import UnPassRetestResult from "../do/b1-material-ins-order/unPassRetestResult.vue";
 import EditInspectionItem from "./components/EditInspectionItem.vue";
 import limsTable from "@/components/Table/lims-table.vue";
 import {
-  getRetestResult,
   claimInsOrderPlan,
   upPlanUser2,
   upPlanUser,
@@ -406,11 +293,10 @@
     // Inspection,
     // Add,
     // CustomsInspection,
-    // UnPassRetestResult
   },
   dicts: ["urgency_level", "inspection_task_state"],
   computed: {
-    ...mapGetters(["name", "userId"]),
+    ...mapGetters(["nickName", "userId"]),
   },
   data() {
     return {
@@ -435,85 +321,6 @@
       ],
       active: 1,
       tabIndex: 0,
-      componentDataDataLook: {
-        entity: {
-          id: 0,
-          orderBy: {
-            field: "sampleCode",
-            order: "asc",
-          },
-        },
-        isIndex: false,
-        showSelect: false,
-        select: false,
-        do: [
-          {
-            id: "parent",
-            font: "涓嶅悎鏍煎娴嬫煡鐪�",
-            type: "text",
-            method: "getRetestResult",
-            disabFun: (row, index) => {
-              return row.insResult != 0;
-            },
-          },
-          {
-            id: "parent",
-            font: "妫�楠岄」缁戝畾",
-            type: "text",
-            method: "getBinding",
-            disabFun: (row, index) => {
-              return (
-                this.lookInfo.userName == null ||
-                this.lookInfo.insState == 3 ||
-                this.lookInfo.insState == 5
-              );
-            },
-          },
-        ],
-        tagField: {
-          insState: {
-            select: [],
-          },
-          insResult: {
-            select: [
-              {
-                value: 1,
-                label: "鍚堟牸",
-                type: "success",
-              },
-              {
-                value: 0,
-                label: "涓嶅悎鏍�",
-                type: "danger",
-              },
-              {
-                value: 3,
-                label: "涓嶅垽瀹�",
-                type: "",
-              },
-            ],
-          },
-        },
-        selectField: {},
-        spanConfig: {
-          rows: [
-            {
-              name: "sampleCode",
-              index: 0,
-            },
-            {
-              name: "sample",
-              index: 1,
-            },
-            {
-              name: "model",
-              index: 6,
-            },
-          ],
-        },
-        requiredAdd: [],
-        requiredUp: [],
-      },
       dataDialogVisible: false,
       planTotal: 0,
       insStateList: [],
@@ -540,7 +347,6 @@
       customsInspection: {},
       showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪�
       isReport: 0,
-      retestVisible: false,
       retestInfo: [],
       isCopper: null,
       bindCurrentInfo: {},
@@ -668,7 +474,7 @@
                   row.userName == null ||
                   row.insState == 3 ||
                   row.insState == 5 ||
-                  (row.userName && !row.userName.includes(this.name))
+                  (row.userName && !row.userName.includes(this.nickName))
                 );
               },
             },
@@ -683,7 +489,7 @@
                   row.userName == null ||
                   row.insState == 5 ||
                   row.insState == 3 ||
-                  (row.userName && !row.userName.includes(this.name))
+                  (row.userName && !row.userName.includes(this.nickName))
                 );
               },
             },
@@ -721,6 +527,7 @@
           type: "",
         },
       ],
+      // 鏁版嵁鏌ョ湅鐩稿叧瀛楁---寮�濮�
       lookTableData: [],
       lookColumn: [
         {
@@ -756,16 +563,6 @@
           label: "鎿嶄綔",
           operation: [
             {
-              name: "涓嶅悎鏍煎娴嬫煡鐪�",
-              type: "text",
-              clickFun: (row) => {
-                this.getRetestResult(row);
-              },
-              disabled: (row) => {
-                return row.insResult != 0;
-              },
-            },
-            {
               name: "妫�楠岄」缁戝畾",
               type: "text",
               clickFun: (row) => {
@@ -788,6 +585,7 @@
         current: 0,
       },
       lookTableLoading: false,
+      // 鏁版嵁鏌ョ湅鐩稿叧瀛楁---缁撴潫
     };
   },
   created() {
@@ -837,6 +635,7 @@
           if (res.code === 200) {
             this.lookTableData = res.data.records;
             this.lookPage.total = res.data.total;
+            this.dataDialogVisible = true;
           }
         })
         .catch((err) => {
@@ -860,19 +659,6 @@
     handleDataLook(row) {
       this.lookInfo = row;
       this.getLookList();
-      this.dataDialogVisible = true;
-    },
-    // 鏌ョ湅涓嶅悎鏍煎娴嬬粨鏋�
-    getRetestResult(row) {
-      getRetestResult({ insProductId: row.insProductId }).then((res) => {
-        if (res.code == 201) return;
-        this.retestVisible = true;
-        this.retestInfo = res.data;
-      });
-    },
-    //
-    closeRetestLook() {
-      this.retestVisible = false;
     },
     // 鏉冮檺鍒嗛厤
     getPower(radio) {
@@ -1023,14 +809,24 @@
       if (row.userName) {
         inspectorList = row.userName.split(",");
       }
-      if (this.name) {
-        inspectorList.push(this.name);
+      if (this.nickName) {
+        inspectorList.push(this.nickName);
       }
       this.inspectorList = inspectorList;
       this.sonLaboratory = row.sonLaboratory;
       this.state = 1;
       this.typeSource = row.typeSource;
       this.orderId = row.id;
+      this.$router.push({
+        path: "/inspectionTask/inspection",
+        query: {
+          inspectorList: this.inspectorList,
+          sonLaboratory: this.sonLaboratory,
+          state: this.state,
+          typeSource: this.typeSource,
+          orderId: this.orderId,
+        },
+      });
     },
     // 鏌ョ湅妫�楠屾暟鎹�
     viewInspectInfo(row) {
@@ -1039,8 +835,8 @@
       if (row.userName) {
         inspectorList = row.userName.split(",");
       }
-      if (this.name) {
-        inspectorList.push(this.name);
+      if (this.nickName) {
+        inspectorList.push(this.nickName);
       }
       this.inspectorList = inspectorList;
       this.sonLaboratory = row.sonLaboratory;
@@ -1106,7 +902,7 @@
       this.orderId = row.id;
     },
     getAuthorizedPerson() {
-      selectUserCondition().then((res) => {
+      selectUserCondition({ type: 1 }).then((res) => {
         let data = [];
         res.data.forEach((a) => {
           data.push({

--
Gitblit v1.9.3