Browse Source

会员管理

shensong 5 years ago
parent
commit
a4891d908d

+ 18 - 0
app/CustomerGiftReceives.php

@@ -0,0 +1,18 @@
1
+<?php
2
+/**
3
+ * Created by PhpStorm.
4
+ * User: shensong
5
+ * Date: 2019/11/29
6
+ * Time: 17:31
7
+ */
8
+
9
+namespace App;
10
+
11
+
12
+use Illuminate\Database\Eloquent\Model;
13
+
14
+class CustomerGiftReceives extends Model
15
+{
16
+    protected $table = 'customer_gift_receives';
17
+    public $timestamps = false;
18
+}

+ 5 - 0
app/Http/Controllers/Admin/CustomerDepositController.php

@@ -7,6 +7,7 @@
7 7
  */
8 8
 namespace  App\Http\Controllers\Admin;
9 9
 use App\CustomerCoupons;
10
+use App\CustomerGiftReceives;
10 11
 use App\CustomerMonthGift;
11 12
 use App\CustomerVip;
12 13
 use App\Goods;
@@ -393,6 +394,10 @@ class CustomerDepositController extends Controller
393 394
             if( !empty($saler_ids) ) $query->whereIn('admin_id', $saler_ids);
394 395
         })->orderBy('id','desc')->offset($offset)->limit($pageSize)->get();
395 396
         $result = json_decode(json_encode($result),true);
397
+        foreach($result as &$value) {
398
+            $admin = Admin::find($value['admin_id']);
399
+            $value['admin_name'] = $admin->realname;
400
+        }
396 401
 
397 402
 
398 403
         $teamList = DB::table('teams')->select('id', 'name')->where(function($query) use($team_id, $self_role){

+ 4 - 0
app/Http/routes.php

@@ -316,6 +316,10 @@ Route::group(['prefix' => 'admin'], function(){
316 316
         Route::get('customer/giftEdit','Admin\CustomerDepositController@editMonthGift');
317 317
         Route::post('customer/giftStore','Admin\CustomerDepositController@monthGiftStore');
318 318
         Route::post('customer/giftUpdate','Admin\CustomerDepositController@monthGiftUpdate');
319
+
320
+        //检索会员信息
321
+        Route::get('customer/vipInformation','Admin\CustomerDepositController@queryVipView');
322
+        Route::post('customer/queryVip','Admin\CustomerDepositController@queryVipInformation');
319 323
     });
320 324
     
321 325
 });

+ 2 - 0
resources/views/customer/vipCustomerList.blade.php

@@ -39,6 +39,7 @@
39 39
                 <th width="10%">手机号</th>
40 40
                 <th width="10%">到期时间</th>
41 41
                 <th width="10%">生日</th>
42
+                <th width="10%">销售</th>
42 43
                 <th width="10%">状态</th>
43 44
                 <th width="10%">操作</th>
44 45
             </tr>
@@ -51,6 +52,7 @@
51 52
                 <td class="text-c">{{$a['phone']}}</td>
52 53
                 <td class="text-c">{{$a['vip_end_time']}}</td>
53 54
                 <td class="text-c">{{$a['birthday']}}</td>
55
+                <td class="text-c">{{$a['admin_name']}}</td>
54 56
                 <td class="text-c">{{$a['is_del'] == 0 ? '启用' : '禁用'}}</td>
55 57
                 <td class="f-14 product-brand-manage">
56 58
                     <a style="text-decoration:none" onClick='user_edit("{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>