Helius
2020-12-23 c554c7ad5405bafa149dbb6429e8245f78b33ffc
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<!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"/>
    <LINK rel="Bookmark" href="../images/favicon.ico">
    <!-- 本框架基本脚本和样式 -->
    <script type="text/javascript"
            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
    <script type="text/javascript"
            th:src="@{/js/systools/MBase.js}"></script>
</head>
<body>
<div class="ibox-content">
 
    <form class="form-horizontal" id="dataform"
          onsubmit="javascripr:return false;">
        <div class="panel panel-default">
            <div class="panel-heading"><strong th:text="'服务单金额:'+${obj.money}"></strong></div>
            <table class="table table-bordered table-striped "
                   style="width: 100%;" id="mgrid">
                <thead>
                <tr>
                    <th>项目名称</th>
                    <th width="50px">服务时长</th>
                    <th>服务时间</th>
                    <th width="300px">美疗师</th>
                    <th width="100px">提成</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item,st:${obj.serviceItems}">
                    <th th:text="${item.projInfo?.name}"></th>
                    <th th:text="${item.projInfo?.timeLength+'分钟'}"></th>
                    <th>
                        <span th:text="${#dates.format(item.beginTime, 'yyyy-MM-dd HH:mm')}"></span>
                        ——
                        <span th:text="${#dates.format(item.endTime, 'yyyy-MM-dd HH:mm')}"></span>
                    </th>
                    <th th:text="${item.beautiStaffInfo?.suName}"></th>
                    <th th:text="${item.extract}"></th>
                </tr>
                </tbody>
            </table>
        </div>
        <div style="border-radius:5px; background:#F5F5F5;padding:10px 0;">
            <div class="form-group">
                <div class="col-sm-11 ">
                    <div class="row">
                        <label class="col-sm-1 control-label">会员姓名</label>
                        <div class="col-sm-2 ">
                            <p class="form-control-static" th:text="${obj?.vipInfo.vipName }"></p>
                        </div>
                        <div class="col-sm-5 ">
                            <label class="col-sm-3 control-label">会员编号</label>
                            <div class="col-sm-9">
                                <p class="form-control-static" th:text="${obj?.vipInfo.vipNo }"></p>
                            </div>
                        </div>
                        <div class="col-sm-4 ">
                            <label class="col-sm-5 control-label">会员手机 </label>
                            <div class="col-sm-7">
                                <p class="form-control-static" th:text="${obj?.vipInfo.phone }"></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-11 ">
                    <div class="row">
                        <label class="col-sm-1 control-label">床位安排</label>
                        <div class="col-sm-2 ">
                            <p th:each="item:${cw}" th:if="${obj.bedId eq item.id }" class="form-control-static"
                               th:text="${item.bedName }"></p>
                        </div>
                        <div class="col-sm-5 ">
                            <label class="col-sm-3 control-label">服务时间</label>
                            <div class="col-sm-9">
                                <p class="form-control-static">
                                    <span th:text="${#dates.format(obj.bedState?.startTime, 'yyyy-MM-dd HH:mm')}"></span>
                                    ——
                                    <span th:text="${#dates.format(obj.bedState?.endTime, 'yyyy-MM-dd HH:mm')}"></span>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
 
 
            <div class="form-group">
                <div class="col-sm-11 ">
                    <div class="row">
                        <label class="col-sm-1 control-label">预约时间 </label>
                        <div class="col-sm-2">
                            <p class="form-control-static">
                                <span th:text="${#dates.format(obj.yyTime, 'yyyy-MM-dd HH:mm')}"></span>
                            </p>
                        </div>
                        <div class="col-sm-5 ">
                            <label class="col-sm-3 control-label">配料师</label>
                            <div class="col-sm-10" th:each="item:${yls}" th:if="${obj.doctorId eq item.id }">
                                <p class="form-control-static" th:text="${item.staffName }"></p>
                            </div>
                        </div>
                        <div class="col-sm-4 ">
                            <label class="col-sm-5 control-label">备注 </label>
                            <div class="col-sm-7">
                                <p class="form-control-static" th:text="${obj?.remark }"></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-11 ">
                    <div class="row">
                        <label class="col-sm-1 control-label">备注 </label>
                        <div class="col-sm-10">
                            <p class="form-control-static" th:text="${obj?.remark }"></p>
                        </div>
 
                    </div>
                </div>
            </div>
        </div>
 
        <div class="form-group ">
            <div class="col-sm-12 text-center">
                <a href="javascript:;" onclick="myPreview2()" class="btn btn-success radius">预览</a> &nbsp;&nbsp;&nbsp;&nbsp;
                <a href="javascript:;" onclick="print()" class="btn btn-success radius">打印</a> &nbsp;&nbsp;&nbsp;&nbsp;
                <button onclick="MTools.closeForm()" class="btn btn-danger radius" type="button">关闭</button>
            </div>
        </div>
