Fix Bug #444: 【手术管理-门诊手术安排】生成临时医嘱界面,"已引用计费药品"列表未正常显示药品详细名称信息

根因:后端 getRequestBaseInfo 接口通过 SQL UNION ALL 返回三类数据(药品adviceType=1、耗材adviceType=2、项目adviceType=3),
前端 handleMedicalAdvice 和 handleQuoteBilling 两处过滤逻辑均未按 adviceType 筛选,导致手术诊疗项目(如"小腿烧伤扩创交腿皮瓣修复术")
和检查项目(如"心脏彩色多普勒超声")混入"已引用计费药品"列表。

修复:在两个函数的 filter 条件中增加 adviceType === 1 的判断,仅保留药品类数据。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
赵云
2026-05-11 13:46:54 +08:00
parent f9ab4c5688
commit 3103c619f2

View File

@@ -1481,6 +1481,8 @@ function handleMedicalAdvice(row) {
const filteredItems = res.data.filter(item => {
// 匹配 encounterId
if (item.encounterId !== row.visitId) return false;
// 仅保留药品adviceType=1过滤耗材(2)和项目(3)
if (item.adviceType !== 1 && item.advice_type !== 1) return false;
// 过滤掉名称为空的项目
const medicineName = item.adviceName || item.advice_name;
if (!medicineName || medicineName.trim() === '') return false;
@@ -1743,6 +1745,8 @@ function handleQuoteBilling() {
const filteredItems = res.data.filter(item => {
// 匹配 encounterId
if (item.encounterId !== temporaryPatientInfo.value.visitId) return false;
// 仅保留药品adviceType=1过滤耗材(2)和项目(3)
if (item.adviceType !== 1 && item.advice_type !== 1) return false;
// 过滤掉名称为空的项目
const medicineName = item.adviceName || item.advice_name;
return medicineName && medicineName.trim() !== '';