From ce0244580ec21e8be3b17367580eda6031878a9c Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 08 四月 2026 13:51:37 +0800
Subject: [PATCH] 质检编辑页面跳转

---
 src/pages/qualityManagement/finalInspection/add.vue |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/pages/qualityManagement/finalInspection/add.vue b/src/pages/qualityManagement/finalInspection/add.vue
index a56b388..46fd37e 100644
--- a/src/pages/qualityManagement/finalInspection/add.vue
+++ b/src/pages/qualityManagement/finalInspection/add.vue
@@ -302,7 +302,7 @@
 
 <script setup>
   import { ref, computed, onMounted, nextTick } 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 { getOptions } from "@/api/procurementManagement/procurementLedger.js";
@@ -454,7 +454,7 @@
 
   // 鏄惁涓虹紪杈戞ā寮�
   const isEdit = computed(() => {
-    const id = getPageId();
+    const id = optionsId.value;
     return !!id;
   });
 
@@ -737,7 +737,7 @@
 
   // 鍒濆鍖栬〃鍗�
   const initForm = async () => {
-    const id = getPageId();
+    const id = optionsId.value;
     if (id) {
       // 缂栬緫妯″紡锛屽姞杞芥暟鎹�
       // 鍏堥噸缃〃鍗曟暟鎹�
@@ -890,6 +890,13 @@
   onShow(() => {
     initForm();
   });
+
+  const optionsId = ref("");
+  onLoad(options => {
+    optionsId.value = options.id || "";
+    console.log(optionsId.value, "========");
+    initForm();
+  });
 </script>
 
 <style scoped lang="scss">

--
Gitblit v1.9.3