New file |
| | |
| | | |
| | | <!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 class="gray-bg"> |
| | | |
| | | |
| | | <div class="ibox-content"> |
| | | <!-- 搜索框部分start --> |
| | | <form class="form-inline" id="serchform"> |
| | | <div class="form-group mr-20"> |
| | | <label>日期范围</label> |
| | | <input name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">- |
| | | <input name="endTime" type="text" class="form-control datetimepicker" id="endTime"> |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label>会员</label> |
| | | <input autocomplete="off" placeholder="姓名/编号/电话" name="vipName" type="text" class="form-control" > |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label>美疗师</label> |
| | | <select class="form-control autoFull select2" |
| | | th:data-url="@{/admin/getShopStaffByRoleName?roleName=美疗师}" |
| | | data-value="suId" |
| | | data-filed="suName" |
| | | name="beaultId" |
| | | id="beaultId"> |
| | | <option value="">--请选择美容师--</option> |
| | | </select> |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label>门店</label> |
| | | <select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId" |
| | | th:data-url="@{/admin/shopInfo/findAllWithPermi}"> |
| | | <option value=''>--请选择部所属门店--</option> |
| | | </select> |
| | | </div> |
| | | |
| | | <div class="row mb-10"> |
| | | <div class="col-sm-8"> |
| | | <button onclick="myGrid.serchData()" type="button" class="btn btn-info btn-sm"><i class="fa fa-search" ></i> 搜索</button> |
| | | <button onclick="myGrid.resetForm()" type="button" class="btn btn-default btn-sm"><i class="fa fa-refresh " ></i> 重置</button> |
| | | <!-- <button matrix:btn="ygyjbb-exportExcel" onclick="exportExcel()" type="button" class="btn btn-default btn-sm"><i class="fa fa-download" ></i> 导出</button>--> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | |
| | | |
| | | <table id="mgrid"> |
| | | <thead> |
| | | <tr> |
| | | <th data-formatter="MGrid.indexfn" data-align="center" |
| | | data-width="30px">序号</th> |
| | | <th data-field="vipName" data-formatter="buildVipNameJump">姓名</th> |
| | | <th data-field="meiliao">美疗师</th> |
| | | <th data-field="arriveCnt">到店次数</th> |
| | | <th data-field="goodsCash">消费金额</th> |
| | | <th data-field="hisConsume">消耗本金</th> |
| | | <th data-field="freeConsume">消耗赠送</th> |
| | | |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | | </div> |
| | | |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/function/public.js}"></script> |
| | | <script type="text/javascript"> |
| | | var myGrid; |
| | | var initParam = { |
| | | format : "yyyy-mm-dd hh:ii", //默认显示年与日,如果想显示十分秒:"yyyy-mm-dd hh:ii:ss" |
| | | minView: "hour", //"month",只显示年月日的选择,不会再跳转去选择时分秒;如果想要选择时分秒的:"hour" |
| | | } |
| | | MTools.ininDatetimepicker(initParam); |
| | | //限制结束时间不小于开始时间 |
| | | MTools.limitStartEndTime({}); |
| | | |
| | | $(function() { |
| | | MTools.autoFullSelect(); |
| | | myGrid = MGrid.initGrid({ |
| | | url : basePath+"/admin/vipStatistics/vipConsumeStatistics", |
| | | showExport : true, |
| | | showFooter : false, |
| | | height:'auto', |
| | | width:'auto', |
| | | exportDataType : "basic", //basic', 'all', 'selected'. |
| | | exportTypes : [ 'excel', 'xlsx' ], //导出类型 |
| | | exportOptions : { |
| | | ignoreColumn : [ 0 ], |
| | | fileName : "客户消费统计" + MTools.getTime(), //文件名称设置 |
| | | worksheetName : 'Sheet1', //表格工作区名称 |
| | | tableName : '客户消费统计', |
| | | excelstyles : [ 'background-color', 'color', 'font-size', |
| | | 'font-weight' ], |
| | | } |
| | | }); |
| | | |
| | | $('[data-toggle="tooltip"]').tooltip() |
| | | |
| | | }); |
| | | |
| | | function footCountTitle(data) { |
| | | return "<b>合计</b>"; |
| | | }; |
| | | function countColumn(data) { |
| | | console.log(data) |
| | | field = this.field; |
| | | var resultsumQuantity = parseFloat((data.reduce(function(sum, row) { |
| | | console.log(sum,row[field]); |
| | | return sum + (+row[field]); |
| | | }, 0)).toFixed(2));//保留有效数字 |
| | | return "<b>"+resultsumQuantity+"</b>"; |
| | | }; |
| | | |
| | | function buildVipNameJump(value, row, index) { |
| | | return '<a onClick="vipDetail(\'' + row.t9 +'\')" class="text-primary " >'+value+'</a>'; |
| | | } |
| | | |
| | | function vipDetail(value) { |
| | | layer.full(layer.open({ |
| | | type : 2, |
| | | title : "订单详情", |
| | | maxmin : true, |
| | | area : MUI.SIZE_M, |
| | | content : [basePath+'/admin/redirect/hive/beautySalon/vip?vipPhone=' + value ] |
| | | })); |
| | | } |
| | | |
| | | function exportExcel(){ |
| | | |
| | | var param=MForm.toUrlParam("#serchform"); |
| | | |
| | | window.location.href=basePath+"/admin/achieve/exportDailyInfoNew?"+param; |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |