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 a73bff99..f01a3f64 100755
--- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue
+++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue
@@ -316,6 +316,7 @@
{{ cat.categoryName }}
+
加载中...
+
+
+
检查方法
+
+ handleMethodSelect(val, method, cat)"
+ class="method-checkbox"
+ >
+ {{ method.name }}
+
+ ¥{{ method.packagePrice || method.price || 0 }}
+
+
@@ -1047,6 +1069,78 @@ function handleDelete(row) {
});
}
+// Bug #428修复: 判断某个检查方法是否已被选中(任意项目关联了该方法)
+function isMethodSelected(method, cat) {
+ return selectedItems.value.some(item =>
+ item.selectedMethod?.id === method.id && item.checkType === cat.typeName
+ );
+}
+
+// Bug #428修复: 勾选检查方法
+async function handleMethodSelect(checked, method, cat) {
+ if (checked) {
+ // 找到该方法所属的第一个检查项目
+ const targetItem = cat.items[0];
+ if (!targetItem) {
+ // 如果分类下没有项目,尝试从其他分类找同名项目或创建
+ console.warn('分类下没有检查项目,无法关联方法');
+ return;
+ }
+
+ // 如果该项目已存在,只更新 selectedMethod
+ const existingItem = selectedItems.value.find(s => s.id === targetItem.id);
+ if (existingItem) {
+ existingItem.selectedMethod = method;
+ updateMethodDisplay();
+ return;
+ }
+
+ // 如果该项目不存在,创建一个并关联方法
+ if (selectedItems.value.length > 0) {
+ const currentCategory = selectedItems.value[0].checkType;
+ const newCategory = cat.typeCode || '';
+ if (currentCategory !== newCategory) {
+ ElMessage.warning('一个检查单不能同时选择多个项目类型的检查项目');
+ return;
+ }
+ }
+
+ selectedItems.value.push({
+ id: targetItem.id, name: targetItem.name,
+ price: targetItem.price, quantity: 1,
+ serviceFee: targetItem.serviceFee || 0,
+ unit: targetItem.unit || '次',
+ applyPart: targetItem.name,
+ checkType: cat.typeName,
+ nationalCode: targetItem.nationalCode || '',
+ checked: true,
+ methods: [method],
+ selectedMethod: method,
+ expanded: false,
+ isPackage: !!targetItem.packageName,
+ packageId: targetItem.packageId || null
+ });
+
+ // 自动回填执行科室
+ if (selectedItems.value.length === 1 && cat?.performDeptName) {
+ form.performDeptCode = cat.performDeptName;
+ }
+
+ // 同时勾选左侧项目的 checkbox
+ targetItem.checked = true;
+
+ } else {
+ // 取消选择方法:将 selectedItems 中关联该方法的项的 selectedMethod 清空
+ const itemsWithMethod = selectedItems.value.filter(
+ item => item.selectedMethod?.id === method.id
+ );
+ for (const item of itemsWithMethod) {
+ item.selectedMethod = null;
+ }
+ }
+ updateMethodDisplay();
+}
+
// ====== 勾选逻辑 ======
async function handleItemSelect(checked, item, cat) {
if (checked) {
@@ -1367,6 +1461,53 @@ defineExpose({ getList });
margin-left: 6px;
}
+/* Bug #428修复: 分类下检查方法区域样式 */
+.method-section {
+ padding: 6px 8px;
+ background: #f0f7ff;
+ border-radius: 4px;
+ margin-top: 6px;
+}
+
+.method-section-title {
+ font-size: 12px;
+ font-weight: 600;
+ color: #409eff;
+ margin-bottom: 4px;
+ padding-bottom: 3px;
+ border-bottom: 1px dashed #d9ecff;
+}
+
+.method-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 3px 4px;
+ border-radius: 3px;
+}
+
+.method-row:hover {
+ background: #e8f4ff;
+}
+
+.method-checkbox {
+ flex: 1;
+ overflow: hidden;
+}
+
+.method-checkbox :deep(.el-checkbox__label) {
+ font-size: 12px;
+ color: #303133;
+}
+
+.method-price-tag {
+ font-size: 11px;
+ color: #e6a23c;
+ font-weight: 500;
+ flex-shrink: 0;
+ margin-left: 6px;
+}
+
/* 已选择 tags */
.selected-panel {
width: 140px; /* Bug #384修复: 加宽以适应展开内容 */
@@ -1438,6 +1579,41 @@ defineExpose({ getList });
transform: rotate(180deg);
}
+/* Bug #428修复: 套餐明细列表样式 */
+.package-details-list {
+ padding: 6px 10px;
+ background: #fffbe6;
+ border-top: 1px solid #ffe58f;
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+}
+
+.detail-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 2px 6px;
+ border-radius: 3px;
+ font-size: 11px;
+ background: #fff;
+}
+
+.detail-row:hover {
+ background: #fff9e6;
+}
+
+.detail-name {
+ color: #303133;
+ font-weight: 500;
+}
+
+.detail-info {
+ color: #909399;
+ font-size: 10px;
+ white-space: nowrap;
+}
+
/* Bug #384修复: 检查方法勾选框列表 */
.method-list {
padding: 6px 10px;