From d35c0c882a05920e16546a4d60e3d057206d5bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 09:03:16 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#443:=20=E6=89=8B=E6=9C=AF=E8=AE=A1?= =?UTF-8?q?=E8=B4=B9=EF=BC=9A=E7=82=B9=E5=87=BB"=E7=AD=BE=E5=8F=91"?= =?UTF-8?q?=E8=80=97=E6=9D=90=E6=97=B6=E5=BC=82=E5=B8=B8=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因分析:getRequestBaseInfo SQL查询的UNION 2(门诊术中计费耗材)缺少generate_source_enum过滤条件,导致手术计费弹窗显示所有来源的耗材(包括医生站开立的项目)。当用户尝试签发非手术计费创建的耗材时,后端handDevice处理失败。 修复内容: 1. 后端SQL:在UNION 2的WHERE子句中添加generate_source_enum过滤,确保手术计费弹窗仅显示手术计费来源的耗材 2. 前端JS:handleSave函数补充.then/.catch错误处理,避免显示笼统的"后端程序异常",改为展示具体错误信息 Co-Authored-By: Claude Opus 4.7 --- .../mapper/doctorstation/DoctorStationAdviceAppMapper.xml | 3 +++ .../clinicmanagement/bargain/component/prescriptionlist.vue | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index 6090fd4b6..e4091d0f0 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -583,6 +583,9 @@ LEFT JOIN adm_location AS AL ON AL.id = DR.perform_location AND AL.delete_flag = '0' WHERE CI.delete_flag = '0' AND CI.service_table = 'wor_device_request' + + AND (DR.generate_source_enum IS NULL OR DR.generate_source_enum = #{generateSourceEnum}) + AND CI.encounter_id = #{encounterId} diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue index 709e4303c..750671849 100755 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue @@ -1059,7 +1059,12 @@ function handleSave() { groupIndexList.value = [] groupList.value = [] nextId.value = 1; + } else { + proxy.$modal.msgError(res?.msg || '签发失败,请重试'); } + }).catch((error) => { + console.error('签发失败:', error); + proxy.$modal.msgError(error?.response?.data?.msg || error?.message || '签发失败,请重试'); }); }