eight
2024-11-08 e005f776031c7acdde4fd4545c8ee098101b1b55
update
已修改2个文件
49 ■■■■ 文件已修改
src/api/ecg/appointment/index.ts 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/appointment/CheckItemPanel.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 })
  }
}
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>