From 31f7c4f32a3488c36039c349548b544b302be5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Wed, 13 May 2026 16:13:18 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#455:=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99-=E5=8C=BB=E5=98=B1=EF=BC=9A=E5=BC=80?= =?UTF-8?q?=E7=AB=8B=E8=AF=8A=E7=96=97=E5=8C=BB=E5=98=B1=E6=97=B6=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=A7=91=E5=AE=A4=E9=BB=98=E8=AE=A4=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E6=9C=89=E8=AF=AF=E4=B8=94=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA=E5=8E=9F=E5=A7=8BID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因分析: - setValue函数对所有类型统一设置orgId=row.positionId - 诊疗项目(adviceType=3)的positionId来自adm_organization_location配置表 - 当配置ID不在当前机构树中时,findOrgNameById返回空,el-tree-select显示原始ID - 后续if(!orgId)判断因已有值而不触发回退到患者就诊科室 修复方案: - 诊疗类型(adviceType=3)跳过positionId赋值,使用患者就诊科室作为默认执行科室 - 同时修复syncGroupFields中会覆盖orgId的问题 Co-Authored-By: Claude Opus 4.7 --- .../components/prescription/prescriptionlist.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index df298f387..31ee811d9 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -3326,9 +3326,13 @@ function syncGroupFields(row) { } // 同步执行科室 + // 🔧 Bug #455: 诊疗类医嘱(adviceType=3)不使用项目配置的执行科室, + // 避免配置ID不在机构树中导致显示原始ID,保持患者就诊科室即可 if (row.orgId || row.positionId) { - // 🔧 修复:优先使用项目所属科室(orgId),其次positionId - prescriptionList.value[rowIndex.value].orgId = row.orgId || row.positionId; + if (Number(row.adviceType) != 3) { + // 🔧 修复:优先使用项目所属科室(orgId),其次positionId + prescriptionList.value[rowIndex.value].orgId = row.orgId || row.positionId; + } } // 同步皮试标记 @@ -3412,8 +3416,11 @@ async function setValue(row) { showPopover: false, // 确保查询框关闭 }; console.log('[BugFix] setValue - prescriptionList[rowIndex].adviceType_dictText:', prescriptionList.value[rowIndex.value].adviceType_dictText); - // 🔧 Bug #455: 执行科室默认逻辑:使用positionId(诊疗执行科室配置) → 患者就诊科室,不再使用row.orgId(项目所属科室) - prescriptionList.value[rowIndex.value].orgId = row.positionId || props.patientInfo?.orgId; + // 🔧 Bug #455: 诊疗医嘱(adviceType=3)的执行科室默认使用患者就诊科室, + // 不使用positionId(诊疗目录配置的执行科室),避免配置ID不在机构树中导致显示原始ID + if (Number(row.adviceType) != 3) { + prescriptionList.value[rowIndex.value].orgId = row.positionId || props.patientInfo?.orgId; + } prescriptionList.value[rowIndex.value].dose = row.dose || row.doseQuantity; prescriptionList.value[rowIndex.value].quantity = row.quantity || 1; prescriptionList.value[rowIndex.value].unitCodeList = unitCodeList.value;