From d2699f5cddbe0f79cdb7122336a7b7c2cefada7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Mon, 11 May 2026 14:06:20 +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 根因分析: 1. 非耗材类医嘱执行报"耗材库存"错误: handleExecute 中无条件调用 lotNumberMatch, 后端会校验该就诊下所有待发放耗材库存,即使当前执行的是口服药等非耗材类医嘱 2. 全选联动异常: msgSuccess 在 handleGetPrescription 之前执行,数据刷新后 defaultSelectAllRows 重新选中所有行,用户关闭弹窗后看到全选效果 修复方案: 1. 增加医嘱类型判断,仅当选中医嘱包含药品(med_medication_request)或耗材(device) 类型时才调用 lotNumberMatch 2. 调整执行顺序:先刷新数据再显示成功弹窗,避免用户看到数据刷新的副作用 Co-Authored-By: Claude Opus 4.7 --- .../components/prescriptionList.vue | 16 ++++++++++++---- 1 file changed, 12 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 91a8baa2..36df2f50 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue @@ -469,11 +469,19 @@ function handleExecute() { console.log(list, 'list'); adviceExecute({ exeDate: exeDate.value, adviceExecuteDetailList: list }).then((res) => { if (res.code == 200) { - proxy.$modal.msgSuccess(res.msg || '医嘱执行成功'); handleGetPrescription(); - lotNumberMatch({ encounterIdList: encounterIds }, { skipErrorMsg: true }).catch((error) => { - console.warn('lotNumberMatch failed after adviceExecute:', error); - }); + // 仅当选中医嘱中包含药品/耗材类医嘱时,才调用耗材批号匹配 + const hasMedOrDevice = list.some( + (item) => + item.adviceTable === 'med_medication_request' || + String(item.adviceTable || '').includes('device'), + ); + if (hasMedOrDevice) { + lotNumberMatch({ encounterIdList: encounterIds }, { skipErrorMsg: true }).catch((error) => { + console.warn('lotNumberMatch failed after adviceExecute:', error); + }); + } + proxy.$modal.msgSuccess(res.msg || '医嘱执行成功'); } else { proxy.$modal.msgError(res.msg || '医嘱执行失败'); }