Ver código fonte

专线判定到付不存在
始发地目的地模糊搜索
home跳转后的路由
承运商计数

Zhouzhendong 6 anos atrás
pai
commit
ec9b3f0d8c

+ 6 - 1
app/Http/Controllers/HomeController.php

@@ -3,6 +3,7 @@
 namespace App\Http\Controllers;
 
 use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Gate;
 
 class HomeController extends Controller
 {
@@ -23,6 +24,10 @@ class HomeController extends Controller
      */
     public function index()
     {
-        return view('home');
+        if(!Gate::allows('退货管理-查询')){
+            if(!Gate::allows('运输管理-查询')){ return view('home');}
+            return redirect(url('waybill'));
+        }
+        return view('rejected');
     }
 }

+ 1 - 1
app/Http/Controllers/WaybillFinancialSnapshotsController.php

@@ -124,7 +124,7 @@ class WaybillFinancialSnapshotsController extends Controller
                 'warehouse_weight_other'=>isset($waybillFinancialSnapshot->waybill->warehouse_weight_other)?
                     $waybillFinancialSnapshot->waybill->warehouse_weight_other.' '.(isset($waybillFinancialSnapshot->waybill->warehouse_weight_unit_other_name)?$waybillFinancialSnapshot->waybill->warehouse_weight_unit_other_name:''):'',
                 'carrier_weight'=>isset($waybillFinancialSnapshot->waybill->carrier_weight)?
-                        $waybillFinancialSnapshot->waybill->carrier_weight.' '.(isset($waybillFinancialSnapshot->waybill->warehouse_weight_unit_other_name)?$waybillFinancialSnapshot->waybill->warehouse_weight_unit_other_name:''):'',
+                        $waybillFinancialSnapshot->waybill->carrier_weight.' '.(isset($waybillFinancialSnapshot->waybill->warehouse_weight_unit_name)?$waybillFinancialSnapshot->waybill->warehouse_weight_unit_name:''):'',
                 'carrier_weight_other'=>isset($waybillFinancialSnapshot->waybill->carrier_weight_other)?
                     $waybillFinancialSnapshot->waybill->carrier_weight_other.' '.(isset($waybillFinancialSnapshot->waybill->carrier_weight_unit_other_name)?$waybillFinancialSnapshot->waybill->carrier_weight_unit_other_name:''):'',
                 'carType'=>isset($waybillFinancialSnapshot->waybill->carType->name)?$waybillFinancialSnapshot->waybill->carType->name.($waybillFinancialSnapshot->waybill->carType->length.'米'):'',

+ 9 - 2
app/Http/Controllers/WaybillsController.php

@@ -47,7 +47,13 @@ class WaybillsController extends Controller
                 $waybills=$waybills->where('owner_id','=',$request->input('owner_id'));
             }
             if ($request->input('wms_bill_number')){
-                $waybills=$waybills->where('wms_bill_number','like','$'.$request->input('wms_bill_number').'%')->where('created_at','>',$today->format('Y-m-d'));
+                $waybills=$waybills->where('wms_bill_number','like','%'.$request->input('wms_bill_number').'%')->where('created_at','>',$today->format('Y-m-d'));
+            }
+            if ($request->input('origination')){
+                $waybills=$waybills->where('origination','like','%'.$request->input('origination').'%')->where('created_at','>',$today->format('Y-m-d'));
+            }
+            if ($request->input('destination')){
+                $waybills=$waybills->where('destination','like','%'.$request->input('destination').'%')->where('created_at','>',$today->format('Y-m-d'));
             }
             if ($request->input('created_at_start')){
                 $waybills=$waybills->where('created_at','>',$request->input('created_at_start'));
@@ -279,7 +285,8 @@ class WaybillsController extends Controller
                     $waybill->waybill_price_model_id=$waybillPriceModel_id;
                 }
                 $waybill->save();
-                $total_receivable=($waybill->charge);
+                if ($waybill->charge)$total_receivable=($waybill->charge);
+                elseif ($waybill->collect_fee)$total_receivable=($waybill->collect_fee);
                 $total_expense=($waybill->pick_up_fee)+($waybill->other_fee)+($waybill->fee);
             }
             if ($total_receivable){

+ 1 - 1
config/users.php

@@ -3,6 +3,6 @@
 return [
 
 
-    'superAdmin' => ['ldaaww','baoshi56','zhouyaping','shiyao'],
+    'superAdmin' => ['ldaaww','baoshi56','zhouyaping','shiyao','zhouzhendong'],
 
 ];

+ 1 - 1
resources/views/waybill/index.blade.php

@@ -249,7 +249,7 @@
                         ,carrier_bill:'',carrier_id:''
                         ,owner_id:'',wms_bill_number:''
                         ,created_at_start:'',created_at_end:''
-                        ,type:'',state:'',},
+                        ,type:'',state:'',origination:'',destination:'',},
 
             },
             computed:{