apply.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <div class="row content-nav">
  2. <div class="col-xs-12">
  3. <ul>
  4. <li><a href="javascript:;"><i></i>财务管理</a></li>
  5. <li><a href="javascript:;">提现申请</a></li>
  6. </ul>
  7. </div>
  8. </div>
  9. <section class="content clearfix">
  10. <div class="layui-list-box">
  11. <table class="layui-hide" id="list-box" lay-filter="list-box"></table>
  12. </div>
  13. </section>
  14. <script type="text/html" id="list-toolbar">
  15. <div style="float: left">
  16. <div class="layui-form-pos-btn">
  17. <div class="tab-list-btn active">全部</div>
  18. <div class="tab-list-btn">未处理</div>
  19. <div class="tab-list-btn">已处理</div>
  20. <div class="tab-list-btn">已拒绝</div>
  21. </div>
  22. </div>
  23. </script>
  24. <script type="text/html" id="list-bar">
  25. {{# if(d.status == 0){ }}
  26. <a class="layui-btn layui-btn-xs" lay-event="handle">待处理</a>
  27. {{# } }}
  28. {{# if(d.status != 0){ }}
  29. <a class="layui-btn layui-btn-xs layui-btn-danger">已处理</a>
  30. {{# } }}
  31. </script>
  32. <style type="text/css">.layui-table-cell{ height:auto !important; } </style>
  33. <script>
  34. window.active = {:input("param.type",0)};
  35. layui.use(['table','form'], function () {
  36. var table = layui.table;
  37. var form = layui.form;
  38. table.render({
  39. elem: '#list-box'
  40. , url: '{:createUrl("apply",["key[status]"=>input("param.type",0)])}'
  41. , toolbar: '#list-toolbar'
  42. , defaultToolbar: []
  43. , title: '数据表'
  44. , cols: [[
  45. {type: 'checkbox'}
  46. , {field: 'username', title: '会员名称',width:150}
  47. , {field: 'type_name', title: '支付类型',width:150}
  48. , {field: 'string', title: '提现方式'}
  49. , {field: 'price', title: '提现金额',width:150,align:'center'}
  50. , {field: 'status_name', title: '审核状态',width:150,align:'center'}
  51. , {field: 'create_time', title: '创建时间',width:180,align:'center'}
  52. , {align: 'center', title: '操作', toolbar: '#list-bar', width: 80}
  53. ]]
  54. ,done: function (){
  55. $(".tab-list-btn").removeClass("active").eq(window.active).addClass("active");
  56. }
  57. , text: {
  58. none: '<div><i class="layui-icon">&#xe702;</i>暂无相关数据</div>'
  59. }
  60. , page: true
  61. , height: 'full-200'
  62. // ,limit:30
  63. });
  64. $(document).on("click",".tab-list-btn",function (){
  65. window.active = $(this).index();
  66. table.reload('list-box', {
  67. page: {
  68. curr: 1
  69. }
  70. , where: {
  71. key: {
  72. status : window.active
  73. }
  74. }
  75. }, 'data');
  76. });
  77. //头工具栏事件
  78. table.on('toolbar(list-box)', function (obj) {
  79. switch (obj.event) {
  80. case 'refresh':
  81. window.location.reload();
  82. break;
  83. }
  84. });
  85. //监听行工具事件
  86. table.on('tool(list-box)', function (obj) {
  87. var data = obj.data;
  88. if (obj.event === 'handle') {
  89. layer.open({
  90. type: 2,
  91. title: '提现管理',
  92. shadeClose: true,
  93. shade: 0.3,
  94. area: ['60%', '80%'],
  95. content: '{:createUrl("handle")}?id='+data.id
  96. });
  97. }
  98. });
  99. });
  100. </script>