From facbe7cd447dbcf0ab4739aceb6506a7a07c0016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Sun, 10 May 2026 10:58:00 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#501:=20=E3=80=90=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E7=AB=99-=E5=8C=BB=E5=98=B1=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E3=80=91=E5=8C=BB=E5=98=B1=E6=89=A7=E8=A1=8C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=82=B9=E5=87=BB"=E5=8F=96=E6=B6=88=E6=89=A7?= =?UTF-8?q?=E8=A1=8C"=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 取消执行时 procedureIds 数组可能为空导致后端 SQL 异常,改为从 exePerformRecordList 直接提取 procedureId,并增加空数据校验 Co-Authored-By: Claude Opus 4.7 --- .../components/prescriptionList.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue index 542bf032..5047e03c 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/components/prescriptionList.vue @@ -497,8 +497,15 @@ function handleCancel() { let list = getSelectRows(); let producerIds = []; list.forEach((item) => { + // 从 exePerformRecordList 直接提取 procedureId,确保取消执行时数据完整 + const procedureIds = (item.exePerformRecordList || []).map((record) => record.procedureId); + if (procedureIds.length === 0 && (!item.procedureIds || item.procedureIds.length === 0)) { + proxy.$modal.msgError('请选择已执行的医嘱记录'); + return; + } + const ids = procedureIds.length > 0 ? procedureIds : item.procedureIds; producerIds.push( - ...item.procedureIds.map((value) => { + ...ids.map((value) => { return { procedureId: value, therapyEnum: item.therapyEnum, @@ -506,6 +513,9 @@ function handleCancel() { }) ); }); + if (producerIds.length === 0) { + return; + } adviceCancel({ adviceExecuteDetailList: producerIds }).then((res) => { if (res.code == 200) { proxy.$modal.msgSuccess(res.msg || '取消执行成功');