A7纸张
This commit is contained in:
parent
a3426eaaa0
commit
f4ed1dd779
@ -390,11 +390,16 @@ const handlePrintBarcode = async (row: PatientVO) => {
|
||||
settingContainer: "#BarcodePrintElementOptionSetting",
|
||||
});
|
||||
|
||||
// 打印设置
|
||||
// 打印设置 - 根据barcode.js的配置设置纸张大小和边距
|
||||
const options = {
|
||||
leftOffset: 0,
|
||||
topOffset: 0,
|
||||
printMode: 'popup'
|
||||
printMode: 'popup',
|
||||
paperType: 'A7', // 纸张类型:A7
|
||||
height: 30, // 纸张高度:30mm
|
||||
width: 50, // 纸张宽度:50mm
|
||||
paperHeader: -6, // 纸张上边距:-6mm
|
||||
paperFooter: 85.03937007874016 // 纸张下边距
|
||||
};
|
||||
|
||||
// 增强样式
|
||||
@ -403,10 +408,30 @@ const handlePrintBarcode = async (row: PatientVO) => {
|
||||
},
|
||||
styleHandler: () => {
|
||||
return `<style>
|
||||
.hiprint-printElement-text{color:black !important;}
|
||||
.hiprint-printElement-barcode{display:block !important; visibility:visible !important;}
|
||||
svg {display:block !important; width:100% !important;}
|
||||
.hiprint-printElement{opacity:1 !important; visibility:visible !important;}
|
||||
/* 条形码打印特定样式 */
|
||||
@page {
|
||||
size: ${options.width}mm ${options.height}mm;
|
||||
margin: 0;
|
||||
@top-center { content: none; }
|
||||
@bottom-center { content: none; }
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.hiprint-printPanel {
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
/* 隐藏页眉页脚页码 */
|
||||
.hiprint-printPanel-header,
|
||||
.hiprint-printPanel-footer,
|
||||
.hiprint-printPanel-pageNumber {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
</style>`;
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user