Nessuna descrizione

vipCustomerList.blade.php 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. @if(session('info'))
  5. <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
  6. {{session('info')}}
  7. </div>
  8. @endif
  9. <div class="page-container">
  10. <div>
  11. @if($self_role != '销售')
  12. <input class="input-text" style="width:6%;text-align:center" type="text" value="所属团队"/>
  13. <select style="width:10%;text-align:center" class="select-box" id='team_id' name="team_id">
  14. <option value="0" @if($team_id=='') selected @endif class="select-option">-- 选择团队 --</option>
  15. @foreach($teamlist as $v)
  16. <option value="{{$v['id']}}" @if($team_id==$v['id']) selected @endif class="select-option">{{$v['name']}}</option>
  17. @endforeach
  18. </select>
  19. <input class="input-text" style="width:6%;text-align:center" type="text" value="所属销售"/>
  20. <select style="width:8%;text-align:center" id='admin_id' class="select-box" name="admin_id">
  21. <option value="0" @if($admin_id=='') selected @endif class="select-option">-- 选择销售 --</option>
  22. @foreach($adminlist as $v)
  23. <option value="{{$v['id']}}" @if($admin_id==$v['id']) selected @endif class="select-option">{{$v['realname']}}</option>
  24. @endforeach
  25. </select>
  26. @endif
  27. <input class="input-text" style="width:6%;text-align:center" type="text" value="客户名"/>
  28. <input id="name" type="text" class="input-text" style="width:10%;text-align:center" name="name" value="{{$name?$name:''}}">
  29. <input class="input-text" style="width:6%;text-align:center" type="text" value="手机号"/>
  30. <input id="phone" type="text" class="input-text" style="width:10%;text-align:center" name="phone" value="{{$phone?$phone:''}}">
  31. <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
  32. <a class="btn btn-primary radius" onclick="user_add('新增')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增vip用户</a>
  33. </div>
  34. <div class="mt-20">
  35. <table class="table table-border table-bordered table-bg table-hover table-sort">
  36. <thead>
  37. <tr class="text-c">
  38. <th width="10%">姓名</th>
  39. <th width="10%">手机号</th>
  40. <th width="10%">到期时间</th>
  41. <th width="10%">生日</th>
  42. <th width="10%">销售</th>
  43. <th width="10%">金额</th>
  44. <th width="10%">支付方式</th>
  45. <th width="10%">代金券</th>
  46. <th width="10%">生日套餐</th>
  47. <th width="10%">每月礼品</th>
  48. {{--<th width="10%">状态</th>--}}
  49. <th width="10%">操作</th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. @if($result)
  54. @foreach($result as $a)
  55. <tr class="text-c">
  56. <td class="text-c">{{$a['name']}}</td>
  57. <td class="text-c">{{$a['phone']}}</td>
  58. <td class="text-c">{{$a['vip_end_time']}}</td>
  59. <td class="text-c">{{date("m-d",strtotime($a['birthday']))}}</td>
  60. <td class="text-c">{{$a['admin_name']}}</td>
  61. <td class="text-c">{{$a['price']}}</td>
  62. <td class="text-c">{{$a['payment']}}</td>
  63. <td class="text-c">{{$a['coupon']}}</td>
  64. <td class="text-c">{{$a['birthday_gift']}}</td>
  65. <td class="text-c">{{$a['month_gift']}}</td>
  66. {{--<td class="text-c">{{$a['is_del'] == 0 ? '启用' : '禁用'}}</td>--}}
  67. <td class="f-14 product-brand-manage">
  68. <a style="text-decoration:none" onClick='user_edit("{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a><br><br>
  69. {{--@if($a['is_del']==0)--}}
  70. {{--<a style="text-decoration:none" class="ml-5" onClick="user_del(this, '{{$a["id"]}}')" href="javascript:;" title="禁用"><span class="btn btn-danger radius">禁用</span></a><br/><br/>--}}
  71. {{--@elseif($a['is_del']==1)--}}
  72. {{--<a style="text-decoration:none" class="ml-5" onClick="user_up(this, '{{$a['id']}}')" href="javascript:;" title="启用"><span class="btn btn-success radius">启用</span></a><br/><br/>--}}
  73. {{--@endif--}}
  74. <a style="text-decoration:none" onClick='coupon_log("{{$a['phone']}}")' href="javascript:;" title="代金券使用记录"><span class="btn btn-primary radius">代金券</span></a><br><br>
  75. <a style="text-decoration:none" onClick='month_gift_log("{{$a['phone']}}")' href="javascript:;" title="每月礼品使用记录"><span class="btn btn-primary radius">每月礼</span></a><br><br>
  76. <a style="text-decoration:none" onClick='birthday_gift_log("{{$a['phone']}}")' href="javascript:;" title="生日套餐使用记录"><span class="btn btn-primary radius">生日礼</span></a>
  77. </td>
  78. </tr>
  79. @endforeach
  80. @endif
  81. </tbody>
  82. </table>
  83. </div>
  84. <div id="page" class="page_div"></div>
  85. </div>
  86. <!--_footer 作为公共模版分离出去-->
  87. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  88. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  89. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  90. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  91. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  92. <!--/_footer 作为公共模版分离出去-->
  93. <!--/_footer 作为公共模版分离出去-->
  94. <script type="text/javascript">
  95. $(function(){
  96. setTimeout("$('#info').hide()",3000);
  97. });
  98. /*添加会员*/
  99. function user_add(){
  100. location.href = '/admin/customer/vipCreate';
  101. }
  102. /*编辑会员*/
  103. function user_edit(id){
  104. location.href = "/admin/customer/vipUpdate?id="+id;
  105. }
  106. /*代金券记录*/
  107. function coupon_log(phone){
  108. location.href = "/admin/customer/couponLog?phone="+phone;
  109. }
  110. /*每月礼品领取记录*/
  111. function month_gift_log(phone){
  112. location.href = "/admin/customer/monthGiftLog?phone="+phone;
  113. }
  114. /*生日套餐领取记录*/
  115. function birthday_gift_log(phone){
  116. location.href = "/admin/customer/birthdayGiftLog?phone="+phone;
  117. }
  118. /*vip用户-禁用*/
  119. function user_del(obj,id){
  120. layer.confirm('确认要禁用吗?',function(index){
  121. $.ajax({
  122. type: 'GET',
  123. url: '/admin/customer/vipDel?id='+id,
  124. dataType: 'json',
  125. success: function(data){
  126. if(data == 1){
  127. location.reload();
  128. }
  129. }
  130. });
  131. });
  132. }
  133. /*vip用户-启用*/
  134. function user_up(obj,id){
  135. layer.confirm('确认要启用吗?',function(index){
  136. $.ajax({
  137. type: 'GET',
  138. url: '/admin/customer/vipUp?id='+id,
  139. dataType: 'json',
  140. success: function(data){
  141. if(data == 1){
  142. location.reload();
  143. }
  144. }
  145. });
  146. });
  147. }
  148. /*会员搜索*/
  149. function user_search(){
  150. var phone = $('#phone').val();
  151. var name = $('#name').val();
  152. var team_id = $('#team_id').val();
  153. var admin_id = $('#admin_id').val();
  154. location.href='vipList?page='+num + '&name='+name + '&phone='+phone + '&team_id=' + team_id + '&admin_id=' + admin_id;
  155. }
  156. $("#page").paging({
  157. pageNo:{{$page}},
  158. totalPage: {{$pages}},
  159. totalSize: {{$count}},
  160. callback: function(num) {
  161. var phone = $('#phone').val();
  162. var name = $('#name').val();
  163. var team_id = $('#team_id').val();
  164. var admin_id = $('#admin_id').val();
  165. location.href='vipList?page='+num + '&name='+name + '&phone='+phone+ '&team_id=' + team_id + '&admin_id=' + admin_id;
  166. }
  167. })
  168. </script>
  169. </body>
  170. @endsection