Jelajahi Sumber

补充字段,将直发专线条件加入三级菜单,修饰页面。

Zhouzhendong 6 tahun lalu
induk
melakukan
3a91a2c763

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

@@ -69,7 +69,7 @@ class CarTypesController extends Controller
         $validator=Validator::make($request->input(),[
             'CarType.name'=>'required|max:50',
             'CarType.model'=>'nullable|alpha_dash|max:50',
-            'CarType.length'=>'required|numeric|min:0',
+            'CarType.length'=>'nullable|numeric|min:0',
             'CarType.load'=>'nullable|numeric|min:0',
         ],[
             'required'=>':attribute 为必填项',

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

@@ -68,7 +68,7 @@ class CarriersController extends Controller
     protected function validatorCarrier(Request $request){
         $validator=Validator::make($request->input(),[
             'Carrier.name'=>'max:50|required',
-            'Carrier.mobile'=>['required','regex:/^(0\d{6,10})|(1[3|4|5|7|8][0-9]\d{4,8})$/'],
+            'Carrier.mobile'=>['required','regex:/^(d{7,11})|(1[3|4|5|7|8][0-9]\d{4,8})$/'],
         ],[
             'digits_between'=>':attribute 最小一位,最大五十位',
             'required'=>':attribute 不应为空',

+ 25 - 5
app/Http/Controllers/WaybillFinancialExceptedController.php

@@ -15,12 +15,32 @@ class WaybillFinancialExceptedController extends Controller
     {
         if(!Gate::allows('财务报表-查询')){ return redirect(url('/'));  }
         $waybillFinancialSnapshots=WaybillFinancialExcepted::orderBy('id', 'DESC');
-        if ($request->input('type')=='直发车'){
-            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('json_content','like','%直发车%');
+        if ($request->input('created_at_start')){
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
+        }
+        if ($request->input('created_at_end')){
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
+        }
+        $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
+        return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'','excepted'=>true]);
+    }
+    public function indexZF(Request $request)
+    {
+        if(!Gate::allows('财务报表-查询')){ return redirect(url('/'));  }
+        $waybillFinancialSnapshots=WaybillFinancialExcepted::orderBy('id', 'DESC')->where('json_content','like','%直发车%');
+        if ($request->input('created_at_start')){
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
         }
-        if($request->input('type')=='专线'){
-            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('json_content','like','%专线%');
+        if ($request->input('created_at_end')){
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
         }
+        $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
+        return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'ZF','excepted'=>true]);
+    }
+    public function indexZX(Request $request)
+    {
+        if(!Gate::allows('财务报表-查询')){ return redirect(url('/'));  }
+        $waybillFinancialSnapshots=WaybillFinancialExcepted::orderBy('id', 'DESC')->where('json_content','like','%专线%');
         if ($request->input('created_at_start')){
             $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
         }
@@ -28,6 +48,6 @@ class WaybillFinancialExceptedController extends Controller
             $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
         }
         $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
-        return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>$request->input('type'),'excepted'=>true]);
+        return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'ZX','excepted'=>true]);
     }
 }

+ 34 - 10
app/Http/Controllers/WaybillFinancialSnapshotsController.php

@@ -15,12 +15,34 @@ class WaybillFinancialSnapshotsController extends Controller
     {
         if(!Gate::allows('财务报表-查询')){ return redirect(url('/'));  }
         $waybillFinancialSnapshots=WaybillFinancialSnapshot::orderBy('id', 'DESC');
-        if ($request->input('type')=='直发车'){
-            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('json_content','like','%直发车%');
+        if ($request->input('created_at_start')){
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
+        }
+        if ($request->input('created_at_end')){
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
+        }
+        $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
+        return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'']);
+    }
+
+    public function indexZF(Request $request)
+    {
+        if(!Gate::allows('财务报表-查询')){ return redirect(url('/'));  }
+        $waybillFinancialSnapshots=WaybillFinancialSnapshot::orderBy('id', 'DESC')->where('json_content','like','%直发车%');
+        if ($request->input('created_at_start')){
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
         }
-        if($request->input('type')=='专线'){
-            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('json_content','like','%专线%');
+        if ($request->input('created_at_end')){
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
         }
+        $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
+        return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'ZF']);
+    }
+
+    public function indexZX(Request $request)
+    {
+        if(!Gate::allows('财务报表-查询')){ return redirect(url('/'));  }
+        $waybillFinancialSnapshots=WaybillFinancialSnapshot::orderBy('id', 'DESC')->where('json_content','like','%专线%');
         if ($request->input('created_at_start')){
             $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
         }
@@ -28,7 +50,7 @@ class WaybillFinancialSnapshotsController extends Controller
             $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
         }
         $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
