diff --git a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue index f5e597847..bea406574 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue @@ -582,15 +582,30 @@ function handleResetSearch() { // 初始化默认日期范围为近一周 handleResetSearch(); -// 🔧 BugFix#426: 懒加载套餐明细 +// 🔧 BugFix#426/#430: 懒加载套餐明细(支持 packageName 解析) async function loadPackageDetails(row, treeNode, resolve) { - if (!row.packageId) { + let packageId = row.packageId; + if (!packageId && row.packageName) { + try { + const pkgRes = await listCheckPackage({ packageName: row.packageName }); + let packages = pkgRes?.data || []; + if (!Array.isArray(packages)) { + packages = packages.records || packages.data || []; + } + if (packages.length > 0) { + packageId = packages[0].id; + } + } catch (err) { + console.error('套餐名称解析失败:', err); + } + } + if (!packageId) { resolve([]); return; } try { const res = await request({ - url: `/system/check-type/package/${row.packageId}/details`, + url: `/system/check-type/package/${packageId}/details`, method: 'get' }); const list = parsePackageDetailsPayload(res); @@ -1058,7 +1073,8 @@ const filteredCategoryList = computed(() => { const key = dictSearchKey.value.toLowerCase(); return categoryList.value.map(cat => ({ ...cat, - items: cat.items.filter(item => (item.name || '').toLowerCase().includes(key)) + items: cat.items.filter(item => (item.name || '').toLowerCase().includes(key)), + methods: cat.methods || [] })).filter(cat => cat.items.length > 0); });