|
@@ -380,7 +380,7 @@ class CustomerDepositController extends Controller
|
380
|
380
|
if($name) $query->where('name', 'like', '%'. $name. '%');
|
381
|
381
|
if($admin_id) $query->where('admin_id', $admin_id);
|
382
|
382
|
if( !empty($saler_ids) ) $query->whereIn('admin_id', $saler_ids);
|
383
|
|
- })->count();
|
|
383
|
+ })->where('is_del',0)->count();
|
384
|
384
|
if ($count > 1) {
|
385
|
385
|
// 总页数
|
386
|
386
|
$pages = ceil($count/$pageSize);
|
|
@@ -393,7 +393,7 @@ class CustomerDepositController extends Controller
|
393
|
393
|
if($name) $query->where('name', 'like', '%'. $name. '%');
|
394
|
394
|
if($admin_id) $query->where('admin_id', $admin_id);
|
395
|
395
|
if( !empty($saler_ids) ) $query->whereIn('admin_id', $saler_ids);
|
396
|
|
- })->orderBy('id','desc')->offset($offset)->limit($pageSize)->get();
|
|
396
|
+ })->where('is_del',0)->orderBy('id','desc')->offset($offset)->limit($pageSize)->get();
|
397
|
397
|
$result = json_decode(json_encode($result),true);
|
398
|
398
|
|
399
|
399
|
$result = array_map(function($value){
|
|
@@ -420,6 +420,15 @@ class CustomerDepositController extends Controller
|
420
|
420
|
//销售人员
|
421
|
421
|
$item['admin_name'] = $admin->realname;
|
422
|
422
|
|
|
423
|
+ $item['phone'] = is_numeric($item['phone']) ? substr_replace($item['phone'], '****', 3, 4) : $item['phone'];
|
|
424
|
+
|
|
425
|
+ if($item['payment_type'] == 1){
|
|
426
|
+ $item['payment'] = '微信支付';
|
|
427
|
+ } else if($item['payment_type'] == 3){
|
|
428
|
+ $item['payment'] = '个体户支付';
|
|
429
|
+ } else {
|
|
430
|
+ $item['payment'] = '';
|
|
431
|
+ }
|
423
|
432
|
return $item;
|
424
|
433
|
},$result);
|
425
|
434
|
|
|
@@ -493,6 +502,8 @@ class CustomerDepositController extends Controller
|
493
|
502
|
$customerVip->create_time = date('Y-m-d H:i:s',time());
|
494
|
503
|
$customerVip->vip_end_time = date('Y-m-d H:i:s',strtotime('+1 year'));
|
495
|
504
|
$customerVip->birthday = date('Y',time()).'-'.$request->input('birthday');
|
|
505
|
+ $customerVip->price = $request->input('price');
|
|
506
|
+ $customerVip->payment_type = $request->input('payment_type',1);
|
496
|
507
|
$customerVip->is_del = 0;
|
497
|
508
|
|
498
|
509
|
if($customerVip->save()) {
|
|
@@ -546,6 +557,8 @@ class CustomerDepositController extends Controller
|
546
|
557
|
$customerVip->name = $request->input('name');
|
547
|
558
|
$customerVip->birthday = date('Y',time()).'-'.$request->input('birthday');
|
548
|
559
|
$customerVip->admin_id = $request->input('admin_id');
|
|
560
|
+ $customerVip->price = $request->input('price');
|
|
561
|
+ $customerVip->payment_type = $request->input('payment_type',1);
|
549
|
562
|
if($customerVip->save()){
|
550
|
563
|
return redirect('/admin/customer/vipList')->with('info', '编辑成功');
|
551
|
564
|
} else {
|