-        return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>$request->input('type')]);
+        return view('waybill.waybillFinancialSnapshot.index',['waybillFinancialSnapshots'=>$waybillFinancialSnapshots,'filterData'=>$request->input(),'type'=>'ZX']);
     }
 
     public function export($id){
@@ -53,6 +75,7 @@ class WaybillFinancialSnapshotsController extends Controller
             'carrier_weight'=>'承运商计重(抛)',
             'carrier_weight_unit'=>'承运商计重单位',
             'carType'=>'车型',
+            'car_owner_info'=>'车型',
             'fee'=>'运费(元)',
             'pick_up_fee'=>'提货费(元)',
             'other_fee'=>'其他费用(元)',
@@ -73,12 +96,12 @@ class WaybillFinancialSnapshotsController extends Controller
             $waybillFinancialSnapshot=json_decode($waybillFinancialSnapshot->json_content);
             $waybillAuditor='';
             $dispatchAuditor='';
-            foreach ($waybillFinancialSnapshot->waybill->waybillAuditLogs as $waybillAuditLog){
-                if ($waybillAuditLog->audit_stage=="运单阶段"){
-                    $waybillAuditor=$waybillAuditLog->user->name;
+            foreach ($waybillFinancialSnapshot->waybill->waybill_audit_logs as $waybill_audit_logs){
+                if ($waybill_audit_logs->audit_stage=="运单阶段"){
+                    $waybillAuditor=$waybill_audit_logs->user->name;
                 }
-                if ($waybillAuditLog->audit_stage=="调度阶段"){
-                    $dispatchAuditor=$waybillAuditLog->user->name;
+                if ($waybill_audit_logs->audit_stage=="调度阶段"){
+                    $dispatchAuditor=$waybill_audit_logs->user->name;
                 }
             };
             $w=[
@@ -101,6 +124,7 @@ class WaybillFinancialSnapshotsController extends Controller
                 'carrier_weight'=>isset($waybillFinancialSnapshot->waybill->carrier_weight)?$waybillFinancialSnapshot->waybill->carrier_weight:'',
                 'carrier_weight_unit'=>isset($waybillFinancialSnapshot->waybill->carrier_weight_unit->name)?$waybillFinancialSnapshot->waybill->carrier_weight_unit->name:'',
                 'carType'=>isset($waybillFinancialSnapshot->waybill->carType->name)?$waybillFinancialSnapshot->waybill->carType->name.($waybillFinancialSnapshot->waybill->carType->length.'米'):'',
+                'car_owner_info'=>isset($waybillFinancialSnapshot->waybill->car_owner_info)?$waybillFinancialSnapshot->waybill->car_owner_info:'',
                 'fee'=>isset($waybillFinancialSnapshot->waybill->fee)?$waybillFinancialSnapshot->waybill->fee:'',
                 'pick_up_fee'=>isset($waybillFinancialSnapshot->waybill->pick_up_fee)?$waybillFinancialSnapshot->waybill->pick_up_fee:'',
                 'other_fee'=>isset($waybillFinancialSnapshot->waybill->other_fee)?$waybillFinancialSnapshot->waybill->other_fee:'',

+ 141 - 17
app/Http/Controllers/WaybillsController.php

@@ -55,29 +55,145 @@ class WaybillsController extends Controller
             if ($request->input('created_at_end')){
                 $waybills=$waybills->where('created_at','<',$request->input('created_at_end'));
             }
-            if ($request->input('type')){
-                $waybills=$waybills->where('type','=',$request->input('type'));
-            }
             $waybills=$waybills->paginate($request->input('paginate')?$request->input('paginate'):50);
+            if (!$waybills&&$request->input('waybill_number')){
+                $waybills=Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
+                    return $query->with('user');
+                }])->orderBy('id','DESC')->where('type','专线')->where('waybill_number',$request->input('waybill_number'))
+                    ->paginate($request->input('paginate')?$request->input('paginate'):50);
+            }
             $carries = Carrier::get();
             $owners = Owner::get();
-            return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data]);
+            return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'']);
         } else {
             $waybills = Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
                 return $query->with('user');
             }])->paginate(50);
             $carries = Carrier::get();
             $owners = Owner::get();
-            return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data]);
+            return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'']);
+
+        }
+    }
+
+    public function indexZF(Request $request){
+        if(!Gate::allows('运单管理-查询')){ return redirect(url('/'));  }
+        $data=$request->input();
+        if ($data != null ) {
+            $today=Carbon::now()->subDays(15);
+            $waybills=Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
+                return $query->with('user');
+            }])->orderBy('id','DESC')->where('type','直发车');
+            if ($request->input('waybill_number')){
+                $waybills =$waybills->where('waybill_number','like','%'.$request->input('waybill_number').'%')->where('created_at','>',$today->format('Y-m-d'));
+            }
+            if ($request->input('carrier_bill')){
+                $waybills=$waybills->where('carrier_bill','like','%'.$request->input('carrier_bill').'%')->where('created_at','>',$today->format('Y-m-d'));
+            }
+            if ($request->input('carrier_id')){
+                $waybills=$waybills->where('carrier_id','=',$request->input('carrier_id'));
+            }
+            if ($request->input('owner_id')){
+                $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'));
+            }
+            if ($request->input('created_at_start')){
+                $waybills=$waybills->where('created_at','>',$request->input('created_at_start'));
+            }
+            if ($request->input('created_at_end')){
+                $waybills=$waybills->where('created_at','<',$request->input('created_at_end'));
+            }
+            $waybills=$waybills->paginate($request->input('paginate')?$request->input('paginate'):50);
+            if (!$waybills&&$request->input('waybill_number')){
+                $waybills=Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
+                    return $query->with('user');
+                }])->orderBy('id','DESC')->where('type','专线')->where('waybill_number',$request->input('waybill_number'))
+                    ->paginate($request->input('paginate')?$request->input('paginate'):50);
+            }
+            $carries = Carrier::get();
+            $owners = Owner::get();
+            return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'ZF']);
+        } else {
+            $waybills = Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
+                return $query->with('user');
+            }])->where('type','直发车')->paginate(50);
+            $carries = Carrier::get();
+            $owners = Owner::get();
+            return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'ZF']);
 
         }
     }
+
+    public function indexZX(Request $request){
+        if(!Gate::allows('运单管理-查询')){ return redirect(url('/'));  }
+        $data=$request->input();
+        if ($data != null ) {
+            $today=Carbon::now()->subDays(15);
+            $waybills=Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
+                return $query->with('user');
+            }])->orderBy('id','DESC')->where('type','专线');
+            if ($request->input('waybill_number')){
+                $waybills =$waybills->where('waybill_number','like','%'.$request->input('waybill_number').'%')->where('created_at','>',$today->format('Y-m-d'));
+            }
+            if ($request->input('carrier_bill')){
+                $waybills=$waybills->where('carrier_bill','like','%'.$request->input('carrier_bill').'%')->where('created_at','>',$today->format('Y-m-d'));
+            }
+            if ($request->input('carrier_id')){
+                $waybills=$waybills->where('carrier_id','=',$request->input('carrier_id'));
+            }
+            if ($request->input('owner_id')){
+                $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'));
+            }
+            if ($request->input('created_at_start')){
+                $waybills=$waybills->where('created_at','>',$request->input('created_at_start'));
+            }
+            if ($request->input('created_at_end')){
+                $waybills=$waybills->where('created_at','<',$request->input('created_at_end'));
+            }
+            $waybills=$waybills->paginate($request->input('paginate')?$request->input('paginate'):50);
+            if (!$waybills&&$request->input('waybill_number')){
+                $waybills=Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
+                    return $query->with('user');
+                }])->orderBy('id','DESC')->where('type','专线')->where('waybill_number',$request->input('waybill_number'))
+                    ->paginate($request->input('paginate')?$request->input('paginate'):50);
+            }
+            $carries = Carrier::get();
+            $owners = Owner::get();
+            return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'ZX']);
+        } else {
+            $waybills = Waybill::with(['owner', 'waybillAuditLogs' => function ($query) {
+                return $query->with('user');
+            }])->where('type','专线')->paginate(50);
+            $carries = Carrier::get();
+            $owners = Owner::get();
+            return view('waybill.index', ['waybills' => $waybills, 'carriers' => $carries, 'owners' => $owners,'filterData'=>$data,'uriType'=>'ZX']);
+
+        }
+    }
+
     public function create()
     {
         if(!Gate::allows('运单管理-录入')){ return redirect(url('/'));  }
         $owners=Owner::get();
         return view('waybill.create',['owners'=>$owners]);
     }
