429 433 438 476 477 478
This commit is contained in:
@@ -918,6 +918,13 @@ function handleSave() {
|
||||
ElMessage.warning('请至少选择一个检查明细项目');
|
||||
return;
|
||||
}
|
||||
// 检查每个项目是否已选择检查方法
|
||||
const itemsWithoutMethod = selectedItems.value.filter(item => !item.selectedMethod);
|
||||
if (itemsWithoutMethod.length > 0) {
|
||||
const names = itemsWithoutMethod.map(item => item.name).join('、');
|
||||
ElMessage.warning(`以下项目未选择检查方法:${names},请在右侧勾选后再保存`);
|
||||
return;
|
||||
}
|
||||
// 从已选项目推导检查类型编码(取第一个项目的 checkType,如 CT / ECG / GI)
|
||||
const firstCheckType = selectedItems.value[0]?.checkType || 'unknown';
|
||||
form.examTypeCode = firstCheckType;
|
||||
@@ -1105,12 +1112,6 @@ async function handleItemSelect(checked, item, cat) {
|
||||
form.performDeptCode = cat.performDeptName;
|
||||
}
|
||||
|
||||
// 如果有且仅有一个检查方法,自动选中并更新显示
|
||||
if (methods.length === 1) {
|
||||
const lastIdx = selectedItems.value.length - 1;
|
||||
selectedItems.value[lastIdx].selectedMethod = methods[0];
|
||||
updateMethodDisplay(); // Bug #384修复: 联动更新显示
|
||||
}
|
||||
} else {
|
||||
const idx = selectedItems.value.findIndex(s => s.id === item.id);
|
||||
if (idx > -1) selectedItems.value.splice(idx, 1);
|
||||
|
||||
Reference in New Issue
Block a user