|   | 
|   | 
|   | 
|   | 
|   | 
| <!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 panel panel-info" | 
|         style="padding: 10px; padding-bottom: 0px; border-color: #bce8f1; margin: 5px 20%"> | 
|         <div class="panel-heading"> | 
|             <h1>客户姓名:[[${vipInfo.vipName}]]</h1> | 
|         </div> | 
|         <form class="form-horizontal" id="dataform" | 
|             style="height: 600px; overflow: scroll; overflow-x: unset;"> | 
|             <input autocomplete="off"   type="hidden" name="onId" th:value="${onId }"> | 
|   | 
|                 <h1 th:if="(${#maps.size(taocanProjMap) eq 0 } and ${#lists.size(projList)} eq 0)" >该会员没有可消耗的项目!</h1> | 
|   | 
|                     <table th:if="(${#maps.size(taocanProjMap) ne 0} or ${#lists.size(projList) ne 0})" class="table table-bordered"> | 
|                         <tr> | 
|                             <td colspan="5"><label >预约时间</label> | 
|                                 <input autocomplete="off"   type="text" class=" datetimepicker" id="yyStartTime" | 
|                                 name="yyTime" nullmsg="请选择预约时间" datatype="*" | 
|                                        th:value="${#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm')}"  /> | 
|                             </td> | 
|                         </tr> | 
|                         <tr class="active"> | 
|                             <th>项目名称</th> | 
|                             <th>数量</th> | 
|                             <th>余次</th> | 
|                             <th>余额</th> | 
|                             <th>有效期</th> | 
|                             <th>来源</th> | 
|                             <th>单次划扣次数</th> | 
|                         </tr> | 
|                         <tr> | 
|                             <td colspan="60" class="active"><label> 套餐使用情况 </label></td> | 
|                         </tr> | 
|   | 
|                         <th:block th:if="${#maps.size(taocanProjMap)>0}"> | 
|   | 
|                             <th:block th:each="item,in:${taocanProjMap}"  > | 
|                                 <th:block th:each="projUser,str:${item.value}" th:with="length=${#lists.size(item.value)}"  > | 
|   | 
|                                     <th:block th:if="${str.index == 0 }"> | 
|   | 
|                                         <tr class="success" colspan="60"> | 
|                                             <td><label>套餐名称:[[${projUser.shoppingGoods.name }]] | 
|                                                 <span th:if="${projUser.type eq '套餐卡'}">[[${item.key }]][套餐卡]</span> | 
|                                             </label></td> | 
|                                             <td></td> | 
|                                             <td><th:block th:if="${projUser.type eq '套餐卡'}"> | 
|                                                 <span th:if="${projUser.surplusCount gt 10000 }">不限</span> | 
|                                                 <span th:if="${projUser.surplusCount lt 10000 }">[[${projUser.surplusCount}]]</span> | 
|                                             </th:block></td> | 
|                                             <td><span th:if="${projUser.type eq '套餐卡'}">[[${projUser.balance }]]</span></td> | 
|                                             <td><span th:if="${projUser.type eq '套餐卡'}"> | 
|                                                 <span | 
|                                                       th:text="${#dates.format(projUser?.failTime,'yyyy年MM月dd日')}" | 
|                                                        ></span> | 
|                                             </span></td> | 
|                                             <td></td> | 
|                                             <td></td> | 
|                                         </tr> | 
|                                     </th:block> | 
|                                     <tr> | 
|                                         <td><input autocomplete="off"   type="checkbox" name="projBox" | 
|                                                    th:value="${projUser.id }">[[${projUser.name}]](¥[[${projUser.price }]])</td> | 
|                                         <td><input autocomplete="off"   class="form-control" | 
|                                                    th:max="${projUser.surplusCount}" min="1" style="width: 70px" | 
|                                                    type="number" value="1"></td> | 
|                                             <th:block th:if="${projUser.type ne '套餐卡'}"> | 
|                                                 <td>[[${projUser.surplusCount}]]</td> | 
|                                                 <td>[[${projUser.balance }]]</td> | 
|                                                 <td><span | 
|                                                         th:text="${#dates.format(projUser?.failTime,'yyyy年MM月dd日')}" | 
|                                                 ></span></td> | 
|                                                 <td>[[${projUser.source}]]</td> | 
|                                                 <td>[[${projUser.shoppingGoodsAssemble?.deductionNum}]]</td> | 
|                                             </th:block> | 
|                                             <th:block th:if="${projUser.type eq '套餐卡'}"> | 
|                                                 <td>-</td> | 
|                                                 <td>-</td> | 
|                                                 <td>-</td> | 
|                                                 <td>-</td> | 
|                                                 <td>[[${projUser.shoppingGoodsAssemble?.deductionNum}]]</td> | 
|                                             </th:block> | 
|                                     </tr> | 
|   | 
|                                     <th:block th:if="${str.index == length-1 }"> | 
|                                         <th:block | 
|                                                 th:if="${#lists.size(projUser.shoppingGoods.assembleGoods)>0}"> | 
|                                             <tr> | 
|                                                 <td colspan="60" class="active"><label>[[${projUser.shoppingGoods.name }]]套餐内产品 | 
|                                                 </label></td> | 
|                                             </tr> | 
|                                                 <tr th:each="assembList:${projUser.shoppingGoods.assembleGoods }"> | 
|                                                     <td> [[${assembList.goods?.name }]]</td> | 
|                                                 </tr> | 
|                                             <tr> | 
|                                                 <td colspan="60"><label>历史备注:</label> <code>[[${projUser.remark }]]</code></td> | 
|                                             </tr> | 
|                                         </th:block> | 
|                                     </th:block> | 
|   | 
|                                 </th:block> | 
|                             </th:block> | 
|   | 
|   | 
|   | 
|                         </th:block> | 
|                         <th:block th:if="${#lists.size(projList)>0}"> | 
|                             <tr> | 
|                                 <td colspan="60" class="success"><label>项目使用情况</label></td> | 
|                             </tr> | 
|                                 <tr th:each="item:${projList }"> | 
|                                     <td class="check"><input autocomplete="off"   type="checkbox" name="projBox" | 
|                                                              th:value="${item.id }">[[${item.name }]]</td> | 
|                                     <td><input autocomplete="off"   class="form-control" th:max="${item.surplusCount}" | 
|                                                min="1" style="width: 70px" type="number" value="1" /></td> | 
|                                     <td>[[${item.surplusCount}]]</td> | 
|                                     <td>[[${item.balance}]]</td> | 
|                                     <td><span th:text="${#dates.format(item?.failTime,'yyyy年MM月dd日')}" | 
|                                     ></span></td> | 
|                                     <td>[[${item.source }]]</td> | 
|                                 </tr> | 
|                         </th:block> | 
|                         <tr> | 
|                         </tr> | 
|                     </table> | 
|             </c:otherwise> | 
|             </c:choose> | 
|              <input type="text"  hidden="hidden" th:value="${vipInfo.id }" name="vipId" /> | 
|         </form> | 
|     </div> | 
|     <div class="form-group "> | 
|         <div class="col-sm-12 text-center"> | 
|             <a href="javascript:;" onclick="myForm.submit()" | 
|                 class="btn btn-success radius">确认</a>      | 
|             <button onclick="MTools.closeForm()" class="btn btn-danger radius" | 
|                 type="button">关闭</button> | 
|         </div> | 
|     </div> | 
| </div> | 
| <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script><script type="text/javascript"> | 
|   | 
|     $('.datetimepicker') | 
|             .datetimepicker( | 
|                     { | 
|                         format : "yyyy-mm-dd hh:ii", | 
|                         maxView : 2, | 
|                         minView : 0, | 
|                         startView : 2, | 
|                         todayBtn : true, | 
|                         setStartDate : '<fmt:formatDate value="${now}" pattern="yyyy-MM-dd HH:MM"/>' | 
|   | 
|                     }); | 
|   | 
|     var myForm = MForm.initForm({ | 
|         invokeUrl : basePath+"/admin/projService/addService", | 
|         beforeSubmit : function() { | 
|   | 
|   | 
|             var projIds = ""; | 
|   | 
|             var param=this.extendParam; | 
|   | 
|             $('input:checkbox[name=projBox]:checked').each(function(i) { | 
|                 var num = $(this).parent("td").next("td").find("input").val(); | 
|                 var puseId= $(this).val(); | 
|                 param["serviceItems["+i+"].puseId"]=puseId; | 
|                 param["serviceItems["+i+"].count"]=num; | 
|                 projIds+=puseId; | 
|             }); | 
|   | 
|             if (projIds == "") { | 
|                 layer.alert("请选择要消耗的项目!"); | 
|                 return false; | 
|             } | 
|             return true; | 
|         }, | 
|         afterSubmit : function() { | 
|             MTools.closeForm(); | 
|         }, | 
|     }); | 
| </script> | 
| </body> | 
|   | 
| </html> |