From 509a0a788f50e9ed3169d2ae2b2d0a614701b84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Wed, 13 May 2026 22:13:51 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#442:=20=E6=89=8B=E6=9C=AF=E8=AE=A1?= =?UTF-8?q?=E8=B4=B9=EF=BC=9A=E7=82=B9=E5=87=BB"=E5=88=A0=E9=99=A4"?= =?UTF-8?q?=E5=BE=85=E7=AD=BE=E5=8F=91=E8=80=97=E6=9D=90=E6=97=B6=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=8A=A5=E9=94=99=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:删除按钮的 handleDelete 函数缺少 bizRequestFlag 过滤逻辑, 与签发/签退按钮的处理逻辑不一致。当用户勾选非本人创建的医嘱(bizRequestFlag != '1') 时,前端仍将其加入删除列表发送至后端,后端尝试删除不存在的 DeviceRequest 记录时报错。 修复:在 handleDelete 的 deleteList 构建中增加 bizRequestFlag 过滤, 排除非本人创建的医嘱,与 changeCheck/handleSave/handleSingOut 逻辑保持一致。 Co-Authored-By: Claude Opus 4.7 --- .../clinicmanagement/bargain/component/prescriptionlist.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue index b80ded4a3..5fcfe6cc1 100755 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue @@ -887,6 +887,10 @@ function handleDelete() { if (item.statusEnum != 1 || item.chargeStatus == 5) { return null; } + // 🔧 Bug #442: 非本人创建的医嘱不允许删除(与签发/签退逻辑保持一致) + if (Number(item.bizRequestFlag) !== 1 && item.bizRequestFlag) { + return null; + } // 🔧 Bug #442: 已保存的行必须有有效的 requestId,否则跳过(避免后端删除不存在的记录) if (item.requestId == null || item.requestId === undefined || item.requestId === '') { return null; @@ -896,7 +900,7 @@ function handleDelete() { dbOpType: '3', adviceType: item.adviceType, }; - }).filter(item => item !== null); // 过滤掉已签发、已收费或无 requestId 的项目 + }).filter(item => item !== null); // 过滤掉已签发、已收费、非本人创建或无 requestId 的项目 if (deleteList.length == 0) { proxy.$modal.msgWarning('只能删除待签发且未收费的项目');