| | |
| | | <el-radio |
| | | v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | :value="dict.value" |
| | | > |
| | | {{ dict.label }} |
| | | </el-radio> |
| | |
| | | import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' |
| | | import { AppointmentApi, AppointmentVO } from '@/api/ecg/appointment' |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | import {getCheckTypeName} from "@/utils/checkTypeFormatter"; |
| | | |
| | | /** 预约 表单 */ |
| | | defineOptions({ name: 'AppointmentForm' }) |
| | |
| | | } |
| | | } |
| | | } |
| | | defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
| | | const openByQueue = async (type: string, patId: string, checkType: number) => { |
| | | dialogVisible.value = true |
| | | dialogTitle.value = t('action.' + type) |
| | | formType.value = type |
| | | resetForm() |
| | | // 修改时,设置数据 |
| | | if (patId) { |
| | | formLoading.value = true |
| | | try { |
| | | formData.value = await AppointmentApi.getCurAppointmentByPatIdAndCheckType( patId, checkType ) |
| | | } finally { |
| | | formLoading.value = false |
| | | } |
| | | } |
| | | } |
| | | defineExpose({ open, openByQueue }) // 提供 open 方法,用于打开弹窗 |
| | | |
| | | /** 提交表单 */ |
| | | const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 |
| | | const emit = defineEmits(['event_appointment_success']) // 定义 success 事件,用于操作成功后的回调 |
| | | const submitForm = async () => { |
| | | // 校验表单 |
| | | await formRef.value.validate() |
| | |
| | | const data = formData.value as unknown as AppointmentVO |
| | | if (formType.value === 'create') { |
| | | await AppointmentApi.createAppointment(data) |
| | | // 发送操作成功的事件 |
| | | emit('event_appointment_success') |
| | | message.success(t('common.createSuccess')) |
| | | } else { |
| | | } else if (formType.value === 'update') { |
| | | await AppointmentApi.updateAppointment(data) |
| | | // 发送操作成功的事件 |
| | | emit('event_appointment_success') |
| | | message.success(t('common.updateSuccess')) |
| | | } |
| | | dialogVisible.value = false |
| | | // 发送操作成功的事件 |
| | | emit('success') |
| | | } finally { |
| | | formLoading.value = false |
| | | } |
| | |
| | | bookTime: undefined, |
| | | bookDate: new Date().getTime(), |
| | | bookTimeslot: 9000930, |
| | | bookCheckType: checkTypeStore.getCheckTypeName(100), |
| | | bookCheckType: getCheckTypeName(100), |
| | | paid: 0, |
| | | } |
| | | formRef.value?.resetFields() |
| | |
| | | |
| | | const searchBookInfo = async () => { |
| | | const tmpPatId = formData.value.patId |
| | | if (null === tmpPatId || "" === tmpPatId) |
| | | if (null == tmpPatId || "" === tmpPatId) |
| | | return |
| | | |
| | | const data = await AppointmentApi.queryAppointmentFromHis( tmpPatId ) // 对应数据库中 pat_id |