From a4aa98cebc5d503bbc93f8f6e158b1d3a28a4a9d Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期二, 26 十一月 2024 23:23:53 +0800 Subject: [PATCH] 显示宽度 --- src/views/ecg/appointment/CheckItemPanel.vue | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/views/ecg/appointment/CheckItemPanel.vue b/src/views/ecg/appointment/CheckItemPanel.vue index ef4a19d..c625c59 100644 --- a/src/views/ecg/appointment/CheckItemPanel.vue +++ b/src/views/ecg/appointment/CheckItemPanel.vue @@ -21,6 +21,8 @@ } }) +const emit = defineEmits(['event_appoint_confirm']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋� + const checkTypeStore = useCheckTypeStore(); const checkTypeTimeslotList = ref<QueueSequenceVO>() @@ -46,6 +48,8 @@ } const data = await AppointmentApi.confirmAppointmentVip(tempAppointment) bookSeqNum.value = data + // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢 + emit('event_appoint_confirm') _printNote() ElNotification({ title: '娓╅Θ鎻愮ず', @@ -63,11 +67,13 @@ } else { const data = await AppointmentApi.confirmAppointment(props.appointment) bookSeqNum.value = data + // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢 + emit('event_appoint_confirm') _printNote() ElNotification({ title: '娓╅Θ鎻愮ず', message: data, - type: 'warning' + type: 'info' }) } } @@ -87,23 +93,29 @@ var panel = hiprintTemplate.addPrintPanel({ width: 140, height: 130, paperNumberDisabled:true}); //鏂囨湰 const checkTypeName = checkTypeStore.getCheckTypeName(props.appointment.bookCheckType) - panel.addPrintText({ options: { width: 140, height: 12, top: 2, left: 20, title: checkTypeName, textAlign: 'center', fontSize: 8, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); + panel.addPrintText({ options: { width: 140, height: 12, top: 0, left: 20, title: checkTypeName, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); const patientBaisc = props.appointment.patName + " " + calGender(props.appointment.patGender) + " " + calculateAge(props.appointment.patBirthday) + "宀�" - panel.addPrintText({ options: { width: 140, height: 12, top: 16, left: 20, title: patientBaisc, textAlign: 'center' , fontSize: 8, fontWeight: '700', } }); + panel.addPrintText({ options: { width: 140, height: 12, top: 18, left: 20, title: patientBaisc, textAlign: 'center' , fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); const ward_bed = props.appointment.patWardDesc + "-" + props.appointment.patBedNo - panel.addPrintText({ options: { width: 140, height: 12, top: 30, left: 20, title: ward_bed, textAlign: 'center', fontSize: 8, fontFamily: '榛戜綋', } }); + panel.addPrintText({ options: { width: 140, height: 12, top: 36, left: 20, title: ward_bed, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); const bookTime = formatTimestamp(props.appointment.bookDate) + " " + getBookBeginTime(props.appointment.bookTimeslot) - panel.addPrintText({ options: { width: 140, height: 12, top: 44, left: 20, title: bookTime, textAlign: 'center', fontSize: 8 } }); + panel.addPrintText({ options: { width: 140, height: 12, top: 54, left: 20, title: bookTime, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); //panel.addPrintText({ options: { width: 140, height: 12, top: 58, left: 20, title: props.appointment.patId, textAlign: 'center', fontSize: 8 } }); //panel.addPrintText({ options: { width: 140, height: 12, top: 72, left: 20, title: props.appointment.patMobile, textAlign: 'center', fontSize: 8, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); - const _bookSeqNum = bookSeqNum.value + '' // 锛侊紒闇�瑕佸瓧绗︿覆 - panel.addPrintText({ options: { width: 140, height: 12, top: 62, left: 20, title: _bookSeqNum, textAlign: 'center', fontSize: 16, fontFamily: '寰蒋闆呴粦', fontWeight: '900' } }); + const _bookSeqNum = bookSeqNum.value??props.appointment?.bookSeqNum + panel.addPrintText({ options: { width: 140, height: 12, top: 78, left: 20, title: ''+_bookSeqNum, textAlign: 'center', fontSize: 20, fontFamily: '寰蒋闆呴粦', fontWeight: '1000' } }); + + // 鏉$爜 灏辫瘖娴佹按鍙� + panel.addPrintText({ options: { width: 140, height: 22, top: 104, left: 20, title: props.appointment.episodeId, textType: 'barcode' } }); + // 娉ㄦ剰浜嬮」 + const notes = checkTypeStore.getCheckTypeNotes(props.appointment.bookCheckType) + panel.addPrintText({ options: { width: 140, height: 12, top: 128, left: 20, title: notes, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } }); //鎵撳嵃 if (undefined === printMode) - hiprintTemplate.print2([{},{},{}]); // 鍙互浼� [瀹氫綅鍙傛暟] http://https://ccsimple.github.io/sv-print-docs/config/template.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AE%BE%E8%AE%A1%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B + hiprintTemplate.print2([{}]); // 鍙互浼� [瀹氫綅鍙傛暟] http://https://ccsimple.github.io/sv-print-docs/config/template.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AE%BE%E8%AE%A1%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B else - hiprintTemplate.print([{},{},{}]); + hiprintTemplate.print([{}]); } onMounted( async () => { @@ -129,7 +141,7 @@ :disabled="item.queueVipNo === item.queueVipFull" /> </el-select> - {{bookSeqNum}} + {{bookSeqNum??appointment.bookSeqNum}} <el-divider/> <el-button @click="_confirmAppointment" :type="isCurrentDay(appointment.bookDate)?'primary':'warning'"><Icon icon="ep:list" class="mr-5px" /> 鎺掗槦 </el-button> <el-button @click="_printNote(8)"><Icon icon="ep:printer" class="mr-5px" /> 鎵撳嵃鍙� </el-button> -- Gitblit v1.9.3