Browse Source

Merge branch 'test01'

# Conflicts:
#	resources/views/admin/index.blade.php
#	resources/views/customer/vipCustomerList.blade.php
shensong 5 years ago
parent
commit
4a145dc200

+ 52 - 2
app/Http/Controllers/Admin/CustomerDepositController.php

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

+ 1 - 2
resources/views/admin/index.blade.php

@@ -75,7 +75,6 @@
75 75
                         <li @if(!isset($res['custreport/detail'])) style="display:none;list-style-type:none;" @endif><a data-href="{{url('admin/custreport/detailindex')}}" data-title="销售上报加粉数据" href="javascript:void(0)">销售上报加粉数据</a></li>
76 76
                         <li @if(!isset($res['custreport/disCostList'])) style="display:none;list-style-type:none;" @endif><a data-href="{{url('admin/custreport/disCostList')}}" data-title="上报地域投入数据" href="javascript:void(0)">上报地域投入数据</a></li>
77 77
                         <li @if(!isset($res['admin/qrcode'])) style="display:none;list-style-type:none;" @endif><a data-href="{{url('admin/admin/uploadQrcodeEdit')}}" data-title="微信二维码上传" href="javascript:void(0)">微信二维码上传</a></li>
78
-
79 78
                     </ul>
80 79
                 </dd>
81 80
             </dl>
@@ -87,7 +86,7 @@
87 86
                     </ul>
88 87
                 </dd>
89 88
             </dl>
90
-            <dl id="menu-deposit">
89
+            <dl id="menu-vip">
91 90
                 <dt @if(!isset($res['customer/vipManage'])) style="display:none;list-style-type:none;" @endif><i class="Hui-iconfont">&#xe692;</i> 会员管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
92 91
                 <dd>
93 92
                     <ul>

+ 1 - 1
resources/views/customer/vipCustomerCreate.blade.php

@@ -30,7 +30,7 @@
30 30
                 <label class="form-label col-xs-4 col-sm-2">
31 31
                     生日:</label>
32 32
                 <div class="formControls col-xs-6 col-sm-6">
33
-                    <input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" autocomplete="off" class="input-text Wdate" name="birthday" value="{{old('birthday')}}">
33
+                    <input type="text" onfocus="WdatePicker({dateFmt:'MM-dd'})" autocomplete="off" class="input-text Wdate" name="birthday" value="{{old('birthday')}}">
34 34
                     <br>
35 35
                 </div>
36 36
             </div>

+ 1 - 1
resources/views/customer/vipCustomerEdit.blade.php

@@ -41,7 +41,7 @@
41 41
                     <label class="form-label col-xs-4 col-sm-2">
42 42
                         生日:</label>
43 43
                     <div class="formControls col-xs-6 col-sm-6">
44
-                        <input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" autocomplete="off" class="input-text Wdate" name="birthday" value="{{$info['birthday']}}">
44
+                        <input type="text" onfocus="WdatePicker({ dateFmt:'MM-dd' })" autocomplete="off" class="input-text Wdate" name="birthday" value="{{date("m-d",strtotime($info['birthday']))}}">
45 45
                     </div>
46 46
                 </div>
47 47
             <div class="row cl">

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

@@ -53,6 +53,7 @@
53 53
                 <td class="text-c">{{$a['vip_end_time']}}</td>
54 54
                 <td class="text-c">{{$a['birthday']}}</td>
55 55
                 <td class="text-c">{{$a['admin_name']}}</td>
56
+                <td class="text-c">{{date("m-d",strtotime($a['birthday']))}}</td>
56 57
                 <td class="text-c">{{$a['is_del'] == 0 ? '启用' : '禁用'}}</td>
57 58
                 <td class="f-14 product-brand-manage">
58 59
                     <a style="text-decoration:none" onClick='user_edit("{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>