Commit f3f44e60c78e81fccd0ecbfe788d3d7522aafe67
1 parent
696731f3
托盘条码打印
Showing
1 changed file
with
34 additions
and
20 deletions
src/main/resources/templates/config/container/print.html
... | ... | @@ -37,24 +37,39 @@ |
37 | 37 | </style> |
38 | 38 | </head> |
39 | 39 | |
40 | -<body > | |
40 | +<body> | |
41 | 41 | <div class="container"> |
42 | 42 | <div class="row" style="text-align:right"><span class="hidden-print" style="padding-left:20px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span></div> |
43 | 43 | <div class="row" style="width:500px;padding:0px 0px; margin:0 auto"> |
44 | - <div id="ddd" style="width: 312px; margin:0;padding:0;"> | |
45 | - <div class="ewm_w" th:each="row:${container}"> | |
46 | - <table style="height: 220px; margin:0;padding:0;" border="0" cellspacing="0" cellpadding="0" class="dy-report table table-bordered"> | |
47 | - <!--th:each="row:${container}">--> | |
48 | - <tbody> | |
49 | - <tr> | |
50 | - <td align="center"> | |
51 | - <img id="barcode" name="rotate" /> | |
52 | - <input th:value="${row.code}" id="code" type="hidden" name="code"/> | |
53 | - </td> | |
54 | - </tr> | |
55 | - </tbody> | |
56 | - </table> | |
57 | - </div> | |
44 | + <div style="width: 312px; margin:0;padding:0;"> | |
45 | + <div th:each="row:${container}"> | |
46 | + <div class="ewm_w" > | |
47 | + <table style="height: 220px; margin:0;padding:0;" border="0" cellspacing="0" cellpadding="0" class="dy-report table table-bordered"> | |
48 | + <!--th:each="row:${container}">--> | |
49 | + <tbody> | |
50 | + <tr> | |
51 | + <td align="center"> | |
52 | + <img id="barcode" name="rotate" /> | |
53 | + <input th:value="${row.code}" id="code" type="hidden" name="code"/> | |
54 | + </td> | |
55 | + </tr> | |
56 | + </tbody> | |
57 | + </table> | |
58 | + </div> | |
59 | + <div class="ewm_w" > | |
60 | + <table style="height: 220px; margin:0;padding:0;" border="0" cellspacing="0" cellpadding="0" class="dy-report table table-bordered"> | |
61 | + <!--th:each="row:${container}">--> | |
62 | + <tbody> | |
63 | + <tr> | |
64 | + <td align="center"> | |
65 | + <img id="barcode" name="rotate" /> | |
66 | + <input th:value="${row.code}" id="code" type="hidden" name="code"/> | |
67 | + </td> | |
68 | + </tr> | |
69 | + </tbody> | |
70 | + </table> | |
71 | + </div> | |
72 | + </div> | |
58 | 73 | </div> |
59 | 74 | </div> |
60 | 75 | </div> |
... | ... | @@ -73,8 +88,8 @@ |
73 | 88 | <script type="text/javascript"> |
74 | 89 | var barcodeStyle = { |
75 | 90 | format: "CODE128",//选择要使用的条形码类型 |
76 | - width:1,//设置条之间的宽度 | |
77 | - height:60,//高度 | |
91 | + width:2,//设置条之间的宽度 | |
92 | + height:70,//高度 | |
78 | 93 | displayValue:true,//是否在条形码下方显示文字 |
79 | 94 | // text:"456",//覆盖显示的文本 |
80 | 95 | // fontOptions:"bold italic",//使文字加粗体或变斜体 |
... | ... | @@ -82,7 +97,7 @@ |
82 | 97 | textAlign:"center",//设置文本的水平对齐方式 |
83 | 98 | textPosition:"bottom",//设置文本的垂直位置 |
84 | 99 | textMargin:1,//设置条形码和文本之间的间距 |
85 | - fontSize:15,//设置文本的大小 | |
100 | + fontSize:17,//设置文本的大小 | |
86 | 101 | background:"#ffffff",//设置条形码的背景 |
87 | 102 | lineColor:"#000000",//设置条和文本的颜色。 |
88 | 103 | margin:1//设置条形码周围的空白边距 |
... | ... | @@ -101,8 +116,7 @@ |
101 | 116 | <script type="text/javascript" src="../../../js/jquery.jqprint-0.3.js"></script> |
102 | 117 | <script type="text/javascript"> |
103 | 118 | function a(){ |
104 | - $("#ddd").jqprint(); | |
105 | - print_qrcode(); | |
119 | + window.print(); | |
106 | 120 | } |
107 | 121 | </script> |
108 | 122 | |
... | ... |