</div>
</form>
</div>
<form id="print" style="display: none;">
    <!-- <form id="print"> -->
    <style midia="print">
 
        .table1 {
            width: 440px;
            font-size: 12px;
            border-top: 1px solid #333;
            margin-top: 20px;
        }
 
        .table4 {
            width: 440px;
            font-size: 12px;
            border-top: 1px solid #333;
            margin-top: 20px;
        }
 
        .table2 {
            font-size: 12px;
            border-top: 1px solid #333;
        }
 
        .table1 td {
            height: 20px;
        }
 
        .table2 td {
            height: 20px;
        }
 
        .table1 tr {
            height: 30px;
        }
 
        .table3 {
            position: absolute;
            font-size: 12px;
            border-top: 1px solid #333;
            bottom: 30px;
        }
 
        .tittl {
            text-align: center;
            font-size: 20px;
        }
 
        .line {
            border-bottom: 1px solid #333;
        }
 
    </style>
 
    <h1 class="tittl">HIVE消耗单</h1>
    <table class="table1">
 
        <tr>
            <td>会员姓名:[[${obj.vipInfo.vipName }]]</td>
            <td>联系电话:[[${obj.vipInfo.phone }]]</td>
            <td>打印日期:<span id="date"></span></td>
        </tr>
        <tr>
            <td>会员编号:[[${obj.vipInfo.vipNo}]]</td>
            <td>健康顾问:[[${obj.vipInfo.staffName}]]</td>
            <td>流水号:[[${obj.serviceNo}]]</td>
        </tr>
        <tr>
        </tr>
    </table>
    <table class="table2 table4 ">
        <tr class="line">
            <td>消费项目</td>
            <td>数量</td>
            <td>金额</td>
            <td>余次</td>
            <td>技师</td>
        </tr>
 
        <th:block th:each="item:${obj.serviceItems }">
 
            <tr>
                <td th:text="${item.projInfo?.name }"></td>
                <td th:text="${item.count}"></td>
                <td th:text="${item.projUse.price }"></td>
                <td th:if="${item.projUse.taocanId eq null }">0</td>
                <td th:if="${item.projUse.taocanId ne null }" th:text="${item.projUse.surplusCount }"></td>
                <td th:text="${item.beautiStaffInfo?.suName }"></td>
            </tr>
 
        </th:block>
 
 
    </table>
    <table class="table1 table3">
        <tr>
            <td>累计积分:
                <th:block th:text="${obj?.vipInfo.pointAll }"></th:block>
            </td>
            <td>本次划扣:
                <th:block th:text="${obj?.money }"></th:block>
            </td>
            <td>收银人:
                <th:block th:text="${user?.name }"></th:block>
            </td>
        </tr>
        <tr>
            <td>客户签名:</td>
            <td></td>
            <td></td>
        </tr>
    </table>
</form>
<script type="text/javascript" th:src="@{/js/plugin/LodopFuncs.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
<script type="text/javascript">
 
    var LODOP;
 
    function print() {
        CreateOneFormPage();
        LODOP.PRINTA();
    }
 
    function myPreview2() {
        CreateOneFormPage();
        LODOP.SET_PREVIEW_WINDOW(0, 0, 0, 760, 540, "");
        LODOP.PREVIEW();
    }
 
    function CreateOneFormPage() {
        $("#date").text(getNowFormatDate());
 
        LODOP = getLodop();
 
        LODOP.PRINT_INIT("");
        LODOP.SET_PRINT_STYLE("FontSize", 18);
        LODOP.SET_PRINT_PAGESIZE(0, 2300, 945, "");
        strCenterStyle = "<style/>table {width:100%}</style>";
        LODOP.ADD_PRINT_HTM(5, 5, "RightMargin:0.9cm", "BottomMargin:9mm", strCenterStyle
            + document.getElementById("print").innerHTML);
        /*     LODOP.ADD_PRINT_HTM(5, "6%", "88%", 600, strCenterStyle
                    + document.getElementById("print").innerHTML); */
        LODOP.SET_PRINT_STYLE("Bold", 1);
        /*     LODOP.ADD_PRINT_HTM(30,30,650,600,document.getElementById("print").innerHTML); */
 
    };
 
    function CreateOneFormPage1() {
        $("#date").text(getNowFormatDate());
 
        LODOP = getLodop();
        LODOP.SET_LICENSES("湖南卓景京信息技术有限公司", "4DCD4C2508498B1DDD6CD498AC0B04F2",
            "", "");
        LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_表单一");
        LODOP.SET_PRINT_STYLE("FontSize", 18);
        LODOP.SET_PRINT_PAGESIZE(0, 2300, 1945, "");
        strCenterStyle = "<style/>table {width:100%}</style>";
        LODOP.ADD_PRINT_HTM(5, "9%", "82%", 600, strCenterStyle
            + document.getElementById("print").innerHTML);
        LODOP.SET_PRINT_STYLE("Bold", 1);
        /*     LODOP.ADD_PRINT_HTM(30,30,650,600,document.getElementById("print").innerHTML); */
 
    };
 
    //获取当前时间
    function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var seperator2 = ":";
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = date.getFullYear() + seperator1 + month + seperator1
            + strDate + " " + date.getHours() + seperator2
            + date.getMinutes() + seperator2 + date.getSeconds();
        return currentdate;
    }
 
 
</script>
</body>
</html>