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)