From acf685fbafd9772ae808f72bdb348156661a971c Mon Sep 17 00:00:00 2001 From: chenqi Date: Mon, 15 Jun 2026 12:24:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(#681):=20=E9=97=A8=E8=AF=8A=E6=94=B6?= =?UTF-8?q?=E8=B4=B9=E7=82=B9=E5=87=BB=E5=B7=B2=E6=94=B6=E8=B4=B9=E6=82=A3?= =?UTF-8?q?=E8=80=85=E5=A2=9E=E5=8A=A0=20encounterId=20=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 问题:已收费列表点击患者行时报错"参数[encounterId]要求类型为 Long,但输入值为'undefined'",导致右侧基本信息为空、收费项目一直 Loading - 根因:row.encounterId 为 undefined 时直接拼入 URL,后端类型校验拒绝 - 修复:clickRow 加 encounterId ?? id 兜底;无 ID 时 msgError 提示并中止调用; 同步写入 patientInfo.value 防止 handleClose/confirmCharge/changePayType 等 后续路径再次读到 undefined - 风格对齐 clinicrefund/index.vue、outpatientregistration/reprintDialog.vue 已有的 encounterId || id 防御模式 - 编译:npm run build:dev ✓ --- .../src/views/charge/cliniccharge/index.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/healthlink-his-ui/src/views/charge/cliniccharge/index.vue b/healthlink-his-ui/src/views/charge/cliniccharge/index.vue index d5d7c2f9d..aeff9cdb5 100755 --- a/healthlink-his-ui/src/views/charge/cliniccharge/index.vue +++ b/healthlink-his-ui/src/views/charge/cliniccharge/index.vue @@ -449,10 +449,17 @@ function checkSelectable(row, index) { */ function clickRow(params) { const row = params.row || params; - patientInfo.value = row; + const encId = row.encounterId ?? row.id; + if (encId === undefined || encId === null || encId === '') { + proxy.$modal.msgError('患者记录缺少就诊ID,无法加载收费详情'); + chargeList.value = []; + patientInfo.value = row; + return; + } + patientInfo.value = { ...row, encounterId: encId }; chargeLoading.value = true; - encounterId.value = row.encounterId; - getChargeList(row.encounterId).then((res) => { + encounterId.value = encId; + getChargeList(encId).then((res) => { chargeList.value = res.data; setTimeout(() => { chargeLoading.value = false;