| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="患者编号" prop="patId"> |
| | | <el-input v-model="formData.patId" placeholder="请输入患者编号" @input="getAppointmentInfoByPatId" /> |
| | | <el-input v-model="formData.patId" placeholder="请输入患者编号" @input="getRentInfoByPatId" /> |
| | | </el-form-item> |
| | | <el-form-item label="患者名称" prop="patName"> |
| | | <el-input v-model="formData.patName" placeholder="请输入患者名称" /> |
| | |
| | | const emit = defineEmits(['event_routine']) // 定义 success 事件,用于操作成功后的回调 |
| | | |
| | | const setPatient = (queueVO: QueueVO | undefined) => { |
| | | resetForm() |
| | | formData.value.patId = queueVO?.patId |
| | | getAppointmentInfoByPatId() |
| | | formData.value.patName = queueVO?.patName |
| | | getFreeRentInfo(formData.value) |
| | | } |
| | | defineExpose({ setPatient }) // 提供 setPatient 方法,用于设置患者 |
| | | |
| | |
| | | formRef.value?.resetFields() |
| | | } |
| | | |
| | | const getAppointmentInfoByPatId = () => { |
| | | const getRentInfoByPatId = () => { |
| | | const tempPatId = formData.value.patId; |
| | | resetForm() |
| | | if (isStringEmpty(tempPatId)) |
| | | return |
| | | |
| | | formData.value.patId = tempPatId; |
| | | getAppointmentInfo() |
| | | getFreeRentInfo(formData.value) |
| | | } |
| | | |
| | | const getAppointmentInfo = async () => { |
| | | const appointmentData = await AppointmentApi.getAppointmentByPatId(formData.value.patId) |
| | | if (null === appointmentData) |
| | | const getFreeRentInfo = async (devRentVO) => { |
| | | const data = await DevRentApi.getFreeRent(devRentVO) |
| | | if (null === data) |
| | | return |
| | | |
| | | // formDate 对应 DevRent |
| | | formData.value.patName = appointmentData.patName |
| | | formData.value.patDeptDesc = appointmentData.patDeptDesc |
| | | formData.value.patWardDesc = appointmentData.patWardDesc |
| | | formData.value.patBedNo = appointmentData.patBedNo |
| | | // formData.value = data //不能整个赋值, 默认领用时间被清空 |
| | | formData.value.id = data.id; |
| | | formData.value.patDetails = data.patDetails |
| | | } |
| | | |
| | | |