| | |
| | | import {AppointmentApi, AppointmentVO} from "@/api/ecg/appointment"; |
| | | import {dateFormatter2, formatDate} from "@/utils/formatTime"; |
| | | import {formatTimeslot} from "@/utils/formatter"; |
| | | import {isCurrentDay} from "@/utils/dateUtil"; |
| | | |
| | | defineComponent({ |
| | | name: 'CheckItemPanel' |
| | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const _confirmAppointment = async () => { |
| | | const data = await AppointmentApi.confirmAppointment(props.appointment) |
| | | ElNotification({ |
| | | title: '温馨提示', |
| | | message: data, |
| | | type: 'warning' |
| | | }) |
| | | if (!isCurrentDay(props.appointment.bookDate)) { |
| | | ElMessageBox.confirm( |
| | | '非当天预约项,确定要今天检查吗?', |
| | | 'Warning', |
| | | { |
| | | confirmButtonText: '好的', |
| | | cancelButtonText: '不用', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(async () => { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: 'Delete completed', |
| | | }) |
| | | const data = await AppointmentApi.confirmAppointmentVip(props.appointment) |
| | | ElNotification({ |
| | | title: '温馨提示', |
| | | message: data, |
| | | type: 'warning' |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: 'Delete canceled', |
| | | }) |
| | | }) |
| | | } else { |
| | | const data = await AppointmentApi.confirmAppointment(props.appointment) |
| | | ElNotification({ |
| | | title: '温馨提示', |
| | | message: data, |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | </script> |
| | |
| | | <div>{{formatDate(appointment.bookDate, 'YYYY-MM-DD')}}</div> |
| | | <div>{{formatTimeslot(appointment.bookTimeslot)}}</div> |
| | | <el-divider/> |
| | | <el-button type="primary" @click="_confirmAppointment"><Icon icon="ep:refresh" class="mr-5px" /> 排队 </el-button> |
| | | <el-button :type="isCurrentDay(appointment.bookDate)?'primary':'warning'" @click="_confirmAppointment"><Icon icon="ep:refresh" class="mr-5px" /> 排队 </el-button> |
| | | </el-card> |
| | | </template> |
| | | |