wzy
2021-04-01 d388e2788b7ef088d7cd40f901b0acdcec460bc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!-- 本框架基本脚本和样式 -->
    <script type="text/javascript"
            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
    <script type="text/javascript"
            th:src="@{/js/plugin/LodopFuncs.js}"></script>
    <object id="LODOP1" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
        <embed id="LODOP_EM1" TYPE="application/x-print-lodop" width=0 height=0 PLUGINSPAGE="install_lodop32.exe">
    </object>
 
 
</head>
<style>
 
 
</style>
<body>
<div id="content" style="width: 200px; margin: 20px auto;">
    <table style="width: 100%; font-size: 9px;">
 
        <tr>
            <td colspan="2" style="text-align: center;font-size: 26px;">
                商品配送单
            </td>
        </tr>
 
        <tr>
            <td colspan="2">
                <b>订单号</b>:<span th:text="${orderInfo.orderNo}"></span>
            </td>
 
        </tr>
 
        <tr>
            <td>
                <b>客户</b>:<span th:text="${orderInfo.userName}"></span>
            </td>
            <td>
                <b>日期</b>:<span th:text="${#dates.format(orderInfo.orderTime, 'yyyy-MM-dd hh:mm')}"></span>
            </td>
        </tr>
        <tr>
            <td>
                <b>电话</b>:<span th:text="${orderInfo.userTel}"></span>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <b> 地址</b>:<span th:text="${orderInfo.deliveryInfo.receiveAddress}"></span>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <b>备注</b>:<span th:text="${orderInfo.remarks}"></span>
            </td>
        </tr>
 
 
    </table>
    <table style="width: 100%;font-size:9px;">
        <tr>
            <th style="border-bottom: 1px solid #000000;border-top: 1px solid #000000;">产品</th>
            <th style="border-bottom: 1px solid #000000;border-top: 1px solid #000000;">单价</th>
            <th style="border-bottom: 1px solid #000000;border-top: 1px solid #000000;">数量</th>
            <th style="border-bottom: 1px solid #000000;border-top: 1px solid #000000;">小计</th>
        </tr>
        <tr th:each="orderDetails,userStat : ${orderInfo.details}">
            <td th:text="${orderDetails.shopProduct.title}"></td>
            <td th:text="${orderDetails.price}"></td>
            <td th:text="${orderDetails.count}"></td>
            <td th:text="${orderDetails.totalPrice}"></td>
        </tr>
        <tr>
            <td >总计:</td>
            <td ></td>
            <td th:text="${orderInfo.purchaseQuantity}"></td>
            <td th:text="${discountExplain.billPrice}"></td>
        </tr>
 
    </table>
    <table style="border-bottom: 1px solid #000000;border-top: 1px solid #000000;width: 100%;font-size: 9px;">
        <tr>
            <td>
                <b>总价</b>:<span th:text="${discountExplain.billPrice}"></span>
            </td>
        </tr>
        <tr>
            <td>
                <b>满减打折</b>:<span th:text="${discountExplain.activity}"></span>
            </td>
        </tr>
        <tr>
            <td>
                <b>优惠券</b>:<span th:text="${discountExplain.coupon}"></span>
            </td>
        </tr>
        <tr>
            <td>
                <b>配送费</b>:<span th:text="${discountExplain.postage}"></span>
            </td>
        </tr>
        <tr>
            <td>
                <b> 实付</b>:<span th:text="${discountExplain.payPrice}"></span>
            </td>
        </tr>
 
    </table>
 
    <div style="width: 100%;text-align: center">
        <br>
        *****************<br>
        谢谢惠顾<br>
        *****************<br>
        &nbsp;<br>
        &nbsp;<br>
        &nbsp;<br>
    </div>
 
 
</div>
 
<div style="width: 400px; margin: 20px auto;">
    <button style="width:100px;height: 40px; margin: 20px auto;" onclick="myAddHtml()">打印</button>
</div>
 
 
</body>
 
<script type="text/javascript">
    var LODOP; //声明为全局变量
    function myAddHtml() {
        LODOP = getLodop();
        LODOP.PRINT_INIT("HIVE打印任务");
        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", document.getElementById("content").innerHTML);
        LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
        LODOP.PREVIEW();
 
    };
 
</script>
 
 
</body>
</html>