From 6f90e7110190d146fde06cf1f5b2272fd49b53d6 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期一, 19 十月 2026 17:24:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/business/inspectionTask/index.vue |   73 ++++++++++++++++++++++++++++++------
 1 files changed, 61 insertions(+), 12 deletions(-)

diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 0e712b9..9131551 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -3,7 +3,7 @@
     <div style="height: 100%">
       <div class="search">
         <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
-          <el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
+          <el-form-item :label="taskSource === 'QUALITY_MONITOR' ? '鐩戞帶浠诲姟缂栧彿' : '濮旀墭缂栧彿'" prop="entrustCode">
             <el-input v-model="queryParams.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
                       @keyup.enter="refreshTable()"></el-input>
           </el-form-item>
@@ -29,7 +29,7 @@
       <div class="center" v-loading="tableLoading">
         <div class="center-options">
           <div style="display: flex; align-items: center">
-            <span style="font-size: 14px">璇曢獙瀹�:</span>
+            <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)">
                 {{ m.label.replace("璇曢獙瀹�", "") }}
@@ -45,7 +45,7 @@
             <span>{{ page.total }}</span>
           </div>
         </div>
-        <lims-table :tableData="tableData" :column="column" :page="page"
+        <lims-table :tableData="tableData" :column="displayColumns" :page="page"
           :rowClassName="rowClassName" :height="'calc(100vh - 300px)'" @pagination="pagination"
           key="tableData0">
           <template #action="scope"><div>
@@ -56,7 +56,7 @@
                   (scope.row.userName && !scope.row.userName.includes(nickName))
                 )"
                        @click="handleInspection(scope.row)">妫�楠�</el-button>
-            <el-button link type="primary" size="small" :disabled="(
+            <el-button v-if="scope.row.taskSource !== 'QUALITY_MONITOR'" link type="primary" size="small" :disabled="(
                   scope.row.userName == null ||
                   scope.row.insState == 5 ||
                   scope.row.insState == 3 ||
@@ -64,12 +64,13 @@
                 )"
                        @click="handleConnect(scope.row)">浜ゆ帴</el-button>
             <el-button link type="primary" size="small" @click="viewInspectInfo(scope.row)">鍘熷璁板綍</el-button>
-            <el-popover placement="bottom" trigger="hover" style="margin-left: 6px" :disabled="(scope.row.insState != 3 || scope.row.userName == null ||(scope.row.userName && !scope.row.userName.includes(nickName)))">
+            <el-button v-if="scope.row.taskSource === 'QUALITY_MONITOR'" link type="primary" size="small" @click="showMonitorRequirement(scope.row)">{{ Number(scope.row.insState) === 5 ? '璇勪环璁板綍' : '璇勪环瑕佹眰' }}</el-button>
+            <el-popover v-if="scope.row.taskSource !== 'QUALITY_MONITOR'" placement="bottom" trigger="hover" style="margin-left: 6px" :disabled="(scope.row.insState != 3 || scope.row.userName == null ||(scope.row.userName && !scope.row.userName.includes(nickName)))">
               <template #reference>
-                <el-button link type="primary" size="small" :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+                <el-button link type="primary" size="small" :disabled="(scope.row.taskSource === 'QUALITY_MONITOR' || scope.row.insState != 3 || scope.row.userName == null ||
                   (scope.row.userName && !scope.row.userName.includes(nickName)))">鏇村</el-button>
               </template>
-              <div>
+              <div v-if="scope.row.taskSource !== 'QUALITY_MONITOR'">
                 <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
                   (scope.row.userName && !scope.row.userName.includes(nickName)))" style="margin-left: 10px" link type="primary" size="small" @click="download(scope.row)">涓嬭浇鎶ュ憡</el-button>
                 <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
@@ -80,6 +81,23 @@
         </lims-table>
       </div>
     </div>
