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/materialInspection/add.vue | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/pages/qualityManagement/materialInspection/add.vue b/src/pages/qualityManagement/materialInspection/add.vue
index 0309813..d49f477 100644
--- a/src/pages/qualityManagement/materialInspection/add.vue
+++ b/src/pages/qualityManagement/materialInspection/add.vue
@@ -309,7 +309,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";
@@ -460,7 +460,7 @@
// 鏄惁涓虹紪杈戞ā寮�
const isEdit = computed(() => {
- const id = getPageId();
+ const id = optionsId.value;
return !!id;
});
@@ -474,7 +474,7 @@
const getPageId = () => {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
- return currentPage.options.id;
+ // return currentPage.options.id;
};
// 杩斿洖涓婁竴椤�
@@ -743,7 +743,7 @@
// 鍒濆鍖栬〃鍗�
const initForm = async () => {
- const id = getPageId();
+ const id = optionsId.value;
if (id) {
// 缂栬緫妯″紡锛屽姞杞芥暟鎹�
// 鍏堥噸缃〃鍗曟暟鎹�
@@ -896,6 +896,12 @@
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