fix(#681): 门诊收费点击已收费患者增加 encounterId 兜底
- 问题:已收费列表点击患者行时报错"参数[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 ✓
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user