From fb4c89727ccee7c2d60c75ab9e765c8739b27d28 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 20 十一月 2024 10:16:49 +0800
Subject: [PATCH] 手动预约

---
 src/views/ecg/appointment/CheckItemPanel.vue |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/views/ecg/appointment/CheckItemPanel.vue b/src/views/ecg/appointment/CheckItemPanel.vue
index 4353077..ea51d69 100644
--- a/src/views/ecg/appointment/CheckItemPanel.vue
+++ b/src/views/ecg/appointment/CheckItemPanel.vue
@@ -6,6 +6,7 @@
 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'
@@ -35,24 +36,22 @@
         }
     )
         .then(async () => {
-          ElMessage({
-            type: 'success',
-            message: 'Delete completed',
-          })
-
           const tempAppointment = cloneDeep(props.appointment)
-          tempAppointment.bookTimeslot = bookTimeSlotVip
+          if( undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value ) {
+            tempAppointment.bookTimeslot = bookTimeSlotVip.value
+          }
           const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
           ElNotification({
             title: '娓╅Θ鎻愮ず',
             message: data,
-            type: 'warning'
+            type: 'info'
           })
         })
         .catch(() => {
-          ElMessage({
-            type: 'info',
-            message: 'Delete canceled',
+          ElNotification({
+            title: '娓╅Θ鎻愮ず',
+            message: '纭澶辫触',
+            type: 'warning'
           })
         })
   } else {
@@ -77,9 +76,9 @@
   <el-card style="width: 200px" shadow="hover" >
     <template #header>{{checkTypeStore.getCheckTypeName(appointment.bookCheckType)}}</template>
     <div>{{formatDate(appointment.bookDate, 'YYYY-MM-DD')}}</div>
+    <div>{{formatTimeslot(appointment.bookTimeslot)}}</div>
 
-    <div v-if="isCurrentDay(appointment.bookDate)">{{formatTimeslot(appointment.bookTimeslot)}}</div>
-    <el-select v-else v-model="bookTimeSlotVip" placeholder="璇烽�夋嫨棰勭害鏃堕棿娈�">
+    <el-select v-if="!isCurrentDay(appointment.bookDate)" v-model="bookTimeSlotVip" placeholder="璇烽�夋嫨棰勭害鏃堕棿娈�">
       <el-option
           v-for="item in checkTypeTimeslotList"
           :key="item.id"

--
Gitblit v1.9.3