|     <!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/systools/MBase.js}"></script> | 
|   | 
| </head> | 
| <body class=" container-fluid"> | 
| <div class="pd-10"> | 
|     <!-- 搜索框部分start --> | 
|     <div class="row form-head"> | 
|         <form class="form-inline" id="serchform"> | 
|             <div class="form-group mr-20"> | 
|   | 
|                 <div class="btn-group search-list mt-10" data-for="search-text"> | 
|                     <input autocomplete="off"   id="search-text" name="vipName" placeholder="会员名称" | 
|                            type="text" class="form-control"> | 
|                     <input autocomplete="off"   id="search-text" name="phone" placeholder="手机号码" | 
|                            type="text" class="form-control"> | 
|                     <input autocomplete="off"   id="search-text" name="vipNo" placeholder="会员编号" | 
|                            type="text" class="form-control"> | 
|                 </div> | 
|             </div> | 
|             <div class="form-group mr-20 mt-10"> | 
|                 <label >会员类型</label> | 
|                 <select class="form-control autoFull" | 
|                         th:data-url="@{/admin/dataDictionary/showDataDictionary}" | 
|                         data-param="{type:'会员类型'}" | 
|                         data-value="name" | 
|                         name="vipType" | 
|                         id="vipType"   > | 
|                     <option value="">--请选择会员类型--</option> | 
|                 </select> | 
|             </div> | 
|   | 
|             <div class="form-group mr-20 mt-10"> | 
|                 <label >到店途径</label> | 
|                 <select class="form-control autoFull select2"  style="width: 200px;height:34px;" | 
|                         th:data-url="@{/admin/dataDictionary/showDataDictionary}" | 
|                         data-param="{type:'到店途径'}" | 
|                         data-value="name" | 
|                         name="arrivalWay" | 
|                         id="arrivalWay" > | 
|                     <option value="">--请选择到店途径--</option> | 
|                 </select> | 
|             </div> | 
|             <div class="form-group mr-20 mt-10"> | 
|                 <label >会员活跃度</label> | 
|                 <select class="form-control autoFull" | 
|                         th:data-url="@{/admin/dataDictionary/showDataDictionary}" | 
|                         data-param="{type:'会员活跃度'}" | 
|                         data-value="name" | 
|                         name="vipState" | 
|                         id="vipState"> | 
|                     <option value="" >--请选择会员活跃度--</option> | 
|                 </select> | 
|             </div> | 
|             <div class="form-group mr-20 mt-10"> | 
|                 <label >健康顾问</label> | 
|                 <select id="staffId" class="form-control autoFull select2" | 
|                         th:data-url="@{/admin/allForZd}" | 
|                         data-value="suId" | 
|                         data-filed="suName" | 
|                         name="staffId" | 
|                        > | 
|                     <option value="">--请选择健康顾问--</option> | 
|                 </select> | 
|             </div> | 
|             <div class="form-group mr-20 mt-10"> | 
|                 <label >是否新客户</label> | 
|                 <select class="form-control " | 
|                         name="isDeal" > | 
|                     <option value="" >--请选择--</option> | 
|                     <option value="1" >是</option> | 
|                     <option value="2" >否</option> | 
|                 </select> | 
|             </div> | 
|             <div class="form-group mr-20 mt-10"> | 
|                 <label >所属门店</label> | 
|                 <select class="form-control autoFull" | 
|                         th:data-url="@{/admin/shopInfo/findShops}" | 
|                         data-value="id" | 
|                         data-filed="shopName" | 
|                         name="shopId" | 
|                         id="shopId" > | 
|                     <option value="">--请选择门店--</option> | 
|                 </select> | 
|             </div> | 
|             <div class="form-group"> | 
|                 <button  onclick="myGrid.serchData(1)" type="button" | 
|                         class="btn btn-sm btn-info"> | 
|                     <i class="fa fa-search "></i> 搜索 | 
|                 </button> | 
|                 <button type="reset" class="btn btn-sm btn-info "> | 
|                     <i class="fa fa-refresh "></i> 重置 | 
|                 </button> | 
|             </div> | 
|         </form> | 
|     </div> | 
|     <div class="row mt-10"> | 
|   | 
|             <!-- 功能按钮部分 --> | 
|             <div id="option-bar" > | 
|                 <button matrix:fn="mdhyzl-edit" onclick="openEdit()"  type="button" class="btn btn-success btn-sm "><i | 
|                         class="fa fa-edit"></i>编辑 | 
|                 </button> | 
|                     <button matrix:fn="mdhyzl-gjjl"  onclick="openFollow()" type="button" class="btn btn-info btn-sm"><i class="fa fa-edit" ></i> 跟进记录</button> | 
|                     <button matrix:fn="mdhyzl-khda"  onclick="openArchieves()" type="button" class="btn btn-info btn-sm"><i class="fa fa-edit" ></i> 客户档案</button> | 
|                     <button matrix:btn="mdhyzl-excelOut"  onclick="exportExcel()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download" ></i> 导出</button> | 
|             </div> | 
|   | 
|         <!-- 数据表格部分 --> | 
|         <table id="mgrid"> | 
|             <thead> | 
|             <tr> | 
|                 <th data-checkbox="true"  ></th> | 
|                 <th data-formatter="MGrid.indexfn" data-align="center"  data-width="30px" >序号</th> | 
|                 <th data-field="vipNo" >会员编号</th> | 
|                 <th data-field="vipName"  data-formatter="getVipName">姓名</th> | 
|                 <th data-field="sex">性别</th> | 
|                 <th data-field="phone">手机号码</th> | 
|                 <th data-field="vipType">会员类型</th> | 
|                 <th data-field="vipState">会员活跃度</th> | 
|                 <th data-field="arrivalWay">到店途径</th> | 
|                 <th data-field="staffName">健康顾问</th> | 
|                 <th data-field="shopName">所属门店</th> | 
|                 <th data-field="phone" data-formatter="buildOperation">操作</th> | 
|             </tr> | 
|             </thead> | 
|         </table> | 
|         <!-- 数据表格部分end --> | 
|     </div> | 
| </div> | 
|   | 
| <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> | 
| <script type="text/javascript"> | 
|     var myGrid; | 
|     $(function(){ | 
|         $(".select2").select2({height:'34px'}); | 
|         //createDateDictionary(); | 
|         MTools.autoFullSelect(); | 
|         //有删除权限 | 
|         var delUrl=""; | 
|         delUrl=basePath+"/hiveErp/vipInfo/del"; | 
|   | 
|         myGrid= | 
|             MGrid.initGrid({ | 
|                 url : basePath+"/hiveErp/vipInfo/showVipInfoList", | 
|                 delUrl : delUrl, | 
|   | 
|             }); | 
|     }); | 
|   | 
|   | 
|     /** | 
|      * 构建会员名称 | 
|      */ | 
|     function getVipName(value, row, index){ | 
|         if(row.isDeal==1){ | 
|             return value+"  <span class='label-danger'>新</span>" | 
|         }else{ | 
|             return value; | 
|         } | 
|     } | 
|   | 
|   | 
|         function openArchieves(){ | 
|             var id=myGrid.getSelectItemId(); | 
|             layer.full(layer.open({ | 
|                 type : 2, | 
|                 title : "客户档案", | 
|                 area : [ MUI.SIZE_L, '450px' ], | 
|                 maxmin : true, | 
|                 content : [ basePath+'/admin/redirect/hive/vip/vip-archives-pc?id=' + id ] | 
|             })); | 
|         } | 
|   | 
|   | 
|   | 
|     function openFollow(){ | 
|         var id=myGrid.getSelectItemId(); | 
|         layer.open({ | 
|             type : 2, | 
|             title : "会员跟进记录", | 
|             area :  MUI.SIZE_M, | 
|             maxmin : true, | 
|             content : [ basePath+'/admin/serviceRecord/toServicefollowListForZd?id=' + id ] | 
|         }); | 
|     } | 
|   | 
|   | 
|   | 
|   | 
|   | 
|     //导出 | 
|         function exportExcel() { | 
|             var name = $("#search-text").attr("name"); | 
|             var value = $("#search-text").val(); | 
|             var vipType = $("#vipType").val(); | 
|             var arrivalWay = $("#arrivalWay").val(); | 
|             var vipState = $("#vipState").val(); | 
|             var staffId = $("#staffId").val(); | 
|             var shopId = $("#shopId").val(); | 
|             window.location.href = basePath+"/admin/vipInfo/exportExcel?vipType=" | 
|                 + encodeURI(encodeURI(vipType)) + "&arrivalWay=" | 
|                 + encodeURI(encodeURI(arrivalWay)) + "&"+name+"=" | 
|                 + encodeURI(encodeURI(value)) + "&vipState=" | 
|                 + encodeURI(encodeURI(vipState)) + "&shopId=" + shopId | 
|                 + "&staffId=" + staffId; | 
|         } | 
|   | 
|     //打开编辑界面 | 
|     function openEdit() { | 
|         var id=myGrid.getSelectItemId(); | 
|         layer.open({ | 
|             type : 2, | 
|             title : "编辑会员信息", | 
|             area :  MUI.SIZE_M, | 
|             content : [ basePath+'/admin/vipInfo/editForm?id=' + id ] | 
|         }); | 
|     } | 
|   | 
|     function buildOperation(value, row, index) { | 
|         var html = ""; | 
|         html += '<a class="text-info" href="javascript:void(0)" onClick="openVipDetail(\''+row.phone+'\')">查看详情</a>  ' | 
|         return html; | 
|     } | 
|     function openVipDetail(value) { | 
|         debugger | 
|         layer.full(layer.open({ | 
|             type : 2, | 
|             title : "会员详情", | 
|             area : [ MUI.SIZE_L, '450px' ], | 
|             maxmin : true, | 
|             content : [ basePath+'/admin/redirect/hive/beautySalon/vip?vipPhone=' + value ] | 
|         })); | 
|     } | 
|   | 
| </script> | 
|   | 
| </body> | 
| </html> |