From 91dec349aa88c58c587199d9601529d60824e1d0 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 02 七月 2026 13:24:34 +0800
Subject: [PATCH] 生产订单对齐管理端新增两个字段展示

---
 src/pages/qualityManagement/finalInspection/detail.vue |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/pages/qualityManagement/finalInspection/detail.vue b/src/pages/qualityManagement/finalInspection/detail.vue
index 9af42a7..d274a28 100644
--- a/src/pages/qualityManagement/finalInspection/detail.vue
+++ b/src/pages/qualityManagement/finalInspection/detail.vue
@@ -15,7 +15,8 @@
           </view>
           <text class="header-title">{{ detailData.productName || '-' }}</text>
           <view class="status-tags">
-            <u-tag :type="getTagType(detailData.checkResult)"
+            <u-tag v-if="detailData.checkResult"
+                   :type="getTagType(detailData.checkResult)"
                    size="small"
                    class="status-tag">
               {{ detailData.checkResult || '-' }}
@@ -131,7 +132,7 @@
 
 <script setup>
   import { ref, onMounted } from "vue";
-  import { onShow } from "@dcloudio/uni-app";
+  import { onShow, onLoad } from "@dcloudio/uni-app";
   import PageHeader from "@/components/PageHeader.vue";
   import dayjs from "dayjs";
   import { qualityInspectParamInfo } from "@/api/qualityManagement/materialInspection.js";
@@ -204,16 +205,9 @@
     }, 1500);
   };
 
-  // 鑾峰彇椤甸潰ID
-  const getPageId = () => {
-    const pages = getCurrentPages();
-    const currentPage = pages[pages.length - 1];
-    return currentPage.options.id;
-  };
-
   // 鑾峰彇璇︽儏鏁版嵁
   const getDetail = () => {
-    const id = getPageId();
+    const id = optionsId.value;
     if (!id) {
       showToast("鍙傛暟閿欒");
       return;
@@ -262,6 +256,11 @@
   onMounted(() => {
     getDetail();
   });
+  const optionsId = ref("");
+  onLoad(options => {
+    optionsId.value = options.id || "";
+    getDetail();
+  });
 </script>
 
 <style scoped lang="scss">

--
Gitblit v1.9.3