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 ++++++++++++++++++++++++++++++++++++------
src/api/ecg/appointment/index.ts | 7 ++++++-
2 files changed, 42 insertions(+), 7 deletions(-)
diff --git a/src/api/ecg/appointment/index.ts b/src/api/ecg/appointment/index.ts
index 836edaa..9451565 100644
--- a/src/api/ecg/appointment/index.ts
+++ b/src/api/ecg/appointment/index.ts
@@ -73,9 +73,14 @@
return await request.download({ url: `/ecg/appointment/export-excel`, params })
},
- // 淇敼棰勭害
+ // 棰勭害纭
confirmAppointment: async (data: AppointmentVO) => {
return await request.post({ url: `/ecg/appointment/confirm`, data })
+ },
+
+ // VIP棰勭害纭
+ confirmAppointmentVip: async (data: AppointmentVO) => {
+ return await request.post({ url: `/ecg/appointment/confirm-vip`, data })
}
}
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