From 18191334e59a1da39e4e64dfa6503f74e8feda1e Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Wed, 11 Dec 2024 14:25:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=BB=E7=94=9F=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E6=96=B0=E5=A2=9E=E5=8C=BB=E7=94=9F=20=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E5=8C=BB=E7=94=9FID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/doctor/Form.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/system/doctor/Form.vue b/src/views/system/doctor/Form.vue index 869a764e..ab4dc44a 100644 --- a/src/views/system/doctor/Form.vue +++ b/src/views/system/doctor/Form.vue @@ -147,7 +147,7 @@ const open = async (type: string, id?: number) => { dialogVisible.value = true dialogTitle.value = t('action.' + type) formType.value = type - + resetForm() // 获取机构字典数据 formData.value.esignatureUrl = formData.value.esignatureUrl @@ -176,9 +176,12 @@ const submitForm = async () => { try { const data = formData.value as unknown as VO if (formType.value === 'create') { - await Api.create(data) - - message.success(t('common.createSuccess')) + const redata = await Api.create(data) + if (redata === '医生编号已存在') { + message.alertError('医生编号已存在') + } else { + message.success(t('common.createSuccess')) + } } else { await Api.update(data)