Fix Bug #507: [住院护士站-住院记账-补费] 项目单位未获取、执行科室显示内码且缺乏默认/模糊搜索逻辑
后端SQL修复: DoctorStationAdviceAppMapper.xml 中诊疗项 min_unit_code 硬编码为空字符串, 改为使用 permitted_unit_code,使前端单位下拉框有可用选项 前端修复: 1. api.js getOrgList 添加 pageSize:100 参数,确保获取足够科室数据 2. FeeDialog.vue loadDepartmentOptions 增加回退逻辑:当树形结构无children时使用扁平records Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -239,7 +239,7 @@
|
||||
NULL AS activity_type_dictText,
|
||||
-- 前端"包装单位"列:显示使用单位(permitted_unit_code)
|
||||
T1.permitted_unit_code AS unit_code,
|
||||
'' AS min_unit_code,
|
||||
T1.permitted_unit_code AS min_unit_code,
|
||||
'' AS volume,
|
||||
'' AS method_code,
|
||||
'' AS rate_code,
|
||||
|
||||
@@ -524,7 +524,11 @@ function loadDepartmentOptions() {
|
||||
getOrgList()
|
||||
.then((res) => {
|
||||
if (res.data && res.data.records && res.data.records.length > 0) {
|
||||
departmentOptions.value = res.data.records[0].children || [];
|
||||
const firstRecord = res.data.records[0];
|
||||
// 优先使用 children(树形结构),回退到 records 本身(扁平结构)
|
||||
departmentOptions.value = (firstRecord.children && firstRecord.children.length > 0)
|
||||
? firstRecord.children
|
||||
: res.data.records;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -28,6 +28,7 @@ export function getOrgList() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
params: { pageSize: 100, pageNum: 1 },
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user