添加信息提示
This commit is contained in:
parent
c83d9b4976
commit
19c47c79a0
@ -394,13 +394,17 @@ const submitForm = async () => {
|
|||||||
birthday: addForm.birthDate ? new Date(addForm.birthDate) : undefined
|
birthday: addForm.birthDate ? new Date(addForm.birthDate) : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
await PatientApi.insertPatinetInfo(patientData as PatientVO)
|
const data=await PatientApi.insertPatinetInfo(patientData as PatientVO)
|
||||||
|
if(data){
|
||||||
message.success('添加成功')
|
message.success('添加成功')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
// 重置表单
|
// 重置表单
|
||||||
resetForm()
|
resetForm()
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
|
}else{
|
||||||
|
message.error('患者已存在')
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('添加失败:', error)
|
console.error('添加失败:', error)
|
||||||
message.error('添加失败: ' + (error.message || '未知错误'))
|
message.error('添加失败: ' + (error.message || '未知错误'))
|
||||||
@ -487,7 +491,6 @@ const handleGwPatientInfo = async () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
// 调用API获取公卫患者信息
|
// 调用API获取公卫患者信息
|
||||||
const result = await PatientApi.getGwPatientInfo(addForm.cardId)
|
const result = await PatientApi.getGwPatientInfo(addForm.cardId)
|
||||||
console.log('获取到的公卫患者信息:', result);
|
|
||||||
if (result) {
|
if (result) {
|
||||||
// 填充表单数据
|
// 填充表单数据
|
||||||
addForm.name = result.name || ''
|
addForm.name = result.name || ''
|
||||||
|
Loading…
Reference in New Issue
Block a user