+    public function createZF()
+    {
+        if(!Gate::allows('运单管理-录入')){ return redirect(url('/'));  }
+        $owners=Owner::get();
+        return view('waybill.create',['owners'=>$owners,'type'=>'直发车']);
+    }
+    public function createZX()
+    {
+        if(!Gate::allows('运单管理-录入')){ return redirect(url('/'));  }
+        $owners=Owner::get();
+        return view('waybill.create',['owners'=>$owners,'type'=>'专线']);
+    }
 
     public function store(Request $request)
     {
@@ -96,7 +212,7 @@ class WaybillsController extends Controller
             'recipient'=>$data['recipient'],
             'recipient_mobile'=>$data['recipient_mobile'],
             'charge'=>$data['charge'],
-            'collect_fee'=>$data['charge'],
+            'collect_fee'=>isset($data['collect_fee'])?$data['collect_fee']:0,
             'ordering_remark'=>$data['ordering_remark']
         ]);
         $waybill->save();
@@ -263,26 +379,32 @@ class WaybillsController extends Controller
             ]);
             $waybillAuditLog->save();
             $waybillAuditLog['user']=Auth::user();
-            $waybillPayoff=WaybillPayoff::where('waybill_id','=',$id)->first();
-            $waybillPayoff->load(["waybill"]);
-            $waybillPayoff->waybill->load(["owner","carrier","origination_city","destination_city","warehouse_weight_unit","carrier_weight_unit","carType","waybillAuditLogs"]);
-            $waybillPayoff->waybill->waybillAuditLogs->load(["user"]);
-            $waybillPayoffJson=json_encode($waybillPayoff,JSON_UNESCAPED_UNICODE);
-            if ($waybill->waybill_price_model_id){
+            if ($waybill->waybill_price_model_id||$waybill->type=='直发车'){
+                $waybill->state='完结';
+                $result=$waybill->save();
+                $waybillPayoff=WaybillPayoff::where('waybill_id','=',$id)->first();
+                $waybillPayoff->load(["waybill"]);
+                $waybillPayoff->waybill->load(["owner","carrier","origination_city","destination_city","warehouse_weight_unit","carrier_weight_unit","carType","waybillAuditLogs"]);
+                $waybillPayoff->waybill->waybillAuditLogs->load(["user"]);
+                $waybillPayoffJson=json_encode($waybillPayoff,JSON_UNESCAPED_UNICODE);
                 WaybillFinancialSnapshot::create([
                     'waybill_id'=>$id,
                     'json_content'=>$waybillPayoffJson,
                 ]);
-                $waybill->state='完结';
+
             }else{
+                $waybill->state='未定义计费模型';
+                $result=$waybill->save();
+                $waybillPayoff=WaybillPayoff::where('waybill_id','=',$id)->first();
+                $waybillPayoff->load(["waybill"]);
+                $waybillPayoff->waybill->load(["owner","carrier","origination_city","destination_city","warehouse_weight_unit","carrier_weight_unit","carType","waybillAuditLogs"]);
+                $waybillPayoff->waybill->waybillAuditLogs->load(["user"]);
+                $waybillPayoffJson=json_encode($waybillPayoff,JSON_UNESCAPED_UNICODE);
                 WaybillFinancialExcepted::create([
                     'waybill_id'=>$id,
                     'json_content'=>$waybillPayoffJson,
                 ]);
-                $waybill->state='未定义计费模型';
             }
-
-            $result=$waybill->save();
             $this->log(__METHOD__,__FUNCTION__,$waybillPayoffJson,Auth::user()['id']);
             return ['success'=>$result,'state'=>$waybill->state,'waybillAuditLog'=>$waybillAuditLog];
         }
@@ -311,6 +433,7 @@ class WaybillsController extends Controller
             'carrier_weight'=>'承运商计重(抛)',
             'carrier_weight_unit'=>'承运商计重单位',
             'carType'=>'车型',
+            'car_owner_info'=>'车辆信息',
             'fee'=>'运费(元)',
             'pick_up_fee'=>'提货费(元)',
             'other_fee'=>'其他费用(元)',
@@ -357,6 +480,7 @@ class WaybillsController extends Controller
                 'carrier_weight'=>isset($waybill->carrier_weight)?$waybill->carrier_weight:'',
                 'carrier_weight_unit'=>isset($waybill->carrier_weight_unit_name)?$waybill->carrier_weight_unit_name:'',
                 'carType'=>isset($waybill->carType->name)?$waybill->carType->name.($waybill->carType->length.'米'):'',
+                'car_owner_info'=>isset($waybill->car_owner_info)?$waybill->car_owner_info:'',
                 'fee'=>isset($waybill->fee)?$waybill->fee:'',
                 'pick_up_fee'=>isset($waybill->pick_up_fee)?$waybill->pick_up_fee:'',
                 'other_fee'=>isset($waybill->other_fee)?$waybill->other_fee:'',
@@ -378,7 +502,7 @@ class WaybillsController extends Controller
             'origination'=>'required|max:255',
             'destination'=>'required|max:255',
             'recipient'=>'required|max:50',
