diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/applicationForm/applicationFormBottomBtn.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/applicationForm/applicationFormBottomBtn.vue index 03058df3d..90ae8808d 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/applicationForm/applicationFormBottomBtn.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/applicationForm/applicationFormBottomBtn.vue @@ -150,9 +150,16 @@ const showApplicationFormDialog = (name) => { onBeforeMount(() => {}); onMounted(() => {}); const applicationFormNameRef = ref(); -const submitApplicationForm = () => { +const submitApplicationForm = async () => { if (applicationFormNameRef.value?.submit) { - applicationFormNameRef.value.submit(); + const success = await applicationFormNameRef.value.submit(); + if (success) { + applicationFormDialogVisible.value = false; + applicationFormName.value = null; + setTimeout(() => { + emits('refResh'); + }, 500); + } } }; const submitOk = () => { diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/applicationForm/surgery.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/applicationForm/surgery.vue index 005bcb7cb..080175b8e 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/applicationForm/surgery.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/applicationForm/surgery.vue @@ -614,26 +614,33 @@ watch(() => transferValue.value, (newValue) => { }); const submit = () => { if (transferValue.value.length == 0) { - return proxy.$message.error('请选择手术项目'); + proxy.$message.error('请选择手术项目'); + return Promise.resolve(false); } if (!form.targetDepartment) { - return proxy.$message.error('请选择发往科室'); + proxy.$message.error('请选择发往科室'); + return Promise.resolve(false); } // 新增必填校验 if (!form.surgeryLevel) { - return proxy.$message.error('请选择手术等级'); + proxy.$message.error('请选择手术等级'); + return Promise.resolve(false); } if (!form.anesthesiaType) { - return proxy.$message.error('请选择麻醉方式'); + proxy.$message.error('请选择麻醉方式'); + return Promise.resolve(false); } if (!form.surgerySite) { - return proxy.$message.error('请选择手术部位'); + proxy.$message.error('请选择手术部位'); + return Promise.resolve(false); } if (!form.mainSurgeonId) { - return proxy.$message.error('请选择主刀医生'); + proxy.$message.error('请选择主刀医生'); + return Promise.resolve(false); } if (!form.plannedTime) { - return proxy.$message.error('请选择预定手术时间'); + proxy.$message.error('请选择预定手术时间'); + return Promise.resolve(false); } let applicationListAllFilter = applicationListAll.value.filter((item) => { return transferValue.value.includes(item.adviceDefinitionId); @@ -660,7 +667,7 @@ const submit = () => { const assistant2Doc = doctorOptions.value.find(d => d.id === form.assistant2Id); form.assistant2Name = assistant2Doc ? assistant2Doc.name : ''; - saveSurgery({ + return saveSurgery({ activityList: applicationListAllFilter, patientId: patientInfo.value.patientId, //患者ID encounterId: patientInfo.value.encounterId, // 就诊ID @@ -675,9 +682,14 @@ const submit = () => { applicationList.value = []; editingRequestFormId.value = ''; emits('submitOk'); + return true; } else { proxy.$message.error(res.message); + return false; } + }).catch((err) => { + console.error('手术申请保存失败:', err); + return false; }); }; /** 递归规范化树形科室 ID 为字符串,确保与 el-tree-select / findTreeItem 兼容 */