diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index cd275c40..b7d39750 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -1886,16 +1886,21 @@ function handleQuoteBilling() { temporaryBillingMedicines.value = [] temporaryAdvices.value = [] - // 🔧 修复 Bug #445: 只保留药品类型(adviceType=1),过滤掉耗材(2)和诊疗项目(3) + // 🔧 修复 Bug #445: 只保留药品类型(adviceType=1),过滤掉耗材(2)和诊疗项目(3/6) // 同时过滤掉已有 requestId 的项目(已生成医嘱的不需要再次显示在"待生成"列表中) const filteredItems = res.data.filter(item => { // 匹配 encounterId if (item.encounterId !== temporaryPatientInfo.value.visitId) return false; - // 只保留药品类型(adviceType=1),过滤掉耗材(2)和诊疗项目(3) - if (item.adviceType !== 1) return false; + // 只保留药品类型(adviceType=1),过滤掉耗材(2)和诊疗项目(3/6) + // 🔧 修复 Bug #444: 使用 Number() 显式转换 + snake_case 回退,避免字符串 "1" 匹配失败 + const at = Number(item.adviceType ?? item.advice_type); + if (at !== 1) return false; // 过滤掉名称为空的项目 const medicineName = item.adviceName || item.advice_name; if (!medicineName || medicineName.trim() === '') return false; + // 🔧 修复 Bug #444: 二次过滤,排除名称中包含手术/检查/诊疗关键词的非药品项目 + const excludedKeywords = ['术', '超声', '多普勒', '检查', '检验', '彩超', 'X线', 'CT', 'MRI', '扫描', '造影']; + if (excludedKeywords.some(kw => medicineName.includes(kw))) return false; // 🔧 修复 Bug #445: 过滤掉已生成医嘱的项目(已有 requestId) if (item.requestId) return false; return true;