recharge_diary.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  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 >金额</th>
  169. <th >赠送金额</th>
  170. <th >账户余额</th>
  171. <th style="">操作时间</th>
  172. <th style="display:none;">操作</th>
  173. </tr>
  174. </thead>
  175. <tbody>
  176. <?php foreach($list as $row){ ?>
  177. <tr>
  178. <td style="position: relative; ">
  179. <input type='checkbox' lay-skin="primary" value="{$row['id']}" class="checkone"/>
  180. </td>
  181. <td>
  182. {$row['id']}
  183. </td>
  184. <td style="overflow: visible">
  185. <div rel="pop" style="display: flex" >
  186. <img class="img-40" src="{$row['avatar']}" style='border-radius:50%;border:1px solid #efefef;' />
  187. <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
  188. <span class="nickname">
  189. <?php if(empty($row['username'])){ ?>未更新<?php }else{ ?>{$row['username']}<?php } ?>
  190. </span>
  191. </span>
  192. </div>
  193. </td>
  194. <td>
  195. <?php
  196. if( $row['state'] == 1 ){
  197. ?>
  198. <span class="line-text">微信充值</span>
  199. <?php }else if( $row['state'] == 3 ){ ?>
  200. 余额付款
  201. <?php }else if( $row['state'] == 4 ){ ?>
  202. <span class="line-text">订单退款到余额</span>
  203. <?php }else if( $row['state'] == 5 ){ ?>
  204. <span class="line-text">后台充值</span>
  205. <?php }else if( $row['state'] == 8 ){ ?>
  206. 后台扣款
  207. <?php }else if( $row['state'] == 9 ){ ?>
  208. 分销提现到余额
  209. <?php }else if( $row['state'] == 10 ){ ?>
  210. 团长提现到余额
  211. <?php } ?>
  212. </td>
  213. <td>
  214. <?php
  215. if( $row['state'] == 1 ){
  216. ?>
  217. <span class="line-text">收入</span>
  218. <?php }else if( $row['state'] == 3 ){ ?>
  219. 支出
  220. <?php }else if( $row['state'] == 4 ){ ?>
  221. <span class="line-text">收入</span>
  222. <?php }else if( $row['state'] == 5 ){ ?>
  223. <span class="line-text">收入</span>
  224. <?php }else if( $row['state'] == 8 ){ ?>
  225. 支出
  226. <?php }else if( $row['state'] == 9 ){ ?>
  227. <span class="line-text">收入</span>
  228. <?php }else if( $row['state'] == 10 ){ ?>
  229. <span class="line-text">收入</span>
  230. <?php } ?>
  231. </td>
  232. <td>
  233. {$row['trans_id']}
  234. </td>
  235. <td>
  236. <?php
  237. if( $row['state'] == 1 ){
  238. ?>
  239. <span class="line-text">+{$row['money']}</span>
  240. <?php }else if( $row['state'] == 3 ){ ?>
  241. -{$row['money']}
  242. <?php }else if( $row['state'] == 4 ){ ?>
  243. <span class="line-text">+{$row['money']}</span>
  244. <?php }else if( $row['state'] == 5 ){ ?>
  245. <span class="line-text">+{$row['money']}</span>
  246. <?php }else if( $row['state'] == 8 ){ ?>
  247. -{$row['money']}
  248. <?php }else if( $row['state'] == 9 ){ ?>
  249. <span class="line-text">+{$row['money']}</span>
  250. <?php } ?>
  251. </td>
  252. <td>
  253. {$row['give_money']}
  254. </td>
  255. <td>
  256. {$row['operate_end_yuer']}
  257. </td>
  258. <td>{:date("Y-m-d",$row['charge_time'])}<br/>{:date("H:i:s",$row['charge_time'])}</td>
  259. <td style="overflow:visible;text-align: center;display:none;">
  260. <div class="btn-group" style="display:none;">
  261. <a class="layui-btn layui-btn-xs"
  262. href="{:U('user/recharge_flow', array('id'=>$row['member_id']))}"
  263. title=''>
  264. 查看详情
  265. </a>
  266. </div>
  267. </td>
  268. </tr>
  269. <?php } ?>
  270. </tbody>
  271. <tfoot>
  272. <tr>
  273. <td colspan="3">
  274. </td>
  275. <td colspan="5" style="text-align: right">
  276. {$pager}
  277. </td>
  278. </tr>
  279. </tfoot>
  280. </table>
  281. </div>
  282. </div>
  283. </form>
  284. </div>
  285. </div>
  286. </div>
  287. <script src="/layuiadmin/layui/layui.js"></script>
  288. <script>
  289. layui.config({
  290. base: '/layuiadmin/' //静态资源所在路径
  291. }).extend({
  292. index: 'lib/index' //主入口模块
  293. }).use('index');
  294. </script>
  295. <script>
  296. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  297. var layer = layui.layer;
  298. var $;
  299. layui.use(['jquery', 'layer','form'], function(){
  300. $ = layui.$;
  301. var form = layui.form;
  302. $('.deldom').click(function(){
  303. var s_url = $(this).attr('data-href');
  304. layer.confirm($(this).attr('data-confirm'), function(index){
  305. $.ajax({
  306. url:s_url,
  307. type:'post',
  308. dataType:'json',
  309. success:function(info){
  310. if(info.status == 0)
  311. {
  312. layer.msg(info.result.message,{icon: 1,time: 2000});
  313. }else if(info.status == 1){
  314. var go_url = location.href;
  315. if( info.result.hasOwnProperty("url") )
  316. {
  317. go_url = info.result.url;
  318. }
  319. layer.msg('操作成功',{time: 1000,
  320. end:function(){
  321. location.href = info.result.url;
  322. }
  323. });
  324. }
  325. }
  326. })
  327. });
  328. })
  329. $('.btn-operation').click(function(){
  330. var ids_arr = [];
  331. var obj = $(this);
  332. var s_toggle = $(this).attr('data-toggle');
  333. var s_url = $(this).attr('data-href');
  334. $("input[name=item_checkbox]").each(function() {
  335. if( $(this).prop('checked') )
  336. {
  337. ids_arr.push( $(this).val() );
  338. }
  339. })
  340. if(ids_arr.length < 1)
  341. {
  342. layer.msg('请选择要操作的内容');
  343. }else{
  344. var can_sub = true;
  345. if( s_toggle == 'batch-remove' )
  346. {
  347. can_sub = false;
  348. layer.confirm($(obj).attr('data-confirm'), function(index){
  349. $.ajax({
  350. url:s_url,
  351. type:'post',
  352. dataType:'json',
  353. data:{ids:ids_arr},
  354. success:function(info){
  355. if(info.status == 0)
  356. {
  357. layer.msg(info.result.message,{icon: 1,time: 2000});
  358. }else if(info.status == 1){
  359. var go_url = location.href;
  360. if( info.result.hasOwnProperty("url") )
  361. {
  362. go_url = info.result.url;
  363. }
  364. layer.msg('操作成功',{time: 1000,
  365. end:function(){
  366. location.href = info.result.url;
  367. }
  368. });
  369. }
  370. }
  371. })
  372. });
  373. }else{
  374. $.ajax({
  375. url:s_url,
  376. type:'post',
  377. dataType:'json',
  378. data:{ids:ids_arr},
  379. success:function(info){
  380. if(info.status == 0)
  381. {
  382. layer.msg(info.result.message,{icon: 1,time: 2000});
  383. }else if(info.status == 1){
  384. var go_url = location.href;
  385. if( info.result.hasOwnProperty("url") )
  386. {
  387. go_url = info.result.url;
  388. }
  389. layer.msg('操作成功',{time: 1000,
  390. end:function(){
  391. location.href = info.result.url;
  392. }
  393. });
  394. }
  395. }
  396. })
  397. }
  398. }
  399. })
  400. form.on('switch(restwsitch)', function(data){
  401. var s_url = $(this).attr('data-href')
  402. var rest = 1;
  403. if(data.elem.checked)
  404. {
  405. rest = 1;
  406. }else{
  407. rest = 0;
  408. }
  409. $.ajax({
  410. url:s_url,
  411. type:'post',
  412. dataType:'json',
  413. data:{rest:rest},
  414. success:function(info){
  415. if(info.status == 0)
  416. {
  417. layer.msg(info.result.message,{icon: 1,time: 2000});
  418. }else if(info.status == 1){
  419. var go_url = location.href;
  420. if( info.result.hasOwnProperty("url") )
  421. {
  422. go_url = info.result.url;
  423. }
  424. layer.msg('操作成功',{time: 1000,
  425. end:function(){
  426. location.href = info.result.url;
  427. }
  428. });
  429. }
  430. }
  431. })
  432. });
  433. form.on('switch(enablewsitch)', function(data){
  434. var s_url = $(this).attr('data-href')
  435. var enable = 1;
  436. if(data.elem.checked)
  437. {
  438. enable = 1;
  439. }else{
  440. enable = 0;
  441. }
  442. $.ajax({
  443. url:s_url,
  444. type:'post',
  445. dataType:'json',
  446. data:{enable:enable},
  447. success:function(info){
  448. if(info.status == 0)
  449. {
  450. layer.msg(info.result.message,{icon: 1,time: 2000});
  451. }else if(info.status == 1){
  452. var go_url = location.href;
  453. if( info.result.hasOwnProperty("url") )
  454. {
  455. go_url = info.result.url;
  456. }
  457. layer.msg('操作成功',{time: 1000,
  458. end:function(){
  459. location.href = info.result.url;
  460. }
  461. });
  462. }
  463. }
  464. })
  465. });
  466. form.on('switch(statewsitch)', function(data){
  467. var s_url = $(this).attr('data-href')
  468. var state = 1;
  469. if(data.elem.checked)
  470. {
  471. state = 1;
  472. }else{
  473. state = 0;
  474. }
  475. $.ajax({
  476. url:s_url,
  477. type:'post',
  478. dataType:'json',
  479. data:{state:state},
  480. success:function(info){
  481. if(info.status == 0)
  482. {
  483. layer.msg(info.result.message,{icon: 1,time: 2000});
  484. }else if(info.status == 1){
  485. var go_url = location.href;
  486. if( info.result.hasOwnProperty("url") )
  487. {
  488. go_url = info.result.url;
  489. }
  490. layer.msg('操作成功',{time: 1000,
  491. end:function(){
  492. location.href = info.result.url;
  493. }
  494. });
  495. }
  496. }
  497. })
  498. });
  499. form.on('checkbox(checkboxall)', function(data){
  500. if(data.elem.checked)
  501. {
  502. $("input[name=item_checkbox]").each(function() {
  503. $(this).prop("checked", true);
  504. });
  505. $("input[name=checkall]").each(function() {
  506. $(this).prop("checked", true);
  507. });
  508. }else{
  509. $("input[name=item_checkbox]").each(function() {
  510. $(this).prop("checked", false);
  511. });
  512. $("input[name=checkall]").each(function() {
  513. $(this).prop("checked", false);
  514. });
  515. }
  516. form.render('checkbox');
  517. });
  518. //监听提交
  519. form.on('submit(formDemo)', function(data){
  520. $.ajax({
  521. url: data.form.action,
  522. type: data.form.method,
  523. data: data.field,
  524. dataType:'json',
  525. success: function (info) {
  526. if(info.status == 0)
  527. {
  528. layer.msg(info.result.message,{icon: 1,time: 2000});
  529. }else if(info.status == 1){
  530. var go_url = location.href;
  531. if( info.result.hasOwnProperty("url") )
  532. {
  533. go_url = info.result.url;
  534. }
  535. layer.msg('操作成功',{time: 1000,
  536. end:function(){
  537. location.href = info.result.url;
  538. }
  539. });
  540. }
  541. }
  542. });
  543. return false;
  544. });
  545. })
  546. </script>
  547. </body>