From ce2570f8555ff6668da4f149521b4620bdd9d8bf Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 23 九月 2026 15:25:22 +0800
Subject: [PATCH] feat(order): 添加订单委托要求字段并优化界面流程 - 新增分包内容、样品处置、结果评价、报告交付方式等委托要求字段 - 添加分包单位信息、报告寄送地址、收件人电话等关联信息录入功能 - 更新订单状态标签,新增作废状态和全部状态页签 - 调整报告准备页面审批流程,防止审核人和批准人为同一人

---
 src/views/business/inspectionTask/inspection.vue |   31 ++++++++++++++++++++-----------
 1 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 6852d28..64d1911 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -872,14 +872,7 @@
   },
   created() {
     this.saveQueue = Promise.resolve();
-    let { sonLaboratory, orderId, state, inspectorList, typeSource } =
-      this.$route.query;
-    this.sonLaboratory = sonLaboratory;
-    this.orderId = orderId;
-    this.id = this.orderId;
-    this.state = state;
-    this.inspectorList = inspectorList;
-    this.typeSource = typeSource;
+    this.syncRouteContext();
   },
   mounted() {
     this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
@@ -891,6 +884,7 @@
     this.scrollInit();
   },
   activated() {
+    this.syncRouteContext();
     this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
     this.getInsStateDicts();
     this.getComparisonList();
@@ -963,6 +957,23 @@
     this.stopWorker();
   },
   methods: {
+    syncRouteContext() {
+      const { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query;
+      const orderChanged = this.id !== orderId;
+      this.sonLaboratory = sonLaboratory;
+      this.orderId = orderId;
+      this.state = state;
+      this.inspectorList = inspectorList;
+      this.typeSource = typeSource;
+      if (orderChanged) {
+        this.tableLists = [];
+        this.tableList = [];
+        this.sampleProduct = [];
+        this.currentSample = {};
+        this.currentTable = null;
+        this.id = orderId;
+      }
+    },
     standardDisplayName(value) {
       if (!value) return '-';
       const separatorIndex = value.indexOf(' - ');
@@ -1734,9 +1745,7 @@
         repetitionTag: this.repetitionTag
       });
       this.tableLoading = false;
-      if (res.data.length > 0) {
-        return res.data;
-      }
+      return Array.isArray(res.data) ? res.data : [];
     },
     // 鍒囨崲鏍峰搧
     async handleChangeSample(row, column, event) {

--
Gitblit v1.9.3