yxh
yxh
9 天以前 09dc74e264b6262cbe41c9c8476e24705871d4a6
src/views/ecg/appointment/CheckItemPanel.vue
@@ -47,16 +47,29 @@
const _confirmAppointment = async () => {
  if (!isCurrentDay(props.appointment.bookDate)) {
    ElMessageBox.confirm('非当天预约项,确定要今天检查吗?', 'Warning', {
      confirmButtonText: '好的',
      cancelButtonText: '不用',
      type: 'warning'
    })
    // 【本需求】非当天预约:先提醒,确认后**按预留号**签入(不占用今天同时段的正常预约号)
    // 注意 bookDate 从后端回来是**时间戳数值**(如 1792339200000),必须格式化后再拼进提示,
    // 否则会直接显示一串数字。formatTimestamp → dayjs(x).format('YYYY-MM-DD')。
    const bookDateText = props.appointment.bookDate
      ? formatTimestamp(props.appointment.bookDate)
      : '-'
    ElMessageBox.confirm(
      `该患者预约日期为 ${bookDateText},不是今天。\n` +
        '是否仍要今天签到?确认后将分配【预留号】(不会占用今天该时段的正常预约号)。',
      '非当天预约签到',
      {
        confirmButtonText: '继续签到',
        cancelButtonText: '取消',
        type: 'warning'
      }
    )
      .then(async () => {
        const tempAppointment = cloneDeep(props.appointment)
        if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value) {
          tempAppointment.bookTimeslot = bookTimeSlotVip.value
        }
        // 【本需求】显式带上"已确认签入"标记:后端据此放行非当天预约,并按预留号取号
        tempAppointment.forceCheckIn = true
        const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
        seqNum.value = data
        // 发送操作成功的事件