From 1ddf8a2ccd4252c99e2500647086eb29a14fd1ed Mon Sep 17 00:00:00 2001 From: guanyu Date: Mon, 18 May 2026 23:03:27 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#444:=20=E5=BC=95=E7=94=A8=E8=AE=A1?= =?UTF-8?q?=E8=B4=B9=E6=97=B6"=E5=B7=B2=E5=BC=95=E7=94=A8=E8=AE=A1?= =?UTF-8?q?=E8=B4=B9=E8=8D=AF=E5=93=81"=E5=88=97=E8=A1=A8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=9D=9E=E8=8D=AF=E5=93=81=E9=A1=B9=E7=9B=AE=20?= =?UTF-8?q?=E2=80=94=20handleQuoteBilling=20=E8=BF=87=E6=BB=A4=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E7=BC=BA=E5=B0=91=20Number()=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E5=92=8C=20snake=5Fcase=20=E5=9B=9E=E9=80=80?= =?UTF-8?q?=EF=BC=8C=E4=B8=94=E7=BC=BA=E5=B0=91=E5=85=B3=E9=94=AE=E8=AF=8D?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E8=BF=87=E6=BB=A4=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=89=8B=E6=9C=AF/=E6=A3=80=E6=9F=A5/=E8=AF=8A=E7=96=97?= =?UTF-8?q?=E7=AD=89=E9=9D=9E=E8=8D=AF=E5=93=81=E9=A1=B9=E7=9B=AE=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E5=88=97=E8=A1=A8=E4=B8=AD=EF=BC=9B=E5=B7=B2?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=B8=8E=20handleMedicalAdvice=20=E7=9A=84?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../src/views/surgicalschedule/index.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index 67bdc4a8f..e067ffe64 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -1861,16 +1861,22 @@ function handleQuoteBilling() { temporaryBillingMedicines.value = [] temporaryAdvices.value = [] - // 🔧 修复 Bug #445: 只保留药品类型(adviceType=1),过滤掉耗材(2)和诊疗项目(3) - // 同时过滤掉已有 requestId 的项目(已生成医嘱的不需要再次显示在"待生成"列表中) + // 🔧 修复 Bug #444: 统一过滤逻辑,与 handleMedicalAdvice 保持一致 + // 1. 使用 Number() + snake_case 回退,避免类型转换导致过滤失效 + // 2. 增加关键词二次过滤,排除手术/检查/诊疗等非药品项目 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 回退 + 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;