Blame view

src/main/resources/templates/task/taskDetail/report.html 4.07 KB
1
2
3
4
5
6
7
8
<!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">
        <table id="reportTable" width="100%" border="1" cellspacing="0" cellpadding="0" class="dy-report">
xqs authored
9
10
11
12
            <thead style="display:table-header-group;">
            <tr>
                <td colspan="7">
xqs authored
13
                    <span style="padding-top:40px;width: 40%; float:left;" th:text="${#dates.format(taskHeader.created,'yyyy-MM-dd HH:mm:ss')}"></span>
14
                    <h2 style="width:20%;text-align:center;float:left;padding-top:10px;">上架明细</h2>
xqs authored
15
                    <span style="float:right; text-align:right">任务ID:<span th:text="${taskHeader['id']}"></span></span>
16
17
18
19
20
                </td>
            </tr>
            <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060">
                <td colspan="7">
                    <div style="width:50%; float:right; text-align:right">
xqs authored
21
22
                        <span>总条数:<span th:text="${totalLines}"></span></span>
                        <span style="padding-left:20px;">总物料数:<span th:text="${totalQty}"></span></span>
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
                        <span class="noprint" style="padding-left:20px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span>
                    </div>
                </td>
            </tr>
            <tr>
                <th width="10%">库位</th>
                <th width="9%">容器</th>
                <th width="18%">物料编码</th>
                <th width="22%">物料名称</th>
                <th width="9%">数量</th>
                <th width="21%">条码</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="row, rowStat : ${task}">
                <td th:if="${row.taskType} eq 100" th:text="${row.toLocation}"></td>
                <td th:if="${row.taskType} eq 200" th:text="${row.toLocation}"></td>
                <td th:if="${row.taskType} eq 300" th:text="${row.fromLocation}"></td>
                <td th:if="${row.taskType} eq 400" th:text="${row.fromLocation}"></td>
                <td th:text="${row.containerCode}"></td>
                <td th:text="${row.materialCode}"></td>
                <td th:text="${row.materialName}"></td>
                <td th:text="${row.qty}"></td>
xqs authored
46
                <td><img></img></td>
47
48
49
50
51
52
            </tr>
            </tbody>
        </table>
    </div>
</div>
<div th:include="include :: footer"></div>
xqs authored
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
<script charset="utf-8" type="text/javascript" th:src="@{/js/barcode/JsBarcode.all.js} "></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/jquery-1.4.4.min.js}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/jquery.jqprint-0.3.js}"></script>
<script th:inline="javascript">

    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//设置条形码周围的空白边距
    };

    //$("#receiptCode").JsBarcode($("#receiptCode").attr("data"), barcodeStyle);

    $('#reportTable tbody tr').each(function(i) {
        var barcodeText = $(this).children()[5].innerText;
        JsBarcode($(this).children()[8].querySelector("img"), barcodeText, barcodeStyle);
    });

    function a(){
        $("#ddd").jqprint();
    }
</script>
</body>
87
</html>