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 | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/views/ecg/appointment/CheckItemPanel.vue b/src/views/ecg/appointment/CheckItemPanel.vue index 67d5bf2..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) @@ -135,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