+    <el-dialog v-model="monitorRequirementVisible" title="璐ㄩ噺鐩戞帶璇勪环瑕佹眰" width="560px">
+      <el-descriptions :column="1" border>
+        <el-descriptions-item label="鐩戞帶浠诲姟缂栧彿">{{ monitorRequirement.entrustCode }}</el-descriptions-item>
+        <el-descriptions-item label="鐩戞帶椤圭洰">{{ monitorRequirement.monitorProject }}</el-descriptions-item>
+        <el-descriptions-item label="鐩戞帶鐩殑">{{ monitorRequirement.monitorPurpose }}</el-descriptions-item>
+        <el-descriptions-item label="鐩戞帶鏂瑰紡">{{ monitorRequirement.monitorWay }}</el-descriptions-item>
+        <el-descriptions-item label="妫�娴嬫爣鍑�">{{ monitorRequirement.standardCode }}</el-descriptions-item>
+        <el-descriptions-item label="鏍峰搧鍙婅鏍�">{{ monitorRequirement.sample }} {{ monitorRequirement.sampleSpec }}</el-descriptions-item>
+        <el-descriptions-item label="瀹屾垚鏈熼檺">{{ monitorRequirement.dueDate }}</el-descriptions-item>
+      </el-descriptions>
+      <p>璇峰湪鈥滃師濮嬭褰曗�濅腑濉啓妫�娴嬫暟鎹紝澶嶆牳閫氳繃鍚庣敱璇勪环浜哄憳濉啓璐ㄩ噺鎺у埗璇勪环璁板綍銆�</p>
+      <template #footer>
+        <el-button @click="monitorRequirementVisible=false">鍏抽棴</el-button>
+        <el-button v-if="Number(monitorRequirement.insState) === 5" type="primary" @click="openMonitorEvaluation">鎵撳紑璇勪环璁板綍</el-button>
+      </template>
+    </el-dialog>
+    <inspection-evaluation-dialog v-if="inspectionEvaluateDialog" ref="inspectionEvaluateDialog" @close="inspectionEvaluateDialog=false" />
     <el-dialog v-model="claimVisible" title="鎻愮ず" width="400px">
       鏄惁璁ら濮旀墭缂栧彿<span style="color: #33c130">{{
         sampleUserForm.entrustCode
@@ -210,10 +228,11 @@
 import {getRetestResult} from "@/api/business/rawMaterialOrder";
 import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
 import filePreview from "@/components/Preview/filePreview.vue";
+import InspectionEvaluationDialog from "@/views/CNAS/process/ensureResults/ensureResultsValidity/components/inspectionEvaluationDialog.vue";
 export default {
   name: 'InspectionTask',
   components: {
-    filePreview, onlyoffice,
+    filePreview, onlyoffice, InspectionEvaluationDialog,
     limsTable,
     viewManHourDia,
     UnPassRetestResult
@@ -221,10 +240,18 @@
   dicts: ["urgency_level", "inspection_task_state","material_prop_type"],
   computed: {
     ...mapGetters(["nickName", "userId"]),
+    displayColumns() {
+      return this.column.filter(item => this.taskSource === 'QUALITY_MONITOR'
+        ? !['typeSource', 'orderType'].includes(item.prop)
+        : !['monitorProject', 'dueDate'].includes(item.prop))
+    },
   },
   data() {
     return {
       issuedVisible: false,
+      monitorRequirementVisible: false,
+      monitorRequirement: {},
+      inspectionEvaluateDialog: false,
       fullscreen: false,
       lookDialogVisible: false,
       option: null,
@@ -245,7 +272,8 @@
       },
       claimVisible: false,
       tabList: [
-        { label: "濮旀墭", value: -1 },
+        { label: "濮旀墭", value: "ENTRUSTED" },
+        { label: "璐ㄩ噺鐩戞帶", value: "QUALITY_MONITOR" },
         // { label: "鍘熸潗鏂�", value: 1 },
         // { label: "澶栬喘", value: 0 },
       ],
@@ -255,6 +283,7 @@
       insStateList: [],
       state: 0, // 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
       typeSource: -1, // 0:澶栬喘鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟
+      taskSource: 'ENTRUSTED',
       sonLaboratory: null, // 0:濮旀墭锛�1锛氬師鏉愭枡
       activeFace: 0, // 1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝榛樿涓�0
       currentId: null,
@@ -328,12 +357,14 @@
       tableData: [],
       column: [
         {
-          label: "濮旀墭缂栧彿",
+          label: "浠诲姟缂栧彿",
           prop: "entrustCode",
           width: "160px",
           dataType: "link",
           linkMethod: "selectAllByOne",
         },
+        { label: "鐩戞帶椤圭洰", prop: "monitorProject", width: "150px" },
+        { label: "璁″垝鏈熼檺", prop: "dueDate", width: "120px" },
         { label: "鏍峰搧鍚嶇О", prop: "sample", width: "160px" },
         {
           label: "涓嬪崟绫诲埆",
@@ -445,6 +476,7 @@
     this.getAuthorizedPerson();
     this.queryParams.userId = this.userId;
     this.queryParams.typeSource = this.typeSource
+    this.queryParams.taskSource = this.taskSource
     this.currentTime = getYearAndMonthAndDays();
     this.getDicts("urgency_level").then((response) => {
       this.urgencyLevel = this.dictToValue(response.data);
@@ -464,9 +496,19 @@
       this.inspectionTaskState = this.dictToValue(response.data);
     });
     this.queryParams.typeSource = this.typeSource
+    this.queryParams.taskSource = this.taskSource
     this.refreshTable();
   },
   methods: {
+    showMonitorRequirement(row) {
+      this.monitorRequirement = row
+      this.monitorRequirementVisible = true
+    },
+    openMonitorEvaluation() {
+      this.monitorRequirementVisible = false
+      this.inspectionEvaluateDialog = true
+      this.$nextTick(() => this.$refs.inspectionEvaluateDialog.open(this.monitorRequirement))
+    },
     getList() {
       this.tableLoading = true;
       let param = { ...this.queryParams, ...this.page };
@@ -505,7 +547,8 @@
     refreshTable(e) {
       this.page.current = 1;
       this.queryParams.tabLabel = this.tabLabel;
-      this.queryParams.typeSource = this.typeSource;
+      this.queryParams.taskSource = this.taskSource;
+      this.queryParams.typeSource = this.taskSource === 'ENTRUSTED' ? -1 : null;
       this.getList();
     },
     // 涓嬭浇鎶ュ憡
@@ -576,11 +619,15 @@
     },
     handleTab(m, i) {
       this.tabIndex = i;
-      this.typeSource =m.value;
+      this.taskSource = m.value;
       this.queryParams.sonLaboratory = "";
       this.refreshTable();
     },
     selectAllByOne(row) {
+      if (row.taskSource === 'QUALITY_MONITOR') {
+        this.viewInspectInfo(row)
+        return
+      }
       this.isCopper = row.isCopper;
       this.customsInspection = row;
       this.activeFace = 2;
@@ -647,6 +694,7 @@
           sonLaboratory: this.sonLaboratory,
           state: this.state,
           typeSource: this.typeSource,
+          taskSource: row.taskSource,
           orderId: this.orderId
         },
       });
@@ -673,6 +721,7 @@
           sonLaboratory: this.sonLaboratory,
           state: this.state,
           typeSource: this.typeSource,
+          taskSource: row.taskSource,
           orderId: this.orderId,
         },
       });

--
Gitblit v1.9.3