bug542【病区护士站-住院记账】“补费”界面选择“耗材”类型时,即使后台已配置科室权限,仍检索不到任何耗材数据

This commit is contained in:
2026-05-19 11:00:45 +08:00
parent 798c5e19e2
commit e9953cd037

View File

@@ -348,7 +348,8 @@ const adviceTypeList = computed(() => {
return val === 3 || val === 4;
}).map(item => ({
label: item.label,
value: parseInt(item.value)
// drord_doctor_type 中耗材是 4但 /advice-base-info 后端耗材类型是 2
value: parseInt(item.value) === 4 ? 2 : parseInt(item.value)
}));
return [...filtered, { label: '全部', value: '' }];
}
@@ -483,8 +484,9 @@ watch(
(visible) => {
if (visible) {
executeTime.value = formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss');
// 弹窗打开时重新加载科室和位置选项,确保数据最新
// 弹窗打开时按当前患者科室重新加载,避免复用上一次患者/登录科室的结果
loadDepartmentOptions();
getAdviceBaseInfos();
getDiseaseInitLoc(16);
} else {
resetData();
@@ -565,6 +567,8 @@ function getAdviceBaseInfos() {
queryParams.value.adviceTypes = [1, 2, 3];
}
queryParams.value.organizationId = orgId.value;
queryParams.value.adviceTypes = normalizeAdviceTypesForQuery(adviceType.value);
queryParams.value.organizationId = props.patientInfo.organizationId || orgId.value;
queryParams.value.pricingFlag = 1; // 划价标记
getAdviceBaseInfo(queryParams.value)
.then((res) => {
@@ -620,6 +624,12 @@ function getItemType_Text(type) {
const map = { 2: '耗材', 3: '诊疗' };
return map[type] || '其他';
}
function normalizeAdviceTypesForQuery(type) {
if (type === '' || type === undefined || type === null) {
return '2,3';
}
return Number(type) === 4 ? 2 : type;
}
function getUnitCodeOptions(row) {
const unitCodes = [];
// 大单位:优先用 codecode 缺失时用字典文本兜底