修改医生管理 新增医生 验证医生ID

This commit is contained in:
lxd 2024-12-11 14:25:21 +08:00
parent f079845eb0
commit 18191334e5

View File

@ -147,7 +147,7 @@ const open = async (type: string, id?: number) => {
dialogVisible.value = true dialogVisible.value = true
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
resetForm() resetForm()
// //
formData.value.esignatureUrl = formData.value.esignatureUrl formData.value.esignatureUrl = formData.value.esignatureUrl
@ -176,9 +176,12 @@ const submitForm = async () => {
try { try {
const data = formData.value as unknown as VO const data = formData.value as unknown as VO
if (formType.value === 'create') { if (formType.value === 'create') {
await Api.create(data) const redata = await Api.create(data)
if (redata === '医生编号已存在') {
message.success(t('common.createSuccess')) message.alertError('医生编号已存在')
} else {
message.success(t('common.createSuccess'))
}
} else { } else {
await Api.update(data) await Api.update(data)