Blame view

src/main/resources/templates/config/container/print.html 4.98 KB
wangyanxiong authored
1
2
3
4
5
6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <head th:include="include :: header"></head>
7
    <title>库存交易明细</title>
wangyanxiong authored
8
9
10
11
12
    <!--<link href="css/bootstrap.min.css" rel="stylesheet" />-->
    <!--<link href="css/font-awesome.min.css" rel="stylesheet" />-->
    <!--&lt;!&ndash;[if IE]>-->
    <!--<link href="css/font-awesome-ie7.min.css" rel="stylesheet" />-->
    <!--<![endif]&ndash;&gt;-->
wangyanxiong authored
13
14
15
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/font-awesome.min.css" rel="stylesheet" />
    <link href="css/font-awesome-ie7.min.css" rel="stylesheet" />
wangyanxiong authored
16
    <style type="text/css">
wangyanxiong authored
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
        body,ul,li{
            padding:0;
            margin:0;
        }
        ul,li{
            list-style:none;
        }
        .table-bordered td,.table-bordered th{border:0px solid #000!important}

        .ewm_w ul{width:500px; margin:0 auto;}
        .ewm_w li{width:500px;height:228px; padding:0px;margin:0px auto; display:inline-table;}

        .ewm_w{
            width:156px;
            float:left;
            padding-left:0px;
wangyanxiong authored
33
        }
wangyanxiong authored
34
35
        .r_two{
            padding-left:20px;
wangyanxiong authored
36
37
38
39
        }
    </style>
</head>
wangyanxiong authored
40
<body>
wangyanxiong authored
41
42
43
<div class="container">
    <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>
    <div class="row" style="width:500px;padding:0px 0px; margin:0 auto">
wangyanxiong authored
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
        <div  style="width: 312px; margin:0;padding:0;">
            <div th:each="row:${container}">
                <div class="ewm_w" >
                    <table style="height: 220px; margin:0;padding:0;" border="0" cellspacing="0" cellpadding="0" class="dy-report table table-bordered">
                        <!--th:each="row:${container}">-->
                        <tbody>
                        <tr>
                            <td align="center">
                                <img id="barcode" name="rotate" />
                                <input th:value="${row.code}" id="code" type="hidden" name="code"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="ewm_w" >
                    <table style="height: 220px; margin:0;padding:0;" border="0" cellspacing="0" cellpadding="0" class="dy-report table table-bordered">
                        <!--th:each="row:${container}">-->
                        <tbody>
                        <tr>
                            <td align="center">
                                <img id="barcode" name="rotate" />
                                <input th:value="${row.code}" id="code" type="hidden" name="code"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
wangyanxiong authored
73
        </div>
wangyanxiong authored
74
75
    </div>
</div>
wangyanxiong authored
76
wangyanxiong authored
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<div th:include="include :: footer"></div>
<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" src="../../../js/barcode/JsBarcode.all.js"></script>
<script type="text/javascript">
    var  barcodeStyle = {
        format: "CODE128",//选择要使用的条形码类型
wangyanxiong authored
91
92
        width:2,//设置条之间的宽度
        height:70,//高度
wangyanxiong authored
93
94
95
96
97
98
99
        displayValue:true,//是否在条形码下方显示文字
        // text:"456",//覆盖显示的文本
        // fontOptions:"bold italic",//使文字加粗体或变斜体
        font:"monospace",//设置文本的字体fantasy
        textAlign:"center",//设置文本的水平对齐方式
        textPosition:"bottom",//设置文本的垂直位置
        textMargin:1,//设置条形码和文本之间的间距
100
        fontSize:35,//设置文本的大小
wangyanxiong authored
101
102
103
104
105
106
        background:"#ffffff",//设置条形码的背景
        lineColor:"#000000",//设置条和文本的颜色。
        margin:1//设置条形码周围的空白边距
    };
    function print_qrcode() {
        $('.dy-report').each(function (i, item) {
wangyanxiong authored
107
108
109
            var code= document.getElementsByName("code")[i].getAttribute("value");
            $(this).find('#barcode').JsBarcode( code, barcodeStyle);
            document.getElementsByName("rotate")[i].style.transform = 'rotate('+90+'deg)';
wangyanxiong authored
110
111
112
113
114
115
116
117
118
        });
    }
    print_qrcode();
</script>

<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(){
wangyanxiong authored
119
        window.print();
wangyanxiong authored
120
121
122
123
124
125
126
127
128
129
130
131
132
    }
</script>

</body>
</html>