From e005f776031c7acdde4fd4545c8ee098101b1b55 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期五, 08 十一月 2024 18:45:41 +0800
Subject: [PATCH] update

---
 src/views/ecg/appointment/CheckItemPanel.vue |   42 ++++++++++++++++++++++++++++++++++++------
 1 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/src/views/ecg/appointment/CheckItemPanel.vue b/src/views/ecg/appointment/CheckItemPanel.vue
index aff0120..8fe2bd4 100644
--- a/src/views/ecg/appointment/CheckItemPanel.vue
+++ b/src/views/ecg/appointment/CheckItemPanel.vue
@@ -20,12 +20,42 @@
 const checkTypeStore = useCheckTypeStore();
 
 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 () => {
+          ElMessage({
+            type: 'success',
+            message: 'Delete completed',
+          })
+          const data = await AppointmentApi.confirmAppointmentVip(props.appointment)
+          ElNotification({
+            title: '娓╅Θ鎻愮ず',
+            message: data,
+            type: 'warning'
+          })
+        })
+        .catch(() => {
+          ElMessage({
+            type: 'info',
+            message: 'Delete canceled',
+          })
+        })
+  } else {
+    const data = await AppointmentApi.confirmAppointment(props.appointment)
+    ElNotification({
+      title: '娓╅Θ鎻愮ず',
+      message: data,
+      type: 'warning'
+    })
+  }
 }
 
 </script>

--
Gitblit v1.9.3