|
@@ -464,7 +464,7 @@ class CustomerDepositController extends Controller
|
464
|
464
|
$customerVip->discount = 95;
|
465
|
465
|
$customerVip->create_time = date('Y-m-d H:i:s',time());
|
466
|
466
|
$customerVip->vip_end_time = date('Y-m-d H:i:s',strtotime('+1 year'));
|
467
|
|
- $customerVip->birthday = $request->input('birthday');
|
|
467
|
+ $customerVip->birthday = date('Y',time()).$request->input('birthday');
|
468
|
468
|
$customerVip->is_del = 0;
|
469
|
469
|
|
470
|
470
|
if($customerVip->save()) {
|
|
@@ -516,7 +516,7 @@ class CustomerDepositController extends Controller
|
516
|
516
|
//修改vip用户信息
|
517
|
517
|
$customerVip = CustomerVip::findOrFail($id);
|
518
|
518
|
$customerVip->name = $request->input('name');
|
519
|
|
- $customerVip->birthday = $request->input('birthday');
|
|
519
|
+ $customerVip->birthday = date('Y',time()).$request->input('birthday');
|
520
|
520
|
$customerVip->admin_id = $request->input('admin_id');
|
521
|
521
|
if($customerVip->save()){
|
522
|
522
|
return redirect('/admin/customer/vipList')->with('info', '编辑成功');
|
|
@@ -701,4 +701,54 @@ class CustomerDepositController extends Controller
|
701
|
701
|
}
|
702
|
702
|
}
|
703
|
703
|
|
|
704
|
+ /**
|
|
705
|
+ * 查询会员信息页面
|
|
706
|
+ * @param Request $request
|
|
707
|
+ */
|
|
708
|
+ public function queryVipView(Request $request) {
|
|
709
|
+ return view('customer/customerInformationQuery');
|
|
710
|
+ }
|
|
711
|
+
|
|
712
|
+ /**
|
|
713
|
+ * 查询会员信息操作
|
|
714
|
+ * @param Request $request
|
|
715
|
+ */
|
|
716
|
+ public function queryVipInformation(Request $request) {
|
|
717
|
+ $phone = $request->input('phone');
|
|
718
|
+
|
|
719
|
+ #查询数据
|
|
720
|
+ $customer = CustomerVip::where('phone',$phone)->first();
|
|
721
|
+ if(!$customer){
|
|
722
|
+ //不是会员
|
|
723
|
+ $couponsList = null;
|
|
724
|
+ $giftList = null;
|
|
725
|
+ } else {
|
|
726
|
+ $couponsList = CustomerCoupons::where('phone',$phone)->get();
|
|
727
|
+ $giftList = CustomerGiftReceives::where('phone',$phone)->where('is_del',0)->get();
|
|
728
|
+ }
|
|
729
|
+
|
|
730
|
+ #处理数据
|
|
731
|
+ if($couponsList){
|
|
732
|
+ $coupons = array();
|
|
733
|
+ foreach($couponsList as $value) {
|
|
734
|
+ if($value['is_use'] == 1) {
|
|
735
|
+ $coupons['use']++;
|
|
736
|
+ } else {
|
|
737
|
+ $coupons['nouse']++;
|
|
738
|
+ }
|
|
739
|
+ }
|
|
740
|
+ }
|
|
741
|
+
|
|
742
|
+ if($giftList){
|
|
743
|
+ $gifts = array();
|
|
744
|
+ foreach($giftList as $value) {
|
|
745
|
+ if($value['gift_type'] == 1){
|
|
746
|
+
|
|
747
|
+ } else if($value['gift_type'] == 0){
|
|
748
|
+
|
|
749
|
+ }
|
|
750
|
+ }
|
|
751
|
+ }
|
|
752
|
+ }
|
|
753
|
+
|
704
|
754
|
}
|