Blame view

src/main/resources/templates/shipment/shipmentHeader/report.html 5.51 KB
tangying authored
1
2
3
4
5
6
7
<!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>
<body class="white-bg" style="padding:5px 0;" id="ddd">
<div class="container" style="color: #333;">
    <div class="row">
8
9
        <!--<h3 align="center">出库单</h3>-->
        <table id="reportTable1" width="100%" border="0" cellspacing="0" cellpadding="0" class="dy-report">
tangying authored
10
11
            <thead style="display:table-header-group;">
            <tr>
12
13
14
                <td colspan="3">
                    <h3 style="width:67%;text-align:center;margin-left: 12%;float:left;padding-top:10px;">出库单</h3>
                    <span style="padding-top:20px;width:30%;margin-right: 1px; text-align: right"><img style="width:20%" id="receiptCode" th:src="@{'/image/'+${shipmentHeader.code}}"></span></span>
tangying authored
15
16
                </td>
            </tr>
17
18
19
20
21
22
23
24
            <tr>
                <td colspan="3">
                    <span class="noprint" style="padding-left:700px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span>
                </td>
            </tr>
           <!-- <tr>
                <td colspan="3">
                    <span ><img style="width:20%" id="receiptCode" th:src="@{'/image/'+${shipmentHeader.code}}"></span>
tangying authored
25
                </td>
26
27
28
29
30
            </tr>-->
            <tr>
                        <td colspan="0">出库单号:<span th:text="${shipmentHeader['code']}"></span></td>
                        <td colspan="0" align="center">发货日期:<span th:text="${#calendars.format(shipmentHeader['created'],'yyyy-MM-dd HH:mm:ss')}"></span></td>
                        <td colspan="0" align="center">销售部门:<span th:text="${shipmentHeader['cDepName']}"></span></td>
tangying authored
31
            </tr>
32
33
34
35
36
37
38
39
40
41
            <tr style="padding:15px 0 5px 0;">
                <td colspan="3">
                    <div style="width:50%; float:left;">客户编码:<span th:text="${shipmentHeader['customerCode']}"></span></div>
                </td>
            </tr>
            </thead>
           </table>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <table id="reportTable" width="100%" border="1" cellspacing="0" cellpadding="0" class="dy-report">
                <thead style="display:table-header-group;">
tangying authored
42
            <tr>
43
44
45
46
47
48
49
50
51
52
53
54
                <th width="12%">序号</th>
                <!--<th >仓库名称</th>-->
                <th width="18%">库存编码</th>
                <!--<th >存货代码</th>-->
                <th >存货名称</th>
                <th >规格型号</th>
                <th >工作令</th>
                <th >单位</th>
                <th >数量</th>
                <!--<th >工作令</th>
                <th >批号内容</th>-->
                <th width="8%">二维码</th>
tangying authored
55
56
57
58
            </tr>
            </thead>
            <tbody>
            <tr th:each="row,rowStat : ${details}">
59
60
                <td th:text="${row.id}"></td>
               <!-- <td th:text="${row.uWarehouseName}"></td>-->
tangying authored
61
                <td th:text="${row.materialCode}"></td>
62
               <!-- <td th:text="${row.barCode}"></td>-->
tangying authored
63
                <td th:text="${row.materialName}"></td>
64
65
66
67
68
69
70
                <td th:text="${row.materialSpec}"></td>
                <td th:text="${row.moCode}"></td>
                <td th:text="${row.materialUnit}"></td>
                <td th:text="${row.qty}"></td>
                <!--<td th:text="${row.moCode}"></td>
                <td th:text="${row.lot}"></td>-->
                <td><img style="width:100%" th:src="@{'/image/'+${row.materialCode}+','+${row.id}}"></td>
tangying authored
71
72
73
74
75
76
77
78
79
            </tr>
            </tbody>
        </table>
    </div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="../../../js/barcode/JsBarcode.all.js"></script>
<script th:inline="javascript">
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
    var  barcodeStyle = {
        format: "CODE128",//选择要使用的条形码类型
        width:1,//设置条之间的宽度
        height:40,//高度
        displayValue:true,//是否在条形码下方显示文字
        // text:"456",//覆盖显示的文本
        // fontOptions:"bold italic",//使文字加粗体或变斜体
        font:"monospace",//设置文本的字体fantasy
        textAlign:"center",//设置文本的水平对齐方式
        textPosition:"bottom",//设置文本的垂直位置
        textMargin:1,//设置条形码和文本之间的间距
        fontSize:12,//设置文本的大小
        background:"#ffffff",//设置条形码的背景
        lineColor:"#000000",//设置条和文本的颜色。
        margin:1//设置条形码周围的空白边距
    };
tangying authored
96
97
    $("#shipmentCode").JsBarcode($("#shipmentCode").attr("data"), barcodeStyle);
tangying authored
98
99
100
101
102
103

    // for (var i=0; i<$('#reportTable tbody tr').length; i++){
    //     var barcodeText = $("#reportTable tbody tr:eq("+ i +") td:eq(0)").innerText;
    //     $("#reportTable tbody tr:eq("+ i +") td:eq(6) canvas").JsBarcode("6666", barcodeStyle);
    // }
104
105
106
107
    /*$('#reportTable tbody tr').each(function(i) {
        var barcodeText = $(this).children()[0].innerText;
        JsBarcode($(this).children()[6].querySelector("img"), barcodeText, barcodeStyle);
    });*/
tangying authored
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124


</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();
    }
</script>
</body>
</html>