| | |
| | | } |
| | | }) |
| | | |
| | | const emit = defineEmits(['event_appoint_confirm']) // 定义 success 事件,用于操作成功后的回调 |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const checkTypeTimeslotList = ref<QueueSequenceVO>() |
| | |
| | | ) |
| | | .then(async () => { |
| | | const tempAppointment = cloneDeep(props.appointment) |
| | | if( undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value ) { |
| | | if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value) { |
| | | tempAppointment.bookTimeslot = bookTimeSlotVip.value |
| | | } |
| | | const data = await AppointmentApi.confirmAppointmentVip(tempAppointment) |
| | | bookSeqNum.value = data |
| | | // 发送操作成功的事件 |
| | | emit('event_appoint_confirm') |
| | | _printNote() |
| | | ElNotification({ |
| | | title: '温馨提示', |
| | |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | /* |
| | | ElNotification({ |
| | | title: '温馨提示', |
| | | message: '确认失败', |
| | | type: 'warning' |
| | | }) |
| | | */ |
| | | }) |
| | | } else if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value && props.appointment.bookTimeslot !== bookTimeSlotVip.value) { |
| | | ElMessageBox.confirm( |
| | | '当天预约项,确定要走VIP吗?', |
| | | 'Warning', |
| | | { |
| | | confirmButtonText: '好的', |
| | | cancelButtonText: '不用', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(async () => { |
| | | const tempAppointment = cloneDeep(props.appointment) |
| | | if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value) { |
| | | tempAppointment.bookTimeslot = bookTimeSlotVip.value |
| | | } |
| | | const data = await AppointmentApi.confirmAppointmentVip(tempAppointment) |
| | | bookSeqNum.value = data |
| | | // 发送操作成功的事件 |
| | | emit('event_appoint_confirm') |
| | | _printNote() |
| | | ElNotification({ |
| | | title: '温馨提示', |
| | | message: data, |
| | | type: 'info' |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | /* |
| | | ElNotification({ |
| | | title: '温馨提示', |
| | | message: '确认失败', |
| | | type: 'warning' |
| | | }) |
| | | */ |
| | | }) |
| | | } else { |
| | | const data = await AppointmentApi.confirmAppointment(props.appointment) |
| | | bookSeqNum.value = data |
| | | // 发送操作成功的事件 |
| | | emit('event_appoint_confirm') |
| | | _printNote() |
| | | ElNotification({ |
| | | title: '温馨提示', |
| | | message: data, |
| | | type: 'warning' |
| | | type: 'info' |
| | | }) |
| | | } |
| | | } |
| | |
| | | var panel = hiprintTemplate.addPrintPanel({ width: 140, height: 130, paperNumberDisabled:true}); |
| | | //文本 |
| | | const checkTypeName = checkTypeStore.getCheckTypeName(props.appointment.bookCheckType) |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: -18, left: 20, title: checkTypeName, textAlign: 'center', fontSize: 13, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | panel.addPrintText({ options: { width: 150, height: 15, top: 2, left: 10, title: checkTypeName, textAlign: 'center', fontSize: 15, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | const patientBaisc = props.appointment.patName + " " + calGender(props.appointment.patGender) + " " + calculateAge(props.appointment.patBirthday) + "岁" |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 0, left: 20, title: patientBaisc, textAlign: 'center' , fontSize: 13, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | panel.addPrintText({ options: { width: 150, height: 15, top: 27, left: 10, title: patientBaisc, textAlign: 'center' , fontSize: 15, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | const ward_bed = props.appointment.patWardDesc + "-" + props.appointment.patBedNo |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 18, left: 20, title: ward_bed, textAlign: 'center', fontSize: 13, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | panel.addPrintText({ options: { width: 150, height: 15, top: 52, left: 10, title: ward_bed, textAlign: 'center', fontSize: 15, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | const bookTime = formatTimestamp(props.appointment.bookDate) + " " + getBookBeginTime(props.appointment.bookTimeslot) |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 36, left: 20, title: bookTime, textAlign: 'center', fontSize: 13, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | //panel.addPrintText({ options: { width: 140, height: 12, top: 58, left: 20, title: props.appointment.patId, textAlign: 'center', fontSize: 8 } }); |
| | | //panel.addPrintText({ options: { width: 140, height: 12, top: 72, left: 20, title: props.appointment.patMobile, textAlign: 'center', fontSize: 8, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | panel.addPrintText({ options: { width: 150, height: 15, top: 77, left: 10, title: bookTime, textAlign: 'center', fontSize: 15, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | //panel.addPrintText({ options: { width: 150, height: 12, top: 58, left: 10, title: props.appointment.patId, textAlign: 'center', fontSize: 8 } }); |
| | | //panel.addPrintText({ options: { width: 150, height: 12, top: 72, left: 10, title: props.appointment.patMobile, textAlign: 'center', fontSize: 8, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | |
| | | // 条码 就诊流水号 |
| | | panel.addPrintText({ options: { width: 150, height: 22, top: 107, left: 10, title: props.appointment.episodeId, textType: 'barcode' } }); |
| | | |
| | | // 右侧 Pane 输出 |
| | | const _bookSeqNum = bookSeqNum.value??props.appointment?.bookSeqNum |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 60, left: 20, title: ''+_bookSeqNum, textAlign: 'center', fontSize: 20, fontFamily: '微软雅黑', fontWeight: '1000' } }); |
| | | panel.addPrintText({ options: { width: 130, height: 20, top: 7, left: 170, title: ''+_bookSeqNum, textAlign: 'center', fontSize: 30, fontFamily: '微软雅黑', fontWeight: '1200' } }); |
| | | |
| | | // 注意事项 |
| | | const notes = checkTypeStore.getCheckTypeNotes(props.appointment.bookCheckType) |
| | | panel.addPrintLongText({ options: { width: 130, height: 80, top: 35, left: 170, lineHeight: 15, title: notes, textAlign: 'center', fontSize: 13, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | |
| | | //打印 |
| | | if (undefined === printMode) |
| | |
| | | <div>{{formatDate(appointment.bookDate, 'YYYY-MM-DD')}}</div> |
| | | <div>{{formatTimeslot(appointment.bookTimeslot)}}</div> |
| | | |
| | | <el-select v-if="!isCurrentDay(appointment.bookDate)" v-model="bookTimeSlotVip" placeholder="请选择预约时间段"> |
| | | <!-- <el-select v-if="!isCurrentDay(appointment.bookDate)" v-model="bookTimeSlotVip" placeholder="请选择预约时间段">--> |
| | | <el-select v-model="bookTimeSlotVip" clearable placeholder="请选择预约时间段"> |
| | | <el-option |
| | | v-for="item in checkTypeTimeslotList" |
| | | :key="item.id" |