123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- @extends('admin/master')
- @section('content')
- <body>
- @if(session('info'))
- <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
- {{session('info')}}
- </div>
- @endif
- <div class="page-container">
- <div>
- @if($self_role != '销售')
- <input class="input-text" style="width:6%;text-align:center" type="text" value="所属团队"/>
- <select style="width:10%;text-align:center" class="select-box" id='team_id' name="team_id">
- <option value="0" @if($team_id=='') selected @endif class="select-option">-- 选择团队 --</option>
- @foreach($teamlist as $v)
- <option value="{{$v['id']}}" @if($team_id==$v['id']) selected @endif class="select-option">{{$v['name']}}</option>
- @endforeach
- </select>
- <input class="input-text" style="width:6%;text-align:center" type="text" value="所属销售"/>
- <select style="width:8%;text-align:center" id='admin_id' class="select-box" name="admin_id">
- <option value="0" @if($admin_id=='') selected @endif class="select-option">-- 选择销售 --</option>
- @foreach($adminlist as $v)
- <option value="{{$v['id']}}" @if($admin_id==$v['id']) selected @endif class="select-option">{{$v['realname']}}</option>
- @endforeach
- </select>
- @endif
- <input class="input-text" style="width:6%;text-align:center" type="text" value="客户名"/>
- <input id="name" type="text" class="input-text" style="width:10%;text-align:center" name="name" value="{{$name?$name:''}}">
- <input class="input-text" style="width:6%;text-align:center" type="text" value="手机号"/>
- <input id="phone" type="text" class="input-text" style="width:10%;text-align:center" name="phone" value="{{$phone?$phone:''}}">
- <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
- <a class="btn btn-primary radius" onclick="user_add('新增')" href="javascript:;"><i class="Hui-iconfont"></i> 新增vip用户</a>
- <a class="btn btn-primary radius" onclick="user_export()" href="javascript:;"><i class="Hui-iconfont"></i>导出报表</a>
- </div>
- <div class="mt-20">
- <table class="table table-border table-bordered table-bg table-hover table-sort">
- <thead>
- <tr class="text-c">
- <th width="10%">姓名</th>
- <th width="10%">手机号</th>
- <th width="10%">到期时间</th>
- <th width="10%">生日</th>
- <th width="10%">销售</th>
- <th width="10%">金额</th>
- <th width="10%">支付方式</th>
- <th width="10%">代金券</th>
- <th width="10%">生日套餐</th>
- <th width="10%">每月礼品</th>
- {{--<th width="10%">状态</th>--}}
- <th width="10%">操作</th>
- </tr>
- </thead>
- <tbody>
- @if($result)
- @foreach($result as $a)
- <tr class="text-c">
- <td class="text-c">{{$a['name']}}</td>
- <td class="text-c">{{is_numeric($a['phone']) ? substr_replace($a['phone'], '****', 3, 4) : $a['phone']}}</td>
- <td class="text-c">{{$a['vip_end_time']}}</td>
- <td class="text-c">{{date("m-d",strtotime($a['birthday']))}}</td>
- <td class="text-c">{{$a['admin_name']}}</td>
- <td class="text-c">{{$a['price']}}</td>
- <td class="text-c">{{$a['payment']}}</td>
- <td class="text-c">{{$a['coupon']}}</td>
- <td class="text-c">{{$a['birthday_gift']}}</td>
- <td class="text-c">{{$a['month_gift']}}</td>
- <!-- <td class="text-c">{{$a['is_del'] == 0 ? '启用' : '禁用'}}</td> -->
- <td class="f-14 product-brand-manage">
- {{--<a style="text-decoration:none" onClick='user_edit("{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a><br><br>--}}
- @if($a['is_del']==0)
- <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/>
- @elseif($a['is_del']==1)
- <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/>
- @endif
- <a style="text-decoration:none" onClick='coupon_log("{{$a['phone']}}")' href="javascript:;" title="代金券使用记录"><span class="btn btn-primary radius">代金券</span></a><br><br>
- <a style="text-decoration:none" onClick='month_gift_log("{{$a['phone']}}")' href="javascript:;" title="每月礼品使用记录"><span class="btn btn-primary radius">每月礼</span></a><br><br>
- <a style="text-decoration:none" onClick='birthday_gift_log("{{$a['phone']}}")' href="javascript:;" title="生日套餐使用记录"><span class="btn btn-primary radius">生日礼</span></a>
- </td>
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- <div id="page" class="page_div"></div>
- </div>
- <!--_footer 作为公共模版分离出去-->
- <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
- <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--/_footer 作为公共模版分离出去-->
- <script type="text/javascript">
- $(function(){
- setTimeout("$('#info').hide()",3000);
- });
- /*添加会员*/
- function user_add(){
- location.href = '/admin/customer/vipCreate';
- }
- /*编辑会员*/
- function user_edit(id){
- location.href = "/admin/customer/vipUpdate?id="+id;
- }
- /*代金券记录*/
- function coupon_log(phone){
- location.href = "/admin/customer/couponLog?phone="+phone;
- }
- /*每月礼品领取记录*/
- function month_gift_log(phone){
- location.href = "/admin/customer/monthGiftLog?phone="+phone;
- }
- /*生日套餐领取记录*/
- function birthday_gift_log(phone){
- location.href = "/admin/customer/birthdayGiftLog?phone="+phone;
- }
- /*vip用户-禁用*/
- function user_del(obj,id){
- layer.confirm('确认要禁用吗?',function(index){
- $.ajax({
- type: 'GET',
- url: '/admin/customer/vipDel?id='+id,
- dataType: 'json',
- success: function(data){
- if(data == 1){
- location.reload();
- }
- }
- });
- });
- }
- /*vip用户-启用*/
- function user_up(obj,id){
- layer.confirm('确认要启用吗?',function(index){
- $.ajax({
- type: 'GET',
- url: '/admin/customer/vipUp?id='+id,
- dataType: 'json',
- success: function(data){
- if(data == 1){
- location.reload();
- }
- }
- });
- });
- }
- /*会员搜索*/
- function user_search(){
- var phone = $('#phone').val();
- var name = $('#name').val();
- var team_id = $('#team_id').val();
- var admin_id = $('#admin_id').val();
- location.href='vipList?page='+num + '&name='+name + '&phone='+phone + '&team_id=' + team_id + '&admin_id=' + admin_id;
- }
- /*会员导出*/
- function user_export(){
- var phone = $('#phone').val();
- var name = $('#name').val();
- var team_id = $('#team_id').val();
- var admin_id = $('#admin_id').val();
- location.href='vipExport?page='+num + '&name='+name + '&phone='+phone + '&team_id=' + team_id + '&admin_id=' + admin_id;
- }
- $("#page").paging({
- pageNo:{{$page}},
- totalPage: {{$pages}},
- totalSize: {{$count}},
- callback: function(num) {
- var phone = $('#phone').val();
- var name = $('#name').val();
- var team_id = $('#team_id').val();
- var admin_id = $('#admin_id').val();
- location.href='vipList?page='+num + '&name='+name + '&phone='+phone+ '&team_id=' + team_id + '&admin_id=' + admin_id;
- }
- })
- </script>
- </body>
- @endsection
|