|   | 
|   | 
|   | 
|   | 
| <!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> | 
|     <title></title> | 
| </head> | 
|   | 
| <div class="panel-body"> | 
|     <div class="form-group"> | 
|         <label class="col-sm-2 control-label">订单号</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static" th:text="${order.orderNo}"></span> | 
|         </div> | 
|         <label class="col-sm-2 control-label">客户姓名</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static" th:text="${order.vipName}"></span> | 
|         </div> | 
|     </div> | 
|     <br> | 
|     <div class="form-group"> | 
|         <label class="col-sm-2 control-label">订单总价</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static" id="total" th:text="${order.total}"></span> | 
|         </div> | 
|         <label class="col-sm-2 control-label">现金支付金额</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static">[[${order.cashPay}]]</span> | 
|         </div> | 
|     </div> | 
|     <br> | 
|     <div class="form-group"> | 
|         <label class="col-sm-2 control-label">卡支付金额</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static" id="total">[[${order.cardPay}]]</span> | 
|         </div> | 
|         <label class="col-sm-2 control-label">欠款</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static">[[${order.arrears}]]</span> | 
|         </div> | 
|     </div> | 
|     <br> | 
|     <div class="form-group"> | 
|         <label class="col-sm-2 control-label">折后价</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static" id="zkTotal" th:text="${order.zkTotal}"></span> | 
|         </div> | 
|         <label class="col-sm-2 control-label">顾问姓名</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static" th:text="${order.staffName}"></span> | 
|         </div> | 
|     </div> | 
|     <br> | 
|     <div class="form-group"> | 
|         <label class="col-sm-2 control-label">本次现金付款</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static">[[${xjMoney}]]</span> | 
|         </div> | 
|         <label class="col-sm-2 control-label">本次卡付款</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static">[[${cardMoney}]]</span> | 
|         </div> | 
|     </div> | 
|     <br> | 
|     <div class="form-group"> | 
|         <label class="col-sm-2 control-label">收银人</label> | 
|         <div class="col-sm-4"> | 
|             <span class="form-control-static" th:text="${orderFlow.staffName}"></span> | 
|         </div> | 
|     </div> | 
| </div> | 
|   | 
|   | 
| <div class="col-sm-12 form-group"> | 
|     <div class="panel-body"> | 
|         <table class="table table-striped table-condensed  table-hover"> | 
|             <thead> | 
|             <tr> | 
|                 <th>序号</th> | 
|                 <th>商品名称</th> | 
|                 <th>单价</th> | 
|                 <th>购买数量</th> | 
|                 <th>折扣单价</th> | 
|                 <th>卡付款</th> | 
|                 <th>现金付款</th> | 
|                 <th>欠款</th> | 
|             </tr> | 
|             </thead> | 
|             <tbody id="tbody"> | 
|             <tr th:each="item,count:${order.items }"> | 
|                 <td th:text="${count.index}+1"></td> | 
|   | 
|                 <td>    <span th:text=" ${item.shoppingGoods.name }"></span> | 
|   | 
|                     <span th:if="${item.isFree eq '是' }" th:text="赠"></span> | 
|                 </td> | 
|                 <td th:text="${item.price }"></td> | 
|                 <td th:text="${item.count}"></td> | 
|                 <td th:text="${item.zkPrice}"></td> | 
|                 <td>[[${item.cardPay}]]</td> | 
|                 <td>[[${item.cashPay}]]</td> | 
|                 <td>[[${item.arrears}]]</td> | 
|             </tr> | 
|             </tbody> | 
|         </table> | 
|     </div> | 
|   | 
|     <div class="form-group "> | 
|         <div class="col-sm-12 text-center"> | 
|   | 
|             <a href="javascript:;" onclick="myPreview2()" class="btn btn-success radius">预览</a>      | 
|             <a href="javascript:;" onclick="print()" class="btn btn-success radius">打印</a>      | 
|             <button onclick="MTools.closeForm()" class="btn btn-danger radius" type="button">取消</button> | 
|         </div> | 
|     </div> | 
| </div> | 
|   | 
| </body> | 
|   | 
| <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: 50px; | 
|         } | 
|   | 
|         .table2 { | 
|             width: 440px; | 
|             font-size: 12px; | 
|             border-top: 1px solid #333; | 
|             margin-top: 20px; | 
|         } | 
|   | 
|         .table1 td { | 
|             height: 20px; | 
|         } | 
|   | 
|         .table2 td { | 
|             height: 20px; | 
|         } | 
|   | 
|         .table1 tr { | 
|             height: 30px; | 
|         } | 
|   | 
|         .table3 { | 
|             position: absolute; | 
|             bottom: 30px; | 
|             width: 440px; | 
|             font-size: 12px; | 
|             border-top: 1px solid #333; | 
|   | 
|         } | 
|   | 
|         .tittl { | 
|             text-align: center; | 
|             font-size: 20px; | 
|         } | 
|     </style> | 
|   | 
|     <h1 class="tittl">HIVE收银单</h1> | 
|     <table class="table1"> | 
|         <tr> | 
|             <td>流水编号:[[${orderFlow.flowNo}]]</td> | 
|             <td>打印日期:<span id="date"></span></td> | 
|             <td></td> | 
|         </tr> | 
|         <tr> | 
|             <td>会员姓名:[[${vipInfo.vipName }]]</td> | 
|             <td>会员编号:[[${vipInfo.vipNo}]]</td> | 
|             <td>手机号:[[${vipInfo.phone }]]</td> | 
|         </tr> | 
|         <tr> | 
|             <td>订单编号:[[${order.orderNo}]]</td> | 
|             <td>健康顾问:[[${vipInfo.staffName}]]</td> | 
|             <td></td> | 
|         </tr> | 
|     </table> | 
|     <table class="table2 "> | 
|         <tr> | 
|             <td>套餐/项目/家居/充值卡</td> | 
|             <td>数量</td> | 
|             <td>单价</td> | 
|             <td>折后单价</td> | 
|             <td>金额</td> | 
|         </tr> | 
|   | 
|         <tr th:each="item,count:${order.items }"> | 
|             <td>[[${item.shoppingGoods.name }]] | 
|                 <span th:if="${item.goodsAssemble.sku ne null}">([[${item.goodsAssemble.sku.name}]])</span> | 
|                 <span th:if="${item.isFree eq '是' }">【赠】</span> | 
|             </td> | 
|             <td th:text="${item.count}"></td> | 
|             <td th:text="${item.price }"></td> | 
|             <td th:text="${item.zkPrice}"></td> | 
|             <td>[[${item.zkPrice*item.count}]] | 
|             </td> | 
|         </tr> | 
|     </table> | 
|   | 
|     <table class="table3"> | 
|         <tr> | 
|             <td colspan="4">备注:</td> | 
|         </tr> | 
|         <tr> | 
|             <td>本次支付:[[${xjMoney+cardMoney}]]</td> | 
|             <td>现金:[[${xjMoney}]]</td> | 
|             <td>划扣:[[${cardMoney}]]</td> | 
|         </tr> | 
|         <tr> | 
|             <td>收银:[[${orderFlow.staffName}]]</td> | 
|             <td>总价:[[${order.zkTotal }]]</td> | 
|             <td>欠款:[[${order.arrears }]]</td> | 
|         </tr> | 
|         <tr> | 
|             <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, 1300, 1945, ""); | 
|         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 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> | 
| </html> |