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 f89587b0..a2db1d4c 100644
--- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue
+++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue
@@ -301,12 +301,11 @@
{{ dictLoading ? '' : '暂无检查项目,请在"检查项目设置"中配置' }}
-
+ handleCollapseChange(activeNames)">
{{ cat.categoryName }}
@@ -356,21 +355,7 @@
-
-
- selectMethodCheckbox(val, item, method)"
- >
- {{ method.name }}
- ¥{{ method.packagePrice || item.price }}
-
-
-
+ {{ detail.name }} 数量: {{ detail.quantity }} 单价: ¥{{ detail.price }}
selectMethodCheckbox(val, item, method)"> {{ method.name }} ¥{{ method.packagePrice || item.price }}
@@ -427,6 +412,7 @@ async function loadPackageDetails(row, treeNode, resolve) {
resolve(children);
} else {
resolve([]);
+async function loadPackageDetailsForItem(item) { if (!item.isPackage || !item.packageId) { return; } try { const res = await request({ url: `/exam/package/${item.packageId}/details`, method: 'get' }); if (res.code === 200 && res.data) { item.packageDetails = res.data.map(detail => ({ ...detail, name: detail.name || detail.itemName, unit: detail.unit || '次', price: detail.price || detail.itemPrice || 0, quantity: detail.quantity || 1 })); } else { item.packageDetails = []; } } catch (err) { console.error('加载套餐明细失败:', err); item.packageDetails = []; } }
}
} catch (err) {
console.error('加载套餐明细失败:', err);
@@ -623,6 +609,17 @@ async function handleCategoryExpand(cat) {
console.error('加载分类检查方法失败', err);
}
}
+async function handleCollapseChange(activeNames) {
+ // 当折叠面板展开时,加载对应分类的检查方法
+ if (Array.isArray(activeNames) && activeNames.length > 0) {
+ for (const typeId of activeNames) {
+ const cat = filteredCategoryList.value.find(c => c.typeId == typeId);
+ if (cat && (!cat.methods || cat.methods.length === 0)) {
+ await handleCategoryExpand(cat);
+ }
+ }
+ }
+}
watch(availableMethods, (newMethods) => {
if (form.inspectionMethod && !newMethods.find(m => m.name === form.inspectionMethod)) {
@@ -1060,8 +1057,12 @@ async function handleItemSelect(checked, item, cat) {
}
// Bug #384修复: 展开/收起项目卡片
-function toggleItemExpand(item) {
+async function toggleItemExpand(item) {
item.expanded = !item.expanded;
+ // 如果是展开且该项目是套餐,加载套餐明细
+ if (item.expanded && item.isPackage && (!item.packageDetails || item.packageDetails.length === 0)) {
+ await loadPackageDetailsForItem(item);
+ }
}
// Bug #384修复: 勾选框选择检查方法(单选逻辑)