From 09dc74e264b6262cbe41c9c8476e24705871d4a6 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 08 十一月 2026 23:31:17 +0800
Subject: [PATCH] yxh
---
src/views/ecg/appointment/CheckItemPanel.vue | 54 ++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/src/views/ecg/appointment/CheckItemPanel.vue b/src/views/ecg/appointment/CheckItemPanel.vue
index 86355cb..db4bc55 100644
--- a/src/views/ecg/appointment/CheckItemPanel.vue
+++ b/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,22 +29,49 @@
const checkTypeTimeslotList = ref<QueueSequenceVO>()
const bookTimeSlotVip = ref<number>()
-const bookSeqNum = ref<number>()
+/**
+ * 鏈绛惧埌鎷垮埌鐨勬帓闃熷彿锛堝彿缁熶竴鍚庣敱鍚庣鍐欏叆 queue.seq_num锛屽苟鐢辩‘璁ゆ帴鍙g洿鎺ヨ繑鍥烇級銆�
+ *
+ * 璇存槑锛氬彉閲忓悕浠� 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)) {
- ElMessageBox.confirm('闈炲綋澶╅绾﹂」锛岀‘瀹氳浠婂ぉ妫�鏌ュ悧锛�', 'Warning', {
- confirmButtonText: '濂界殑',
- cancelButtonText: '涓嶇敤',
- type: 'warning'
- })
+ // 銆愭湰闇�姹傘�戦潪褰撳ぉ棰勭害锛氬厛鎻愰啋锛岀‘璁ゅ悗**鎸夐鐣欏彿**绛惧叆锛堜笉鍗犵敤浠婂ぉ鍚屾椂娈电殑姝e父棰勭害鍙凤級
+ // 娉ㄦ剰 bookDate 浠庡悗绔洖鏉ユ槸**鏃堕棿鎴虫暟鍊�**锛堝 1792339200000锛夛紝蹇呴』鏍煎紡鍖栧悗鍐嶆嫾杩涙彁绀猴紝
+ // 鍚﹀垯浼氱洿鎺ユ樉绀轰竴涓叉暟瀛椼�俧ormatTimestamp 鈫� dayjs(x).format('YYYY-MM-DD')銆�
+ const bookDateText = props.appointment.bookDate
+ ? formatTimestamp(props.appointment.bookDate)
+ : '-'
+ ElMessageBox.confirm(
+ `璇ユ偅鑰呴绾︽棩鏈熶负 ${bookDateText}锛屼笉鏄粖澶┿�俓n` +
+ '鏄惁浠嶈浠婂ぉ绛惧埌锛熺‘璁ゅ悗灏嗗垎閰嶃�愰鐣欏彿銆戯紙涓嶄細鍗犵敤浠婂ぉ璇ユ椂娈电殑姝e父棰勭害鍙凤級銆�',
+ '闈炲綋澶╅绾︾鍒�',
+ {
+ 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)
- bookSeqNum.value = data
+ seqNum.value = data
// 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
emit('event_appoint_confirm')
_printNote()
@@ -79,7 +106,7 @@
tempAppointment.bookTimeslot = bookTimeSlotVip.value
}
const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
- bookSeqNum.value = data
+ seqNum.value = data
// 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
emit('event_appoint_confirm')
_printNote()
@@ -100,7 +127,7 @@
})
} else {
const data = await AppointmentApi.confirmAppointment(props.appointment)
- bookSeqNum.value = data
+ seqNum.value = data
// 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
emit('event_appoint_confirm')
// _printNote()
@@ -206,15 +233,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 +294,7 @@
:disabled="item.queueVipNo === item.queueVipFull"
/>
</el-select>
- {{ bookSeqNum ?? appointment.bookSeqNum }}
+ {{ seqNumText }}
<el-divider />
<el-button
@click="_confirmAppointment"
--
Gitblit v1.9.3