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 || '取消执行成功');