recharge_flow.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  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-card-body" style="padding:15px;">
  108. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  109. <div class="layui-form-item">
  110. </div>
  111. </form>
  112. <form action="" class="layui-form" lay-filter="example" method="post" >
  113. <div class="row">
  114. <div class="col-md-12">
  115. <div class="page-table-header">
  116. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  117. </div>
  118. <table class="table table-responsive" lay-even lay-skin="line" lay-size="lg">
  119. <thead>
  120. <tr>
  121. <th style="width:25px;"></th>
  122. <th style="width:60px;">ID</th>
  123. <th style="width: 250px;">交易类型</th>
  124. <th style="">订单号</th>
  125. <th style="">金额</th>
  126. <th style="">赠送金额</th>
  127. <th>所剩余额</th>
  128. <th>备注</th>
  129. <th style="">操作时间</th>
  130. </tr>
  131. </thead>
  132. <tbody>
  133. <?php foreach($list as $row){ ?>
  134. <tr>
  135. <td style="position: relative; ">
  136. <input type='checkbox' lay-skin="primary" value="{$row['id']}" class="checkone"/>
  137. </td>
  138. <td>
  139. {$row['id']}
  140. </td>
  141. <td>
  142. <?php
  143. if( $row['state'] == 1 ){
  144. ?>
  145. <span class="line-text">微信充值</span>
  146. <?php }else if( $row['state'] == 3 ){ ?>
  147. 余额付款
  148. <?php }else if( $row['state'] == 4 ){ ?>
  149. <span class="line-text">订单退款到余额</span>
  150. <?php }else if( $row['state'] == 5 ){ ?>
  151. <span class="line-text">后台充值</span>
  152. <?php }else if( $row['state'] == 8 ){ ?>
  153. 后台扣款
  154. <?php }else if( $row['state'] == 9 ){ ?>
  155. 分销提现到余额
  156. <?php }else if( $row['state'] == 10 ){ ?>
  157. 团长提现到余额
  158. <?php }else if( $row['state'] == 11 ){ ?>
  159. 拼团佣金提现到余额
  160. <?php }else if( $row['state'] == 12 ){ ?>
  161. 配送佣金提现到余额
  162. <?php }else if( $row['state'] == 20 ){ ?>
  163. 礼品卡兑换
  164. <?php }else if( $row['state'] == 21 ){ ?>
  165. <span class="line-text">拼团返利</span>
  166. <?php } ?>
  167. </td>
  168. <td>
  169. {$row['trans_id']}
  170. </td>
  171. <td>
  172. <?php
  173. if( $row['state'] == 1 ){
  174. ?>
  175. <span class="line-text">+{$row['money']}</span>
  176. <?php }else if( $row['state'] == 3 ){ ?>
  177. -{$row['money']}
  178. <?php }else if( $row['state'] == 4 ){ ?>
  179. <span class="line-text">+{$row['money']}</span>
  180. <?php }else if( $row['state'] == 5 ){ ?>
  181. <span class="line-text">+{$row['money']}</span>
  182. <?php }else if( $row['state'] == 8 ){ ?>
  183. -{$row['money']}
  184. <?php }else if( $row['state'] == 9 ){ ?>
  185. <span class="line-text">+{$row['money']}</span>
  186. <?php }else if( $row['state'] == 10 ){ ?>
  187. <span class="line-text">+{$row['money']}</span>
  188. <?php }else if( $row['state'] == 11 ){ ?>
  189. <span class="line-text">+{$row['money']}</span>
  190. <?php }else if( $row['state'] == 12 ){ ?>
  191. <span class="line-text">+{$row['money']}</span>
  192. <?php }else if( $row['state'] == 20 ){ ?>
  193. <span class="line-text">+{$row['money']}</span>
  194. <?php }else if( $row['state'] == 21 ){ ?>
  195. <span class="line-text">+{$row['money']}</span>
  196. <?php } ?>
  197. </td>
  198. <td>
  199. <?php if($row['give_money'] > 0){ ?>
  200. <span class="line-text">{$row['give_money']}</span>
  201. <?php }else{ ?>
  202. {$row['give_money']}
  203. <?php }?>
  204. </td>
  205. <td>
  206. {$row['operate_end_yuer']}
  207. </td>
  208. <td>{$row['remark']}</td>
  209. <td>{:date("Y-m-d",$row['charge_time'])}<br/>{:date("H:i:s",$row['charge_time'])}</td>
  210. <td style="overflow:visible;text-align: center;">
  211. <div class="btn-group">
  212. </div>
  213. </td>
  214. </tr>
  215. <?php } ?>
  216. </tbody>
  217. <tfoot>
  218. <tr>
  219. <td colspan="3">
  220. </td>
  221. <td colspan="5" style="text-align: right">
  222. {$pager}
  223. </td>
  224. </tr>
  225. </tfoot>
  226. </table>
  227. </div>
  228. </div>
  229. </form>
  230. </div>
  231. </div>
  232. </div>
  233. <script src="/layuiadmin/layui/layui.js"></script>
  234. <script>
  235. layui.config({
  236. base: '/layuiadmin/' //静态资源所在路径
  237. }).extend({
  238. index: 'lib/index' //主入口模块
  239. }).use('index');
  240. </script>
  241. <script>
  242. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  243. var layer = layui.layer;
  244. var $;
  245. layui.use(['jquery', 'layer','form'], function(){
  246. $ = layui.$;
  247. var form = layui.form;
  248. $('.deldom').click(function(){
  249. var s_url = $(this).attr('data-href');
  250. layer.confirm($(this).attr('data-confirm'), function(index){
  251. $.ajax({
  252. url:s_url,
  253. type:'post',
  254. dataType:'json',
  255. success:function(info){
  256. if(info.status == 0)
  257. {
  258. layer.msg(info.result.message,{icon: 1,time: 2000});
  259. }else if(info.status == 1){
  260. var go_url = location.href;
  261. if( info.result.hasOwnProperty("url") )
  262. {
  263. go_url = info.result.url;
  264. }
  265. layer.msg('操作成功',{time: 1000,
  266. end:function(){
  267. location.href = info.result.url;
  268. }
  269. });
  270. }
  271. }
  272. })
  273. });
  274. })
  275. $('.btn-operation').click(function(){
  276. var ids_arr = [];
  277. var obj = $(this);
  278. var s_toggle = $(this).attr('data-toggle');
  279. var s_url = $(this).attr('data-href');
  280. $("input[name=item_checkbox]").each(function() {
  281. if( $(this).prop('checked') )
  282. {
  283. ids_arr.push( $(this).val() );
  284. }
  285. })
  286. if(ids_arr.length < 1)
  287. {
  288. layer.msg('请选择要操作的内容');
  289. }else{
  290. var can_sub = true;
  291. if( s_toggle == 'batch-remove' )
  292. {
  293. can_sub = false;
  294. layer.confirm($(obj).attr('data-confirm'), function(index){
  295. $.ajax({
  296. url:s_url,
  297. type:'post',
  298. dataType:'json',
  299. data:{ids:ids_arr},
  300. success:function(info){
  301. if(info.status == 0)
  302. {
  303. layer.msg(info.result.message,{icon: 1,time: 2000});
  304. }else if(info.status == 1){
  305. var go_url = location.href;
  306. if( info.result.hasOwnProperty("url") )
  307. {
  308. go_url = info.result.url;
  309. }
  310. layer.msg('操作成功',{time: 1000,
  311. end:function(){
  312. location.href = info.result.url;
  313. }
  314. });
  315. }
  316. }
  317. })
  318. });
  319. }else{
  320. $.ajax({
  321. url:s_url,
  322. type:'post',
  323. dataType:'json',
  324. data:{ids:ids_arr},
  325. success:function(info){
  326. if(info.status == 0)
  327. {
  328. layer.msg(info.result.message,{icon: 1,time: 2000});
  329. }else if(info.status == 1){
  330. var go_url = location.href;
  331. if( info.result.hasOwnProperty("url") )
  332. {
  333. go_url = info.result.url;
  334. }
  335. layer.msg('操作成功',{time: 1000,
  336. end:function(){
  337. location.href = info.result.url;
  338. }
  339. });
  340. }
  341. }
  342. })
  343. }
  344. }
  345. })
  346. form.on('switch(restwsitch)', function(data){
  347. var s_url = $(this).attr('data-href')
  348. var rest = 1;
  349. if(data.elem.checked)
  350. {
  351. rest = 1;
  352. }else{
  353. rest = 0;
  354. }
  355. $.ajax({
  356. url:s_url,
  357. type:'post',
  358. dataType:'json',
  359. data:{rest:rest},
  360. success:function(info){
  361. if(info.status == 0)
  362. {
  363. layer.msg(info.result.message,{icon: 1,time: 2000});
  364. }else if(info.status == 1){
  365. var go_url = location.href;
  366. if( info.result.hasOwnProperty("url") )
  367. {
  368. go_url = info.result.url;
  369. }
  370. layer.msg('操作成功',{time: 1000,
  371. end:function(){
  372. location.href = info.result.url;
  373. }
  374. });
  375. }
  376. }
  377. })
  378. });
  379. form.on('switch(enablewsitch)', function(data){
  380. var s_url = $(this).attr('data-href')
  381. var enable = 1;
  382. if(data.elem.checked)
  383. {
  384. enable = 1;
  385. }else{
  386. enable = 0;
  387. }
  388. $.ajax({
  389. url:s_url,
  390. type:'post',
  391. dataType:'json',
  392. data:{enable:enable},
  393. success:function(info){
  394. if(info.status == 0)
  395. {
  396. layer.msg(info.result.message,{icon: 1,time: 2000});
  397. }else if(info.status == 1){
  398. var go_url = location.href;
  399. if( info.result.hasOwnProperty("url") )
  400. {
  401. go_url = info.result.url;
  402. }
  403. layer.msg('操作成功',{time: 1000,
  404. end:function(){
  405. location.href = info.result.url;
  406. }
  407. });
  408. }
  409. }
  410. })
  411. });
  412. form.on('switch(statewsitch)', function(data){
  413. var s_url = $(this).attr('data-href')
  414. var state = 1;
  415. if(data.elem.checked)
  416. {
  417. state = 1;
  418. }else{
  419. state = 0;
  420. }
  421. $.ajax({
  422. url:s_url,
  423. type:'post',
  424. dataType:'json',
  425. data:{state:state},
  426. success:function(info){
  427. if(info.status == 0)
  428. {
  429. layer.msg(info.result.message,{icon: 1,time: 2000});
  430. }else if(info.status == 1){
  431. var go_url = location.href;
  432. if( info.result.hasOwnProperty("url") )
  433. {
  434. go_url = info.result.url;
  435. }
  436. layer.msg('操作成功',{time: 1000,
  437. end:function(){
  438. location.href = info.result.url;
  439. }
  440. });
  441. }
  442. }
  443. })
  444. });
  445. form.on('checkbox(checkboxall)', function(data){
  446. if(data.elem.checked)
  447. {
  448. $("input[name=item_checkbox]").each(function() {
  449. $(this).prop("checked", true);
  450. });
  451. $("input[name=checkall]").each(function() {
  452. $(this).prop("checked", true);
  453. });
  454. }else{
  455. $("input[name=item_checkbox]").each(function() {
  456. $(this).prop("checked", false);
  457. });
  458. $("input[name=checkall]").each(function() {
  459. $(this).prop("checked", false);
  460. });
  461. }
  462. form.render('checkbox');
  463. });
  464. //监听提交
  465. form.on('submit(formDemo)', function(data){
  466. $.ajax({
  467. url: data.form.action,
  468. type: data.form.method,
  469. data: data.field,
  470. dataType:'json',
  471. success: function (info) {
  472. if(info.status == 0)
  473. {
  474. layer.msg(info.result.message,{icon: 1,time: 2000});
  475. }else if(info.status == 1){
  476. var go_url = location.href;
  477. if( info.result.hasOwnProperty("url") )
  478. {
  479. go_url = info.result.url;
  480. }
  481. layer.msg('操作成功',{time: 1000,
  482. end:function(){
  483. location.href = info.result.url;
  484. }
  485. });
  486. }
  487. }
  488. });
  489. return false;
  490. });
  491. })
  492. </script>
  493. </body>