123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
- <head>
- <th:block th:include="include :: header('充值记录')" />
- </head>
- <body class="gray-bg">
- <div class="container-div">
- <div class="row">
- <div class="col-sm-12 search-collapse">
- <form id="role-form">
- <div class="select-list">
- <ul>
- <li>
- 卿卿号:<input type="text" name="erbanNo" id="erbanNo" placeholder="请输入卿卿号"/>
- </li>
- <li>
- 订单ID:<input type="text" name="recordId" id="recordId" placeholder="请输入订单号"/>
- </li>
- <li>
- ping++单号:<input type="text" name="pingxxId" id="pingxxId" placeholder="请输入ping++单号"/>
- </li>
- <li>
- 金币:<select id="chargeType" name="chargeType" th:with="type=${@dict.getType('charge_type')}">
- <option value="">全部</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li>
- 类型:<select id="goldChargeType" name="goldChargeType" th:with="type=${@dict.getType('gold_charge_type')}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li>
- 支付渠道:<select id="payChannel" name="payChannel" th:with="type=${@dict.getType('pay_channel')}">
- <option value="">全部</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li>
- 支付状态:<select id="payStatus" name="payStatus" th:with="type=${@dict.getType('pay_status')}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li>
- 平台:<select id="osType" name="osType" th:with="type=${@dict.getType('os_type')}">
- <option value="">全部</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li>
- 性别:<select id="gender" name="gender" th:with="type=${@dict.getType('sys_user_sex')}">
- <option value="">全部</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li class="select-time">
- <label>创建时间: </label>
- <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/>
- <span>-</span>
- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
- </li>
- <li>
- <a class="btn btn-primary btn-rounded btn-sm" id="btnSearch"><i class="fa fa-search"></i> 搜索</a>
- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
- <a class="btn btn-primary btn-rounded btn-sm" id="yesterdaySearch"><i class="fa fa-calendar"></i> 昨天</a>
- </li>
- <li>
- <span style="font-size: 23px;">充值人数: </span><span id="chargeNum" style="color: red; margin-left: 10px;font-size: 23px"></span>
- <span style="font-size: 23px;">男: </span><span id="maleNum" style="color: red; margin-left: 10px;font-size: 23px"></span>
- <span style="font-size: 23px;">女: </span><span id="femaleNum" style="color: red; margin-left: 10px;font-size: 23px"></span>
- <span style="font-size: 23px;">其他: </span><span id="otherNum" style="color: red; margin-left: 10px;font-size: 23px"></span>
- <span style="font-size: 23px;">金额(RMB): </span><span id="total" style="color: red; margin-left: 10px;font-size: 23px"></span>
- </li>
- </ul>
- </div>
- </form>
- </div>
- <div class="btn-group-sm" id="toolbar" role="group">
- <a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="report:recharge:record:excel">
- <i class="fa fa-cloud-download"></i> 导出Excel
- </a>
- </div>
- <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
- <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer" />
- <script th:inline="javascript">
- var prefix = ctx + "report/recharge/record";
- var sexs = [[${@dict.getType('sys_user_sex')}]];
- var os = [[${@dict.getType('os_type')}]];
- var payChannel = [[${@dict.getType('pay_channel')}]];
- var payStatus = [[${@dict.getType('pay_status')}]];
- $(function() {
- //设置时间初始值
- $("#startTime").val(new Date().Format("yyyy-MM-dd"));
- $("#endTime").val(new Date().Format("yyyy-MM-dd"));
- getChargeInfo();
- var options = {
- url: prefix + "/list",
- exportUrl: prefix + "/export",
- modalName: "充值记录",
- height: $(window).height()-170,
- columns: [
- {
- field: 'chargeRecordId',
- title: '订单ID'
- },
- {
- field: 'pingxxChargeId',
- title: 'ping++订单号',
- align : 'center'
- },
- {
- field: 'erbanNo',
- title: '卿卿号',
- align : 'center'
- },
- {
- field: 'nick',
- title: '昵称',
- align : 'center'
- },
- {
- field: 'phone',
- title: '电话',
- align : 'center'
- },
- {
- field: 'os',
- title: '平台',
- align: 'center',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(os, value);
- }
- },
- {
- field: 'gender',
- title: '性别',
- align: 'center',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(sexs, value);
- }
- },
- {
- field: 'clientIp',
- title: '用户IP',
- align : 'center'
- },
- {
- field: 'totalGold',
- title: '金币数量',
- align : 'center'
- },
- {
- field: 'chargeDesc',
- title: '产品描述',
- align : 'center'
- },
- {
- field: 'amount',
- title: '金额(元)',
- align : 'center',
- formatter: function (val, row, index) {
- return val;
- }
- },
- {
- field: 'channel',
- title: '支付渠道',
- align: 'center',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(payChannel, value);
- }
- },
- {
- field: 'chargeStatus',
- title: '支付状态',
- align: 'center',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(payStatus, value);
- }
- },
- {
- field: 'createTime',
- title: '购买时间',
- align : 'center'
- },
- {
- field: 'updateTime',
- title: '回调时间',
- align : 'center'
- }]
- };
- $.table.init(options);
- $('#btnSearch').on('click', function () {
- $.table.search();
- getChargeInfo();
- });
- $('#yesterdaySearch').on('click',function () {
- var today = new Date();
- today.setDate(today.getDate() - 1);
- $("#startTime").val(today.Format("yyyy-MM-dd"));
- $("#endTime").val(today.Format("yyyy-MM-dd"));
- $.table.search();
- getChargeInfo();
- });
- });
- Date.prototype.Format = function (fmt) { //author: meizz
- var o = {
- "M+": this.getMonth() + 1, //月份
- "d+": this.getDate(), //日
- "H+": this.getHours(), //小时
- "m+": this.getMinutes(), //分
- "s+": this.getSeconds(), //秒
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
- "S": this.getMilliseconds() //毫秒
- };
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
- for (var k in o)
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
- return fmt;
- };
- function getChargeInfo() {
- var param = {
- beginTime: $("#startTime").val(),
- endTime: $("#endTime").val(),
- erbanNo: $('#erbanNo').val(),
- osType: $("#osType").val(),
- gender: $("#gender").val(),
- chargeType:$("#chargeType").val(),
- goldChargeType:$("#goldChargeType").val(),
- payChannel:$("#payChannel").val(),
- payStatus:$("#payStatus").val()
- };
- $.post(prefix + "/getChargeRecordInfo", param, function (data){
- $("#chargeNum").text(data.userNum);
- $("#maleNum").text(data.male);
- $("#femaleNum").text(data.female);
- $("#otherNum").text(data.other);
- $("#total").text(data.totalAmount / 100);
- });
- }
- </script>
- </body>
- </html>
|