From 7bb1225933da6296ae3023ceca7c2a29b9809069 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Tue, 7 Jan 2025 13:54:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=9C=88=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerManage/customerdock/index.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue index eed1bd1e9..ce73c88de 100644 --- a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue @@ -191,14 +191,17 @@ const formsSuccess = async (formType,data) => { if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; basicFormRef.value.formLoading = true - if (formType === 'create') { - await CustomerdockApi.createCustomerdock(data) - message.success(t('common.createSuccess')) - } else { - await CustomerdockApi.updateCustomerdock(data) - message.success(t('common.updateSuccess')) + try { + if (formType === 'create') { + await CustomerdockApi.createCustomerdock(data) + message.success(t('common.createSuccess')) + } else { + await CustomerdockApi.updateCustomerdock(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } - basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false if (formType === 'create') { getList()