withdrawal.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('红包提现记录')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 search-collapse">
  10. <form id="role-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. 卿卿号:<input type="text" name="erBanNo" id="erBanNo" placeholder="请输入卿卿号"/>
  15. </li>
  16. <li>
  17. 提现状态:<select id="withdrawStatus" name="withdrawStatus" th:with="type=${@dict.getType('withdraw_status')}">
  18. <option value="">全部</option>
  19. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  20. </select>
  21. </li>
  22. <li>
  23. 账号提现状态:<select id="accountStatus" name="accountStatus" th:with="type=${@dict.getType('withdraw_account_type')}">
  24. <option value="">全部</option>
  25. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  26. </select>
  27. </li>
  28. <li>
  29. 提现方式:<select id="tranType" name="tranType" th:with="type=${@dict.getType('cash_method')}">
  30. <option value="">全部</option>
  31. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  32. </select>
  33. </li>
  34. <li>
  35. 真实方式:<select id="realTranType" name="realTranType" th:with="type=${@dict.getType('cash_method')}">
  36. <option value="">全部</option>
  37. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  38. </select>
  39. </li>
  40. <li class="select-time">
  41. <label>时间: </label>
  42. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/>
  43. <span>-</span>
  44. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
  45. </li>
  46. <li>
  47. <a class="btn btn-primary btn-rounded btn-sm" id="btnSearch"><i class="fa fa-search"></i>&nbsp;搜索</a>
  48. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  49. <a class="btn btn-primary btn-rounded btn-sm" id="yesterdaySearch"><i class="fa fa-calendar"></i>&nbsp;昨天</a>
  50. </li>
  51. <li>
  52. <span style="font-size: 23px;">提现人数: </span><span id="withdrawNum" style="color: red; margin-left: 10px;font-size: 23px"></span>
  53. <span style="font-size: 23px;">金额(RMB): </span><span id="total" style="color: red; margin-left: 10px;font-size: 23px"></span>
  54. </li>
  55. </ul>
  56. </div>
  57. </form>
  58. </div>
  59. <div class="btn-group-sm" id="toolbar" role="group">
  60. <a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="report:recharge:record:excel">
  61. <i class="fa fa-cloud-download"></i> 导出Excel
  62. </a>
  63. <a class="btn btn-primary" onclick="batchWx()" shiro:hasPermission="report:red:withdrawal:batchWx">
  64. <i class="fa fa-weixin"></i> 批量微信转账
  65. </a>
  66. <a class="btn btn-success" onclick="batchAliPay()" shiro:hasPermission="report:red:withdrawal:batchAlipay">
  67. <i class="fa fa-cc-mastercard"></i> 批量支付宝转账
  68. </a>
  69. <a class="btn btn-info" onclick="batchBankCard()" shiro:hasPermission="report:red:withdrawal:batchBank">
  70. <i class="fa fa-credit-card"></i> 批量银行卡转账
  71. </a>
  72. <a class="btn btn-danger" onclick="batchHuiJu()" shiro:hasPermission="report:red:withdrawal:batchHuiJu">
  73. <i class="fa fa-paypal"></i> 批量汇聚转账
  74. </a>
  75. </div>
  76. <div class="col-sm-12 select-table table-striped">
  77. <table id="bootstrap-table" data-mobile-responsive="false"></table>
  78. </div>
  79. </div>
  80. </div>
  81. <th:block th:include="include :: footer" />
  82. <script th:inline="javascript">
  83. var prefix = ctx + "report/red/withdrawal";
  84. var freezeFlag = [[${@permission.hasPermi('report:red:withdrawal:freeze')}]];
  85. var unfreezeFlag = [[${@permission.hasPermi('report:red:withdrawal:unfreeze')}]];
  86. var wxFlag = [[${@permission.hasPermi('report:red:withdrawal:wx')}]];
  87. var alipayFlag = [[${@permission.hasPermi('report:red:withdrawal:alipay')}]];
  88. var bankFlag = [[${@permission.hasPermi('report:red:withdrawal:bank')}]];
  89. var huiJuFlag = [[${@permission.hasPermi('report:red:withdrawal:huiju')}]];
  90. var redWithdrawStatus = [[${@dict.getType('withdraw_status')}]];
  91. var accountStatus = [[${@dict.getType('withdraw_account_type')}]];
  92. var realTranType = [[${@dict.getType('cash_method')}]];
  93. $(function() {
  94. //设置时间初始值
  95. $("#startTime").val(new Date().Format("yyyy-MM-dd"));
  96. $("#endTime").val(new Date().Format("yyyy-MM-dd"));
  97. getPacketWithDrawRecordInfo();
  98. var options = {
  99. url: prefix + "/list",
  100. exportUrl: prefix + "/export",
  101. modalName: "红包提现记录",
  102. height: $(window).height() - 120,
  103. columns: [
  104. {
  105. field: 'tempId',
  106. title: '编号',
  107. checkbox: true
  108. },
  109. {
  110. field: 'recordId',
  111. title: 'ID',
  112. },
  113. {
  114. field: 'merchantOrderNo',
  115. title: '汇聚商户号',
  116. align : 'center'
  117. },
  118. {
  119. field: 'erbanNo',
  120. title: '卿卿号',
  121. align : 'center'
  122. },
  123. {
  124. field: 'nick',
  125. title: '昵称',
  126. align : 'center'
  127. },
  128. {
  129. field: 'phone',
  130. title: '电话',
  131. align : 'center'
  132. },
  133. {
  134. field: 'wxOpenId',
  135. title: '微信openid',
  136. align : 'center'
  137. },
  138. {
  139. field: 'alipayAccount',
  140. title: '支付宝',
  141. align : 'center'
  142. },
  143. {
  144. field: 'alipayAccountName',
  145. title: '真实姓名',
  146. align : 'center'
  147. },
  148. {
  149. field: 'cardNumber',
  150. title: '银行卡号',
  151. align : 'center'
  152. },
  153. {
  154. field: 'cardName',
  155. title: '银行卡名字',
  156. align : 'center'
  157. },
  158. {
  159. field: 'openBankCode',
  160. title: '所属银行',
  161. align : 'center'
  162. },
  163. {
  164. field: 'packetNum',
  165. title: '提现金额',
  166. align : 'center'
  167. },
  168. {
  169. field: 'recordStatus',
  170. title: '提现状态',
  171. align: 'center',
  172. formatter: function(value, row, index) {
  173. return $.table.selectDictLabel(redWithdrawStatus, value);
  174. }
  175. },
  176. {
  177. field: 'withdrawStatus',
  178. title: '账号提现状态',
  179. align: 'center',
  180. formatter: function(value, row, index) {
  181. return $.table.selectDictLabel(accountStatus, value);
  182. }
  183. },
  184. {
  185. field: 'realTranType',
  186. title: '真实方式',
  187. align: 'center',
  188. formatter: function(value, row, index) {
  189. return $.table.selectDictLabel(realTranType, value);
  190. }
  191. },
  192. {
  193. field: 'createTime',
  194. title: '提现时间',
  195. align : 'center'
  196. },
  197. {
  198. field: 'pingxxId',
  199. title: 'ping++单号',
  200. align : 'center'
  201. },
  202. {
  203. field: 'adminName',
  204. title: '转账操作人',
  205. align : 'center'
  206. },
  207. {
  208. title: '操作',
  209. align: 'center',
  210. formatter: function(value, row, index) {
  211. var actions = [];
  212. var key = row.recordId;
  213. if(row.withdrawStatus == 0){
  214. 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> ');
  215. if(row.recordStatus == 1){
  216. 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> ');
  217. 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> ');
  218. 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> ');
  219. 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> ');
  220. }else if(row.recordStatus == 3){
  221. 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> ');
  222. 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> ');
  223. 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> ');
  224. 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> ');
  225. }
  226. }else{
  227. 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> ');
  228. }
  229. return actions.join('');
  230. }
  231. }]
  232. };
  233. $.table.init(options);
  234. $('#btnSearch').on('click', function () {
  235. $.table.search();
  236. getPacketWithDrawRecordInfo();
  237. });
  238. $('#yesterdaySearch').on('click',function () {
  239. var today = new Date();
  240. today.setDate(today.getDate() - 1);
  241. $("#startTime").val(today.Format("yyyy-MM-dd"));
  242. $("#endTime").val(today.Format("yyyy-MM-dd"));
  243. $.table.search();
  244. getPacketWithDrawRecordInfo();
  245. });
  246. });
  247. Date.prototype.Format = function (fmt) { //author: meizz
  248. var o = {
  249. "M+": this.getMonth() + 1, //月份
  250. "d+": this.getDate(), //日
  251. "H+": this.getHours(), //小时
  252. "m+": this.getMinutes(), //分
  253. "s+": this.getSeconds(), //秒
  254. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  255. "S": this.getMilliseconds() //毫秒
  256. };
  257. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  258. for (var k in o)
  259. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  260. return fmt;
  261. };
  262. function getPacketWithDrawRecordInfo() {
  263. var param = {
  264. beginTime: $("#startTime").val(),
  265. endTime: $("#endTime").val(),
  266. erBanNo: $('#erbanNo').val(),
  267. withdrawStatus: $("#withdrawStatus").val(),
  268. accountStatus: $("#accountStatus").val(),
  269. tranType:$("#tranType").val(),
  270. realTranType:$("#realTranType").val(),
  271. };
  272. $.post(prefix + "/getPacketWithDrawRecordInfo", param, function (data){
  273. $("#withdrawNum").text(data.userNum);
  274. $("#total").text(data.money);
  275. });
  276. }
  277. /**
  278. * 冻结用户
  279. * @param recordId
  280. * @param uid
  281. */
  282. function freeze(recordId,uid){
  283. $.modal.confirm("确认要冻结该用户吗?", function () {
  284. $.operate.post(prefix + "/freeze?uid=" + uid);
  285. });
  286. }
  287. /**
  288. * 解冻用户
  289. * @param recordId
  290. * @param uid
  291. */
  292. function unfreeze(recordId,uid){
  293. $.modal.confirm("确认要解冻该用户吗?", function () {
  294. $.operate.post(prefix + "/unfreeze?uid=" + uid);
  295. });
  296. }
  297. /**
  298. * 微信转账
  299. * @param recordId
  300. */
  301. function wx(recordId) {
  302. $.modal.confirm("你确认给此用户转账吗?\r\n转账后账户金额会划拨到用户微信,请谨慎操作!", function () {
  303. $.operate.post(prefix + "/transFerByWx?ids=" + recordId);
  304. });
  305. }
  306. /**
  307. * 支付宝转账
  308. * @param recordId
  309. */
  310. function alipay(recordId){
  311. $.modal.confirm("你确认给此用户转账吗?\r\n转账后账户金额会划拨到用户支付宝,请谨慎操作!", function () {
  312. $.operate.post(prefix + "/transFerByAliPay?ids=" + recordId);
  313. });
  314. }
  315. /**
  316. * 银行卡转账
  317. * @param recordId
  318. */
  319. function bankCard(recordId) {
  320. $.modal.confirm("你确认给此用户转账吗?\r\n转账后账户金额会划拨到用户银行卡,请谨慎操作!", function () {
  321. $.operate.post(prefix + "/transFerByBankCard?ids=" + recordId);
  322. });
  323. }
  324. /**
  325. * 汇聚转账
  326. * @param recordId
  327. */
  328. function huiJu(recordId) {
  329. $.modal.confirm("你确认给此用户转账吗?\r\n转账后账户金额会通过汇聚划拨到用户银行卡,请谨慎操作!", function () {
  330. $.operate.post(prefix + "/transFerByHuiJu?ids=" + recordId);
  331. });
  332. }
  333. /**
  334. * 批量微信
  335. */
  336. function batchWx() {
  337. var rows = $('#bootstrap-table').bootstrapTable('getSelections');
  338. if (rows.length == 0) {
  339. $.modal.alertWarning("请至少选择一条记录");
  340. return;
  341. }
  342. var ids = "";
  343. $.modal.confirm("你确认批量转账选中的" + rows.length + "条数据吗? \r\n转账后账户金额会划拨到用户微信,请谨慎操作!", function() {
  344. for(var i=0;i < rows.length; i++){
  345. if(rows[i].tempId == true) {
  346. ids += rows[i].recordId + ",";
  347. }
  348. }
  349. $.operate.post(prefix + "/batchTransFerByWx?ids=" + ids);
  350. });
  351. }
  352. /**
  353. * 批量支付宝
  354. */
  355. function batchAliPay(){
  356. var rows = $('#bootstrap-table').bootstrapTable('getSelections');
  357. if (rows.length == 0) {
  358. $.modal.alertWarning("请至少选择一条记录");
  359. return;
  360. }
  361. var ids = "";
  362. $.modal.confirm("确认批量支付宝转账选中的" + rows.length + "条数据吗? \r\n转账后账户金额会划拨到用户支付宝,请谨慎操作!", function() {
  363. for(var i=0;i < rows.length; i++){
  364. if(rows[i].tempId == true) {
  365. ids += rows[i].recordId + ",";
  366. }
  367. }
  368. $.operate.post(prefix + "/batchTransFerByAliPay?ids=" + ids);
  369. });
  370. }
  371. /**
  372. * 批量银行卡
  373. */
  374. function batchBankCard(){
  375. var rows = $('#bootstrap-table').bootstrapTable('getSelections');
  376. if (rows.length == 0) {
  377. $.modal.alertWarning("请至少选择一条记录");
  378. return;
  379. }
  380. var ids = "";
  381. $.modal.confirm("确认要批量银行卡转账选中的" + rows.length + "条数据吗? \r\n转账后账户金额会划拨到用户银行卡,请谨慎操作!", function() {
  382. for(var i=0;i < rows.length; i++){
  383. if(rows[i].tempId == true) {
  384. ids += rows[i].recordId + ",";
  385. }
  386. }
  387. $.operate.post(prefix + "/batchTransFerByBankCard?ids=" + ids);
  388. });
  389. }
  390. /**
  391. * 批量汇聚转账
  392. */
  393. function batchHuiJu(){
  394. var rows = $('#bootstrap-table').bootstrapTable('getSelections');
  395. if (rows.length == 0) {
  396. $.modal.alertWarning("请至少选择一条记录");
  397. return;
  398. }
  399. var ids = "";
  400. $.modal.confirm("确认要批量汇聚转账选中的" + rows.length + "条数据吗? \r\n转账后账户金额会通过汇聚划拨到用户银行卡,请谨慎操作!", function() {
  401. for(var i=0;i < rows.length; i++){
  402. if(rows[i].tempId == true) {
  403. ids += rows[i].recordId + ",";
  404. }
  405. }
  406. $.operate.post(prefix + "/batchTransFerByHuiJu?ids=" + ids);
  407. });
  408. }
  409. </script>
  410. </body>
  411. </html>