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); });