fix: 修复手术安排计费报"未关联就诊记录"及 encounterId=undefined 异常

1. vxe-table 4.x current-change 事件参数为 { row } 对象,handleCurrentChange
     未解构导致 selectedRow 存的是事件对象而非行数据,计费/医嘱按钮读取
     visitId 始终为 undefined → 报"该手术安排未关联就诊记录"
     修复:const currentRow = args?.row || args

  2. getPrescriptionList 等 API 函数直接用字符串拼接 URL 参数,当
     encounterId 为 undefined 时拼接成字符串 "undefined" 发送到后端,
     导致 Long 类型转换异常 MethodArgumentTypeMismatchException
     修复:encounterId 为 null/undefined/空字符串时直接返回空数组,
          不再拼接无效值到 URL
This commit is contained in:
wangjian963
2026-06-05 17:25:52 +08:00
parent 09e07b1fba
commit 227d6d12f1
4 changed files with 33 additions and 7 deletions

View File

@@ -325,6 +325,10 @@ export function singOut(data) {
* 获取患者本次就诊处方
*/
export function getPrescriptionList(encounterId) {
// encounterId 为 undefined/null 时不发请求,避免后端 Long 类型转换异常
if (encounterId == null || encounterId === '') {
return Promise.resolve({ data: [] });
}
// 添加时间戳参数防止浏览器缓存,确保签发后总能获取到最新数据
const timestamp = Date.now();
return request({