From 168961e6562beb9ad9d98dd6fb82ae4ec17080bf Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Mon, 15 Jun 2026 17:14:46 +0800 Subject: [PATCH] =?UTF-8?q?654=20[=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F?= =?UTF-8?q?=E7=AB=99-=E6=89=8B=E6=9C=AF=E7=94=B3=E8=AF=B7]=20=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=8D=95=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=9C=AA=E8=87=AA=E5=8A=A8=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applicationFormBottomBtn.vue | 11 ++++++-- .../order/applicationForm/surgery.vue | 28 +++++++++++++------ 2 files changed, 29 insertions(+), 10 deletions(-) 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 兼容 */