|
@@ -379,7 +379,7 @@ class CustomerDepositController extends Controller
|
379
|
379
|
if($name) $query->where('name', 'like', '%'. $name. '%');
|
380
|
380
|
if($admin_id) $query->where('admin_id', $admin_id);
|
381
|
381
|
if( !empty($saler_ids) ) $query->whereIn('admin_id', $saler_ids);
|
382
|
|
- })->count();
|
|
382
|
+ })->where('is_del',0)->count();
|
383
|
383
|
if ($count > 1) {
|
384
|
384
|
// 总页数
|
385
|
385
|
$pages = ceil($count/$pageSize);
|
|
@@ -392,7 +392,7 @@ class CustomerDepositController extends Controller
|
392
|
392
|
if($name) $query->where('name', 'like', '%'. $name. '%');
|
393
|
393
|
if($admin_id) $query->where('admin_id', $admin_id);
|
394
|
394
|
if( !empty($saler_ids) ) $query->whereIn('admin_id', $saler_ids);
|
395
|
|
- })->orderBy('id','desc')->offset($offset)->limit($pageSize)->get();
|
|
395
|
+ })->where('is_del',0)->orderBy('id','desc')->offset($offset)->limit($pageSize)->get();
|
396
|
396
|
$result = json_decode(json_encode($result),true);
|
397
|
397
|
|
398
|
398
|
$result = array_map(function($value){
|
|
@@ -412,6 +412,14 @@ class CustomerDepositController extends Controller
|
412
|
412
|
$admin = Admin::find($value['admin_id']);
|
413
|
413
|
$item['admin_name'] = $admin->realname;
|
414
|
414
|
$item['phone'] = is_numeric($item['phone']) ? substr_replace($item['phone'], '****', 3, 4) : $item['phone'];
|
|
415
|
+
|
|
416
|
+ if($item['payment_type'] == 1){
|
|
417
|
+ $item['payment'] = '微信支付';
|
|
418
|
+ } else if($item['payment_type'] == 3){
|
|
419
|
+ $item['payment'] = '个体户支付';
|
|
420
|
+ } else {
|
|
421
|
+ $item['payment'] = '';
|
|
422
|
+ }
|
415
|
423
|
return $item;
|
416
|
424
|
},$result);
|
417
|
425
|
|
|
@@ -486,6 +494,7 @@ class CustomerDepositController extends Controller
|
486
|
494
|
$customerVip->vip_end_time = date('Y-m-d H:i:s',strtotime('+1 year'));
|
487
|
495
|
$customerVip->birthday = date('Y',time()).'-'.$request->input('birthday');
|
488
|
496
|
$customerVip->price = $request->input('price');
|
|
497
|
+ $customerVip->payment_type = $request->input('payment_type',1);
|
489
|
498
|
$customerVip->is_del = 0;
|
490
|
499
|
|
491
|
500
|
if($customerVip->save()) {
|
|
@@ -540,6 +549,7 @@ class CustomerDepositController extends Controller
|
540
|
549
|
$customerVip->birthday = date('Y',time()).'-'.$request->input('birthday');
|
541
|
550
|
$customerVip->admin_id = $request->input('admin_id');
|
542
|
551
|
$customerVip->price = $request->input('price');
|
|
552
|
+ $customerVip->payment_type = $request->input('payment_type',1);
|
543
|
553
|
if($customerVip->save()){
|
544
|
554
|
return redirect('/admin/customer/vipList')->with('info', '编辑成功');
|
545
|
555
|
} else {
|