Blame view

src/main/resources/templates/receipt/receiptContainerDetail/reportBatteryPackage.html 3.22 KB
pengcheng authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!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;
    }
    .spanstyle{
        margin-left: 2%;
    }
    .dy-report{

    }
</style>
<body class="white-bg" style="padding:5px 0;" 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;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span></div>
20
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dy-report "
pengcheng authored
21
22
               th:each="row:${receiptDetails}">
            <tbody>
23
            <tr style="height:40%;">
pengcheng authored
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
                <td   style="margin:0px;width:100%;" align="center"  >
                    <input th:value="${row.batteryPackTwoCode}"  type="hidden" name="code"/>
                    <!--<div style="" class="qrcode"></div>-->
                    <img   th:src="@{'/image/'+${row.batteryPackTwoCode}}">
                </td>
            </tr>
            <tr style="">
                <td  style="text-align:center">
                    <div class="divstyle" >
                        <span >PACK编码:</span>
                        <span th:text="${row.batteryPackTwoCode}"></span></div>
                    <div class="divstyle" >
                        <span >PACK内部种类:</span>
                        <span>电池包</span></div>
                    <div class="divstyle" >
                        <span >供货商:</span>
                        <span th:text="${row.companyName}"></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;}
    }
</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>