fix(prescription): 修正医嘱撤回条件验证逻辑
- 修复了撤回功能允许已作废医嘱撤回的错误 - 现在只有状态为草稿(1)或已签发(2)的医嘱可以撤回 - 已作废(5)状态的医嘱不再支持撤回操作,只能通过删除处理 - 更新了撤回条件判断逻辑以确保数据一致性
This commit is contained in:
@@ -3636,8 +3636,9 @@ function handleSingOut() {
|
||||
// 🔧 BugFix: 将requestId转换为数字类型
|
||||
let requestIdList = normalRows
|
||||
.filter((item) => {
|
||||
// 🔧 BugFix: 支持 statusEnum 为 1(草稿)、2(已签发)、5(已作废) 的医嘱都可以撤回
|
||||
const canRecall = item.statusEnum == 1 || item.statusEnum == 2 || item.statusEnum == 5;
|
||||
// 🔧 BugFix: 只有 statusEnum 为 1(草稿)、2(已签发) 的医嘱可以撤回
|
||||
// 已作废(5)的医嘱不能撤回,只能删除
|
||||
const canRecall = item.statusEnum == 1 || item.statusEnum == 2;
|
||||
console.log('BugFix#219: 检查撤回条件, adviceName=', item.adviceName,
|
||||
'statusEnum=', item.statusEnum, 'canRecall=', canRecall);
|
||||
return canRecall;
|
||||
|
||||
Reference in New Issue
Block a user