reportBatteryPackage.html
3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style>
.divstyle{
margin-top: 0px;
/*margin-left: 18%;*/
}
.spanstyle{
margin-left: 50%;
}
.dy-report{
}
</style>
<body class="white-bg" style="padding:5px 0;font-size:12px;" id="ddd">
<div class="container" style="color: #333;">
<div class="row">
<div class="row" style="text-align:right"><span class="hidden-print" style="padding-left:2px;padding-top:0px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span></div>
<table width="100%" style="margin-top:0px;" border="0" cellspacing="0" cellpadding="0" class="dy-report "
th:each="row:${receiptContainerDetails}">
<tbody>
<tr style="height:40%;">
<td style="margin:0px;width:200px;" align="center" >
<input th:value="${row.batteryPackTwoCode}" type="hidden" name="code"/>
<!--<div style="" class="qrcode"></div>-->
<img width="170px;" th:src="@{'/image/'+${row.batteryPackTwoCode}}">
</td>
</tr>
<tr style="">
<td style="text-align:center" > <!--align="center"-->
<div class="divstyle" >
<span >PACK编码:</span>
<span th:text="${row.batteryPackTwoCode}"></span></div>
<div class="divstyle" >
<span >PACK内部种类:</span>
<span th:text="${row.userDef2}"></span></div>
<div class="divstyle" >
<span >供货商:</span>
<span th:text="${row.companyName}"></span></div>
<!--<div class="divstyle" >
<span >国家编码:</span>
<span th:text="${row.countryCode}"></span></div>-->
<div class="divstyle" >
<span >备注:</span>
<span th:text="${row.remark}"></span></div>
<div class="divstyle" >
<span >打印时间:</span>
<span th:text="${row.userDef1}"></span></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="../../../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../../../js/jquery.jqprint-0.3.js"></script>
<script type="text/javascript" src="../../../js/qrcode/qrcode.min.js"></script>
<script th:inline="javascript">
function print_qrcode(){
$('.dy-report').each(function (i,item) {
var code=$("input[name='code']")[i].value;
//var code=$("#code").val();
var code_text=code;
$(".qrcode")[i].innerHTML = "";
var QRcode=new QRCode($(this).find('.qrcode')[0],{
text:code_text,
width:100,
height:100,
correctLevel:QRCode.CorrectLevel.L
});
});
}
// print_qrcode();
</script>
<style type="text/css">
@media print {
.noprint{display:none;}
}
.divstyle{
margin-top: 0px;
/*margin-left: 18%;*/
}
</style>
<script type="text/javascript" src="../../../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../../../js/jquery.jqprint-0.3.js"></script>
<script type="text/javascript">
function a(){
$("#ddd").jqprint();
/*$(".qrcode").children().remove();
print_qrcode();
window.print();*/
}
</script>
</body>
</html>