| | |
| | | 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: -18, 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: 0, 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: 18, 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: 36, 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??props.appointment?.bookSeqNum |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 62, left: 20, title: ''+_bookSeqNum, textAlign: 'center', fontSize: 16, fontFamily: '微软雅黑', fontWeight: '900' } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 60, left: 20, title: ''+_bookSeqNum, textAlign: 'center', fontSize: 20, fontFamily: '微软雅黑', fontWeight: '1000' } }); |
| | | |
| | | //打印 |
| | | 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 () => { |
| | |
| | | var panel = hiprintTemplate.addPrintPanel({ width: 140, height: 130, paperNumberDisabled:true}); |
| | | //文本 |
| | | const checkTypeName = checkTypeStore.getCheckTypeName(curAppointment.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: 2, left: 20, title: checkTypeName, textAlign: 'center', fontSize: 10, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | const patientBaisc = curAppointment.patName + " " + calGender(curAppointment.patGender) + " " + calculateAge(curAppointment.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: 16, left: 20, title: patientBaisc, textAlign: 'center' , fontSize: 10, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | const ward_bed = curAppointment.patWardDesc + "-" + curAppointment.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: 30, left: 20, title: ward_bed, textAlign: 'center', fontSize: 10, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | const bookTime = formatTimestamp(curAppointment.bookDate) + " " + getBookBeginTime(curAppointment.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: 58, left: 20, title: curAppointment.patId, textAlign: 'center', fontSize: 8 } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 72, left: 20, title: curAppointment.patMobile, textAlign: 'center', fontSize: 8, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 44, left: 20, title: bookTime, textAlign: 'center', fontSize: 10, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 58, left: 20, title: curAppointment.patId, textAlign: 'center', fontSize: 10, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 72, left: 20, title: curAppointment.patMobile, textAlign: 'center', fontSize: 10, fontFamily: '微软雅黑', fontWeight: '700', } }); |
| | | //条形码 |
| | | panel.addPrintText({ options: { width: 140, height: 22, top: 86, left: 20, title: curAppointment.patId, textType: 'barcode' } }); |
| | | |