From f085b0783327a460fd0b2802e9f1b7cdbee3cde9 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期一, 02 十二月 2024 13:53:13 +0800 Subject: [PATCH] 预约确认 时段选择 开放 --- src/views/ecg/appointment/CheckItemPanel.vue | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 50 insertions(+), 9 deletions(-) diff --git a/src/views/ecg/appointment/CheckItemPanel.vue b/src/views/ecg/appointment/CheckItemPanel.vue index c625c59..34480a4 100644 --- a/src/views/ecg/appointment/CheckItemPanel.vue +++ b/src/views/ecg/appointment/CheckItemPanel.vue @@ -43,7 +43,7 @@ ) .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) @@ -58,11 +58,48 @@ }) }) .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) @@ -93,23 +130,26 @@ 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: 0, left: 20, title: checkTypeName, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); + panel.addPrintText({ options: { width: 140, height: 15, top: 0, left: 20, 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: 18, left: 20, title: patientBaisc, textAlign: 'center' , fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); + panel.addPrintText({ options: { width: 140, height: 15, top: 25, left: 20, 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: 36, left: 20, title: ward_bed, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); + panel.addPrintText({ options: { width: 140, height: 15, top: 50, left: 20, 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: 54, left: 20, title: bookTime, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); + panel.addPrintText({ options: { width: 140, height: 15, top: 75, left: 20, title: bookTime, textAlign: 'center', fontSize: 15, 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', } }); - const _bookSeqNum = bookSeqNum.value??props.appointment?.bookSeqNum - panel.addPrintText({ options: { width: 140, height: 12, top: 78, left: 20, title: ''+_bookSeqNum, textAlign: 'center', fontSize: 20, fontFamily: '寰蒋闆呴粦', fontWeight: '1000' } }); // 鏉$爜 灏辫瘖娴佹按鍙� panel.addPrintText({ options: { width: 140, height: 22, top: 104, left: 20, title: props.appointment.episodeId, textType: 'barcode' } }); + + // 鍙充晶 Pane 杈撳嚭 + const _bookSeqNum = bookSeqNum.value??props.appointment?.bookSeqNum + panel.addPrintText({ options: { width: 140, height: 20, top: 5, left: 160, title: ''+_bookSeqNum, textAlign: 'center', fontSize: 30, fontFamily: '寰蒋闆呴粦', fontWeight: '1200' } }); + // 娉ㄦ剰浜嬮」 const notes = checkTypeStore.getCheckTypeNotes(props.appointment.bookCheckType) - panel.addPrintText({ options: { width: 140, height: 12, top: 128, left: 20, title: notes, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); + panel.addPrintText({ options: { width: 140, height: 40, top: 35, left: 160, title: notes, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); //鎵撳嵃 if (undefined === printMode) @@ -132,7 +172,8 @@ <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" -- Gitblit v1.9.3