index.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <include file="public@header"/>
  2. <style>
  3. .box {
  4. padding: .5rem;
  5. }
  6. .header {
  7. /*text-align: center;*/
  8. height: 48px;
  9. line-height: 48px;
  10. }
  11. .header .name {
  12. font-weight: bold;
  13. font-size: 20px;
  14. margin-left: 44%;
  15. }
  16. .header .date {
  17. float: right;
  18. margin-right: 15px;
  19. }
  20. .box .money {
  21. text-align: center;
  22. }
  23. </style>
  24. </head>
  25. <body>
  26. <div class="wrap js-check-wrap">
  27. <ul class="nav nav-tabs">
  28. <li class="active"><a>提现记录列表</a></li>
  29. </ul>
  30. <form class="well form-inline margin-top-20" method="post" action="{:url('admin/account/index')}">
  31. 状态
  32. <select name="status" id="status">
  33. <option value="0">全部</option>
  34. <option value="1" <if condition="$status == 1">selected</if>>待审核</option>
  35. <option value="2" <if condition="$status == 2">selected</if>>已通过</option>
  36. <option value="3" <if condition="$status == 3">selected</if>>已驳回</option>
  37. </select>
  38. 关键字:
  39. <input class="form-control" type="text" id="keyword" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
  40. placeholder="提现人姓名">
  41. <input type="submit" class="btn btn-primary" value="搜索"/>
  42. <a class="btn btn-default" href="{:url('admin/account/index')}">清空</a>
  43. <a class="btn btn-warning" href="{:url('admin/account/export')}">导出</a>
  44. <a class="btn btn-danger" onclick="doDelete()">批量删除</a>
  45. </form>
  46. <form method="post" class="js-ajax-form">
  47. <table class="table table-hover table-bordered">
  48. <thead>
  49. <tr>
  50. <th width="60"><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
  51. <th>名称</th>
  52. <th>账号</th>
  53. <th>提现金额</th>
  54. <th>实付金额</th>
  55. <th>提现前余额</th>
  56. <th>提现时间</th>
  57. <th>状态</th>
  58. <th>{:lang('ACTIONS')}</th>
  59. </tr>
  60. </thead>
  61. <tbody>
  62. <php>
  63. $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
  64. </php>
  65. <foreach name="list" item="vo">
  66. <tr>
  67. <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}">{$vo.id}</td>
  68. <td>{$vo.real_name}[{$vo.name|default='会员'}]</td>
  69. <td>{$vo['description']?$vo['description']:lang('NOT_FILLED')}</td>
  70. <td>{$vo['change']?$vo['change']:lang('NOT_FILLED')}</td>
  71. <td>{$vo.pay_money}</td>
  72. <td>{$vo.balance}</td>
  73. <td>
  74. {:date('Y-m-d H:i:s',$vo['create_time'])}
  75. </td>
  76. <td>
  77. <switch name="vo.status">
  78. <case value="1">
  79. <span class="text-primary">待审核</span>
  80. </case>
  81. <case value="2">
  82. <span class="text-success">已通过</span>
  83. </case>
  84. <case value="3">
  85. <span class="text-danger">已驳回</span>
  86. </case>
  87. </switch>
  88. </td>
  89. <td>
  90. <if condition="$vo.status eq 1">
  91. <a class="btn btn-xs btn-success" onclick="doConfirm('{$vo.id}',2)">通过</a>
  92. <a class="btn btn-xs btn-warning" onclick="doConfirm('{$vo.id}',3)">驳回</a>
  93. </if>
  94. <a class="btn btn-xs btn-danger js-ajax-dialog-btn" href="{:url('account/del',array('id'=>$vo['id']))}" data-msg="确认删除?">删除</a>
  95. </td>
  96. </tr>
  97. </foreach>
  98. </tbody>
  99. </table>
  100. <div class="pagination">{$page}</div>
  101. </form>
  102. </div>
  103. <script src="__STATIC__/js/admin.js"></script>
  104. <script>
  105. function doDelete() {
  106. var ids = [];
  107. $(".js-check:checked").each(function () {
  108. var id = $(this).val();
  109. if (id > 0) {
  110. ids.push(id);
  111. }
  112. });
  113. if (ids.length <= 0) {
  114. showMsg('请先选择操作项');
  115. return false;
  116. }
  117. if(confirm('确定批量删除选择项?不可恢复')){
  118. $.post('/admin/account/del',{id:ids},function(res){
  119. if(res.code == 1){
  120. showMsg(res.msg);
  121. setTimeout(function () {
  122. location.reload();
  123. }, 800)
  124. }else{
  125. showMsg(res.msg);
  126. }
  127. },"json")
  128. }
  129. }
  130. /**
  131. * 审核驳回
  132. * @param id
  133. * @param status
  134. */
  135. function doConfirm(id, status){
  136. var checked = false;
  137. var msg = status==1? '确定通过?请填写备注' : '确定驳回?请填写原因';
  138. if(status!=1){
  139. checked = true;
  140. var remark = prompt(msg)
  141. }else{
  142. checked = confirm('确认审核通过?')
  143. }
  144. if (id>0 && remark && checked) {
  145. $.post('/admin/account/confirm', {id: id, status: status,remark:remark}, function (res) {
  146. if (res.code == 1) {
  147. showMsg(res.msg);
  148. setTimeout(function () {
  149. location.reload();
  150. }, 800)
  151. } else {
  152. showMsg(res.msg);
  153. }
  154. }, "json")
  155. }
  156. }
  157. </script>
  158. </body>
  159. </html>