diff --git a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue index 4779c5e02..e362b5959 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue @@ -182,8 +182,16 @@ function handleRadioChange() { function handleGetPrescription() { if (patientInfoList.value.length > 0) { + // 过滤掉 encounterId 无效的患者节点,防止后端 SQL 解析异常 + const validEncounterIds = patientInfoList.value + .map((i) => i.encounterId) + .filter((id) => id !== undefined && id !== null && id !== ''); + if (validEncounterIds.length === 0) { + proxy.$message.warning('请选择有效的患者'); + return; + } loading.value = true; - let encounterIds = patientInfoList.value.map((i) => i.encounterId).join(','); + let encounterIds = validEncounterIds.join(','); getPrescriptionList({ encounterIds: encounterIds, requestStatus: props.requestStatus,