From 3a86e24722e52eb4cb1581aa7954f631bf2f0f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E7=BA=A2=E5=85=B5?= <374362909@qq.com> Date: Fri, 6 Mar 2026 01:33:49 +0800 Subject: [PATCH] fix --- .../purchase/purchasingrequisition/add.vue | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/purchase/purchasingrequisition/add.vue b/src/views/purchase/purchasingrequisition/add.vue index 53b7a1a..c12a6b4 100644 --- a/src/views/purchase/purchasingrequisition/add.vue +++ b/src/views/purchase/purchasingrequisition/add.vue @@ -623,8 +623,25 @@ import { fetchList as getBusinessLeaderList } from '/@/api/purchase/purchasingBu const router = useRouter(); const route = useRoute(); -// 当前使用的申请单 ID +// 流程嵌入时接收 currJob +const props = defineProps({ + currJob: { + type: Object, + default: null, + }, + currElTab: { + type: Object, + default: {}, + }, +}); + +// 当前使用的申请单 ID(优先从流程 currJob.orderId 获取,否则从 URL query 获取) const effectiveQueryId = computed(() => { + // 流程嵌入模式:优先使用 currJob.orderId + if (props.currJob?.orderId) { + return String(props.currJob.orderId); + } + // URL 模式 const q = route.query.id; return q ? String(q) : ''; }); @@ -811,7 +828,7 @@ const isHidePurchaseType = computed(() => { // 部门申请角色 + 学校统一采购:隐藏采购方式 const isHidePurchaseSchool = computed(() => { - return isDeptApplyRole || ( isDeptApplyRole.value && !isDeptPurchase.value); + return isDeptApplyRole.value || ( isDeptApplyRole.value && !isDeptPurchase.value); });