From e7c5ce7f86210ea57ca10f98c265ecc5bbf27a12 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 16 十二月 2025 08:19:20 +0800
Subject: [PATCH] 调整打印样式
---
src/views/component/printList/barcode.vue | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/views/component/printList/barcode.vue b/src/views/component/printList/barcode.vue
index 03101c2..a579815 100644
--- a/src/views/component/printList/barcode.vue
+++ b/src/views/component/printList/barcode.vue
@@ -26,6 +26,7 @@
recordset: [],
},
grfPath: "",
+ oriention: null,
};
},
async mounted() {
@@ -115,6 +116,7 @@
this.pageSize.width = grfMeta.Printer.Width * 10 + "mm";
this.pageSize.height = grfMeta.Printer.Height * 10 + "mm";
console.log("pageSize: ",this.pageSize)
+ this.oriention = grfMeta.Printer.Oriention.toLowerCase()
},
getTemp() {
// 瀵规瘡涓鎵撳嵃鐨勫璞℃坊鍔犲垎椤�
@@ -136,10 +138,11 @@
type: "html",
style:
this.styleList[0].innerText +
- ` @media print {
+ `
.printable {
page-break-inside: avoid;
page-break-after: always;
+ box-sizing: border-box !important; /* 鍐呰竟璺濅笉褰卞搷瀹介珮 */
}
@page {
@@ -148,9 +151,16 @@
padding: 0;
}
+ table { border-collapse: collapse !important; }
+
* {
margin: 0;
padding: 0;
+ color: #000 !important;
+ opacity: 1 !important;
+ filter: none !important;
+ text-shadow: none !important;
+ -webkit-print-color-adjust: exact; /* 寮哄埗杩樺師棰滆壊锛堥伩鍏嶆贰鑹诧級 */
}
`,
});
@@ -159,4 +169,5 @@
};
</script>
-<style></style>
+<style>
+</style>
--
Gitblit v1.9.1