From 9278cad97f96a9e1eb634c45b90dc14511d24a2c Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 03 十一月 2026 17:47:31 +0800
Subject: [PATCH] refactor(inspection): 统一检验值批注识别与格式化逻辑

---
 src/views/business/inspectionTask/inspection.vue |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index edbdefe..ce6b984 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -280,14 +280,14 @@
                     </template>
                     <template v-else-if="
                       n.v.ps != undefined &&
-                      n.v.ps.value === '璁$畻鍊�' &&
+                      isInspectionValueAnnotation(n.v.ps.value, '璁$畻鍊�') &&
                       state == 1
                     "><span :style="`font-family:${n.v.ff} !important;`">{{
                       n.v.v
                     }}</span></template>
                     <template v-else-if="
                       n.v.ps != undefined &&
-                      n.v.ps.value === '鏈�缁堝��' &&
+                      isInspectionValueAnnotation(n.v.ps.value, '鏈�缁堝��') &&
                       state == 1
                     ">
                       <span :style="`font-family:${n.v.ff} !important;`">{{
@@ -523,7 +523,7 @@
 import { mapGetters } from "@/utils/store-compat";
 import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
 import {getDicts} from "@/api/system/dict/data";
-import { parseInspectionValueAnnotation, formatInspectionValue } from "@/utils/inspectionValueFormat";
+import { parseInspectionValueAnnotation, formatInspectionValue, isInspectionValueAnnotation } from "@/utils/inspectionValueFormat";
 export default {
   name: 'Inspection',
   components: {
@@ -838,6 +838,7 @@
     this.stopWorker();
   },
   methods: {
+    isInspectionValueAnnotation,
     syncRouteContext() {
       const { sonLaboratory, orderId, state, inspectorList, typeSource, taskSource } = this.$route.query;
       const orderChanged = this.id !== orderId;
@@ -1509,8 +1510,8 @@
             b.v.ps != undefined &&
             typeof b.v.ps.value === "string" &&
             (b.v.ps.value.includes("妫�楠屽��") ||
-              b.v.ps.value === "璁$畻鍊�" ||
-              b.v.ps.value === "鏈�缁堝��" ||
+              isInspectionValueAnnotation(b.v.ps.value, "璁$畻鍊�") ||
+              isInspectionValueAnnotation(b.v.ps.value, "鏈�缁堝��") ||
               b.v.ps.value === "璁惧鍚嶇О")
           ) {
             b.v["v"] = "";
@@ -1575,12 +1576,12 @@
           if (value === undefined || value === null) {
             return;
           }
-          cell.v.v = value;
+          cell.v.v = formatInspectionValue(value, parseInspectionValueAnnotation(cell.v.ps && cell.v.ps.value));
           if (typeof item === "object" && item.u) {
             cell.u = item.u;
           }
           this.param[a.templateId][key] = {
-            v: value,
+            v: cell.v.v,
             u: typeof item === "object" ? item.u : cell.u,
           };
         });
@@ -2012,8 +2013,8 @@
             cell.v.ps != undefined &&
             typeof cell.v.ps.value === "string" &&
             (cell.v.ps.value.includes("妫�楠屽��") ||
-              cell.v.ps.value === "璁$畻鍊�" ||
-              cell.v.ps.value === "鏈�缁堝��" ||
+              isInspectionValueAnnotation(cell.v.ps.value, "璁$畻鍊�") ||
+              isInspectionValueAnnotation(cell.v.ps.value, "鏈�缁堝��") ||
               cell.v.ps.value === "璁惧鍚嶇О");
           const isExportResult = resultHeader && exportRows.has(cell.r) && cell.c === resultHeader.c;
           if (!isEditable && !isExportResult) {

--
Gitblit v1.9.3