123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451 |
- <!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>
- 提现状态:<select id="withdrawStatus" name="withdrawStatus" th:with="type=${@dict.getType('withdraw_status')}">
- <option value="">全部</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li>
- 账号提现状态:<select id="accountStatus" name="accountStatus" th:with="type=${@dict.getType('withdraw_account_type')}">
- <option value="">全部</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li>
- 提现方式:<select id="tranType" name="tranType" th:with="type=${@dict.getType('cash_method')}">
- <option value="">全部</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
- <li>
- 真实方式:<select id="realTranType" name="realTranType" th:with="type=${@dict.getType('cash_method')}">
- <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="withdrawNum" 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>
- <a class="btn btn-primary" onclick="batchWx()" shiro:hasPermission="report:red:withdrawal:batchWx">
- <i class="fa fa-weixin"></i> 批量微信转账
- </a>
- <a class="btn btn-success" onclick="batchAliPay()" shiro:hasPermission="report:red:withdrawal:batchAlipay">
- <i class="fa fa-cc-mastercard"></i> 批量支付宝转账
- </a>
- <a class="btn btn-info" onclick="batchBankCard()" shiro:hasPermission="report:red:withdrawal:batchBank">
- <i class="fa fa-credit-card"></i> 批量银行卡转账
- </a>
- <a class="btn btn-danger" onclick="batchHuiJu()" shiro:hasPermission="report:red:withdrawal:batchHuiJu">
- <i class="fa fa-paypal"></i> 批量汇聚转账
- </a>
- </div>
- <div class="col-sm-12 select-table table-striped">
- <table id="bootstrap-table" data-mobile-responsive="false"></table>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer" />
- <script th:inline="javascript">
- var prefix = ctx + "report/red/withdrawal";
- var freezeFlag = [[${@permission.hasPermi('report:red:withdrawal:freeze')}]];
- var unfreezeFlag = [[${@permission.hasPermi('report:red:withdrawal:unfreeze')}]];
- var wxFlag = [[${@permission.hasPermi('report:red:withdrawal:wx')}]];
- var alipayFlag = [[${@permission.hasPermi('report:red:withdrawal:alipay')}]];
- var bankFlag = [[${@permission.hasPermi('report:red:withdrawal:bank')}]];
- var huiJuFlag = [[${@permission.hasPermi('report:red:withdrawal:huiju')}]];
- var redWithdrawStatus = [[${@dict.getType('withdraw_status')}]];
- var accountStatus = [[${@dict.getType('withdraw_account_type')}]];
- var realTranType = [[${@dict.getType('cash_method')}]];
- $(function() {
- //设置时间初始值
- $("#startTime").val(new Date().Format("yyyy-MM-dd"));
- $("#endTime").val(new Date().Format("yyyy-MM-dd"));
- getPacketWithDrawRecordInfo();
- var options = {
- url: prefix + "/list",
- exportUrl: prefix + "/export",
- modalName: "红包提现记录",
- height: $(window).height() - 120,
- columns: [
- {
- field: 'tempId',
- title: '编号',
- checkbox: true
- },
- {
- field: 'recordId',
- title: 'ID',
- },
- {
- field: 'merchantOrderNo',
- title: '汇聚商户号',
- align : 'center'
- },
- {
- field: 'erbanNo',
- title: '卿卿号',
- align : 'center'
- },
- {
- field: 'nick',
- title: '昵称',
- align : 'center'
- },
- {
- field: 'phone',
- title: '电话',
- align : 'center'
- },
- {
- field: 'wxOpenId',
- title: '微信openid',
- align : 'center'
- },
- {
- field: 'alipayAccount',
- title: '支付宝',
- align : 'center'
- },
- {
- field: 'alipayAccountName',
- title: '真实姓名',
- align : 'center'
- },
- {
- field: 'cardNumber',
- title: '银行卡号',
- align : 'center'
- },
- {
- field: 'cardName',
- title: '银行卡名字',
- align : 'center'
- },
- {
- field: 'openBankCode',
- title: '所属银行',
- align : 'center'
- },
- {
- field: 'packetNum',
- title: '提现金额',
- align : 'center'
- },
- {
- field: 'recordStatus',
- title: '提现状态',
- align: 'center',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(redWithdrawStatus, value);
- }
- },
- {
- field: 'withdrawStatus',
- title: '账号提现状态',
- align: 'center',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(accountStatus, value);
- }
- },
- {
- field: 'realTranType',
- title: '真实方式',
- align: 'center',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(realTranType, value);
- }
- },
- {
- field: 'createTime',
- title: '提现时间',
- align : 'center'
- },
- {
- field: 'pingxxId',
- title: 'ping++单号',
- align : 'center'
- },
- {
- field: 'adminName',
- title: '转账操作人',
- align : 'center'
- },
- {
- title: '操作',
- align: 'center',
- formatter: function(value, row, index) {
- var actions = [];
- var key = row.recordId;
- if(row.withdrawStatus == 0){
- actions.push('<a style="margin: 3px" class="btn btn-warning btn-xs ' + freezeFlag + '" href="javascript:void(0)" onclick="freeze(\'' + key + '\',\'' + row.uid + '\')"><i class="fa fa-toggle-on"></i> 冻结用户</a> ');
- if(row.recordStatus == 1){
- actions.push('<a style="margin: 3px" class="btn btn-info btn-xs ' + wxFlag + '" href="javascript:void(0)" onclick="wx(\'' + key + '\')"><i class="fa fa-weixin"></i> 微信转账</a> ');
- actions.push('<a style="margin: 3px" class="btn btn-success btn-xs ' + alipayFlag + '" href="javascript:void(0)" onclick="alipay(\'' + key + '\')"><i class="fa fa-cc-mastercard"></i> 支付宝转账</a> ');
- actions.push('<a style="margin: 3px" class="btn btn-primary btn-xs ' + bankFlag + '" href="javascript:void(0)" onclick="bankCard(\'' + key + '\')"><i class="fa fa-credit-card"></i> 银行卡转账</a> ');
- actions.push('<a style="margin: 3px" class="btn btn-danger btn-xs ' + huiJuFlag + '" href="javascript:void(0)" onclick="huiJu(\'' + key + '\')"><i class="fa fa-paypal"></i> 汇聚转账</a> ');
- }else if(row.recordStatus == 3){
- actions.push('<a style="margin: 3px" class="btn btn-info btn-xs ' + wxFlag + '" href="javascript:void(0)" onclick="wx(\'' + key + '\')"><i class="fa fa-weixin"></i> 再次微信转账</a> ');
- actions.push('<a style="margin: 3px" class="btn btn-success btn-xs ' + alipayFlag + '" href="javascript:void(0)" onclick="alipay(\'' + key + '\')"><i class="fa fa-cc-mastercard"></i> 再次支付宝转账</a> ');
- actions.push('<a style="margin: 3px" class="btn btn-primary btn-xs ' + bankFlag + '" href="javascript:void(0)" onclick="bankCard(\'' + key + '\')"><i class="fa fa-credit-card"></i> 再次银行卡转账</a> ');
- actions.push('<a style="margin: 3px" class="btn btn-danger btn-xs ' + huiJuFlag + '" href="javascript:void(0)" onclick="huiJu(\'' + key + '\')"><i class="fa fa-paypal"></i> 再次汇聚转账</a> ');
- }
- }else{
- actions.push('<a style="margin: 3px" class="btn btn-warning btn-xs ' + unfreezeFlag + '" href="javascript:void(0)" onclick="unfreeze(\'' + key + '\',\'' + row.uid + '\')"><i class="fa fa-toggle-off"></i> 解冻用户</a> ');
- }
- return actions.join('');
- }
- }]
- };
- $.table.init(options);
- $('#btnSearch').on('click', function () {
- $.table.search();
- getPacketWithDrawRecordInfo();
- });
- $('#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();
- getPacketWithDrawRecordInfo();
- });
- });
- 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 getPacketWithDrawRecordInfo() {
- var param = {
- beginTime: $("#startTime").val(),
- endTime: $("#endTime").val(),
- erBanNo: $('#erbanNo').val(),
- withdrawStatus: $("#withdrawStatus").val(),
- accountStatus: $("#accountStatus").val(),
- tranType:$("#tranType").val(),
- realTranType:$("#realTranType").val(),
- };
- $.post(prefix + "/getPacketWithDrawRecordInfo", param, function (data){
- $("#withdrawNum").text(data.userNum);
- $("#total").text(data.money);
- });
- }
- /**
- * 冻结用户
- * @param recordId
- * @param uid
- */
- function freeze(recordId,uid){
- $.modal.confirm("确认要冻结该用户吗?", function () {
- $.operate.post(prefix + "/freeze?uid=" + uid);
- });
- }
- /**
- * 解冻用户
- * @param recordId
- * @param uid
- */
- function unfreeze(recordId,uid){
- $.modal.confirm("确认要解冻该用户吗?", function () {
- $.operate.post(prefix + "/unfreeze?uid=" + uid);
- });
- }
- /**
- * 微信转账
- * @param recordId
- */
- function wx(recordId) {
- $.modal.confirm("你确认给此用户转账吗?\r\n转账后账户金额会划拨到用户微信,请谨慎操作!", function () {
- $.operate.post(prefix + "/transFerByWx?ids=" + recordId);
- });
- }
- /**
- * 支付宝转账
- * @param recordId
- */
- function alipay(recordId){
- $.modal.confirm("你确认给此用户转账吗?\r\n转账后账户金额会划拨到用户支付宝,请谨慎操作!", function () {
- $.operate.post(prefix + "/transFerByAliPay?ids=" + recordId);
- });
- }
- /**
- * 银行卡转账
- * @param recordId
- */
- function bankCard(recordId) {
- $.modal.confirm("你确认给此用户转账吗?\r\n转账后账户金额会划拨到用户银行卡,请谨慎操作!", function () {
- $.operate.post(prefix + "/transFerByBankCard?ids=" + recordId);
- });
- }
- /**
- * 汇聚转账
- * @param recordId
- */
- function huiJu(recordId) {
- $.modal.confirm("你确认给此用户转账吗?\r\n转账后账户金额会通过汇聚划拨到用户银行卡,请谨慎操作!", function () {
- $.operate.post(prefix + "/transFerByHuiJu?ids=" + recordId);
- });
- }
- /**
- * 批量微信
- */
- function batchWx() {
- var rows = $('#bootstrap-table').bootstrapTable('getSelections');
- if (rows.length == 0) {
- $.modal.alertWarning("请至少选择一条记录");
- return;
- }
- var ids = "";
- $.modal.confirm("你确认批量转账选中的" + rows.length + "条数据吗? \r\n转账后账户金额会划拨到用户微信,请谨慎操作!", function() {
- for(var i=0;i < rows.length; i++){
- if(rows[i].tempId == true) {
- ids += rows[i].recordId + ",";
- }
- }
- $.operate.post(prefix + "/batchTransFerByWx?ids=" + ids);
- });
- }
- /**
- * 批量支付宝
- */
- function batchAliPay(){
- var rows = $('#bootstrap-table').bootstrapTable('getSelections');
- if (rows.length == 0) {
- $.modal.alertWarning("请至少选择一条记录");
- return;
- }
- var ids = "";
- $.modal.confirm("确认批量支付宝转账选中的" + rows.length + "条数据吗? \r\n转账后账户金额会划拨到用户支付宝,请谨慎操作!", function() {
- for(var i=0;i < rows.length; i++){
- if(rows[i].tempId == true) {
- ids += rows[i].recordId + ",";
- }
- }
- $.operate.post(prefix + "/batchTransFerByAliPay?ids=" + ids);
- });
- }
- /**
- * 批量银行卡
- */
- function batchBankCard(){
- var rows = $('#bootstrap-table').bootstrapTable('getSelections');
- if (rows.length == 0) {
- $.modal.alertWarning("请至少选择一条记录");
- return;
- }
- var ids = "";
- $.modal.confirm("确认要批量银行卡转账选中的" + rows.length + "条数据吗? \r\n转账后账户金额会划拨到用户银行卡,请谨慎操作!", function() {
- for(var i=0;i < rows.length; i++){
- if(rows[i].tempId == true) {
- ids += rows[i].recordId + ",";
- }
- }
- $.operate.post(prefix + "/batchTransFerByBankCard?ids=" + ids);
- });
- }
- /**
- * 批量汇聚转账
- */
- function batchHuiJu(){
- var rows = $('#bootstrap-table').bootstrapTable('getSelections');
- if (rows.length == 0) {
- $.modal.alertWarning("请至少选择一条记录");
- return;
- }
- var ids = "";
- $.modal.confirm("确认要批量汇聚转账选中的" + rows.length + "条数据吗? \r\n转账后账户金额会通过汇聚划拨到用户银行卡,请谨慎操作!", function() {
- for(var i=0;i < rows.length; i++){
- if(rows[i].tempId == true) {
- ids += rows[i].recordId + ",";
- }
- }
- $.operate.post(prefix + "/batchTransFerByHuiJu?ids=" + ids);
- });
- }
- </script>
- </body>
- </html>
|