sunhao 5 年 前
コミット
d62ee12ba1
共有2 個のファイルを変更した4 個の追加3 個の削除を含む
  1. 3 3
      app/Http/Controllers/Admin/OrderController.php
  2. 1 0
      resources/views/order/ordercreate.blade.php

+ 3 - 3
app/Http/Controllers/Admin/OrderController.php

@@ -345,6 +345,7 @@ class OrderController extends Controller
345 345
             $customers['receiverDistrict'] = $order['receiverDistrict'];
346 346
             $customers['receiverStreet'] = $order['receiverStreet'];
347 347
             $customers['receiverAddress'] = $order['receiverAddress'];
348
+            $customers['fanTime'] = $request->input('fanTime');
348 349
 
349 350
             $if_e = DB::table('customers')->select('id')->where('phone', $order['receiverMobile'])->first();
350 351
             if(isset($if_e->id)){               
@@ -352,8 +353,7 @@ class OrderController extends Controller
352 353
                 $order['is_fugou'] = 1;
353 354
                 $up_c = DB::table('customers')->where('id', $if_e->id)->update($customers);
354 355
             }else{
355
-                $customers['phone'] = $order['receiverMobile'];
356
-                $customers['fanTime'] = $request->input('fanTime');
356
+                $customers['phone'] = $order['receiverMobile'];                
357 357
                 $customers['is_fugou'] = $order['is_fugou'];
358 358
                 $in_c = DB::table('customers')->insert($customers);
359 359
             }
@@ -1011,7 +1011,7 @@ class OrderController extends Controller
1011 1011
             exit('0');
1012 1012
         }
1013 1013
 
1014
-        $result = DB::table('customers')->select('receiverState', 'receiverCity', 'receiverDistrict', 'receiverStreet', 'receiverAddress')->where('phone', $phone)->first();
1014
+        $result = DB::table('customers')->select('receiverState', 'receiverCity', 'receiverDistrict', 'receiverStreet', 'receiverAddress', 'fanTime')->where('phone', $phone)->first();
1015 1015
         if(empty($result)) exit('0');
1016 1016
 
1017 1017
         $result = json_decode(json_encode($result), true);

+ 1 - 0
resources/views/order/ordercreate.blade.php

@@ -384,6 +384,7 @@
384 384
                             $("input[name=receiverDistrict]").val(data.receiverDistrict);
385 385
                             $("input[name=receiverStreet]").val(data.receiverStreet);
386 386
                             $("input[name=receiverAddress]").val(data.receiverAddress);
387
+                            $("input[name=fanTime]").val(data.fanTime);
387 388
                         }
388 389
                     }
389 390
                 })