|
@@ -3,13 +3,12 @@
|
|
|
<div id="printSection">
|
|
<div id="printSection">
|
|
|
<div
|
|
<div
|
|
|
class="print"
|
|
class="print"
|
|
|
-
|
|
|
|
|
style="
|
|
style="
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
- width: 1141px;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
@@ -49,7 +48,7 @@
|
|
|
</span>
|
|
</span>
|
|
|
<span style="width: 17%">
|
|
<span style="width: 17%">
|
|
|
<span style="width: 60px; display: inline-block">发货日期</span>
|
|
<span style="width: 60px; display: inline-block">发货日期</span>
|
|
|
- 2025-01-01
|
|
|
|
|
|
|
+ 2025-01-01
|
|
|
</span>
|
|
</span>
|
|
|
<span style="width: 17%">
|
|
<span style="width: 17%">
|
|
|
<span style="width: 60px; display: inline-block">总计金额</span>
|
|
<span style="width: 60px; display: inline-block">总计金额</span>
|
|
@@ -86,7 +85,7 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr
|
|
<tr
|
|
|
align="center"
|
|
align="center"
|
|
|
- style="height:30px"
|
|
|
|
|
|
|
+ style="height: 30px"
|
|
|
v-for="(item, index) in [{}, {}, {}, {}, {}, {}]"
|
|
v-for="(item, index) in [{}, {}, {}, {}, {}, {}]"
|
|
|
>
|
|
>
|
|
|
<td> {{ item.productCode }} </td>
|
|
<td> {{ item.productCode }} </td>
|
|
@@ -214,15 +213,23 @@
|
|
|
printWindow.document.open();
|
|
printWindow.document.open();
|
|
|
printWindow.document.write('<html><head><title>打印预览</title>');
|
|
printWindow.document.write('<html><head><title>打印预览</title>');
|
|
|
printWindow.document.write(`<style>
|
|
printWindow.document.write(`<style>
|
|
|
- @media print {
|
|
|
|
|
- .print{
|
|
|
|
|
- page-break-before: always !important;
|
|
|
|
|
- page-break-inside: avoid !important;
|
|
|
|
|
- };
|
|
|
|
|
- @page {
|
|
|
|
|
- size: 31cm 11cm;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+@media print {
|
|
|
|
|
+ @page {
|
|
|
|
|
+ size: 30cm 11cm; /* 设置打印尺寸 */
|
|
|
|
|
+ margin: 0; /* 去除页边距 */
|
|
|
|
|
+ }
|
|
|
|
|
+ body {
|
|
|
|
|
+ width: 30cm;
|
|
|
|
|
+ height: 11cm;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ #printSection {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
</style>`);
|
|
</style>`);
|
|
|
|
|
|