From 71f99da69a888b6851a0dbbe2b0f050a6bac90f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 02:18:38 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#480:=20[=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E7=AB=99-=E5=8C=BB=E5=98=B1=E6=89=A7?= =?UTF-8?q?=E8=A1=8C]=20=E9=9D=9E=E8=80=97=E6=9D=90=E7=B1=BB=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E6=89=A7=E8=A1=8C=E6=8A=A5"=E8=80=97=E6=9D=90?= =?UTF-8?q?=E5=BA=93=E5=AD=98"=E9=94=99=E8=AF=AF=E4=B8=94=E5=85=A8?= =?UTF-8?q?=E9=80=89=E9=80=BB=E8=BE=91=E8=81=94=E5=8A=A8=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 handleExecute 中 hasDevice 判断逻辑错误:原代码用 includes('device') 判断 adviceTable 是否包含耗材类医嘱,但 adviceTable 实际取值为 med_medication_request (药品)或 wor_service_request(诊疗/耗材),均不含 "device" 字符串,导致 hasDevice 恒为 false。 改为检查 adviceTable === 'wor_service_request',确保仅当选中医嘱包含诊疗类(可能 绑定耗材)时才调用 lotNumberMatch,纯药品医嘱不再触发耗材库存校验。 Co-Authored-By: Claude Opus 4.7 --- .../components/prescriptionList.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue index 488c13584..eb46516bd 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue @@ -471,11 +471,13 @@ function handleExecute() { console.log(list, 'list'); adviceExecute({ exeDate: exeDate.value, adviceExecuteDetailList: list }).then((res) => { if (res.code == 200) { - // 仅当选中医嘱中包含耗材类医嘱时,才调用耗材批号匹配(排除纯药品医嘱场景) - const hasDevice = list.some((item) => - String(item.adviceTable || '').includes('device'), + // 仅当选中医嘱中包含诊疗类医嘱(可能绑定耗材)时,才调用耗材批号匹配 + // adviceTable 取值为 med_medication_request(药品)或 wor_service_request(诊疗/耗材) + // 原代码用 includes('device') 判断有误,两个表名均不含 "device" 字符串 + const hasServiceRequest = list.some((item) => + String(item.adviceTable || '') === 'wor_service_request', ); - if (hasDevice) { + if (hasServiceRequest) { lotNumberMatch({ encounterIdList: encounterIds }, { skipErrorMsg: true }).catch((error) => { console.warn('lotNumberMatch failed after adviceExecute:', error); });