-            'recipient_mobile'=>['required','regex:/^(0\d{6,10})|(1[3|4|5|7|8][0-9]\d{4,8})$/'],
+            'recipient_mobile'=>['required','regex:/^(\d{7,11})|(1[3|4|5|7|8][0-9]\d{4,8})$/'],
             'charge'=>'required|min:0|numeric',
             'collect_fee'=>'nullable|min:0|numeric',
         ],[

+ 1 - 1
app/Waybill.php

@@ -10,7 +10,7 @@ class Waybill extends Model
     protected $fillable=[
         'state','type','waybill_number','owner_id','wms_bill_number','origination','destination','recipient','recipient_mobile','charge','ordering_remark',
         'carrier_id','carrier_bill','origination_city_id','destination_city_id','warehouse_weight','warehouse_weight_unit_id','carrier_weight','carrier_weight_unit_id','carType_id',
-        'fee','pick_up_fee','other_fee','collect_fee','dispatch_remark','waybill_price_model_id'
+        'car_owner_info','fee','pick_up_fee','other_fee','collect_fee','dispatch_remark','waybill_price_model_id'
     ];
     protected $appends=[
         'origination_city_name',

+ 3 - 2
composer.json

@@ -10,7 +10,9 @@
     "require": {
         "php": "^7.1.3",
         "ext-json": "*",
+        "ext-mbstring": "*",
         "ext-openssl": "*",
+        "doctrine/dbal": "^2.10",
         "fideloper/proxy": "^4.0",
         "kitetail/zttp": "^0.6.0",
         "laravel/framework": "5.8.*",
@@ -18,8 +20,7 @@
         "maatwebsite/excel": "^3.1",
         "overtrue/laravel-pinyin": "^4.0",
         "predis/predis": "^1.1",
-        "pusher/pusher-php-server": "^4.0",
-      "ext-mbstring": "*"
+        "pusher/pusher-php-server": "^4.0"
     },
     "require-dev": {
         "barryvdh/laravel-debugbar": "^3.2",

File diff ditekan karena terlalu besar
+ 605 - 49
composer.lock


+ 35 - 0
database/migrations/2019_12_19_133403_change_way_bill_field.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeWayBillField extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+/*        Schema::table('waybills', function (Blueprint $table) {
+            $table->string('car_owner_info')->nullable()->comment('车辆所有人信息');
+        });*/
+        Schema::table('car_types',function (Blueprint $table){
+            $table->decimal('length')->nullable()->comment('车长')->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('waybills', function (Blueprint $table) {
+            $table->dropColumn('car_owner_info');
+        });
+    }
+}

+ 18 - 8
resources/views/waybill/create.blade.php

@@ -3,23 +3,31 @@
 @section('content')
     <div id="nav2">
         @component('waybill.menu')@endcomponent
+            <div class="container">
+                <div class="card" style="background: #f9f0f0;transform: scale(0.95)">
+                    <ul class="nav nav-pills">
+                        @can('运单管理-录入')
+                            <li class="nav-item">
+                                <a class="nav-link" href="{{url('waybill/create/ZX')}}" :class="{active:isActive('ZX',3)}">专线</a>
+                            </li> @endcan
+                        @can('运单管理-录入')
+                        <li class="nav-item">
+                            <a class="nav-link" href="{{url('waybill/create/ZF')}}" :class="{active:isActive('ZF',3)}">直发</a>
+                        </li> @endcan
+                    </ul>
+                </div>
+            </div>
     </div>
     <div class="container mt-3">
         <div class="card col-md-8 offset-md-2">
             <div class="card-body">
                 <form method="POST" action="{{ url('waybill') }}">
                     @csrf
-                    <div class="form-group row">
-                        <label for="type" class="col-2 col-form-label text-right text-primary">运单类型 *</label>
-                        <div class="col-8" style="padding-top: 1%">
-                            <label class="radio-inline"><input type="radio" name="type" value="直发车" checked>直发车</label>
-                            <label class="radio-inline" style="margin-left: 5%"><input type="radio" name="type" value="专线">专线</label>
-                        </div>
-                    </div>
+                    <input name="type" hidden value="{{$type}}">
                     <div class="form-group row">
                         <label for="owner_id" class="col-2 col-form-label text-right text-primary">货主 *</label>
                         <div class="col-8">
-                            <select name="owner_id" class="form-control" style="width: 30%;height: 30px">
+                            <select name="owner_id" class="form-control" style="width: 30%">
                                 @foreach($owners as $owner)
                                     <option value="{{$owner->id}}">{{$owner->name}}</option>
                                 @endforeach
@@ -98,6 +106,7 @@
                             @enderror
                         </div>
                     </div>
+                    @if($type=='直发车')
                     <div class="form-group row">
                         <label for="collect_fee" class="col-2 col-form-label text-right text-muted">到付金额(元)</label>
                         <div class="col-8">
@@ -110,6 +119,7 @@
                             @enderror
                         </div>
                     </div>
+                    @endif
                     <div class="form-group row">
                         <label for="ordering_remark" class="col-2 col-form-label text-right text-muted">下单备注</label>
                         <div class="col-8">

+ 20 - 13
resources/views/waybill/edit.blade.php

@@ -80,7 +80,7 @@
                     <div class="form-group row">
                         <label for="carrier_id" class="col-2 col-form-label text-right text-primary">承运商 *</label>
                         <div class="col-8">
-                            <select name="carrier_id" class="form-control" id="carrier_id" v-model="waybillPriceModel.carrier_id" style="width: 30%;height: 30px" @change="isCarrier($event)">
+                            <select name="carrier_id" class="form-control" id="carrier_id" v-model="waybillPriceModel.carrier_id" style="width: 30%; " @change="isCarrier($event)">
                                 @foreach($carriers as $carrier)
                                     <option value="{{$carrier->id}}">{{$carrier->name}}</option>
                                 @endforeach
@@ -108,7 +108,7 @@
                     <div class="form-group row">
                         <label for="origination_city_id" class="col-2 col-form-label text-right text-primary">始发市 *</label>
                         <div class="col-8 form-inline">
-                            <select class="form-control" name="origination_city_id" style="width: 30%;height: 30px" v-model="waybillPriceModel.origination_city_id">
+                            <select class="form-control" name="origination_city_id" style="width: 30%; " v-model="waybillPriceModel.origination_city_id">
                                 <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
                             </select>
                             <input class="form-control-sm" placeholder="输入关键字定位" @input="origination_city_name">
@@ -117,7 +117,7 @@
                     <div class="form-group row">
                         <label for="destination_city_id" class="col-2 col-form-label text-right text-primary">目的市 *</label>
                         <div class="col-8 form-inline">
-                            <select class="form-control" name="destination_city_id" id="destination_city_id" v-model="waybillPriceModel.destination_city_id" style="width: 30%;height: 30px" @change="isDestination_city($event)">
+                            <select class="form-control" name="destination_city_id" id="destination_city_id" v-model="waybillPriceModel.destination_city_id" style="width: 30%; " @change="isDestination_city($event)">
                                 <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
                             </select>
                             <input class="form-control-sm" placeholder="输入关键字定位" @input="destination_city_id">
@@ -129,7 +129,7 @@
                         </div>
                     </div>
                     <div class="form-group row">
-                        <label for="warehouse_weight" class="col-2 col-form-label text-right text-primary">仓库计(抛) *</label>
+                        <label for="warehouse_weight" class="col-2 col-form-label text-right text-primary">仓库计(抛) *</label>
                         <div class="col-8">
                             <input type="text"  class="form-control @error('warehouse_weight') is-invalid @enderror"
                                    name="warehouse_weight" autocomplete="off" value="@if(old('warehouse_weight')){{ old('warehouse_weight') }}@else{{$waybill->warehouse_weight}}@endif"  >
@@ -141,9 +141,9 @@
                         </div>
                     </div>
                     <div class="form-group row">
-                        <label for="warehouse_weight_unit_id" class="col-2 col-form-label text-right text-primary">仓库计单位 *</label>
+                        <label for="warehouse_weight_unit_id" class="col-2 col-form-label text-right text-primary">仓库计单位 *</label>
                         <div class="col-8">
-                            <select class="form-control" name="warehouse_weight_unit_id" style="width: 30%;height: 30px">
+                            <select class="form-control" name="warehouse_weight_unit_id" style="width: 30%; ">
                                 @foreach($units as $unit)
                                     @if($unit->id==$waybill->warehouse_weight_unit_id)
                                         <option value="{{$unit->id}}" selected>{{$unit->name}}</option>
@@ -154,8 +154,9 @@
                             </select>
                         </div>
                     </div>
+                    @endif
                     <div class="form-group row">
-                        <label for="carrier_weight" class="col-2 col-form-label text-right text-primary">承运商计(抛) *</label>
+                        <label for="carrier_weight" class="col-2 col-form-label text-right text-primary">承运商计(抛) *</label>
                         <div class="col-8">
                             <input type="text" id="carrier_weight" class="form-control @error('carrier_weight') is-invalid @enderror"
                                    name="carrier_weight" autocomplete="off" v-model="waybillPriceModel.carrier_weight" @blur="isCarrier_weight($event)">
@@ -167,9 +168,9 @@
                         </div>
                     </div>
                     <div class="form-group row">
-                        <label for="carrier_weight_unit_id" class="col-2 col-form-label text-right text-primary">承运商计单位 *</label>
+                        <label for="carrier_weight_unit_id" class="col-2 col-form-label text-right text-primary">承运商计单位 *</label>
                         <div class="col-8">
-                            <select class="form-control" name="carrier_weight_unit_id" id="carrier_weight_unit_id" v-model="waybillPriceModel.carrier_weight_unit_id" style="width: 30%;height: 30px" @change="isCarrier_weight_unit($event)">
+                            <select class="form-control" name="carrier_weight_unit_id" id="carrier_weight_unit_id" v-model="waybillPriceModel.carrier_weight_unit_id" style="width: 30%; " @change="isCarrier_weight_unit($event)">
                                 @foreach($units as $unit)
                                     <option value="{{$unit->id}}">{{$unit->name}}</option>
                                 @endforeach
@@ -181,22 +182,28 @@
                             @enderror
                         </div>
                     </div>
-                    @endif
                     @if($waybill->type=="直发车")
                     <div class="form-group row">
                         <label for="carType_id" class="col-2 col-form-label text-right text-primary">车型 *</label>
                         <div class="col-8">
-                            <select class="form-control" name="carType_id" style="width: 30%;height: 30px">
+                            <select class="form-control" name="carType_id" style="width: 30%; ">
                                 @foreach($carTypes as $carType)
                                     @if($carType->id==$waybill->carType_id)
-                                        <option value="{{$carType->id}}" selected>{{$carType->name}}({{$carType->length}}米)</option>
+                                        <option value="{{$carType->id}}" selected>{{$carType->name}}@if($carType->length)({{$carType->length}}米)@endif</option>
                                     @else
-                                        <option value="{{$carType->id}}">{{$carType->name}}({{$carType->length}}米)</option>
+                                        <option value="{{$carType->id}}">{{$carType->name}}@if($carType->length)({{$carType->length}}米)@endif</option>
                                     @endif
                                 @endforeach
                             </select>
                         </div>
                     </div>
+                    <div class="form-group row">
+                        <label for="car_owner_info" class="col-2 col-form-label text-right text-primary">车辆信息</label>
+                        <div class="col-8">
+                            <input type="text" class="form-control"
+                                   name="car_owner_info" autocomplete="off" value="@if(old('car_owner_info')){{ old('car_owner_info') }}@else{{$waybill->car_owner_info}}@endif"  >
+                        </div>
+                    </div>
                     @endif
                     @if($waybill->type=="直发车")
                     <div class="form-group row">

+ 38 - 24
resources/views/waybill/index.blade.php

@@ -4,15 +4,34 @@
     <div id="nav2">
         @component('waybill.menu')
         @endcomponent
+        <div class="container">
+            <div class="card" style="background: #f9f0f0;transform: scale(0.95)">
+                <ul class="nav nav-pills">
+                    @can('运单管理-查询')
+                        <li class="nav-item">
+                            <a class="nav-link" href="{{url('waybill/index')}}" :class="{active:isActive('',3)}">全部</a>
+                        </li> @endcan
+                    @can('运单管理-查询')
+                        <li class="nav-item">
+                            <a class="nav-link" href="{{url('waybill/index/ZX')}}" :class="{active:isActive('ZX',3)}">专线</a>
+                        </li> @endcan
+                    @can('运单管理-查询')
+                        <li class="nav-item">
+                            <a class="nav-link" href="{{url('waybill/index/ZF')}}" :class="{active:isActive('ZF',3)}">直发</a>
+                        </li> @endcan
+
+                </ul>
+            </div>
+        </div>
     </div>
     <div id="list">
         <div class="card">
             <div class="card-body">
-                <form  method="GET" action="{{url('waybill')}}" style="margin-top: 1%" id="optionSubmit">
+                <form  method="GET" action="@if($uriType=='ZF'){{url('waybill/index/ZF')}}@elseif($uriType=='ZX'){{url('waybill/index/ZX')}}@else{{url('waybill/index')}}@endif" style="margin-top: 1%" id="optionSubmit">
                 <table class="table  table-sm table-bordered table-hover text-nowrap ">
                     <tr>
                         <td colspan="4"><div class="col" v-if="isBeingFilterConditions" style="padding:0">
-                                <a  href="{{url('waybill')}}"><span class="btn btn-warning text-dark">清除过滤条件</span></a>
+                                <a  href="@if($uriType=='ZF'){{url('waybill/index/ZF')}}@elseif($uriType=='ZX'){{url('waybill/index/ZX')}}@else{{url('waybill/index')}}@endif"><span class="btn btn-warning text-dark">清除过滤条件</span></a>
                             </div></td>
                     </tr>
                     <tr>
@@ -24,20 +43,14 @@
                                 <option value="500">500行</option>
                                 <option value="1000">1000行</option>
                             </select></td>
-                        <td><label style="margin-left: 2%">类型:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
-                            <select name="type" v-model="filterData.type" class="rounded  " @change="setType" style="height: 30px;width: 80px">
-                                <option></option>
-                                <option value="专线">专线</option>
-                                <option value="直发车">直发车车</option>
-                            </select></td>
-                        <td><label style="margin-left: 2%">货主:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+                        <td><label style="margin-left: 2%">货主:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                             <select name="owner_id" v-model="filterData.owner_id" class="rounded  " @change="setOwner" style="height: 30px;width: 80px">
                                 <option>    </option>
                                 @foreach($owners as $owner)
                                     <option value="{{$owner->id}}">{{$owner->name}}</option>
                                 @endforeach
                             </select></td>
-                        <td><label style="margin-left: 2%">承运商:</label>
+                        <td><label style="margin-left: 2%">承运商:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                             <select name="carrier_id" v-model="filterData.carrier_id" class="rounded  " @change="setCarrier" style="height: 30px;width: 80px">
                                 <option >    </option>
                                 @foreach($carriers as $carrier)
@@ -51,17 +64,16 @@
                             <input type="text" name="waybill_number" class="rounded  " v-model="filterData.waybill_number"></td>
                         <td><label style="margin-left: 2%">承运商单号:</label>
                             <input type="text"  name="carrier_bill" class="rounded  " v-model="filterData.carrier_bill"></td>
-                        <td><label style="margin-left: 2%"> 始发地:&nbsp;&nbsp;&nbsp;&nbsp;</label>
-                            <input type="text" name="origination" class="rounded  " v-model="filterData.origination"></td>
-                        <td><label style="margin-left: 2%"> 目的地:</label>
-                            <input type="text"  name="destination" class="rounded  " v-model="filterData.destination"><br></td>
-                    </tr>
-                    <tr>
                         <td><label style="margin-left: 2%"> WMS单号:&nbsp;&nbsp;</label>
                             <input type="text" name="wms_bill_number" class="rounded  " v-model="filterData.wms_bill_number"></td>
-                        <td><div><label style="margin-left: 1%"> 开始日期:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="date" name="created_at_start" class="rounded"  v-model="filterData.created_at_start"></div></td>
-                        <td colspan="2">
-                            <div><label style="margin-left: 1%"> 截至日期:&nbsp;&nbsp;</label><input type="date" class="rounded" name="created_at_end" v-model="filterData.created_at_end"></div></td>
+                    </tr>
+                    <tr>
+                        <td><div><label style="margin-left: 2%"> 始发地:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+                                <input type="text" name="origination" class="rounded  " v-model="filterData.origination"></div>
+                            <div><label style="margin-left: 2%"> 目的地:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+                                <input type="text"  name="destination" class="rounded  " v-model="filterData.destination"></div></td>
+                        <td><div><label style="margin-left: 1%"> 开始日期:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="date" name="created_at_start" class="rounded"  v-model="filterData.created_at_start"></div>
+                            <div><label style="margin-left: 1%"> 截至日期:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="date" class="rounded" name="created_at_end" v-model="filterData.created_at_end"></div></td>
                     </tr>
                     <tr>
                         <td colspan="5">
@@ -112,6 +124,7 @@
                 <th>承运商计重(抛)</th>
                 <th>承运商计重单位</th>
                 <th>车型</th>
+                <th>车辆信息</th>
                 <th>运费(元)</th>
                 <th>提货费(元)</th>
                 <th>其他费用(元)</th>
@@ -164,7 +177,8 @@
                 <td>@{{waybill.warehouse_weight_unit}}</td>
                 <td>@{{waybill.carrier_weight}}</td>
                 <td>@{{waybill.carrier_weight_unit}}</td>
-                <td><p v-if="waybill.carType">@{{ waybill.carType.name }}(@{{waybill.carType.length}}米)</p></td>
+                <td><p v-if="waybill.carType">@{{ waybill.carType.name }}<i v-if="waybill.carType.length">(@{{waybill.carType.length}}米)</i></p></td>
+                <td>@{{waybill.car_owner_info}}</td>
                 @can('运单管理-可见费用项')
                     <td><p v-if="waybill.type=='专线'">***</p><p v-else>@{{waybill.fee}}</p></td>
                 <td>@{{waybill.pick_up_fee}}</td>
@@ -206,7 +220,7 @@
                         carrier_bill:'{{$waybill->carrier_bill}}',origination_city:'{{$waybill->origination_city_name}}',
                         destination_city:'{{$waybill->destination_city_name}}',warehouse_weight:'{{$waybill->warehouse_weight}}',
                         warehouse_weight_unit:'{{$waybill->warehouse_weight_unit_name}}',carrier_weight:'{{$waybill->carrier_weight}}',
-                        carrier_weight_unit:'{{$waybill->carrier_weight_unit_name}}',@if($waybill->carType)carType:{!! $waybill->carType !!},@endif @can('运单管理-可见费用项') fee:'{{$waybill->fee}}',
+                        carrier_weight_unit:'{{$waybill->carrier_weight_unit_name}}',@if($waybill->carType)carType:{!! $waybill->carType !!},car_owner_info:'{{$waybill->car_owner_info}}',@endif @can('运单管理-可见费用项') fee:'{{$waybill->fee}}',
                         pick_up_fee:'{{$waybill->pick_up_fee}}',other_fee:'{{$waybill->other_fee}}',
                         collect_fee:'{{$waybill->collect_fee}}', @endif dispatch_remark:'{{$waybill->dispatch_remark}}',
                         waybillAuditLogs:{!! $waybill->waybillAuditLogs !!}
@@ -269,7 +283,7 @@
                     if(!confirm('确定要通过“'+waybill_number+'”的审核吗?')){return};
                     let _this=this;
                     let w;
-                    axios.post('waybill/waybillAudit', {id:id})
+                    axios.post(@if($uriType=='')'waybill/waybillAudit',@else'../waybillAudit', @endif{id:id})
                         .then(
                             function (response) {
                                 if (response.data.success){
@@ -302,7 +316,7 @@
                     if(!confirm('确定要驳回“'+waybill_number+'”的审核吗?')){return};
                     let _this=this;
                     let w;
-                    axios.post('waybill/waybillRetreatAudit', {id:id})
+                    axios.post(@if($uriType=='')'waybillRetreatAudit',@else'../waybillRetreatAudit',@endif {id:id})
                         .then(
                             function (response) {
                                 if (response.data.success){
@@ -332,7 +346,7 @@
                     if(!confirm('确定要通过“'+waybill_number+'”的终审吗?')){return};
                     let _this=this;
                     let w;
-                    axios.post('waybill/waybillEndAudit', {id:id})
+                    axios.post(@if($uriType=='')'waybill/waybillEndAudit',@else'../waybillEndAudit',@endif {id:id})
                         .then(
                             function (response) {
                                 if (response.data.success){

+ 2 - 2
resources/views/waybill/menu.blade.php

@@ -4,11 +4,11 @@
         <ul class="nav nav-pills">
             @can('运单管理-查询')
             <li class="nav-item">
-                <a class="nav-link" href="{{url('waybill')}}" :class="{active:isActive('',2)}">运单查询</a>
+                <a class="nav-link" href="{{url('waybill/index')}}" :class="{active:isActive('index',2)}">运单查询</a>
             </li> @endcan
             @can('运单管理-录入')
             <li class="nav-item">
-                <a class="nav-link" href="{{url('waybill/create')}}" :class="{active:isActive('create',2)}">运单录入</a>
+                <a class="nav-link" href="{{url('waybill/create/ZX')}}" :class="{active:isActive('create',2)}">运单录入</a>
             </li> @endcan
             @can('计费模型')
             <li class="nav-item">

+ 29 - 15
resources/views/waybill/waybillFinancialSnapshot/index.blade.php

@@ -2,20 +2,35 @@
 
 @section('content')
 <div id="editingPanel">
-    <form  method="get" action="@if(!isset($excepted)) {{url('waybill/waybillFinancialSnapshot')}} @else {{url('waybill/waybillFinancialExcepted')}} @endif ">
+
     <div  class="card" id="nav2">
         @component('waybill.menu')@endcomponent
 
             <div class="container">
                 <div class="card" style="background: #f9f0f0;transform: scale(0.95)">
-                    <div class="btn-group">
-                        <input type="submit" class="btn @if($type=='全部') btn-info @endif" name="type" value="全部"/>
-                        <input type="submit" class="btn @if($type=='直发车') btn-info @endif" name="type" value="直发车"/>
-                        <input type="submit" class="btn @if($type=='专线') btn-info @endif" name="type" value="专线"/>
-                    </div>
+                    <ul class="nav nav-pills">
+                        @can('财务报表-查询')
+                            <li class="nav-item">
+                                <a class="nav-link" href="@if(!isset($excepted)) {{url('waybill/waybillFinancialSnapshot')}} @else {{url('waybill/waybillFinancialExcepted')}} @endif" :class="{active:isActive('',3)}">全部</a>
+                            </li> @endcan
+                        @can('财务报表-查询')
+                            <li class="nav-item">
+                                <a class="nav-link" href="@if(!isset($excepted)) {{url('waybill/waybillFinancialSnapshot/ZX')}} @else {{url('waybill/waybillFinancialExcepted/ZX')}} @endif" :class="{active:isActive('ZX',3)}">专线</a>
+                            </li> @endcan
+                        @can('财务报表-查询')
+                            <li class="nav-item">
+                                <a class="nav-link" href="@if(!isset($excepted)) {{url('waybill/waybillFinancialSnapshot/ZF')}} @else {{url('waybill/waybillFinancialExcepted/ZF')}} @endif" :class="{active:isActive('ZF',3)}">直发</a>
+                            </li> @endcan
+
+                    </ul>
                 </div>
             </div>
     </div>
+    <form  method="get" action="@if(!isset($excepted))
+    @if($type=='ZF'){{url('waybill/waybillFinancialSnapshot/ZF')}}@elseif($type=='ZX'){{url('waybill/waybillFinancialSnapshot/ZX')}}@else{{url('waybill/waybillFinancialSnapshot')}}@endif
+    @else
+    @if($type=='ZF'){{url('waybill/waybillFinancialExcepted/ZF')}}@elseif($type=='ZX'){{url('waybill/waybillFinancialExcepted/ZX')}}@else{{url('waybill/waybillFinancialExcepted')}}@endif
+    @endif ">
     <div class="card-header">
         <label style="margin-left: 1%"> 开始日期:</label><input type="date" name="created_at_start" class="rounded"  v-model="filterData.created_at_start">
         <label style="margin-left: 1%"> 截至日期:</label><input type="date" class="rounded" name="created_at_end" v-model="filterData.created_at_end">
@@ -35,9 +50,7 @@
         <tr style="background: #E8E8E8;@if(isset($excepted)) color: red; @endif">
             @if(!isset($excepted))
             <th>
-                <label for="all">
-                    <input id="all" type="checkbox" @click="checkAll($event)">全选
-                </label>
+                <input id="all" type="checkbox" @click="checkAll($event)">全选
             </th>
             @endif
             <th>运单ID</th>
@@ -60,6 +73,7 @@
             <th>承运商计重(抛)</th>
             <th>承运商计重单位</th>
             <th>车型</th>
+            <th>车辆信息</th>
             <th>运费(元)</th>
             <th>提货费(元)</th>
             <th>其他费用(元)</th>
@@ -101,7 +115,8 @@
             <td><p v-if="json_content.waybill.warehouse_weight_unit&&json_content.waybill.warehouse_weight_unit.name">@{{json_content.waybill.warehouse_weight_unit.name}}</p></td>
             <td>@{{json_content.waybill.carrier_weight}}</td>
             <td><p v-if="json_content.waybill.carrier_weight_unit&&json_content.waybill.carrier_weight_unit.name">@{{json_content.waybill.carrier_weight_unit.name}}</p></td>
-            <td>@{{json_content.waybill.car_type.name}}</td>
+            <td><p v-if="json_content.waybill.car_type">@{{json_content.waybill.car_type.name}}</p></td>
+            <td>@{{json_content.waybill.car_owner_info}}</td>
             <td>@{{json_content.waybill.fee}}</td>
             <td>@{{json_content.waybill.pick_up_fee}}</td>
             <td>@{{json_content.waybill.other_fee}}</td>
@@ -110,12 +125,12 @@
             <td>@{{json_content.waybill.created_at}}</td>
             <td>
                 <ul style="list-style: none">
-                    <li  v-for="waybillAuditLog in json_content.waybill.waybillAuditLogs" v-if=waybillAuditLog.audit_stage==="运单阶段">@{{waybillAuditLog.user.name}}</li>
+                    <li  v-for="waybillAuditLog in json_content.waybill.waybill_audit_logs" v-if=waybillAuditLog.audit_stage==="运单阶段">@{{waybillAuditLog.user.name}}</li>
                 </ul>
             </td>
             <td>
                 <ul  style="list-style: none">
-                    <li v-for="waybillAuditLog in json_content.waybill.waybillAuditLogs" v-if=waybillAuditLog.audit_stage==="调度阶段">@{{waybillAuditLog.user.name}}</li>
+                    <li v-for="waybillAuditLog in json_content.waybill.waybill_audit_logs" v-if=waybillAuditLog.audit_stage==="调度阶段">@{{waybillAuditLog.user.name}}</li>
                 </ul>
             </td>
             <td>@{{json_content.total_receivable}}</td>
@@ -143,13 +158,13 @@
     let editing= new Vue({
         el:'#editingPanel',
         data:{
-            @if(isset($waybillFinancialSnapshots)&&isset($waybillFinancialSnapshot->json_content))
             json_contents:[
+                @if(isset($waybillFinancialSnapshots))
                 @foreach($waybillFinancialSnapshots as $waybillFinancialSnapshot)
                     {!!$waybillFinancialSnapshot->json_content!!},
                 @endforeach
+                @endif
             ],
-            @endif
             checkData:[],
             filterData:{
                 created_at_start:'',created_at_end:'',
@@ -180,7 +195,6 @@
                         let pair=paramPair.split('=');
                         let key = pair[0], val = pair[1];
                         if(key==='type')return;
-                        console.log(uriParts);
                         $('input[name="'+key+'"]').val(val);
                         decodeURI(data.filterData[key]=val);
                     });

+ 9 - 0
routes/web.php

@@ -43,10 +43,19 @@ Route::resource('waybill/waybillPriceModel','WaybillPriceModelsController');
 Route::get('waybill/waybillPriceModel/excel/goImport',function (){return view('waybill.waybillPriceModel.import');});
 Route::get('waybill/waybillPriceModel/cities/{province_id}','WaybillPriceModelsController@getCities');
 
+Route::get('waybill/waybillFinancialSnapshot/ZF','WaybillFinancialSnapshotsController@indexZF');
+Route::get('waybill/waybillFinancialSnapshot/ZX','WaybillFinancialSnapshotsController@indexZX');
+Route::get('waybill/waybillFinancialExcepted/ZF','WaybillFinancialExceptedController@indexZF');
+Route::get('waybill/waybillFinancialExcepted/ZX','WaybillFinancialExceptedController@indexZX');
 Route::resource('waybill/waybillFinancialSnapshot','WaybillFinancialSnapshotsController');
 Route::resource('waybill/waybillFinancialExcepted','WaybillFinancialExceptedController');
 
+Route::any('waybill/create/ZF','WaybillsController@createZF');
+Route::any('waybill/create/ZX','WaybillsController@createZX');
+Route::get('waybill/index','WaybillsController@index');
 Route::resource('waybill','WaybillsController');
+Route::get('waybill/index/ZF','WaybillsController@indexZF');
+Route::get('waybill/index/ZX','WaybillsController@indexZX');
 Route::post('waybill/is/waybillPriceModel','WaybillsController@isWaybillPriceModel');
 Route::any('waybill/waybillAudit','WaybillsController@waybillAudit');
 Route::any('waybill/waybillEdit/{id}','WaybillsController@waybillEdit');

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini