eight
2024-11-08 e005f776031c7acdde4fd4545c8ee098101b1b55
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>