Index.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!-- header start -->
  2. <include file="Public/Header" />
  3. <!-- header end -->
  4. <!-- right content start -->
  5. <div class="content-right">
  6. <div class="content">
  7. <!-- form start -->
  8. <form class="am-form view-list" action="{{:U('Admin/PrizeLogV2/Index')}}" method="post">
  9. <div class="am-g">
  10. <input type="text" class="am-radius form-keyword" placeholder="用户uid" name="keyword" value="{{$keyword}}" style="display: inline-block;width: 20rem;">
  11. <select name="prize_status" style="display: inline-block;width: 10rem;">
  12. <option value="-1">全部类型</option>
  13. <option value="1" <?php if($prize_status == 1):?>selected<?php endif;?>>中奖</option>
  14. <option value="0" <?php if($prize_status == 0):?>selected<?php endif;?>>不中奖</option>
  15. </select>
  16. <select name="act_id" style="display: inline-block;width: 10rem;">
  17. <option value="">全部活动</option>
  18. <?php foreach($acts as $act):?>
  19. <option value="<?php echo $act['id'];?>" <?php if($act_id == $act['id']):?>selected<?php endif;?>><?php echo $act['activity_name'];?></option>
  20. <?php endforeach;?>
  21. </select>
  22. <if condition="!IsMobile()">
  23. <a href="#" id="export" class="am-btn am-btn-success am-btn-xs m-l-10 am-icon-file-excel-o am-radius"> {{:L('common_operation_excel_export_name')}}</a>
  24. </if>
  25. <button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
  26. </div>
  27. </form>
  28. <table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
  29. <thead>
  30. <tr>
  31. <th>ID</th>
  32. <th class="am-hide-sm-only">用户id</th>
  33. <th class="am-hide-sm-only">是否会员</th>
  34. <th class="am-hide-sm-only">奖品名称</th>
  35. <th class="am-hide-sm-only">中奖时间</th>
  36. <th class="am-hide-sm-only">登记号码</th>
  37. <th class="am-hide-sm-only">登记联系人</th>
  38. <th class="am-hide-sm-only">登记地址</th>
  39. <th>{{:L('common_operation_name')}}</th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <if condition="!empty($List)">
  44. <?php $vip = [0=>'非会员',1=>'会员',2=>'双会员'];?>
  45. <foreach name="List" item="v">
  46. <tr id="data-list-{{$v.id}}">
  47. <input type="hidden" value="{{$v.id}}" />
  48. <td class="am-hide-sm-only">{{$v.id}}</td>
  49. <td class="am-hide-sm-only">{{$v.uid}}</td>
  50. <td class="am-hide-sm-only"><?php echo $vip[$v['is_vip']];?></td>
  51. <td class="am-hide-sm-only">{{$v['prize_name']}}</td>
  52. <td class="am-hide-sm-only">{{$v.created_at}}</td>
  53. <td class="am-hide-sm-only"> {{$v['user_phone']}}</td>
  54. <td class="am-hide-sm-only"> {{$v['receiver']}}</td>
  55. <td class="am-hide-sm-only"> {{$v['address']}}</td>
  56. <td class="view-operation">
  57. <button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/PrizeLogV2/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
  58. </td>
  59. </tr>
  60. </foreach>
  61. <else />
  62. <tr><td colspan="10" class="table-no">{{$act_id ? '没有记录':'请先选择活动'}}</td></tr>
  63. </if>
  64. </tbody>
  65. </table>
  66. <!-- list end -->
  67. <!-- page start -->
  68. <div id="pages" class="p">{{$page}}</div>
  69. <!-- page end -->
  70. </div>
  71. </div>
  72. <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
  73. <!-- right content end -->
  74. <script type="text/javascript">
  75. $("#export").on("click",function(){
  76. var keyword = $("input[name=keyword]").val();
  77. var prize_status = $("select[name=prize_status]").val();
  78. var act_id = $("select[name=act_id]").val();
  79. var params = '&keyword='+keyword+'&prize_status='+prize_status+'&act_id='+act_id;
  80. var url = 'index.php?m=Admin&c=PrizeLogV2&a=Index&model=exportExcel'+params;
  81. // alert(url);return ;
  82. window.open(url);
  83. });
  84. </script>
  85. <!-- footer start -->
  86. <include file="Public/Footer" />
  87. <!-- footer end