Нет описания

user.blade.php 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. @extends('admin/master')
  2. @section('content')
  3. <body class="pos-r">
  4. @if(session('info'))
  5. <div class="Huialert Huialert-info" onclick="$(this).remove()">
  6. {{session('info')}}
  7. </div>
  8. @endif
  9. <div>
  10. <div class="page-container">
  11. <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="r">共有数据:<strong>{{$count}}</strong> 条</span> </div>
  12. <div style="float:right;margin:10px;">
  13. <label >是否完成注册:</label>
  14. <select name="phone_verified" id="" style="width: 100px;height: 30px">
  15. <option value="all">请选择</option>
  16. <option value="0" @if(session('phone_verified') == '0') selected @endif>未完成</option>
  17. <option value="1" @if(session('phone_verified') == '1') selected @endif>已完成</option>
  18. </select>
  19. <!-- <label>渠道号:</label>
  20. <input type="text" class="input-text" style="width:80px;" value="@if(isset($qudao)){{$qudao}}@endif" placeholder="" id="qudao" name="qudao">&nbsp;&nbsp; -->
  21. <label>开始时间:</label>
  22. <input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" id="stime" class="input-text Wdate" style="width:180px;" name="stime" value="{{session('s_timestamp')}}">
  23. <label>结束时间:</label>
  24. <input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" id="etime" class="input-text Wdate" style="width:180px;" name="etime" value="{{session('e_timestamp')}}">
  25. <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">检索</a>
  26. <a class="btn btn-primary radius" onclick="user_export()" href="javascript:;">导出</a>
  27. </div>
  28. <div class="mt-20">
  29. <table class="table table-border table-bordered table-bg table-hover table-sort">
  30. <thead>
  31. <tr class="text-c">
  32. <th width="20">ID</th>
  33. <th width="20">注册时间</th>
  34. <th width="20">用户名</th>
  35. <th width="20">手机号</th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. @foreach($users as $user)
  40. <tr class="text-c va-m" title="">
  41. <td class="text-l">{{$user['id']}}</td>
  42. <td class="text-l">{{$user['created_at']}}</td>
  43. <td class="text-l">@if(($user['name'])) {{$user['name']}} @else 用户名未填写 @endif</td>
  44. <td class="text-l">@if($user['mobile']) {{$user['mobile']}} @else 用户未填写 @endif</td>
  45. </tr>
  46. @endforeach
  47. </tbody>
  48. </table>
  49. </div>
  50. <div style="float: right;">
  51. <?php
  52. $presenter = new Illuminate\Pagination\BootstrapThreePresenter($users);
  53. ?>
  54. <div class="am-fr" style="position:relative; top: 30px;">
  55. <ul class="am-pagination">
  56. <?php echo $presenter->render(); ?>
  57. </ul>
  58. </div>
  59. </div>
  60. <br><br><br>
  61. </div>
  62. </div>
  63. <!--_footer 作为公共模版分离出去-->
  64. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  65. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  66. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  67. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  68. <!--/_footer 作为公共模版分离出去-->
  69. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  70. <script type="text/javascript">
  71. function user_search(){
  72. var qudao = $("#qudao").val() == ''? 'all' : $("#qudao").val();
  73. var s_datetime = $("#stime").val();
  74. var s_timestamp = Date.parse(new Date(s_datetime));
  75. s_timestamp = s_timestamp /1000;
  76. var e_datetime = $("#etime").val();
  77. var e_timestamp = Date.parse(new Date(e_datetime));
  78. e_timestamp = e_timestamp /1000;
  79. s_timestamp = isNaN(s_timestamp) ? 'all' : s_timestamp;
  80. e_timestamp = isNaN(e_timestamp) ? 'all' : e_timestamp;
  81. var phone_verified = $("select[name='phone_verified']").val();
  82. window.location.href="/admin/user/index/"+s_timestamp+"/"+e_timestamp+"/"+qudao+"/"+phone_verified;
  83. }
  84. function user_export(){
  85. var qudao = $("#qudao").val() == ''? 'all' : $("#qudao").val();
  86. var s_datetime = $("#stime").val();
  87. var s_timestamp = Date.parse(new Date(s_datetime));
  88. s_timestamp = s_timestamp /1000;
  89. var e_datetime = $("#etime").val();
  90. var e_timestamp = Date.parse(new Date(e_datetime));
  91. e_timestamp = e_timestamp /1000;
  92. if (isNaN(s_timestamp) && isNaN(e_timestamp) ) {
  93. alert('请选择合适的日期!')
  94. return
  95. }
  96. s_timestamp = isNaN(s_timestamp) ? 'all' : s_timestamp;
  97. e_timestamp = isNaN(e_timestamp) ? 'all' : e_timestamp;
  98. var phone_verified = $("select[name='phone_verified']").val();
  99. window.location.href="/admin/user/export/"+s_timestamp+"/"+e_timestamp+"/"+qudao+"/"+phone_verified;
  100. }
  101. </script>
  102. </body>
  103. @endsection