Няма описание

vipCustomerList.blade.php 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. <a class="btn btn-primary radius" onclick="user_export()" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i>导出报表</a>
  34. </div>
  35. <div class="mt-20">
  36. <table class="table table-border table-bordered table-bg table-hover table-sort">
  37. <thead>
  38. <tr class="text-c">
  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. <th width="10%">操作</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. @if($result)
  55. @foreach($result as $a)
  56. <tr class="text-c">
  57. <td class="text-c">{{$a['name']}}</td>
  58. <td class="text-c">{{is_numeric($a['phone']) ? substr_replace($a['phone'], '****', 3, 4) : $a['phone']}}</td>
  59. <td class="text-c">{{$a['vip_end_time']}}</td>
  60. <td class="text-c">{{date("m-d",strtotime($a['birthday']))}}</td>
  61. <td class="text-c">{{$a['admin_name']}}</td>
  62. <td class="text-c">{{$a['price']}}</td>
  63. <td class="text-c">{{$a['payment']}}</td>
  64. <td class="text-c">{{$a['coupon']}}</td>
  65. <td class="text-c">{{$a['birthday_gift']}}</td>
  66. <td class="text-c">{{$a['month_gift']}}</td>
  67. <!-- <td class="text-c">{{$a['is_del'] == 0 ? '启用' : '禁用'}}</td> -->
  68. <td class="f-14 product-brand-manage">
  69. {{--<a style="text-decoration:none" onClick='user_edit("{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a><br><br>--}}
  70. @if($a['is_del']==0)
  71. <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/>
  72. @elseif($a['is_del']==1)
  73. <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/>
  74. @endif
  75. <a style="text-decoration:none" onClick='coupon_log("{{$a['phone']}}")' href="javascript:;" title="代金券使用记录"><span class="btn btn-primary radius">代金券</span></a><br><br>
  76. <a style="text-decoration:none" onClick='month_gift_log("{{$a['phone']}}")' href="javascript:;" title="每月礼品使用记录"><span class="btn btn-primary radius">每月礼</span></a><br><br>
  77. <a style="text-decoration:none" onClick='birthday_gift_log("{{$a['phone']}}")' href="javascript:;" title="生日套餐使用记录"><span class="btn btn-primary radius">生日礼</span></a>
  78. </td>
  79. </tr>
  80. @endforeach
  81. @endif
  82. </tbody>
  83. </table>
  84. </div>
  85. <div id="page" class="page_div"></div>
  86. </div>
  87. <!--_footer 作为公共模版分离出去-->
  88. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  89. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  90. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  91. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  92. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  93. <!--/_footer 作为公共模版分离出去-->
  94. <!--/_footer 作为公共模版分离出去-->
  95. <script type="text/javascript">
  96. $(function(){
  97. setTimeout("$('#info').hide()",3000);
  98. });
  99. /*添加会员*/
  100. function user_add(){
  101. location.href = '/admin/customer/vipCreate';
  102. }
  103. /*编辑会员*/
  104. function user_edit(id){
  105. location.href = "/admin/customer/vipUpdate?id="+id;
  106. }
  107. /*代金券记录*/
  108. function coupon_log(phone){
  109. location.href = "/admin/customer/couponLog?phone="+phone;
  110. }
  111. /*每月礼品领取记录*/
  112. function month_gift_log(phone){
  113. location.href = "/admin/customer/monthGiftLog?phone="+phone;
  114. }
  115. /*生日套餐领取记录*/
  116. function birthday_gift_log(phone){
  117. location.href = "/admin/customer/birthdayGiftLog?phone="+phone;
  118. }
  119. /*vip用户-禁用*/
  120. function user_del(obj,id){
  121. layer.confirm('确认要禁用吗?',function(index){
  122. $.ajax({
  123. type: 'GET',
  124. url: '/admin/customer/vipDel?id='+id,
  125. dataType: 'json',
  126. success: function(data){
  127. if(data == 1){
  128. location.reload();
  129. }
  130. }
  131. });
  132. });
  133. }
  134. /*vip用户-启用*/
  135. function user_up(obj,id){
  136. layer.confirm('确认要启用吗?',function(index){
  137. $.ajax({
  138. type: 'GET',
  139. url: '/admin/customer/vipUp?id='+id,
  140. dataType: 'json',
  141. success: function(data){
  142. if(data == 1){
  143. location.reload();
  144. }
  145. }
  146. });
  147. });
  148. }
  149. /*会员搜索*/
  150. function user_search(){
  151. var phone = $('#phone').val();
  152. var name = $('#name').val();
  153. var team_id = $('#team_id').val();
  154. var admin_id = $('#admin_id').val();
  155. location.href='vipList?page='+num + '&name='+name + '&phone='+phone + '&team_id=' + team_id + '&admin_id=' + admin_id;
  156. }
  157. /*会员导出*/
  158. function user_export(){
  159. var phone = $('#phone').val();
  160. var name = $('#name').val();
  161. var team_id = $('#team_id').val();
  162. var admin_id = $('#admin_id').val();
  163. location.href='vipExport?page='+num + '&name='+name + '&phone='+phone + '&team_id=' + team_id + '&admin_id=' + admin_id;
  164. }
  165. $("#page").paging({
  166. pageNo:{{$page}},
  167. totalPage: {{$pages}},
  168. totalSize: {{$count}},
  169. callback: function(num) {
  170. var phone = $('#phone').val();
  171. var name = $('#name').val();
  172. var team_id = $('#team_id').val();
  173. var admin_id = $('#admin_id').val();
  174. location.href='vipList?page='+num + '&name='+name + '&phone='+phone+ '&team_id=' + team_id + '&admin_id=' + admin_id;
  175. }
  176. })
  177. </script>
  178. </body>
  179. @endsection