recharge_diary.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module': {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie': {'pre': ''},
  33. 'account': {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. <style>
  45. tbody tr td{
  46. position: relative;
  47. }
  48. tbody tr .icow-weibiaoti--{
  49. visibility: hidden;
  50. display: inline-block;
  51. color: #fff;
  52. height:18px;
  53. width:18px;
  54. background: #e0e0e0;
  55. text-align: center;
  56. line-height: 18px;
  57. vertical-align: middle;
  58. }
  59. tbody tr:hover .icow-weibiaoti--{
  60. visibility: visible;
  61. }
  62. tbody tr .icow-weibiaoti--.hidden{
  63. visibility: hidden !important;
  64. }
  65. .full .icow-weibiaoti--{
  66. margin-left:10px;
  67. }
  68. .full>span{
  69. display: -webkit-box;
  70. display: -webkit-flex;
  71. display: -ms-flexbox;
  72. display: flex;
  73. vertical-align: middle;
  74. align-items: center;
  75. }
  76. tbody tr .label{
  77. margin: 5px 0;
  78. }
  79. .goods_attribute a{
  80. cursor: pointer;
  81. }
  82. .newgoodsflag{
  83. width: 22px;height: 16px;
  84. background-color: #ff0000;
  85. color: #fff;
  86. text-align: center;
  87. position: absolute;
  88. bottom: 70px;
  89. left: 57px;
  90. font-size: 12px;
  91. }
  92. .a{cursor: pointer;}
  93. .img-40 {
  94. width: 40px;
  95. height: 40px;
  96. }
  97. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect{
  98. width:auto!important;
  99. }
  100. </style>
  101. </head>
  102. <body layadmin-themealias="default">
  103. <table id="demo" lay-filter="test"></table>
  104. <div class="layui-fluid">
  105. <div class="layui-card">
  106. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">余额流水列表</span></div>
  107. <div class="layui-tab layui-tab-brief" >
  108. <ul class="layui-tab-title">
  109. <li <?php if(empty($state) || $state=='0'){ ?>class="layui-this"<?php } ?>>
  110. <a href="{:U('marketing/recharge_diary', array('state' => 0))}">全部记录({$all_count})</a>
  111. </li>
  112. <li <?php if($state =='1'){ ?>class="layui-this"<?php } ?> >
  113. <a href="{:U('marketing/recharge_diary', array('state' => 1))}">用户充值({$count_status_1})</a>
  114. </li>
  115. <li <?php if($state=='3'){ ?>class="layui-this"<?php } ?> >
  116. <a href="{:U('marketing/recharge_diary', array('state' => 3))}">余额付款({$count_status_3})</a>
  117. </li>
  118. <li <?php if($state=='4'){ ?>class="layui-this"<?php } ?> >
  119. <a href="{:U('marketing/recharge_diary', array('state' => 4))}">订单退款到余额({$count_status_4})</a>
  120. </li>
  121. <li <?php if($state=='5'){ ?>class="layui-this"<?php } ?> >
  122. <a href="{:U('marketing/recharge_diary', array('state' => 5))}">后台充值({$count_status_5})</a>
  123. </li>
  124. <li <?php if($state=='8'){ ?>class="layui-this"<?php } ?> >
  125. <a href="{:U('marketing/recharge_diary', array('state' => 8))}">后台扣除({$count_status_8})</a>
  126. </li>
  127. <li <?php if($state=='9'){ ?>class="layui-this"<?php } ?> >
  128. <a href="{:U('marketing/recharge_diary', array('state' => 9))}">分销提现到余额({$count_status_9})</a>
  129. </li>
  130. <li <?php if($state=='10'){ ?>class="layui-this"<?php } ?> >
  131. <a href="{:U('marketing/recharge_diary', array('state' => 10))}">团长提现到余额({$count_status_10})</a>
  132. </li>
  133. </ul>
  134. </div>
  135. <div class="layui-card-body" style="padding:15px;">
  136. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  137. <input type="hidden" name="c" value="marketing" />
  138. <input type="hidden" name="a" value="recharge_diary" />
  139. <div class="layui-form-item">
  140. <div class="layui-inline">
  141. <div class="layui-input-inline" style="width:280px;">
  142. {:tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);}
  143. </div>
  144. <div class="layui-input-inline" >
  145. <input type="text" class="layui-input" name="keyword" value="{$keyword}" placeholder="请输入姓名然后回车"/>
  146. </div>
  147. <div class="layui-input-inline">
  148. <button class="layui-btn layui-btn-sm" data-export="0" type="submit"> 搜索</button>
  149. </div>
  150. </div>
  151. </div>
  152. </form>
  153. <form action="" class="layui-form" lay-filter="example" method="post" >
  154. <div class="row">
  155. <div class="col-md-12">
  156. <div class="page-table-header">
  157. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  158. </div>
  159. <table class="table table-responsive" lay-even lay-skin="line" lay-size="lg">
  160. <thead>
  161. <tr>
  162. <th style="width:25px;"></th>
  163. <th style="width:60px;">ID</th>
  164. <th style="width: 250px;">用户名</th>
  165. <th style="width: 120px;">交易类型</th>
  166. <th style="width: 100px;">资金流向</th>
  167. <th style="">订单号</th>
  168. <th style="width: 200px;">备注</th>
  169. <th >金额</th>
  170. <th >赠送金额</th>
  171. <th >账户余额</th>
  172. <th style="">操作时间</th>
  173. <th style="display:none;">操作</th>
  174. </tr>
  175. </thead>
  176. <tbody>
  177. <?php foreach($list as $row){ ?>
  178. <tr>
  179. <td style="position: relative; ">
  180. <input type='checkbox' lay-skin="primary" value="{$row['id']}" class="checkone"/>
  181. </td>
  182. <td>
  183. {$row['id']}
  184. </td>
  185. <td style="overflow: visible">
  186. <div rel="pop" style="display: flex" >
  187. <img class="img-40" src="{$row['avatar']}" style='border-radius:50%;border:1px solid #efefef;' />
  188. <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
  189. <span class="nickname">
  190. <?php if(empty($row['username'])){ ?>未更新<?php }else{ ?>{$row['username']}<?php } ?>
  191. </span>
  192. </span>
  193. </div>
  194. </td>
  195. <td>
  196. <?php
  197. if( $row['state'] == 1 ){
  198. ?>
  199. <span class="line-text">微信充值</span>
  200. <?php }else if( $row['state'] == 3 ){ ?>
  201. 余额付款
  202. <?php }else if( $row['state'] == 4 ){ ?>
  203. <span class="line-text">订单退款到余额</span>
  204. <?php }else if( $row['state'] == 5 ){ ?>
  205. <span class="line-text">后台充值</span>
  206. <?php }else if( $row['state'] == 8 ){ ?>
  207. 后台扣款
  208. <?php }else if( $row['state'] == 9 ){ ?>
  209. 分销提现到余额
  210. <?php }else if( $row['state'] == 10 ){ ?>
  211. 团长提现到余额
  212. <?php }else if( $row['state'] == 20 ){ ?>
  213. 礼品卡兑换
  214. <?php } ?>
  215. </td>
  216. <td>
  217. <?php
  218. if( $row['state'] == 1 ){
  219. ?>
  220. <span class="line-text">收入</span>
  221. <?php }else if( $row['state'] == 3 ){ ?>
  222. 支出
  223. <?php }else if( $row['state'] == 4 ){ ?>
  224. <span class="line-text">收入</span>
  225. <?php }else if( $row['state'] == 5 ){ ?>
  226. <span class="line-text">收入</span>
  227. <?php }else if( $row['state'] == 8 ){ ?>
  228. 支出
  229. <?php }else if( $row['state'] == 9 ){ ?>
  230. <span class="line-text">收入</span>
  231. <?php }else if( $row['state'] == 10 ){ ?>
  232. <span class="line-text">收入</span>
  233. <?php }else if( $row['state'] == 20 ){ ?>
  234. <span class="line-text">收入</span>
  235. <?php } ?>
  236. </td>
  237. <td>
  238. {$row['trans_id']}
  239. </td>
  240. <td>
  241. {$row['remark']}
  242. </td>
  243. <td>
  244. <?php
  245. if( $row['state'] == 1 ){
  246. ?>
  247. <span class="line-text">+{$row['money']}</span>
  248. <?php }else if( $row['state'] == 3 ){ ?>
  249. -{$row['money']}
  250. <?php }else if( $row['state'] == 4 ){ ?>
  251. <span class="line-text">+{$row['money']}</span>
  252. <?php }else if( $row['state'] == 5 ){ ?>
  253. <span class="line-text">+{$row['money']}</span>
  254. <?php }else if( $row['state'] == 8 ){ ?>
  255. -{$row['money']}
  256. <?php }else if( $row['state'] == 9 ){ ?>
  257. <span class="line-text">+{$row['money']}</span>
  258. <?php }else if( $row['state'] == 20 ){ ?>
  259. <span class="line-text">+{$row['money']}</span>
  260. <?php } ?>
  261. </td>
  262. <td>
  263. {$row['give_money']}
  264. </td>
  265. <td>
  266. {$row['operate_end_yuer']}
  267. </td>
  268. <td>{:date("Y-m-d",$row['charge_time'])}<br/>{:date("H:i:s",$row['charge_time'])}</td>
  269. <td style="overflow:visible;text-align: center;display:none;">
  270. <div class="btn-group" style="display:none;">
  271. <a class="layui-btn layui-btn-xs"
  272. href="{:U('user/recharge_flow', array('id'=>$row['member_id']))}"
  273. title=''>
  274. 查看详情
  275. </a>
  276. </div>
  277. </td>
  278. </tr>
  279. <?php } ?>
  280. </tbody>
  281. <tfoot>
  282. <tr>
  283. <td colspan="3">
  284. </td>
  285. <td colspan="5" style="text-align: right">
  286. {$pager}
  287. </td>
  288. </tr>
  289. </tfoot>
  290. </table>
  291. </div>
  292. </div>
  293. </form>
  294. </div>
  295. </div>
  296. </div>
  297. <script src="/layuiadmin/layui/layui.js"></script>
  298. <script>
  299. layui.config({
  300. base: '/layuiadmin/' //静态资源所在路径
  301. }).extend({
  302. index: 'lib/index' //主入口模块
  303. }).use('index');
  304. </script>
  305. <script>
  306. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  307. var layer = layui.layer;
  308. var $;
  309. layui.use(['jquery', 'layer','form'], function(){
  310. $ = layui.$;
  311. var form = layui.form;
  312. $('.deldom').click(function(){
  313. var s_url = $(this).attr('data-href');
  314. layer.confirm($(this).attr('data-confirm'), function(index){
  315. $.ajax({
  316. url:s_url,
  317. type:'post',
  318. dataType:'json',
  319. success:function(info){
  320. if(info.status == 0)
  321. {
  322. layer.msg(info.result.message,{icon: 1,time: 2000});
  323. }else if(info.status == 1){
  324. var go_url = location.href;
  325. if( info.result.hasOwnProperty("url") )
  326. {
  327. go_url = info.result.url;
  328. }
  329. layer.msg('操作成功',{time: 1000,
  330. end:function(){
  331. location.href = info.result.url;
  332. }
  333. });
  334. }
  335. }
  336. })
  337. });
  338. })
  339. $('.btn-operation').click(function(){
  340. var ids_arr = [];
  341. var obj = $(this);
  342. var s_toggle = $(this).attr('data-toggle');
  343. var s_url = $(this).attr('data-href');
  344. $("input[name=item_checkbox]").each(function() {
  345. if( $(this).prop('checked') )
  346. {
  347. ids_arr.push( $(this).val() );
  348. }
  349. })
  350. if(ids_arr.length < 1)
  351. {
  352. layer.msg('请选择要操作的内容');
  353. }else{
  354. var can_sub = true;
  355. if( s_toggle == 'batch-remove' )
  356. {
  357. can_sub = false;
  358. layer.confirm($(obj).attr('data-confirm'), function(index){
  359. $.ajax({
  360. url:s_url,
  361. type:'post',
  362. dataType:'json',
  363. data:{ids:ids_arr},
  364. success:function(info){
  365. if(info.status == 0)
  366. {
  367. layer.msg(info.result.message,{icon: 1,time: 2000});
  368. }else if(info.status == 1){
  369. var go_url = location.href;
  370. if( info.result.hasOwnProperty("url") )
  371. {
  372. go_url = info.result.url;
  373. }
  374. layer.msg('操作成功',{time: 1000,
  375. end:function(){
  376. location.href = info.result.url;
  377. }
  378. });
  379. }
  380. }
  381. })
  382. });
  383. }else{
  384. $.ajax({
  385. url:s_url,
  386. type:'post',
  387. dataType:'json',
  388. data:{ids:ids_arr},
  389. success:function(info){
  390. if(info.status == 0)
  391. {
  392. layer.msg(info.result.message,{icon: 1,time: 2000});
  393. }else if(info.status == 1){
  394. var go_url = location.href;
  395. if( info.result.hasOwnProperty("url") )
  396. {
  397. go_url = info.result.url;
  398. }
  399. layer.msg('操作成功',{time: 1000,
  400. end:function(){
  401. location.href = info.result.url;
  402. }
  403. });
  404. }
  405. }
  406. })
  407. }
  408. }
  409. })
  410. form.on('switch(restwsitch)', function(data){
  411. var s_url = $(this).attr('data-href')
  412. var rest = 1;
  413. if(data.elem.checked)
  414. {
  415. rest = 1;
  416. }else{
  417. rest = 0;
  418. }
  419. $.ajax({
  420. url:s_url,
  421. type:'post',
  422. dataType:'json',
  423. data:{rest:rest},
  424. success:function(info){
  425. if(info.status == 0)
  426. {
  427. layer.msg(info.result.message,{icon: 1,time: 2000});
  428. }else if(info.status == 1){
  429. var go_url = location.href;
  430. if( info.result.hasOwnProperty("url") )
  431. {
  432. go_url = info.result.url;
  433. }
  434. layer.msg('操作成功',{time: 1000,
  435. end:function(){
  436. location.href = info.result.url;
  437. }
  438. });
  439. }
  440. }
  441. })
  442. });
  443. form.on('switch(enablewsitch)', function(data){
  444. var s_url = $(this).attr('data-href')
  445. var enable = 1;
  446. if(data.elem.checked)
  447. {
  448. enable = 1;
  449. }else{
  450. enable = 0;
  451. }
  452. $.ajax({
  453. url:s_url,
  454. type:'post',
  455. dataType:'json',
  456. data:{enable:enable},
  457. success:function(info){
  458. if(info.status == 0)
  459. {
  460. layer.msg(info.result.message,{icon: 1,time: 2000});
  461. }else if(info.status == 1){
  462. var go_url = location.href;
  463. if( info.result.hasOwnProperty("url") )
  464. {
  465. go_url = info.result.url;
  466. }
  467. layer.msg('操作成功',{time: 1000,
  468. end:function(){
  469. location.href = info.result.url;
  470. }
  471. });
  472. }
  473. }
  474. })
  475. });
  476. form.on('switch(statewsitch)', function(data){
  477. var s_url = $(this).attr('data-href')
  478. var state = 1;
  479. if(data.elem.checked)
  480. {
  481. state = 1;
  482. }else{
  483. state = 0;
  484. }
  485. $.ajax({
  486. url:s_url,
  487. type:'post',
  488. dataType:'json',
  489. data:{state:state},
  490. success:function(info){
  491. if(info.status == 0)
  492. {
  493. layer.msg(info.result.message,{icon: 1,time: 2000});
  494. }else if(info.status == 1){
  495. var go_url = location.href;
  496. if( info.result.hasOwnProperty("url") )
  497. {
  498. go_url = info.result.url;
  499. }
  500. layer.msg('操作成功',{time: 1000,
  501. end:function(){
  502. location.href = info.result.url;
  503. }
  504. });
  505. }
  506. }
  507. })
  508. });
  509. form.on('checkbox(checkboxall)', function(data){
  510. if(data.elem.checked)
  511. {
  512. $("input[name=item_checkbox]").each(function() {
  513. $(this).prop("checked", true);
  514. });
  515. $("input[name=checkall]").each(function() {
  516. $(this).prop("checked", true);
  517. });
  518. }else{
  519. $("input[name=item_checkbox]").each(function() {
  520. $(this).prop("checked", false);
  521. });
  522. $("input[name=checkall]").each(function() {
  523. $(this).prop("checked", false);
  524. });
  525. }
  526. form.render('checkbox');
  527. });
  528. //监听提交
  529. form.on('submit(formDemo)', function(data){
  530. $.ajax({
  531. url: data.form.action,
  532. type: data.form.method,
  533. data: data.field,
  534. dataType:'json',
  535. success: function (info) {
  536. if(info.status == 0)
  537. {
  538. layer.msg(info.result.message,{icon: 1,time: 2000});
  539. }else if(info.status == 1){
  540. var go_url = location.href;
  541. if( info.result.hasOwnProperty("url") )
  542. {
  543. go_url = info.result.url;
  544. }
  545. layer.msg('操作成功',{time: 1000,
  546. end:function(){
  547. location.href = info.result.url;
  548. }
  549. });
  550. }
  551. }
  552. });
  553. return false;
  554. });
  555. })
  556. </script>
  557. </body>