From 825172fe39308a3c8a36c4bece5aba7c8761b0db Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期四, 22 十月 2026 20:28:19 +0800
Subject: [PATCH] fix: 完善检验设备显示与报告印章提示

---
 src/views/business/inspectionTask/inspection.vue |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 0150dfc..4c7cafe 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -187,7 +187,8 @@
           </el-form-item>
           <el-form-item label="璁惧:">
             <el-select v-model="currentOtherForm.deviceIds" :disabled="state != 1" multiple filterable clearable
-              size="small" placeholder="璇烽�夋嫨璁惧" style="width: 360px"
+              class="device-select" size="small" placeholder="璇烽�夋嫨璁惧"
+              style="width: 360px !important; min-width: 360px; flex: 0 0 360px"
               @change="(m) => subOtherForm(m, 'deviceIds')">
               <el-option v-for="device in orderDeviceOptions" :key="device.id" :label="device.label" :value="device.id" />
             </el-select>
@@ -396,7 +397,7 @@
         </div>
         <div class="search_input" style="width: 100%">
           <el-select v-model="verifyUser" clearable filterable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
-            <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
+            <el-option v-for="(item, i) in reviewerOptions" :key="i" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
         </div>
@@ -554,6 +555,7 @@
       state: null,
       inspectorList: null,
       typeSource: null,
+      taskSource: null,
       sagData: [],
       sagForm: {
         sampleCode: null,
@@ -727,6 +729,11 @@
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
     ...mapGetters(["userId"]),
+    reviewerOptions() {
+      return this.taskSource === 'QUALITY_MONITOR'
+        ? this.personList.filter(item => Number(item.value) !== Number(this.userId))
+        : this.personList;
+    },
     action() {
       return this.javaApi + "/insOrderPlan/uploadFile";
     },
@@ -831,14 +838,16 @@
   },
   methods: {
     syncRouteContext() {
-      const { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query;
+      const { sonLaboratory, orderId, state, inspectorList, typeSource, taskSource } = this.$route.query;
       const orderChanged = this.id !== orderId;
       this.sonLaboratory = sonLaboratory;
       this.orderId = orderId;
       this.state = state;
       this.inspectorList = inspectorList;
       this.typeSource = typeSource;
+      this.taskSource = taskSource;
       if (orderChanged) {
+        if (taskSource === 'QUALITY_MONITOR') this.verifyUser = null;
         this.tableLists = [];
         this.tableList = [];
         this.sampleProduct = [];
@@ -1000,6 +1009,7 @@
         laboratory: this.sonLaboratory,
       }).then(async (res) => {
         this.insOrder = res.data.insOrder;
+        this.taskSource = this.insOrder.taskSource || this.taskSource;
         if(res.data.insOrder.ifsOrderType==='02wg'){
           //鏌ヨ闆朵欢灞炴��
           this.getPartProps(res.data.insOrder.ifsInventoryId)
@@ -1759,6 +1769,10 @@
       }
     },
     openAddCheck() {
+      if (this.taskSource === 'QUALITY_MONITOR') {
+        this.upInsReview(1);
+        return;
+      }
       this.addCheck = true;
     },
     // 鏀堕泦妯℃澘绾ф娴嬫潯浠剁殑缂哄け椤癸紙姣忎釜妯℃澘閮借濉叏锛�
@@ -1897,7 +1911,6 @@
             temperature: form.temperature == null ? null : form.temperature,
             detectionTime: form.detectionTime || null,
             detectionPlace: form.detectionPlace || null,
-            deviceIds: Array.isArray(form.deviceIds) ? [...form.deviceIds] : [],
           });
         }));
       } catch (error) {
@@ -2311,6 +2324,14 @@
   flex: none;
 }
 
+/* 璁惧涓嬫媺鍥哄畾瀹藉害锛岀姝㈣琛屽唴甯冨眬鍘嬬缉锛屽惁鍒欓�変腑鍐呭涓嶅彲瑙� */
+.template-panel:deep(.device-select) {
+  display: inline-block !important;
+  width: 360px !important;
+  min-width: 360px;
+  flex: 0 0 360px;
+}
+
 .template-panel__unit {
   margin-left: 4px;
   color: var(--lims-text-2);

--
Gitblit v1.9.3