yxh
2026-10-18 1446994d504819c367e1ff667360eadb314f9ac6
src/views/ecg/appointment/CheckItemPanel.vue
@@ -9,7 +9,7 @@
import { cloneDeep } from 'lodash-es'
import { hiprint } from 'vue-plugin-hiprint'
import { calGender, getBookBeginTime } from '@/utils'
import { getCheckTypeName } from '@/utils/checkTypeFormatter'
import { getCheckTypeName, getCheckTypeSeqPrefix } from '@/utils/checkTypeFormatter'
defineComponent({
  name: 'CheckItemPanel'
@@ -29,7 +29,21 @@
const checkTypeTimeslotList = ref<QueueSequenceVO>()
const bookTimeSlotVip = ref<number>()
const bookSeqNum = ref<number>()
/**
 * 本次签到拿到的排队号(号统一后由后端写入 queue.seq_num,并由确认接口直接返回)。
 *
 * 说明:变量名从 bookSeqNum 改为 seqNum —— 号已经统一,系统里不再有 book_seq_num 这一路。
 * 预约对象上的 `bookSeqNum` 字段名保留(接口字段不动),值来源也已改为 queue.seq_num,
 * 仅在"该预约已经排过队"时用于回显。
 */
const seqNum = ref<number>()
/** 排队号显示文案:检查项目前缀 + 号(号按检查项目各自编号,必须靠前缀区分) */
const seqNumText = computed(() => {
  const num = seqNum.value ?? props.appointment?.bookSeqNum
  if (num === undefined || num === null || num === '') return ''
  return `${getCheckTypeSeqPrefix(props.appointment?.bookCheckType)}${num}`
})
const _confirmAppointment = async () => {
  if (!isCurrentDay(props.appointment.bookDate)) {
@@ -44,7 +58,7 @@
          tempAppointment.bookTimeslot = bookTimeSlotVip.value
        }
        const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
        bookSeqNum.value = data
        seqNum.value = data
        // 发送操作成功的事件
        emit('event_appoint_confirm')
        _printNote()
@@ -79,7 +93,7 @@
          tempAppointment.bookTimeslot = bookTimeSlotVip.value
        }
        const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
        bookSeqNum.value = data
        seqNum.value = data
        // 发送操作成功的事件
        emit('event_appoint_confirm')
        _printNote()
@@ -100,7 +114,7 @@
      })
  } else {
    const data = await AppointmentApi.confirmAppointment(props.appointment)
    bookSeqNum.value = data
    seqNum.value = data
    // 发送操作成功的事件
    emit('event_appoint_confirm')
    // _printNote()
@@ -206,15 +220,14 @@
    }
  })
  // 右侧 Pane 输出
  const _bookSeqNum = bookSeqNum.value ?? props.appointment?.bookSeqNum
  // 右侧 Pane 输出:排队号(前缀 + 号,与屏上显示一致)
  panel.addPrintText({
    options: {
      width: 130,
      height: 20,
      top: 7,
      left: 170,
      title: '' + _bookSeqNum,
      title: seqNumText.value,
      textAlign: 'center',
      fontSize: 30,
      fontFamily: '微软雅黑',
@@ -268,7 +281,7 @@
        :disabled="item.queueVipNo === item.queueVipFull"
      />
    </el-select>
    {{ bookSeqNum ?? appointment.bookSeqNum }}
    {{ seqNumText }}
    <el-divider />
    <el-button
      @click="_confirmAppointment"