Blame view

src/main/resources/templates/shipment/shipmentHeader/report.html 5.33 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">
hh authored
8
9
        <h3 align="center">出库单</h3>
        <span>出库单号:</span><span th:text="${shipmentHeader['totalLines']}"></span>
10
        <table id="reportTable" width="100%" border="1" cellspacing="0" cellpadding="0" class="dy-report">
tangying authored
11
12
13
14
15
            <thead style="display:table-header-group;">
            <tr>
                <td colspan="7">
                    <span style="padding-top:40px;width: 40%; float:left;" th:text="${#dates.format(shipmentHeader.created,'yyyy-MM-dd HH:mm:ss')}"></span>
                    <h2 style="width:20%;text-align:center;float:left;padding-top:10px;">出库单</h2>
16
                    <span style="padding-top:20px;width:38%;float:right; text-align: right"><img id="shipmentCode" th:src="@{'/image/'+${shipmentHeader.code}}"></span>
tangying authored
17
18
19
20
                </td>
            </tr>
            <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060">
                <td colspan="7">
hh authored
21
22
23
24
25
26
<!--                    <div style="width:40%; float:left;">客户名称:<span th:text="${shipmentHeader['customerName']}"></span></div>-->
                    <div style="width:40%; float:left;">生产车间:<span th:text="${shipmentHeader['workshop']}"></span></div>
                    <div style="width:40%; float:left;">仓库:<span th:text="${shipmentHeader['warehouse']}"></span></div>
                    <div style="width:40%; float:left;">母件编码:<span th:text="${shipmentHeader['superiorCode']}"></span></div>
                    <div style="width:40%; float:left;">母件名称:<span th:text="${shipmentHeader['superiorName']}"></span></div>
tangying authored
27
28
29
30
31
32
33
34
                    <div style="width:50%; float:right; text-align:right">
                        <span>明细条数:<span th:text="${shipmentHeader['totalLines']}"></span></span>
                        <span style="padding-left:20px;">明细总数:<span th:text="${shipmentHeader['totalQty']}"></span></span>
                        <span class="noprint" style="padding-left:20px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span>
                    </div>
                </td>
            </tr>
            <tr>
35
                <th width="18%">物料编码</th>
tangying authored
36
                <th width="22%">物料名称</th>
hh authored
37
                <!--                <th width="10%">物料规格</th>
38
39
                <th width="9%">批次</th>
                <th width="11%">批号</th>
hh authored
40
                <th width="9%">项目号</th>-->
41
                <th width="8%">数量</th>
tangying authored
42
43
44
45
46
47
48
                <th width="21%">条码</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="row,rowStat : ${details}">
                <td th:text="${row.materialCode}"></td>
                <td th:text="${row.materialName}"></td>
hh authored
49
                <!--                <td th:text="${row.materialSpec}"></td>
tangying authored
50
51
                <td th:text="${row.batch}"></td>
                <td th:text="${row.lot}"></td>
hh authored
52
                <td th:text="${row.projectNo}"></td>-->
hh authored
53
                <td th:text="${row.qty}"></td>
54
                <td><img th:src="@{'/image/'+${row.materialCode}}"></td>
tangying authored
55
56
57
58
59
60
61
62
63
            </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">
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    // 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
80
81
    // $("#shipmentCode").JsBarcode($("#shipmentCode").attr("data"), barcodeStyle);
tangying authored
82
83
84
85
86
87

    // 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);
    // }
88
89
90
91
    // $('#reportTable tbody tr').each(function(i) {
    //     var barcodeText = $(this).children()[0].innerText;
    //     JsBarcode($(this).children()[6].querySelector("img"), barcodeText, barcodeStyle);
    // });
tangying authored
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107


</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>
hh authored
108
</html>