From e89202f6af34764552a5cfe765c6b752cee937d2 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 20 十一月 2024 11:06:28 +0800
Subject: [PATCH] HiPrint 字体 粗细
---
src/views/ecg/appointment/CheckItemPanel.vue | 70 +++++++++++++++++++++++++++++++----
1 files changed, 62 insertions(+), 8 deletions(-)
diff --git a/src/views/ecg/appointment/CheckItemPanel.vue b/src/views/ecg/appointment/CheckItemPanel.vue
index 58dd1ff..ea51d69 100644
--- a/src/views/ecg/appointment/CheckItemPanel.vue
+++ b/src/views/ecg/appointment/CheckItemPanel.vue
@@ -2,8 +2,11 @@
import {defineComponent, PropType} from "vue";
import {useCheckTypeStore} from "@/store/modules/checkType";
import {AppointmentApi, AppointmentVO} from "@/api/ecg/appointment";
-import {dateFormatter2, formatDate} from "@/utils/formatTime";
import {formatTimeslot} from "@/utils/formatter";
+import {isCurrentDay} from "@/utils/dateUtil";
+import {QueueSequenceApi, QueueSequenceVO} from "@/api/ecg/queuesequence";
+import {formatDate} from "../../../utils/formatTime";
+import { cloneDeep } from 'lodash-es'
defineComponent({
name: 'CheckItemPanel'
@@ -18,14 +21,54 @@
const checkTypeStore = useCheckTypeStore();
+const checkTypeTimeslotList = ref<QueueSequenceVO>()
+const bookTimeSlotVip = ref<number>()
+
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 () => {
+ const tempAppointment = cloneDeep(props.appointment)
+ if( undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value ) {
+ tempAppointment.bookTimeslot = bookTimeSlotVip.value
+ }
+ const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
+ ElNotification({
+ title: '娓╅Θ鎻愮ず',
+ message: data,
+ type: 'info'
+ })
+ })
+ .catch(() => {
+ ElNotification({
+ title: '娓╅Θ鎻愮ず',
+ message: '纭澶辫触',
+ type: 'warning'
+ })
+ })
+ } else {
+ const data = await AppointmentApi.confirmAppointment(props.appointment)
+ ElNotification({
+ title: '娓╅Θ鎻愮ず',
+ message: data,
+ type: 'warning'
+ })
+ }
}
+
+onMounted( async () => {
+ const data = await QueueSequenceApi.getTimeslotByCheckType(props.appointment.bookCheckType)
+ console.info( data )
+ checkTypeTimeslotList.value = data
+})
</script>
@@ -34,8 +77,19 @@
<template #header>{{checkTypeStore.getCheckTypeName(appointment.bookCheckType)}}</template>
<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-option
+ v-for="item in checkTypeTimeslotList"
+ :key="item.id"
+ :label="formatTimeslot(item.timeSlot)"
+ :value="item.timeSlot"
+ :disabled="item.queueVipNo === item.queueVipFull"
+ />
+ </el-select>
+
<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>
--
Gitblit v1.9.3