Przeglądaj źródła

Merge branch 'zzd'

# Conflicts:
#	bootstrap/cache/services.php
#	composer.lock
LD 6 lat temu
rodzic
commit
b95d33bdc6
43 zmienionych plików z 2598 dodań i 30 usunięć
  1. 110 0
      app/Http/Controllers/ClientController.php
  2. 84 0
      app/Http/Controllers/PriceModelExpressageController.php
  3. 84 0
      app/Http/Controllers/PriceModelLogisticController.php
  4. 84 0
      app/Http/Controllers/PriceModelNonstopController.php
  5. 84 0
      app/Http/Controllers/PriceModelStorageController.php
  6. 84 0
      app/Http/Controllers/PriceModelTaskController.php
  7. 5 0
      app/Http/Controllers/TestController.php
  8. 69 3
      app/Http/Controllers/WaybillsController.php
  9. 10 0
      app/Http/Controllers/api/thirdPart/weight/PackageController.php
  10. 12 0
      app/UploadFile.php
  11. 11 1
      app/Waybill.php
  12. 11 0
      bootstrap/cache/packages.php
  13. 4 3
      composer.json
  14. 1 1
      config/app.php
  15. 45 0
      database/migrations/2020_06_16_171741_create_upload_files_table.php
  16. BIN
      public/icon/img404-bulky.jpg
  17. BIN
      public/icon/img404-thumbnail.jpg
  18. 43 0
      resources/views/client/areaCheck/create.blade.php
  19. 160 0
      resources/views/client/areaCheck/index.blade.php
  20. 16 0
      resources/views/client/areaCheck/menu.blade.php
  21. 50 0
      resources/views/client/base/create.blade.php
  22. 163 0
      resources/views/client/base/index.blade.php
  23. 16 0
      resources/views/client/base/menu.blade.php
  24. 47 0
      resources/views/client/billCheck/create.blade.php
  25. 107 0
      resources/views/client/billCheck/index.blade.php
  26. 16 0
      resources/views/client/billCheck/menu.blade.php
  27. 145 0
      resources/views/client/instantBill/index.blade.php
  28. 25 0
      resources/views/client/menu.blade.php
  29. 154 0
      resources/views/client/performanceReport/index.blade.php
  30. 5 0
      resources/views/layouts/menu.blade.php
  31. 3 0
      resources/views/maintenance/menu.blade.php
  32. 168 0
      resources/views/maintenance/priceModel/expressage/index.blade.php
  33. 168 0
      resources/views/maintenance/priceModel/logistic/index.blade.php
  34. 25 0
      resources/views/maintenance/priceModel/menu.blade.php
  35. 168 0
      resources/views/maintenance/priceModel/nonstop/index.blade.php
  36. 30 0
      resources/views/maintenance/priceModel/storage/index.blade.php
  37. 168 0
      resources/views/maintenance/priceModel/task/index.blade.php
  38. 10 2
      resources/views/maintenance/role/index.blade.php
  39. 1 1
      resources/views/waybill/create.blade.php
  40. 156 18
      resources/views/waybill/index.blade.php
  41. 1 1
      resources/views/waybill/waybillFinancialSnapshot/index.blade.php
  42. 40 0
      routes/web.php
  43. 15 0
      tests/webApi/thirdPart/weight/PackageController.http

+ 110 - 0
app/Http/Controllers/ClientController.php

@@ -0,0 +1,110 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+class ClientController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        return view('client.base.index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('client.base.create');
+    }
+
+
+    public function areaCheckIndex(){
+        return view('client.areaCheck.index');
+    }
+
+
+    public function areaCheckCreate(){
+        return view('client.areaCheck.create');
+    }
+
+    public function billCheckIndex(){
+        return view('client.billCheck.index');
+    }
+
+
+    public function billCheckCreate(){
+        return view('client.billCheck.create');
+    }
+
+    public function performanceReportIndex(){
+        return view('client.performanceReport.index');
+    }
+    public function instantBillIndex(){
+        return view('client.instantBill.index');
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 84 - 0
app/Http/Controllers/PriceModelExpressageController.php

@@ -0,0 +1,84 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+class PriceModelExpressageController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        return view('maintenance.priceModel.expressage.index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 84 - 0
app/Http/Controllers/PriceModelLogisticController.php

@@ -0,0 +1,84 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+class PriceModelLogisticController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        return view('maintenance.priceModel.logistic.index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 84 - 0
app/Http/Controllers/PriceModelNonstopController.php

@@ -0,0 +1,84 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+class PriceModelNonstopController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        return view('maintenance.priceModel.nonstop.index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 84 - 0
app/Http/Controllers/PriceModelStorageController.php

@@ -0,0 +1,84 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+class PriceModelStorageController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        return view('maintenance.priceModel.storage.index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 84 - 0
app/Http/Controllers/PriceModelTaskController.php

@@ -0,0 +1,84 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+class PriceModelTaskController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        return view('maintenance.priceModel.task.index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 5 - 0
app/Http/Controllers/TestController.php

@@ -15,6 +15,7 @@ use App\Rejected;
 use App\RejectedBill;
 use App\RejectedBillItem;
 use App\Unit;
+use App\UploadFile;
 use App\User;
 use App\UserToken;
 use App\Waybill;
@@ -284,4 +285,8 @@ class TestController extends Controller
         }
         return "a";*/
     }
+    function test(){
+        $waybill=Waybill::with('uploadFile')->find(55);
+        dd($waybill,$waybill->upload_file_url);
+    }
 }

+ 69 - 3
app/Http/Controllers/WaybillsController.php

@@ -3,8 +3,7 @@
 namespace App\Http\Controllers;
 
 
-use App\Http\Controllers\Api\thirdPart\flux\WaybillController;
-use App\User;
+use App\UploadFile;
 use App\WaybillAuditLog;
 use App\WaybillPriceModel;
 use App\Carrier;
@@ -23,6 +22,7 @@ use Illuminate\Support\Facades\Auth;
 use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Gate;
 use Illuminate\Support\Facades\Validator;
+use Intervention\Image\Facades\Image;
 use Maatwebsite\Excel\Facades\Excel;
 use Ramsey\Uuid\Uuid;
 
@@ -60,7 +60,7 @@ class WaybillsController extends Controller
         }
         if ($request->input('owners')){
             $owners=array_values(json_decode($request->input('owners'),true));
-            $waybills=$waybills->whereIn('owner_id',$owners);
+            if (count($owners)>0)$waybills=$waybills->whereIn('owner_id',$owners);
         }
         if ($request->input('owner_id')){
             $waybills=$waybills->where('owner_id','=',$request->input('owner_id'));
@@ -577,6 +577,72 @@ class WaybillsController extends Controller
         return ['exception'=>'请勿重复审核!'];
     }
 
+    public function upload(Request $request){
+        if(!Gate::allows('运输管理-图片上传')){ return '没有权限';  }
+        $file=$request->file('file');
+        $waybill_number=$request->input('waybill_number');
+        $waybill=Waybill::where('waybill_number',$waybill_number)->first();
+        if (!$waybill){
+            return ['success'=>false,'error'=>"未找到该运单!"];
+        }
+        if ($waybill->upload_file_url){
+            return ['success'=>false,'error'=>"该运单已存在照片!"];
+        }
+        if (!$file){
+            return ['success'=>false,'error'=>"照片不得为空!"];
+        }
+        if (!$file->isValid()){
+            return ['success'=>false,'error'=>"找不到照片!"];
+        }
+        $tmpFile = $file->getRealPath();
+        if (! is_uploaded_file($tmpFile)) {
+            return ['success'=>false,'error'=>"文件错误!"];
+        }
+        $fileExtension=$file->getClientOriginalExtension();
+        // 5.存储, 生成一个随机文件名
+        $fileName = date('ymd').'-'.Uuid::uuid1();//thumbnail common bulky
+        $thumbnailName=storage_path('app\\public\\files\\'.$fileName.'-thumbnail.'.$fileExtension);
+        $commonName=storage_path('app\\public\\files\\'.$fileName.'-common.'.$fileExtension);
+        $bulkyName=storage_path('app\\public\\files\\'.$fileName.'-bulky.'.$fileExtension);
+        $result=move_uploaded_file ($tmpFile ,$bulkyName);
+        if ($result){
+            $img=Image::make($bulkyName);
+            if ($img->height() > $img->width())
+            $img->heighten(250)->save($commonName);
+            else $img->widen(250)->save($commonName);
+            $img->heighten(28)->save($thumbnailName);
+            $uploadFile=new UploadFile([
+                "table_name"=>"waybills",
+                "table_id"=>$waybill->id,
+                "url"=>'/files/'.$fileName,
+                "type"=>$fileExtension,
+            ]);
+            if ($uploadFile->save())
+            $this->log(__METHOD__,'图片上传',json_encode($request),Auth::user()['id']);
+            $uploadFile->url=asset('/storage'.$uploadFile->url);
+            return ['success'=>true,'data'=>$uploadFile];
+        }
+        return ['success'=>false,'error'=>"图片保存失败!"];
+    }
+
+    //删除照片
+    public function deleteImg(Request $request){
+        if(!Gate::allows('运输管理-图片删除')){ return '没有权限';  }
+        $ids=$request->input('ids');
+        $uploadFiles=UploadFile::where('table_name','waybills')->whereIn('table_id',$ids)->get();
+        foreach ($uploadFiles as $uploadFile){
+            $bulky=storage_path('app/public/'.$uploadFile->url.'-bulky.'.$uploadFile->type);
+            $common=storage_path('app/public/'.$uploadFile->url.'-common.'.$uploadFile->type);
+            $thumbnail=storage_path('app/public/'.$uploadFile->url.'-thumbnail.'.$uploadFile->type);
+            if (file_exists($bulky) && file_exists($common) && file_exists($thumbnail)){
+                unlink($bulky);unlink($common);unlink($thumbnail);
+            }
+        }
+        UploadFile::where('table_name','waybills')->whereIn('table_id',$ids)->delete();
+        $this->log(__METHOD__,'图片删除',json_encode($request),Auth::user()['id']);
+        return ['success'=>true];
+    }
+
     public function waybillExport($id,Request $request){
         if(!Gate::allows('运输管理-查询')){ return '没有权限';  }
         if ($id==-1){

+ 10 - 0
app/Http/Controllers/api/thirdPart/weight/PackageController.php

@@ -9,6 +9,7 @@ use App\Jobs\MeasuringMachineQueue;
 use App\Jobs\MarkPackageExcepted;
 use App\MeasuringMachine;
 use App\Package;
+use App\Waybill;
 use Illuminate\Http\Request;
 use Illuminate\Support\Carbon;
 use Illuminate\Support\Facades\Validator;
@@ -99,6 +100,15 @@ class PackageController extends Controller
                 }
                 $package->save();
             }
+            if ($package->order_code){
+                $waybill=Waybill::where('wms_bill_number',$package->order_code)->where('status','!=','已完结')
+                    ->where('status','!=','无模型')->first();
+                if ($waybill){
+                    $waybill->warehouse_weight_other=$package->weight;
+                    $waybill->warehouse_weight_unit_id_other=1;
+                    $waybill->update();
+                }
+            }
             event(new WeighedEvent($package));
             $response=["msg"=>"保存成功",
                         "code"=>200,

+ 12 - 0
app/UploadFile.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class UploadFile extends Model
+{
+    protected $fillable=[
+        'table_name','table_id','url','type'
+    ];
+}

+ 11 - 1
app/Waybill.php

@@ -24,6 +24,8 @@ class Waybill extends Model
         'carrier_weight_unit_name',
         'warehouse_weight_unit_other_name',
         'carrier_weight_unit_other_name',
+        'upload_file_url',
+        'upload_file_type',
     ];
 
     public function owner(){
@@ -68,8 +70,17 @@ class Waybill extends Model
     public function waybillAuditLogs(){
         return $this->hasMany('App\WaybillAuditLog','waybill_id','id');
     }
+    public function uploadFile(){
+        return $this->hasOne('App\UploadFile','table_id','id')->where('table_name','waybills');
+    }
 
 
+    public function getUploadFileUrlAttribute(){
+        return $this['uploadFile']? asset('/storage'.$this['uploadFile']['url']):null;
+    }
+    public function getUploadFileTypeAttribute(){
+        return $this['uploadFile']? $this['uploadFile']['type']:null;
+    }
     public function getOwnerNameAttribute(){
         return $this['owner']? $this['owner']['name']:null;
     }
@@ -82,7 +93,6 @@ class Waybill extends Model
     public  function  getDestinationCityNameAttribute(){
         return $this['destination_city']? $this['destination_city']['name']:null;
     }
-
     public function getWarehouseWeightUnitNameAttribute(){
         return $this['warehouse_weight_unit']? $this['warehouse_weight_unit']['name']:null;
     }

+ 11 - 0
bootstrap/cache/packages.php

@@ -35,6 +35,17 @@
       0 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
     ),
   ),
+  'intervention/image' => 
+  array (
+    'providers' => 
+    array (
+      0 => 'Intervention\\Image\\ImageServiceProvider',
+    ),
+    'aliases' => 
+    array (
+      'Image' => 'Intervention\\Image\\Facades\\Image',
+    ),
+  ),
   'laravel/tinker' => 
   array (
     'providers' => 

+ 4 - 3
composer.json

@@ -15,18 +15,19 @@
         "ext-pdo": "*",
         "doctrine/dbal": "^2.10",
         "endroid/qr-code": "^3.7",
+        "facade/ignition": "^2.0",
         "fideloper/proxy": "^4.0",
+        "intervention/image": "^2.5",
         "kitetail/zttp": "^0.6.0",
         "laravel/framework": "7.*",
         "laravel/tinker": "^2.0",
+        "laravel/ui": "^2.0",
         "maatwebsite/excel": "^3.1",
         "overtrue/laravel-pinyin": "^4.0",
         "predis/predis": "^1.1",
         "pusher/pusher-php-server": "^4.1",
         "te7a-houdini/laravel-trix": "^2.0",
-        "yajra/laravel-oci8": "7.0",
-        "facade/ignition": "^2.0",
-        "laravel/ui": "^2.0"
+        "yajra/laravel-oci8": "7.0"
     },
     "require-dev": {
         "barryvdh/laravel-debugbar": "^3.2",

+ 1 - 1
config/app.php

@@ -184,7 +184,7 @@ return [
     |
     | This array of class aliases will be registered when this application
     | is started. However, feel free to register as many as you wish as
-    | the aliases are "lazy" loaded so they don't hinder performance.
+    | the aliases are "lazy" loaded so they don't hinder performanceReport.
     |
     */
 

+ 45 - 0
database/migrations/2020_06_16_171741_create_upload_files_table.php

@@ -0,0 +1,45 @@
+<?php
+
+use App\Authority;
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateUploadFilesTable extends Migration
+{
+    protected $authNames=[
+        "运输管理-图片上传",
+        "运输管理-图片删除"
+    ];
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('upload_files', function (Blueprint $table) {
+            $table->string('table_name')->comment('表名');
+            $table->string('table_id')->comment('表ID');
+            $table->string('url')->unique()->comment('路径');
+            $table->string('type')->nullable()->comment('类型');
+            $table->timestamps();
+        });
+        foreach ($this->authNames as $name){
+            if(!Authority::where('name',$name)->first())(new Authority(['name'=>$name,'alias_name'=>$name]))->save();
+        }
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('upload_files');
+        foreach ($this->authNames as $name){
+            Authority::where('name',$name)->delete();
+        }
+    }
+}

BIN
public/icon/img404-bulky.jpg


BIN
public/icon/img404-thumbnail.jpg


+ 43 - 0
resources/views/client/areaCheck/create.blade.php

@@ -0,0 +1,43 @@
+@extends('layouts.app')
+
+@section('content')
+    @component('client.areaCheck.menu')@endcomponent
+<form class="card col-md-8 offset-md-2 card-body">
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">项目小组</label>
+        <select class="form-control col-7">
+            <option></option>
+        </select>
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">子项目</label>
+        <select class="form-control col-7">
+            <option></option>
+        </select>
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">用仓类型</label>
+        <select class="form-control col-7">
+            <option></option>
+        </select>
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2">货物整托</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 ">货物半托</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 ">平面区面积</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-group mt-3">
+        <div class="col-7 offset-2">
+            <input type="submit" class="btn btn-success form-control">
+        </div>
+    </div>
+</form>
+@endsection
+

+ 160 - 0
resources/views/client/areaCheck/index.blade.php

@@ -0,0 +1,160 @@
+@extends('layouts.app')
+
+@section('content')
+    @component('client.areaCheck.menu')@endcomponent
+    <div class="card m-2">
+        <form>
+            <table class="table table-sm table-bordered  text-nowrap mb-0" style="background: #fff;min-width: 1500px">
+                <tr>
+                    <td colspan="10">
+                        <select name="paginate"  class="form-control-sm" style="vertical-align: middle">
+                            <option value="50">每页显示50行</option>
+                            <option value="100">每页显示100行</option>
+                            <option value="200">每页显示200行</option>
+                            <option value="500">每页显示500行</option>
+                            <option value="1000">每页显示1000行</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td style="width: 300px">
+                        <div class="form-inline">
+                            <select name="owner_id"    class="form-control form-control-sm tooltipTarget "   style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
+                                <option value="" class="text-secondary">货主 </option>
+                                <option  class="font-weight-bold"></option>
+                            </select>
+                            <div style="position: relative;">
+                                <button type="button"  style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
+                            </div>
+                        </div>
+                    </td>
+                    <td style="width: 300px">
+                            <input class="form-control form-control-sm" placeholder="结算月(示例:202001)" style="max-width: 200px">
+                    </td>
+                    <td style="width: 300px">
+                        <input class="form-control form-control-sm" type="date" style="max-width: 200px">
+                    </td>
+                    <td style="width: 300px">
+                        <select name="status"  class="form-control form-control-sm " style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">用仓类型</option>
+                        </select>
+                    </td>
+                    <td colspan="6"></td>
+                </tr>
+                <tr>
+                    <td>
+                        <select  name="status"  class="form-control form-control-sm " style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">子项目</option>
+                        </select>
+                    </td>
+                    <td>
+                        <select name="status"  class="form-control form-control-sm " style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">项目组</option>
+                        </select>
+                    </td>
+                    <td>
+                        <input class="form-control form-control-sm" type="date" style="max-width: 200px">
+                    </td>
+                    <td colspan="7"></td>
+                </tr>
+                <tr>
+                    <td colspan="10">
+                        <span class="dropdown">
+                            <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle "
+                                    data-toggle="dropdown" >
+                                导出Excel
+                            </button>
+                            <div class="dropdown-menu">
+                                <a class="dropdown-item" @click="waybillExport(1)" href="javascript:">导出勾选内容</a>
+                                <a class="dropdown-item" @click="waybillExport(2)" href="javascript:">导出所有页</a>
+                            </div>
+                        </span>
+                    </td>
+                </tr>
+            </table>
+        </form>
+        <table class="table table-sm table-hover table-bordered table-striped text-nowrap m-2">
+            <tr>
+                <th>
+                    <label for="all">
+                        <input id="all" type="checkbox" >全选
+                    </label>
+                </th>
+                <th>序号</th>
+                <th>项目组</th>
+                <th>货主</th>
+                <th>子项目</th>
+                <th>结算月</th>
+                <th>录入日期</th>
+                <th>用仓类型</th>
+                <th>货物整托</th>
+                <th>货物半托</th>
+                <th>平面区面积</th>
+                <th>结算面积</th>
+                <th>操作</th>
+            </tr>
+            <tr>
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>1</td>
+                <td>XXX</td>
+                <td>BS</td>
+                <td>东浩子项目1</td>
+                <td class="text-muted">202006</td>
+                <td>2020-06-15 15:06:32</td>
+                <td>整租</td>
+                <td>20</td>
+                <td>20</td>
+                <td>20</td>
+                <td>20</td>
+                <td><button class="btn btn-sm btn-outline-info">修改</button></td>
+            </tr>
+            <tr class="text-success">
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>2</td>
+                <td>XXX</td>
+                <td>BS</td>
+                <td>东浩子项目2</td>
+                <td class="text-muted">202006</td>
+                <td>2020-06-15 15:06:32</td>
+                <td>整租</td>
+                <td>20</td>
+                <td>20</td>
+                <td>20</td>
+                <td>20</td>
+                <td></td>
+            </tr>
+            <tr>
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>3</td>
+                <td>XXX</td>
+                <td>BS</td>
+                <td>
+                    <select class="form-control form-control-sm" >
+                        <option>东浩子项目3</option>
+                    </select></td>
+                <td class="text-muted">202006</td>
+                <td>2020-06-15 15:06:32</td>
+                <td>
+                    <select class="form-control form-control-sm" style="max-width: 100px">
+                        <option>整租</option>
+                    </select>
+                </td>
+                <td><input value="20" class="form-control form-control-sm" style="max-width: 100px"></td>
+                <td><input value="20" class="form-control form-control-sm" style="max-width: 100px"></td>
+                <td><input value="20" class="form-control form-control-sm" style="max-width: 100px"></td>
+                <td>20</td>
+                <td>
+                    <button class="btn btn-sm btn-outline-success">确定</button>
+                    <button class="btn btn-sm btn-outline-danger">取消</button>
+                </td>
+            </tr>
+        </table>
+    </div>
+@endsection
+

+ 16 - 0
resources/views/client/areaCheck/menu.blade.php

@@ -0,0 +1,16 @@
+<div id="nav2">
+    @component('client.menu')
+    @endcomponent
+    <div class="container-fluid nav3">
+        <div class="card menu-third" >
+            <ul class="nav nav-pills">
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('client/areaCheck')}}" :class="{active:isActive('',3)}">查询</a>
+                </li>
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('client/areaCheck/create')}}" :class="{active:isActive('create',3)}">录入</a>
+                </li>
+            </ul>
+        </div>
+    </div>
+</div>

+ 50 - 0
resources/views/client/base/create.blade.php

@@ -0,0 +1,50 @@
+@extends('layouts.app')
+
+@section('content')
+    @component('client.base.menu')@endcomponent
+<form class="card col-md-8 offset-md-2 card-body">
+    <div class="form-inline">
+        <label for="owner" class="col-2 text-primary">客户</label>
+        <select id="owner" class="form-control col-3">
+            <option></option>
+        </select>
+        <label class="col-1 text-primary">税率</label>
+        <div class="input-group-append col-2 p-0">
+            <input class="form-control">
+            <span class="input-group-text">%</span>
+        </div>
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2">销售姓名</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2">公司名称</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">联系人</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">联系电话</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">项目小组</label>
+        <select class="form-control col-7">
+            <option></option>
+        </select>
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2">项目描述</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-group mt-3">
+        <div class="col-7 offset-2">
+            <input type="submit" class="btn btn-success form-control">
+        </div>
+    </div>
+</form>
+@endsection
+

+ 163 - 0
resources/views/client/base/index.blade.php

@@ -0,0 +1,163 @@
+@extends('layouts.app')
+
+@section('content')
+    @component('client.base.menu')@endcomponent
+    <div class="card">
+        <form>
+            <table class="table table-sm table-bordered  text-nowrap mb-0" style="background: #fff;min-width: 1500px">
+                <tr>
+                    <td colspan="10">
+                        <select name="paginate"  class="form-control-sm" style="vertical-align: middle">
+                            <option value="50">每页显示50行</option>
+                            <option value="100">每页显示100行</option>
+                            <option value="200">每页显示200行</option>
+                            <option value="500">每页显示500行</option>
+                            <option value="1000">每页显示1000行</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr >
+                    <td >
+                        <div class="form-inline">
+                            <select name="owner_id"    class="form-control form-control-sm tooltipTarget "   style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
+                                <option value="" class="text-secondary">货主 </option>
+                                <option  class="font-weight-bold"></option>
+                            </select>
+                            <div style="position: relative;">
+                                <button type="button"  style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
+                            </div>
+                        </div>
+                    </td>
+                    <td >
+                        <input type="text"  placeholder="子项目"
+                               class="form-control form-control-sm  "  style="vertical-align: middle;max-width: 200px" ></td>
+                    <td >
+                        <input type="text"  placeholder="合同号"
+                               class="form-control form-control-sm  "  style="vertical-align: middle;max-width: 200px" ></td>
+                    <td  >
+                        <input type="date" style="max-width: 200px" name="created_at_start" class="form-control form-control-sm "
+                               >
+                    <td colspan="6"></td>
+                </tr>
+                <tr>
+                    <td>
+                        <select name="status"  class="form-control form-control-sm tooltipTarget" style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">项目小组</option>
+                        </select>
+                    </td>
+                    <td>
+                        <select name="status"  class="form-control form-control-sm tooltipTarget" style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">激活状态</option>
+                        </select>
+                    </td>
+                    <td>
+                        <input type="text" style="max-width: 200px" class="form-control form-control-sm " placeholder="销售名称">
+                    </td>
+                    <td >
+                        <input type="date" style="max-width: 200px" class="form-control form-control-sm" name="created_at_end"></td>
+                    <td colspan="6"></td>
+                </tr>
+                <tr>
+                    <td colspan="10">
+                        <span class="dropdown">
+                            <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle "
+                                    data-toggle="dropdown" >
+                                导出Excel
+                            </button>
+                            <div class="dropdown-menu">
+                                <a class="dropdown-item" @click="waybillExport(1)" href="javascript:">导出勾选内容</a>
+                                <a class="dropdown-item" @click="waybillExport(2)" href="javascript:">导出所有页</a>
+                            </div>
+                        </span>
+                        <button class="btn btn-sm btn-outline-info ml-1">新增客户</button>
+                    </td>
+                </tr>
+            </table>
+        </form>
+        <table class="table table-sm table-hover table-bordered table-striped text-nowrap m-2">
+            <tr>
+                <th>
+                    <label for="all">
+                        <input id="all" type="checkbox" >全选
+                    </label>
+                </th>
+                <th>序号</th>
+                <th>客户(货主)</th>
+                <th>税率%</th>
+                <th>子项目</th>
+                <th>货主代码</th>
+                <th>合同号</th>
+                <th>创建日期</th>
+                <th>销售姓名</th>
+                <th>公司全称</th>
+                <th class="text-danger">联系人</th>
+                <th class="text-danger">联系电话</th>
+                <th class="text-danger">项目小组</th>
+                <th>关联报价</th>
+                <th>月单量预警</th>
+                <th>是否激活</th>
+                <th>项目描述</th>
+            </tr>
+            <tr>
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>1</td>
+                <td rowspan="3" class="text-center" style="vertical-align: middle">东浩</td>
+                <td rowspan="3" class="text-center" style="vertical-align: middle">6</td>
+                <td>东浩子项目1</td>
+                <td>DONGHAO</td>
+                <td>SH0939028329</td>
+                <td>2020/4/26</td>
+                <td>施尧</td>
+                <td>上海东浩国际贸易有限公司</td>
+                <td>余经理</td>
+                <td>13687646665</td>
+                <td>葛付晖</td>
+                <td></td>
+                <td></td>
+                <td><b  class="font-weight-bold text-info font-italic" style="cursor:pointer;text-decoration: underline;">激活</b></td>
+                <td></td>
+            </tr>
+            <tr>
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>2</td>
+                <td>东浩子项目2</td>
+                <td>DONGHAO</td>
+                <td>SH0939028329</td>
+                <td>2020/4/27</td>
+                <td>施尧</td>
+                <td>上海东浩国际贸易有限公司</td>
+                <td>余经理</td>
+                <td>13687646666</td>
+                <td>邓婷婷</td>
+                <td></td>
+                <td></td>
+                <td><b class="font-weight-bold text-danger font-italic" style="cursor:pointer;text-decoration: underline;">冻结</b></td>
+                <td></td>
+            </tr>
+            <tr>
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>3</td>
+                <td>东浩子项目3</td>
+                <td>DONGHAO</td>
+                <td>SH0939028329</td>
+                <td>2020/4/28</td>
+                <td>施尧</td>
+                <td>上海东浩国际贸易有限公司</td>
+                <td>余经理</td>
+                <td>13687646667</td>
+                <td>张书恒</td>
+                <td></td>
+                <td></td>
+                <td><b  class="font-weight-bold text-info font-italic" style="cursor:pointer;text-decoration: underline;">激活</b></td>
+                <td></td>
+            </tr>
+        </table>
+    </div>
+@endsection
+

+ 16 - 0
resources/views/client/base/menu.blade.php

@@ -0,0 +1,16 @@
+<div id="nav2">
+    @component('client.menu')
+    @endcomponent
+    <div class="container-fluid nav3">
+        <div class="card menu-third" >
+            <ul class="nav nav-pills">
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('client/base')}}" :class="{active:isActive('',3)}">查询</a>
+                </li>
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('client/base/create')}}" :class="{active:isActive('create',3)}">添加子项</a>
+                </li>
+            </ul>
+        </div>
+    </div>
+</div>

+ 47 - 0
resources/views/client/billCheck/create.blade.php

@@ -0,0 +1,47 @@
+@extends('layouts.app')
+
+@section('content')
+    @component('client.billCheck.menu')@endcomponent
+<form class="card col-md-8 offset-md-2 card-body">
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">项目小组</label>
+        <select class="form-control col-7">
+            <option></option>
+        </select>
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">货主</label>
+        <select class="form-control col-7">
+            <option></option>
+        </select>
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">子项目</label>
+        <select class="form-control col-7">
+            <option></option>
+        </select>
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 text-info">结算月</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2">原始账单金额</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 ">账单确认金额</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-inline mt-3">
+        <label class="col-2 ">差额</label>
+        <input class="form-control col-7">
+    </div>
+    <div class="form-group mt-3">
+        <div class="col-7 offset-2">
+            <input type="submit" class="btn btn-success form-control">
+        </div>
+    </div>
+</form>
+@endsection
+

+ 107 - 0
resources/views/client/billCheck/index.blade.php

@@ -0,0 +1,107 @@
+@extends('layouts.app')
+
+@section('content')
+    @component('client.billCheck.menu')@endcomponent
+    <div class="card m-2">
+        <form>
+            <table class="table table-sm table-bordered  text-nowrap mb-0" style="background: #fff;min-width: 1500px">
+                <tr>
+                    <td colspan="10">
+                        <select name="paginate"  class="form-control-sm" style="vertical-align: middle">
+                            <option value="50">每页显示50行</option>
+                            <option value="100">每页显示100行</option>
+                            <option value="200">每页显示200行</option>
+                            <option value="500">每页显示500行</option>
+                            <option value="1000">每页显示1000行</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td style="width: 300px">
+                        <div class="form-inline">
+                            <select name="owner_id"    class="form-control form-control-sm tooltipTarget "   style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
+                                <option value="" class="text-secondary">货主 </option>
+                                <option  class="font-weight-bold"></option>
+                            </select>
+                            <div style="position: relative;">
+                                <button type="button"  style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
+                            </div>
+                        </div>
+                    </td>
+                    <td style="width: 300px">
+                            <input class="form-control form-control-sm" placeholder="结算月(示例:202001)" style="max-width: 200px">
+                    </td>
+                    <td style="width: 300px">
+                        <input class="form-control form-control-sm" type="date" style="max-width: 200px">
+                    </td>
+                    <td colspan="7"></td>
+                </tr>
+                <tr>
+                    <td>
+                        <select  name="status"  class="form-control form-control-sm " style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">子项目</option>
+                        </select>
+                    </td>
+                    <td>
+                        <select name="status"  class="form-control form-control-sm " style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">项目组</option>
+                        </select>
+                    </td>
+                    <td>
+                        <input class="form-control form-control-sm" type="date" style="max-width: 200px">
+                    </td>
+                    <td colspan="7"></td>
+                </tr>
+                <tr>
+                    <td colspan="10">
+                        <span class="dropdown">
+                            <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle "
+                                    data-toggle="dropdown" >
+                                导出Excel
+                            </button>
+                            <div class="dropdown-menu">
+                                <a class="dropdown-item" @click="waybillExport(1)" href="javascript:">导出勾选内容</a>
+                                <a class="dropdown-item" @click="waybillExport(2)" href="javascript:">导出所有页</a>
+                            </div>
+                        </span>
+                    </td>
+                </tr>
+            </table>
+        </form>
+        <table class="table table-sm table-hover table-bordered table-striped text-nowrap m-2">
+            <tr>
+                <th>
+                    <label for="all">
+                        <input id="all" type="checkbox" >全选
+                    </label>
+                </th>
+                <th>序号</th>
+                <th>项目组</th>
+                <th>货主</th>
+                <th>子项目</th>
+                <th>结算月</th>
+                <th>录入日期</th>
+                <th>原始账单金额</th>
+                <th>账单确认金额</th>
+                <th>差额</th>
+                <th>操作</th>
+            </tr>
+            <tr>
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>1</td>
+                <td>XXX</td>
+                <td>BS</td>
+                <td>东浩子项目1</td>
+                <td class="text-muted">202006</td>
+                <td>2020-06-15 15:06:32</td>
+                <td>200</td>
+                <td>400</td>
+                <td>200</td>
+                <td><button class="btn btn-sm btn-outline-info">确认开票</button></td>
+            </tr>
+        </table>
+    </div>
+@endsection
+

+ 16 - 0
resources/views/client/billCheck/menu.blade.php

@@ -0,0 +1,16 @@
+<div id="nav2">
+    @component('client.menu')
+    @endcomponent
+    <div class="container-fluid nav3">
+        <div class="card menu-third" >
+            <ul class="nav nav-pills">
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('client/billCheck')}}" :class="{active:isActive('',3)}">查询</a>
+                </li>
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('client/billCheck/create')}}" :class="{active:isActive('create',3)}">录入</a>
+                </li>
+            </ul>
+        </div>
+    </div>
+</div>

+ 145 - 0
resources/views/client/instantBill/index.blade.php

@@ -0,0 +1,145 @@
+@extends('layouts.app')
+
+@section('content')
+    @component('client.menu')@endcomponent
+    <div class="card m-2">
+        <form>
+            <table class="table table-sm table-bordered  text-nowrap mb-0" style="background: #fff;min-width: 1500px">
+                <tr>
+                    <td colspan="10">
+                        <select name="paginate"  class="form-control-sm" style="vertical-align: middle">
+                            <option value="50">每页显示50行</option>
+                            <option value="100">每页显示100行</option>
+                            <option value="200">每页显示200行</option>
+                            <option value="500">每页显示500行</option>
+                            <option value="1000">每页显示1000行</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td style="width: 300px">
+                        <select name="owner_id"    class="form-control form-control-sm tooltipTarget "   style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
+                            <option value="" class="text-secondary">店铺 </option>
+                            <option  class="font-weight-bold"></option>
+                        </select>
+                    </td>
+                    <td style="width: 300px">
+                        <input class="form-control form-control-sm" placeholder="结算月(示例:202001)" style="max-width: 200px">
+                    </td>
+                    <td style="width: 300px">
+                        <input class="form-control form-control-sm" type="date" style="max-width: 200px">
+                    </td>
+                    <td colspan="7"></td>
+                </tr>
+                <tr>
+                    <td>
+                        <select  name="status"  class="form-control form-control-sm " style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">作业类型</option>
+                        </select>
+                    </td>
+                    <td style="width: 300px">
+                        <input class="form-control form-control-sm" placeholder="物流单号" style="max-width: 200px">
+                    </td>
+                    <td>
+                        <input class="form-control form-control-sm" type="date" style="max-width: 200px">
+                    </td>
+                    <td colspan="7"></td>
+                </tr>
+                <tr>
+                    <td colspan="10">
+                        <span class="dropdown">
+                            <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle "
+                                    data-toggle="dropdown" >
+                                导出Excel
+                            </button>
+                            <div class="dropdown-menu">
+                                <a class="dropdown-item" @click="waybillExport(1)" href="javascript:">导出勾选内容</a>
+                                <a class="dropdown-item" @click="waybillExport(2)" href="javascript:">导出所有页</a>
+                            </div>
+                        </span>
+                    </td>
+                </tr>
+            </table>
+        </form>
+        <table class="table table-sm table-hover table-bordered table-striped text-nowrap m-2">
+            <tr>
+                <th colspan="2"></th>
+                <th colspan="6" class="text-center" style="background-color: #2894FF"><span class="fa fa-file-text-o m-1"></span>订单信息</th>
+                <th colspan="5" class="text-center" style="background-color: #DAB1D5"><span class="fa fa-truck m-1"></span>物流信息</th>
+                <th colspan="3" class="text-center" style="background-color: #FF5809"><span class="fa fa-rmb m-1"></span>费用信息</th>
+                <th colspan="4" style="background-color: #D8D8D8"></th>
+            </tr>
+            <tr>
+                <th>
+                    <label for="all">
+                        <input id="all" type="checkbox" >全选
+                    </label>
+                </th>
+                <th>序号</th>
+                <th style="background-color: #2894FF">作业日期</th>
+                <th style="background-color: #2894FF">作业类型</th>
+                <th style="background-color: #2894FF">店铺</th>
+                <th style="background-color: #2894FF">发/退/提货单号</th>
+                <th style="background-color: #2894FF">收件人</th>
+                <th style="background-color: #2894FF">电话</th>
+                <th style="background-color: #DAB1D5">物流单号</th>
+                <th style="background-color: #DAB1D5">商品数量</th>
+                <th style="background-color: #DAB1D5">体积</th>
+                <th style="background-color: #DAB1D5">重量</th>
+                <th style="background-color: #DAB1D5">承运商</th>
+                <th style="background-color: #FF5809">操作费</th>
+                <th style="background-color: #FF5809">物流费用</th>
+                <th style="background-color: #FF5809">合计</th>
+                <th style="background-color: #D8D8D8">结算月</th>
+                <th style="background-color: #D8D8D8">当前订单总数</th>
+                <th style="background-color: #D8D8D8">计费总额</th>
+                <th style="background-color: #D8D8D8">平均单费用</th>
+            </tr>
+            <tr>
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>1</td>
+                <td style="background-color: #2894FF">2017/12/6</td>
+                <td style="background-color: #2894FF">发货</td>
+                <td style="background-color: #2894FF">店铺a</td>
+                <td style="background-color: #2894FF">OSS017120023</td>
+                <td style="background-color: #2894FF"></td>
+                <td style="background-color: #2894FF"></td>
+                <td style="background-color: #DAB1D5">32561515</td>
+                <td style="background-color: #DAB1D5">49</td>
+                <td style="background-color: #DAB1D5">3.2</td>
+                <td style="background-color: #DAB1D5">5</td>
+                <td style="background-color: #DAB1D5">中通</td>
+                <td style="background-color: #FF5809">200</td>
+                <td style="background-color: #FF5809">736</td>
+                <td style="background-color: #FF5809">936</td>
+                <td style="background-color: #D8D8D8;vertical-align: middle" rowspan="2" class="text-center">202003</td>
+                <td style="background-color: #D8D8D8;vertical-align: middle" rowspan="2" class="text-center">2654</td>
+                <td style="background-color: #D8D8D8;vertical-align: middle" rowspan="2" class="text-center">36651</td>
+                <td style="background-color: #D8D8D8;vertical-align: middle" rowspan="2" class="text-center">13.842415</td>
+            </tr>
+            <tr>
+                <td>
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td>2</td>
+                <td style="background-color: #2894FF">2017/12/6</td>
+                <td style="background-color: #2894FF">发货</td>
+                <td style="background-color: #2894FF">店铺a</td>
+                <td style="background-color: #2894FF">OSS017120023</td>
+                <td style="background-color: #2894FF"></td>
+                <td style="background-color: #2894FF"></td>
+                <td style="background-color: #DAB1D5">32561515</td>
+                <td style="background-color: #DAB1D5">49</td>
+                <td style="background-color: #DAB1D5">3.2</td>
+                <td style="background-color: #DAB1D5"></td>
+                <td style="background-color: #DAB1D5">中通</td>
+                <td style="background-color: #FF5809">200</td>
+                <td style="background-color: #FF5809">736</td>
+                <td style="background-color: #FF5809">936</td>
+            </tr>
+        </table>
+    </div>
+@endsection
+

+ 25 - 0
resources/views/client/menu.blade.php

@@ -0,0 +1,25 @@
+
+<div class="container-fluid nav2" id="nav2">
+    <div class="card">
+        <ul class="nav nav-pills">
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('client/base')}}" :class="{active:isActive('base',2)}">基础资料</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('client/areaCheck')}}" :class="{active:isActive('areaCheck',2)}">面积盘点</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('client/billCheck')}}" :class="{active:isActive('billCheck',2)}">账单确认</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('client/performanceReport')}}" :class="{active:isActive('performanceReport',2)}">绩效报表</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('client/instantBill')}}" :class="{active:isActive('instantBill',2)}">即时账单</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link text-muted" href="{{url('client/base')}}" :class="{active:isActive('',2)}">基础资料</a>
+            </li>
+        </ul>
+    </div>
+</div>

+ 154 - 0
resources/views/client/performanceReport/index.blade.php

@@ -0,0 +1,154 @@
+@extends('layouts.app')
+
+@section('content')
+    @component('client.menu')@endcomponent
+    <div class="card m-2">
+        <form>
+            <table class="table table-sm table-bordered  text-nowrap mb-0" style="background: #fff;min-width: 1500px">
+                <tr>
+                    <td colspan="10">
+                        <select name="paginate"  class="form-control-sm" style="vertical-align: middle">
+                            <option value="50">每页显示50行</option>
+                            <option value="100">每页显示100行</option>
+                            <option value="200">每页显示200行</option>
+                            <option value="500">每页显示500行</option>
+                            <option value="1000">每页显示1000行</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td style="width: 300px">
+                        <div class="form-inline">
+                            <select name="owner_id"    class="form-control form-control-sm tooltipTarget "   style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
+                                <option value="" class="text-secondary">货主 </option>
+                                <option  class="font-weight-bold"></option>
+                            </select>
+                            <div style="position: relative;">
+                                <button type="button"  style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
+                            </div>
+                        </div>
+                    </td>
+                    <td style="width: 300px">
+                            <input class="form-control form-control-sm" placeholder="结算月(示例:202001)" style="max-width: 200px">
+                    </td>
+                    <td style="width: 300px">
+                        <select    class="form-control form-control-sm " style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">子项目</option>
+                        </select>
+                    </td>
+                    <td style="width: 300px">
+                        <select   class="form-control form-control-sm " style="vertical-align: middle;max-width: 100px" >
+                            <option value="" class="text-secondary">项目组</option>
+                        </select>
+                    </td>
+                    <td colspan="6"></td>
+                </tr>
+                <tr>
+                    <td colspan="10">
+                        <span class="dropdown">
+                            <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle "
+                                    data-toggle="dropdown" >
+                                导出Excel
+                            </button>
+                            <div class="dropdown-menu">
+                                <a class="dropdown-item" @click="waybillExport(1)" href="javascript:">导出勾选内容</a>
+                                <a class="dropdown-item" @click="waybillExport(2)" href="javascript:">导出所有页</a>
+                            </div>
+                        </span>
+                    </td>
+                </tr>
+            </table>
+        </form>
+        <table class="table table-sm table-hover table-bordered table-striped text-nowrap m-2">
+            <tr>
+                <th >
+                    <label for="all">
+                        <input id="all" type="checkbox" >全选
+                    </label>
+                </th>
+                <th style="background-color: #D2B48C">项目小组</th>
+                <th style="background-color: #D2B48C">客户(货主)</th>
+                <th style="background-color: #D2B48C">子项目</th>
+                <th style="background-color: #D2B48C">状态</th>
+                <th style="background-color: #D2B48C">创建日期</th>
+                <th style="background-color: #D2B48C">在库时长</th>
+                <th style="background-color: #6A5ACD">结算月</th>
+                <th style="background-color: #6A5ACD">日均单量</th>
+                <th style="background-color: #6A5ACD">上月盘点面积</th>
+                <th style="background-color: #6A5ACD">本月盘点面积</th>
+                <th style="background-color: #FF7F50">初始账单金额</th>
+                <th style="background-color: #FF7F50">账单确认金额</th>
+                <th style="background-color: #FF7F50">账单确认日期</th>
+            </tr>
+            <tr>
+                <td >
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td rowspan="4" class="text-center" style="vertical-align: middle;background-color: #D2B48C" >项目小组A</td>
+                <td style="background-color: #D2B48C">货主A</td>
+                <td style="background-color: #D2B48C">子项目1</td>
+                <td style="background-color: #D2B48C">激活</td>
+                <td style="background-color: #D2B48C">2018.07.06</td>
+                <td style="background-color: #D2B48C">458天</td>
+                <td style="background-color: #6A5ACD">202003</td>
+                <td style="background-color: #6A5ACD">55</td>
+                <td style="background-color: #6A5ACD">695</td>
+                <td style="background-color: #6A5ACD">695</td>
+                <td style="background-color: #FF7F50"></td>
+                <td style="background-color: #FF7F50">100000</td>
+                <td style="background-color: #FF7F50"></td>
+            </tr>
+            <tr>
+                <td >
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td rowspan="2"  style="vertical-align: middle;background-color: #D2B48C">货主B</td>
+                <td style="background-color: #D2B48C">子项目1</td>
+                <td style="background-color: #D2B48C">激活</td>
+                <td style="background-color: #D2B48C">2018.07.06</td>
+                <td style="background-color: #D2B48C">458天</td>
+                <td style="background-color: #6A5ACD">202003</td>
+                <td style="background-color: #6A5ACD">778</td>
+                <td style="background-color: #6A5ACD">7878</td>
+                <td style="background-color: #6A5ACD">45</td>
+                <td style="background-color: #FF7F50"></td>
+                <td style="background-color: #FF7F50"></td>
+                <td style="background-color: #FF7F50"></td>
+            </tr>
+            <tr>
+                <td >
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td style="background-color: #D2B48C">子项目2</td>
+                <td style="background-color: #D2B48C">冻结</td>
+                <td style="background-color: #D2B48C">2018.07.06</td>
+                <td style="background-color: #D2B48C">458天</td>
+                <td style="background-color: #6A5ACD">258</td>
+                <td style="background-color: #6A5ACD">98</td>
+                <td style="background-color: #6A5ACD">456</td>
+                <td style="background-color: #6A5ACD">45</td>
+                <td style="background-color: #FF7F50"></td>
+                <td style="background-color: #FF7F50"></td>
+                <td style="background-color: #FF7F50"></td>
+            </tr>
+            <tr>
+                <td >
+                    <input class="checkItem" type="checkbox" >
+                </td>
+                <td style="background-color: #D2B48C">货主C</td>
+                <td style="background-color: #D2B48C">子项目1</td>
+                <td style="background-color: #D2B48C">冻结</td>
+                <td style="background-color: #D2B48C">2018.07.06</td>
+                <td style="background-color: #D2B48C">458天</td>
+                <td style="background-color: #6A5ACD">8</td>
+                <td style="background-color: #6A5ACD">75</td>
+                <td style="background-color: #6A5ACD">12</td>
+                <td style="background-color: #6A5ACD">24</td>
+                <td style="background-color: #FF7F50"></td>
+                <td style="background-color: #FF7F50"></td>
+                <td style="background-color: #FF7F50"></td>
+            </tr>
+        </table>
+    </div>
+@endsection
+

+ 5 - 0
resources/views/layouts/menu.blade.php

@@ -41,6 +41,11 @@
                                     :class="{active:isActive('personnel',1)}">
                     <span class="fa fa-header" style="color: #72441b"></span>
                     人事管理</a></li> @endcan
+
+        <li class="nav-item"><a href="{{url("client/base")}}" class="nav-link"
+                                :class="{active:isActive('client',1)}">
+                <span class="fa fa-address-book-o" style="color: #72441b"></span>
+                客户管理</a></li>
         @can('基础设置')
         <li class="nav-item"><a href="{{url("maintenance/")}}" class="nav-link"
                                 :class="{active:isActive('maintenance',1)}">

+ 3 - 0
resources/views/maintenance/menu.blade.php

@@ -58,6 +58,9 @@
                 <li class="nav-item">
                     <a class="nav-link text-dark" href="{{url('maintenance/carType')}}" :class="{active:isActive('carType',2)}">车型</a>
                 </li> @endcan
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('maintenance/priceModel/storage')}}" :class="{active:isActive('priceModel',2)}">计价模型</a>
+                </li>
             @can('计费模型')
                 <li class="nav-item">
                     <a class="nav-link text-dark" href="{{url('maintenance/waybillPriceModel')}}" :class="{active:isActive('waybillPriceModel',2)}">计费模型</a>

+ 168 - 0
resources/views/maintenance/priceModel/expressage/index.blade.php

@@ -0,0 +1,168 @@
+
+@extends('layouts.app')
+@section('title')运输价格模型@endsection
+
+@section('content')
+    <span id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.waybillPriceModel.menu')@endcomponent
+    </span>
+    <div id="list">
+    <div class="container-fluid">
+        <div class="card">
+            <div>
+                <form  method="GET" action="{{url('maintenance/waybillPriceModel')}}" id="optionSubmit">
+                    <table class="table  table-sm table-bordered table-hover text-nowrap ">
+                        <tr>
+                            <td  > <label style="margin-left: 2%" class="form-inline">页显示条数:
+                                <select name="paginate" v-model="filterData.paginate" class="form-control" @change="setPaginate">
+                                    <option value="50">50行</option>
+                                    <option value="100">100行</option>
+                                    <option value="200">200行</option>
+                                    <option value="500">500行</option>
+                                    <option value="1000">1000行</option>
+                                </select></label></td>
+                            <td > <label class="form-inline" style="margin-left: 2%">承运商:
+                                <select name="carrier_id" v-model="filterData.carrier_id" class="form-control"  @change="setCarrier">
+                                    <option >    </option>
+                                    @foreach($carriers as $carrier)
+                                        <option value="{{$carrier->id}}">{{$carrier->name}}</option>
+                                    @endforeach
+                                </select></label></td>
+                            <td><label class="form-inline" style="margin-left: 2%">省份:
+                                <select name="province_id" v-model="filterData.province_id" class="form-control" @change="setProvince">
+                                    <option>    </option>
+                                    @foreach($provinces as $province)
+                                        <option value="{{$province->id}}">{{$province->name}}</option>
+                                    @endforeach
+                                </select><input hidden type="submit"></label></td>
+                        </tr>
+                    </table>
+                </form>
+            </div>
+            <div class="card-body">
+                @if(Session::has('successTip'))
+                    <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
+                @endif
+                <table class="table table-striped table-sm">
+                    <tr>
+                        <th>代码</th>
+                        <th>承运商名称</th>
+                        <th>省份</th>
+                        <th>城市</th>
+                        <th>计重单位</th>
+                        <th>区间</th>
+                        <th>单价(元)</th>
+                        <th>起步费(元)</th>
+                        <th>最低计数</th>
+                        <th>录入时间</th>
+                        <th>操作</th>
+                    </tr>
+                    <tr v-for="waybillPriceModel in waybillPriceModels">
+                        <td class="text-muted">@{{waybillPriceModel.id}}</td>
+                        <td>@{{waybillPriceModel.carrier}}</td>
+                        <td>@{{waybillPriceModel.province}}</td>
+                        <td>@{{waybillPriceModel.city}}</td>
+                        <td>@{{waybillPriceModel.unit}}</td>
+                        <td>@{{waybillPriceModel.range_min}}<a v-if="waybillPriceModel.range_min&&waybillPriceModel.range_max">&nbsp;&nbsp;--&nbsp;&nbsp;</a> @{{waybillPriceModel.range_max}}</td>
+                        <td>@{{waybillPriceModel.unit_price}}</td>
+                        <td>@{{waybillPriceModel.base_fee}}</td>
+                        <td>@{{waybillPriceModel.initial_weight}}</td>
+                        <td class="text-muted">@{{waybillPriceModel.created_at}}</td>
+                        <td>
+                            @can('计费模型-编辑')
+                                <button class="btn btn-sm btn-outline-primary" @click="edit(waybillPriceModel.id)">改</button> @endcan
+                            @can('计费模型-删除')
+                                <button class="btn btn-sm btn-outline-dark" @click="destroy(waybillPriceModel)">删</button> @endcan
+                        </td>
+                    </tr>
+                </table>
+                {{$waybillPriceModels->appends($filterData)->links()}}
+            </div>
+        </div>
+    </div>
+    </div>
+@endsection
+
+@section('lastScript')
+    <script>
+        new Vue({
+            el:"#list",
+            data:{
+                waybillPriceModels:[
+                    @foreach( $waybillPriceModels as $waybillPriceModel )
+                        {id:'{{$waybillPriceModel->id}}',carrier:'{{$waybillPriceModel->carrier_name}}',
+                        province:'{{$waybillPriceModel->province_name}}',city:'{{$waybillPriceModel->city_name}}',
+                        unit:'{{$waybillPriceModel->unit_name}}',range_min:'{{$waybillPriceModel->range_min}}',range_max:'{{$waybillPriceModel->range_max}}',
+                        unit_price:'{{$waybillPriceModel->unit_price}}',base_fee:'{{$waybillPriceModel->base_fee}}',initial_weight:'{{$waybillPriceModel->initial_weight}}',
+                        created_at:'{{$waybillPriceModel->created_at}}'},
+                    @endforeach
+                ],
+                filterData:
+                    {paginate:'50',carrier_id:'',province_id: ''},
+            },
+            mounted:function(){
+                this.initInputs();
+            },
+            methods:{
+                edit:function(id){
+                    location.href = "{{url('maintenance/waybillPriceModel')}}/"+id+"/edit";
+                },
+                destroy:function(waybillPriceModel){
+                    if(!confirm('确定要删除该计费模型吗?')){return};
+                    let data=this;
+                    let url = "{{url('maintenance/waybillPriceModel')}}/"+waybillPriceModel.id;
+                    axios.delete(url,{id:waybillPriceModel.id})
+                        .then(function (response) {
+                            if(response.data.success){
+                                for (let i = 0; i < data.waybillPriceModels.length; i++) {
+                                    if (data.waybillPriceModels[i].id===waybillPriceModel.id){
+                                        data.waybillPriceModels.splice(i,1);
+                                        break;
+                                    }
+                                }
+                                tempTip.setDuration(1000);
+                                tempTip.showSuccess('删除计费模型成功!')
+                            }else{
+                                tempTip.setDuration(1000);
+                                tempTip.show('删除计费模型失败!')
+                            }
+                        })
+                        .catch(function (err) {
+                            tempTip.setDuration(3000);
+                            tempTip.show('删除计费模型失败!'+'网络错误:' + err);
+                        });
+                },
+                initInputs:function(){
+                    let data=this;
+                    let uriParts =decodeURI(location.href).split("?");
+                    if(uriParts.length>1){
+                        let params = uriParts[1].split('&');
+                        params.forEach(function(paramPair){
+                            let pair=paramPair.split('=');
+                            let key = pair[0], val = pair[1];
+                            $('input[name="'+key+'"]').val(val);
+                            $('select[name="'+key+'"]').val(val);
+                            decodeURI(data.filterData[key]=val);
+                        });
+                    }
+                },
+                setPaginate:function(e){
+                    this.filterData.paginate=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+                setCarrier:function (e){
+                    this.filterData.carrier_id=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+                setProvince:function (e){
+                    this.filterData.province_id=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+            }
+        });
+    </script>
+@endsection

+ 168 - 0
resources/views/maintenance/priceModel/logistic/index.blade.php

@@ -0,0 +1,168 @@
+
+@extends('layouts.app')
+@section('title')运输价格模型@endsection
+
+@section('content')
+    <span id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.waybillPriceModel.menu')@endcomponent
+    </span>
+    <div id="list">
+    <div class="container-fluid">
+        <div class="card">
+            <div>
+                <form  method="GET" action="{{url('maintenance/waybillPriceModel')}}" id="optionSubmit">
+                    <table class="table  table-sm table-bordered table-hover text-nowrap ">
+                        <tr>
+                            <td  > <label style="margin-left: 2%" class="form-inline">页显示条数:
+                                <select name="paginate" v-model="filterData.paginate" class="form-control" @change="setPaginate">
+                                    <option value="50">50行</option>
+                                    <option value="100">100行</option>
+                                    <option value="200">200行</option>
+                                    <option value="500">500行</option>
+                                    <option value="1000">1000行</option>
+                                </select></label></td>
+                            <td > <label class="form-inline" style="margin-left: 2%">承运商:
+                                <select name="carrier_id" v-model="filterData.carrier_id" class="form-control"  @change="setCarrier">
+                                    <option >    </option>
+                                    @foreach($carriers as $carrier)
+                                        <option value="{{$carrier->id}}">{{$carrier->name}}</option>
+                                    @endforeach
+                                </select></label></td>
+                            <td><label class="form-inline" style="margin-left: 2%">省份:
+                                <select name="province_id" v-model="filterData.province_id" class="form-control" @change="setProvince">
+                                    <option>    </option>
+                                    @foreach($provinces as $province)
+                                        <option value="{{$province->id}}">{{$province->name}}</option>
+                                    @endforeach
+                                </select><input hidden type="submit"></label></td>
+                        </tr>
+                    </table>
+                </form>
+            </div>
+            <div class="card-body">
+                @if(Session::has('successTip'))
+                    <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
+                @endif
+                <table class="table table-striped table-sm">
+                    <tr>
+                        <th>代码</th>
+                        <th>承运商名称</th>
+                        <th>省份</th>
+                        <th>城市</th>
+                        <th>计重单位</th>
+                        <th>区间</th>
+                        <th>单价(元)</th>
+                        <th>起步费(元)</th>
+                        <th>最低计数</th>
+                        <th>录入时间</th>
+                        <th>操作</th>
+                    </tr>
+                    <tr v-for="waybillPriceModel in waybillPriceModels">
+                        <td class="text-muted">@{{waybillPriceModel.id}}</td>
+                        <td>@{{waybillPriceModel.carrier}}</td>
+                        <td>@{{waybillPriceModel.province}}</td>
+                        <td>@{{waybillPriceModel.city}}</td>
+                        <td>@{{waybillPriceModel.unit}}</td>
+                        <td>@{{waybillPriceModel.range_min}}<a v-if="waybillPriceModel.range_min&&waybillPriceModel.range_max">&nbsp;&nbsp;--&nbsp;&nbsp;</a> @{{waybillPriceModel.range_max}}</td>
+                        <td>@{{waybillPriceModel.unit_price}}</td>
+                        <td>@{{waybillPriceModel.base_fee}}</td>
+                        <td>@{{waybillPriceModel.initial_weight}}</td>
+                        <td class="text-muted">@{{waybillPriceModel.created_at}}</td>
+                        <td>
+                            @can('计费模型-编辑')
+                                <button class="btn btn-sm btn-outline-primary" @click="edit(waybillPriceModel.id)">改</button> @endcan
+                            @can('计费模型-删除')
+                                <button class="btn btn-sm btn-outline-dark" @click="destroy(waybillPriceModel)">删</button> @endcan
+                        </td>
+                    </tr>
+                </table>
+                {{$waybillPriceModels->appends($filterData)->links()}}
+            </div>
+        </div>
+    </div>
+    </div>
+@endsection
+
+@section('lastScript')
+    <script>
+        new Vue({
+            el:"#list",
+            data:{
+                waybillPriceModels:[
+                    @foreach( $waybillPriceModels as $waybillPriceModel )
+                        {id:'{{$waybillPriceModel->id}}',carrier:'{{$waybillPriceModel->carrier_name}}',
+                        province:'{{$waybillPriceModel->province_name}}',city:'{{$waybillPriceModel->city_name}}',
+                        unit:'{{$waybillPriceModel->unit_name}}',range_min:'{{$waybillPriceModel->range_min}}',range_max:'{{$waybillPriceModel->range_max}}',
+                        unit_price:'{{$waybillPriceModel->unit_price}}',base_fee:'{{$waybillPriceModel->base_fee}}',initial_weight:'{{$waybillPriceModel->initial_weight}}',
+                        created_at:'{{$waybillPriceModel->created_at}}'},
+                    @endforeach
+                ],
+                filterData:
+                    {paginate:'50',carrier_id:'',province_id: ''},
+            },
+            mounted:function(){
+                this.initInputs();
+            },
+            methods:{
+                edit:function(id){
+                    location.href = "{{url('maintenance/waybillPriceModel')}}/"+id+"/edit";
+                },
+                destroy:function(waybillPriceModel){
+                    if(!confirm('确定要删除该计费模型吗?')){return};
+                    let data=this;
+                    let url = "{{url('maintenance/waybillPriceModel')}}/"+waybillPriceModel.id;
+                    axios.delete(url,{id:waybillPriceModel.id})
+                        .then(function (response) {
+                            if(response.data.success){
+                                for (let i = 0; i < data.waybillPriceModels.length; i++) {
+                                    if (data.waybillPriceModels[i].id===waybillPriceModel.id){
+                                        data.waybillPriceModels.splice(i,1);
+                                        break;
+                                    }
+                                }
+                                tempTip.setDuration(1000);
+                                tempTip.showSuccess('删除计费模型成功!')
+                            }else{
+                                tempTip.setDuration(1000);
+                                tempTip.show('删除计费模型失败!')
+                            }
+                        })
+                        .catch(function (err) {
+                            tempTip.setDuration(3000);
+                            tempTip.show('删除计费模型失败!'+'网络错误:' + err);
+                        });
+                },
+                initInputs:function(){
+                    let data=this;
+                    let uriParts =decodeURI(location.href).split("?");
+                    if(uriParts.length>1){
+                        let params = uriParts[1].split('&');
+                        params.forEach(function(paramPair){
+                            let pair=paramPair.split('=');
+                            let key = pair[0], val = pair[1];
+                            $('input[name="'+key+'"]').val(val);
+                            $('select[name="'+key+'"]').val(val);
+                            decodeURI(data.filterData[key]=val);
+                        });
+                    }
+                },
+                setPaginate:function(e){
+                    this.filterData.paginate=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+                setCarrier:function (e){
+                    this.filterData.carrier_id=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+                setProvince:function (e){
+                    this.filterData.province_id=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+            }
+        });
+    </script>
+@endsection

+ 25 - 0
resources/views/maintenance/priceModel/menu.blade.php

@@ -0,0 +1,25 @@
+
+<div class="container-fluid nav3">
+    <div class="card menu-third" >
+        <ul class="nav nav-pills">
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/waybillPriceModel')}}" :class="{active:isActive('',3)}">承运商</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/storage')}}" :class="{active:isActive('storage',3)}">仓储费</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/task')}}" :class="{active:isActive('goImport',3)}">作业费</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/expressage')}}" :class="{active:isActive('goImport',3)}">快递费</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/logistics')}}" :class="{active:isActive('goImport',3)}">物流费</a>
+            </li>
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/nonstop')}}" :class="{active:isActive('goImport',3)}">直发车</a>
+            </li>
+        </ul>
+    </div>
+</div>

+ 168 - 0
resources/views/maintenance/priceModel/nonstop/index.blade.php

@@ -0,0 +1,168 @@
+
+@extends('layouts.app')
+@section('title')运输价格模型@endsection
+
+@section('content')
+    <span id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.waybillPriceModel.menu')@endcomponent
+    </span>
+    <div id="list">
+    <div class="container-fluid">
+        <div class="card">
+            <div>
+                <form  method="GET" action="{{url('maintenance/waybillPriceModel')}}" id="optionSubmit">
+                    <table class="table  table-sm table-bordered table-hover text-nowrap ">
+                        <tr>
+                            <td  > <label style="margin-left: 2%" class="form-inline">页显示条数:
+                                <select name="paginate" v-model="filterData.paginate" class="form-control" @change="setPaginate">
+                                    <option value="50">50行</option>
+                                    <option value="100">100行</option>
+                                    <option value="200">200行</option>
+                                    <option value="500">500行</option>
+                                    <option value="1000">1000行</option>
+                                </select></label></td>
+                            <td > <label class="form-inline" style="margin-left: 2%">承运商:
+                                <select name="carrier_id" v-model="filterData.carrier_id" class="form-control"  @change="setCarrier">
+                                    <option >    </option>
+                                    @foreach($carriers as $carrier)
+                                        <option value="{{$carrier->id}}">{{$carrier->name}}</option>
+                                    @endforeach
+                                </select></label></td>
+                            <td><label class="form-inline" style="margin-left: 2%">省份:
+                                <select name="province_id" v-model="filterData.province_id" class="form-control" @change="setProvince">
+                                    <option>    </option>
+                                    @foreach($provinces as $province)
+                                        <option value="{{$province->id}}">{{$province->name}}</option>
+                                    @endforeach
+                                </select><input hidden type="submit"></label></td>
+                        </tr>
+                    </table>
+                </form>
+            </div>
+            <div class="card-body">
+                @if(Session::has('successTip'))
+                    <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
+                @endif
+                <table class="table table-striped table-sm">
+                    <tr>
+                        <th>代码</th>
+                        <th>承运商名称</th>
+                        <th>省份</th>
+                        <th>城市</th>
+                        <th>计重单位</th>
+                        <th>区间</th>
+                        <th>单价(元)</th>
+                        <th>起步费(元)</th>
+                        <th>最低计数</th>
+                        <th>录入时间</th>
+                        <th>操作</th>
+                    </tr>
+                    <tr v-for="waybillPriceModel in waybillPriceModels">
+                        <td class="text-muted">@{{waybillPriceModel.id}}</td>
+                        <td>@{{waybillPriceModel.carrier}}</td>
+                        <td>@{{waybillPriceModel.province}}</td>
+                        <td>@{{waybillPriceModel.city}}</td>
+                        <td>@{{waybillPriceModel.unit}}</td>
+                        <td>@{{waybillPriceModel.range_min}}<a v-if="waybillPriceModel.range_min&&waybillPriceModel.range_max">&nbsp;&nbsp;--&nbsp;&nbsp;</a> @{{waybillPriceModel.range_max}}</td>
+                        <td>@{{waybillPriceModel.unit_price}}</td>
+                        <td>@{{waybillPriceModel.base_fee}}</td>
+                        <td>@{{waybillPriceModel.initial_weight}}</td>
+                        <td class="text-muted">@{{waybillPriceModel.created_at}}</td>
+                        <td>
+                            @can('计费模型-编辑')
+                                <button class="btn btn-sm btn-outline-primary" @click="edit(waybillPriceModel.id)">改</button> @endcan
+                            @can('计费模型-删除')
+                                <button class="btn btn-sm btn-outline-dark" @click="destroy(waybillPriceModel)">删</button> @endcan
+                        </td>
+                    </tr>
+                </table>
+                {{$waybillPriceModels->appends($filterData)->links()}}
+            </div>
+        </div>
+    </div>
+    </div>
+@endsection
+
+@section('lastScript')
+    <script>
+        new Vue({
+            el:"#list",
+            data:{
+                waybillPriceModels:[
+                    @foreach( $waybillPriceModels as $waybillPriceModel )
+                        {id:'{{$waybillPriceModel->id}}',carrier:'{{$waybillPriceModel->carrier_name}}',
+                        province:'{{$waybillPriceModel->province_name}}',city:'{{$waybillPriceModel->city_name}}',
+                        unit:'{{$waybillPriceModel->unit_name}}',range_min:'{{$waybillPriceModel->range_min}}',range_max:'{{$waybillPriceModel->range_max}}',
+                        unit_price:'{{$waybillPriceModel->unit_price}}',base_fee:'{{$waybillPriceModel->base_fee}}',initial_weight:'{{$waybillPriceModel->initial_weight}}',
+                        created_at:'{{$waybillPriceModel->created_at}}'},
+                    @endforeach
+                ],
+                filterData:
+                    {paginate:'50',carrier_id:'',province_id: ''},
+            },
+            mounted:function(){
+                this.initInputs();
+            },
+            methods:{
+                edit:function(id){
+                    location.href = "{{url('maintenance/waybillPriceModel')}}/"+id+"/edit";
+                },
+                destroy:function(waybillPriceModel){
+                    if(!confirm('确定要删除该计费模型吗?')){return};
+                    let data=this;
+                    let url = "{{url('maintenance/waybillPriceModel')}}/"+waybillPriceModel.id;
+                    axios.delete(url,{id:waybillPriceModel.id})
+                        .then(function (response) {
+                            if(response.data.success){
+                                for (let i = 0; i < data.waybillPriceModels.length; i++) {
+                                    if (data.waybillPriceModels[i].id===waybillPriceModel.id){
+                                        data.waybillPriceModels.splice(i,1);
+                                        break;
+                                    }
+                                }
+                                tempTip.setDuration(1000);
+                                tempTip.showSuccess('删除计费模型成功!')
+                            }else{
+                                tempTip.setDuration(1000);
+                                tempTip.show('删除计费模型失败!')
+                            }
+                        })
+                        .catch(function (err) {
+                            tempTip.setDuration(3000);
+                            tempTip.show('删除计费模型失败!'+'网络错误:' + err);
+                        });
+                },
+                initInputs:function(){
+                    let data=this;
+                    let uriParts =decodeURI(location.href).split("?");
+                    if(uriParts.length>1){
+                        let params = uriParts[1].split('&');
+                        params.forEach(function(paramPair){
+                            let pair=paramPair.split('=');
+                            let key = pair[0], val = pair[1];
+                            $('input[name="'+key+'"]').val(val);
+                            $('select[name="'+key+'"]').val(val);
+                            decodeURI(data.filterData[key]=val);
+                        });
+                    }
+                },
+                setPaginate:function(e){
+                    this.filterData.paginate=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+                setCarrier:function (e){
+                    this.filterData.carrier_id=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+                setProvince:function (e){
+                    this.filterData.province_id=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+            }
+        });
+    </script>
+@endsection

+ 30 - 0
resources/views/maintenance/priceModel/storage/index.blade.php

@@ -0,0 +1,30 @@
+@extends('layouts.app')
+@section('title')仓储计价模型@endsection
+
+@section('content')
+    @component('maintenance.menu')@endcomponent
+    @component('maintenance.priceModel.menu')@endcomponent
+<div class="card">
+    <table class="table table-sm table-hover table-bordered table-striped m-2">
+        <tr>
+            <th>项目</th>
+            <th>计费类型</th>
+            <th>用仓类型</th>
+            <th>最低起租面积</th>
+            <th>单价</th>
+            <th>减免类型</th>
+            <th>减免方法</th>
+        </tr>
+        <tr>
+            <td>项目1</td>
+            <td>包仓1</td>
+            <td>常温</td>
+            <td>300</td>
+            <td>1.4</td>
+            <td>无减免</td>
+            <td>/</td>
+        </tr>
+    </table>
+</div>
+@endsection
+

+ 168 - 0
resources/views/maintenance/priceModel/task/index.blade.php

@@ -0,0 +1,168 @@
+
+@extends('layouts.app')
+@section('title')运输价格模型@endsection
+
+@section('content')
+    <span id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.waybillPriceModel.menu')@endcomponent
+    </span>
+    <div id="list">
+    <div class="container-fluid">
+        <div class="card">
+            <div>
+                <form  method="GET" action="{{url('maintenance/waybillPriceModel')}}" id="optionSubmit">
+                    <table class="table  table-sm table-bordered table-hover text-nowrap ">
+                        <tr>
+                            <td  > <label style="margin-left: 2%" class="form-inline">页显示条数:
+                                <select name="paginate" v-model="filterData.paginate" class="form-control" @change="setPaginate">
+                                    <option value="50">50行</option>
+                                    <option value="100">100行</option>
+                                    <option value="200">200行</option>
+                                    <option value="500">500行</option>
+                                    <option value="1000">1000行</option>
+                                </select></label></td>
+                            <td > <label class="form-inline" style="margin-left: 2%">承运商:
+                                <select name="carrier_id" v-model="filterData.carrier_id" class="form-control"  @change="setCarrier">
+                                    <option >    </option>
+                                    @foreach($carriers as $carrier)
+                                        <option value="{{$carrier->id}}">{{$carrier->name}}</option>
+                                    @endforeach
+                                </select></label></td>
+                            <td><label class="form-inline" style="margin-left: 2%">省份:
+                                <select name="province_id" v-model="filterData.province_id" class="form-control" @change="setProvince">
+                                    <option>    </option>
+                                    @foreach($provinces as $province)
+                                        <option value="{{$province->id}}">{{$province->name}}</option>
+                                    @endforeach
+                                </select><input hidden type="submit"></label></td>
+                        </tr>
+                    </table>
+                </form>
+            </div>
+            <div class="card-body">
+                @if(Session::has('successTip'))
+                    <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
+                @endif
+                <table class="table table-striped table-sm">
+                    <tr>
+                        <th>代码</th>
+                        <th>承运商名称</th>
+                        <th>省份</th>
+                        <th>城市</th>
+                        <th>计重单位</th>
+                        <th>区间</th>
+                        <th>单价(元)</th>
+                        <th>起步费(元)</th>
+                        <th>最低计数</th>
+                        <th>录入时间</th>
+                        <th>操作</th>
+                    </tr>
+                    <tr v-for="waybillPriceModel in waybillPriceModels">
+                        <td class="text-muted">@{{waybillPriceModel.id}}</td>
+                        <td>@{{waybillPriceModel.carrier}}</td>
+                        <td>@{{waybillPriceModel.province}}</td>
+                        <td>@{{waybillPriceModel.city}}</td>
+                        <td>@{{waybillPriceModel.unit}}</td>
+                        <td>@{{waybillPriceModel.range_min}}<a v-if="waybillPriceModel.range_min&&waybillPriceModel.range_max">&nbsp;&nbsp;--&nbsp;&nbsp;</a> @{{waybillPriceModel.range_max}}</td>
+                        <td>@{{waybillPriceModel.unit_price}}</td>
+                        <td>@{{waybillPriceModel.base_fee}}</td>
+                        <td>@{{waybillPriceModel.initial_weight}}</td>
+                        <td class="text-muted">@{{waybillPriceModel.created_at}}</td>
+                        <td>
+                            @can('计费模型-编辑')
+                                <button class="btn btn-sm btn-outline-primary" @click="edit(waybillPriceModel.id)">改</button> @endcan
+                            @can('计费模型-删除')
+                                <button class="btn btn-sm btn-outline-dark" @click="destroy(waybillPriceModel)">删</button> @endcan
+                        </td>
+                    </tr>
+                </table>
+                {{$waybillPriceModels->appends($filterData)->links()}}
+            </div>
+        </div>
+    </div>
+    </div>
+@endsection
+
+@section('lastScript')
+    <script>
+        new Vue({
+            el:"#list",
+            data:{
+                waybillPriceModels:[
+                    @foreach( $waybillPriceModels as $waybillPriceModel )
+                        {id:'{{$waybillPriceModel->id}}',carrier:'{{$waybillPriceModel->carrier_name}}',
+                        province:'{{$waybillPriceModel->province_name}}',city:'{{$waybillPriceModel->city_name}}',
+                        unit:'{{$waybillPriceModel->unit_name}}',range_min:'{{$waybillPriceModel->range_min}}',range_max:'{{$waybillPriceModel->range_max}}',
+                        unit_price:'{{$waybillPriceModel->unit_price}}',base_fee:'{{$waybillPriceModel->base_fee}}',initial_weight:'{{$waybillPriceModel->initial_weight}}',
+                        created_at:'{{$waybillPriceModel->created_at}}'},
+                    @endforeach
+                ],
+                filterData:
+                    {paginate:'50',carrier_id:'',province_id: ''},
+            },
+            mounted:function(){
+                this.initInputs();
+            },
+            methods:{
+                edit:function(id){
+                    location.href = "{{url('maintenance/waybillPriceModel')}}/"+id+"/edit";
+                },
+                destroy:function(waybillPriceModel){
+                    if(!confirm('确定要删除该计费模型吗?')){return};
+                    let data=this;
+                    let url = "{{url('maintenance/waybillPriceModel')}}/"+waybillPriceModel.id;
+                    axios.delete(url,{id:waybillPriceModel.id})
+                        .then(function (response) {
+                            if(response.data.success){
+                                for (let i = 0; i < data.waybillPriceModels.length; i++) {
+                                    if (data.waybillPriceModels[i].id===waybillPriceModel.id){
+                                        data.waybillPriceModels.splice(i,1);
+                                        break;
+                                    }
+                                }
+                                tempTip.setDuration(1000);
+                                tempTip.showSuccess('删除计费模型成功!')
+                            }else{
+                                tempTip.setDuration(1000);
+                                tempTip.show('删除计费模型失败!')
+                            }
+                        })
+                        .catch(function (err) {
+                            tempTip.setDuration(3000);
+                            tempTip.show('删除计费模型失败!'+'网络错误:' + err);
+                        });
+                },
+                initInputs:function(){
+                    let data=this;
+                    let uriParts =decodeURI(location.href).split("?");
+                    if(uriParts.length>1){
+                        let params = uriParts[1].split('&');
+                        params.forEach(function(paramPair){
+                            let pair=paramPair.split('=');
+                            let key = pair[0], val = pair[1];
+                            $('input[name="'+key+'"]').val(val);
+                            $('select[name="'+key+'"]').val(val);
+                            decodeURI(data.filterData[key]=val);
+                        });
+                    }
+                },
+                setPaginate:function(e){
+                    this.filterData.paginate=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+                setCarrier:function (e){
+                    this.filterData.carrier_id=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+                setProvince:function (e){
+                    this.filterData.province_id=e.target.value;
+                    var form = document.getElementById("optionSubmit");
+                    form.submit();
+                },
+            }
+        });
+    </script>
+@endsection

+ 10 - 2
resources/views/maintenance/role/index.blade.php

@@ -16,7 +16,8 @@
                     <tr>
                         <th>ID</th>
                         <th>角色名</th>
-                        <th>权限</th>
+                        <th>允许权限</th>
+                        <th>禁止权限</th>
                         <th>创建时间</th>
                         <th>操作</th>
                     </tr>
@@ -26,7 +27,14 @@
                         <td>
                             <div style="max-height: 130px;overflow-y: scroll;border: solid 1px #ddd;" v-if="role.authorities.length>0">
                                 <ul class="list-group">
-                                    <li v-for="authority in role.authorities" :class="authority.permission=='禁止'?'text-danger':''" style="list-style: none">@{{ authority.alias_name }}</li>
+                                    <li v-for="authority in role.authorities" v-if="authority.permission=='允许'"  style="list-style: none">@{{ authority.alias_name }}</li>
+                                </ul>
+                            </div>
+                        </td>
+                        <td>
+                            <div style="max-height: 130px;overflow-y: scroll;border: solid 1px #ddd;" v-if="role.authorities.length>0">
+                                <ul class="list-group">
+                                    <li v-for="authority in role.authorities" v-if="authority.permission=='禁止'"  style="list-style: none">@{{ authority.alias_name }}</li>
                                 </ul>
                             </div>
                         </td>

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

@@ -26,7 +26,7 @@
                     <div class="h5 text-center mb-3">
                         <ul class="nav nav-tabs">
                             <li class="nav-item offset-5"><a class="nav-link @if($type=='专线') active @endif" href="{{url('waybill/create/ZX')}}">专线</a></li>
-                            <li class="nav-item"><a class="nav-link @if($type!='专线') active @endif" href="{{url('waybill/create/ZF')}}">直发车</a></li>
+                            <li class="nav-item"><a class="nav-link @if($type!='专线') active @endif" href="{{url('files')}}">直发车</a></li>
                         </ul>
                     </div>
                     <div class="form-group row">

+ 156 - 18
resources/views/waybill/index.blade.php

@@ -29,7 +29,7 @@
             <form  method="GET" action="@if($uriType=='ZF'){{url('waybill/index/ZF')}}@elseif($uriType=='ZX'){{url('waybill/index/ZX')}}@else{{url('waybill/index')}}@endif" id="optionSubmit">
                 <table class="table table-sm table-bordered  text-nowrap mb-0" style="background: #fff;">
                     <tr v-if="isBeingFilterConditions">
-                        <td colspan="4"><div class="col" style="padding:0">
+                        <td colspan="4"><div class="col" style="padding:0;">
                                 <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>
@@ -48,22 +48,20 @@
                     <tr >
                         <td >
                             <div class="form-inline">
-                            <select name="owner_id"  v-model="filterData.owner_id"  class="form-control form-control-sm tooltipTarget "  @change="setOwner" style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
-                                <option value="" class="text-secondary">货主 </option>
-                                <option v-for="owner in owners" :value="owner.id" class="font-weight-bold">@{{owner.name}}</option>
-                            </select>
-                            <div style="position: relative;">
-                                <button type="button" v-show="!isOwnersBtn" @click="isOwnersBtn=true;" style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
-                                <button type="button" v-show="isOwnersBtn" @click="isOwnersBtn=false;" style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">收起货主</button>
-                                <span v-show="isOwnersBtn" class="border" style="position: absolute;left:0;top:30px;width:80px;max-height:100px;overflow:auto;background-color: white">
-                                    <ul style="list-style-type:none" class="pl-0">
+                                <select name="owner_id"  v-model="filterData.owner_id"  class="form-control form-control-sm tooltipTarget "  @change="setOwner" style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
+                                    <option value="" class="text-secondary">货主 </option>
+                                    <option v-for="owner in owners" :value="owner.id" class="font-weight-bold">@{{owner.name}}</option>
+                                </select>
+                                <div style="position: relative;" @mouseover="isOut=true;mouseleaveOwner();" @mouseleave="isOut=false;mouseleaveOwner();">
+                                    <input type="text" title="多选货主时双击选中" class="form-control form-control-sm tooltipTarget" @input="owner_seek($event)"  placeholder="定位货主" @blur="isBlur=false;blurOwner();" @focus="isOwnersBtn=true;isBlur=true;">
+                                    <span v-show="isOwnersBtn" class="border"   style="position: absolute;left:0;top:30px;width:150px;max-height:100px;overflow:auto;background-color: white">
+                                    <ul style="list-style-type:none" class="pl-0" >
                                         <li v-for="owner in owners" style="cursor: pointer;user-select:none;" :style="{'background-color':filterData.owners['_'+owner.id]?'#4aa0e6':''}"
                                             @dblclick="selectedOwner(owner.id)" class="text-left">@{{owner.name}}<hr class="m-0" style="width: 100%"></li>
                                     </ul>
-
                                 </span>
-                                <input hidden name="owners" :value="JSON.stringify(filterData.owners)">
-                            </div>
+                                    <input hidden name="owners" :value="JSON.stringify(filterData.owners)">
+                                </div>
                             </div>
                         </td>
                         <td >
@@ -119,6 +117,7 @@
                                     <a class="dropdown-item" @click="waybillExport(2)" href="javascript:">导出所有页</a>
                                 </div>
                             </span>
+                            @can('运输管理-图片删除')<button type="button" @click="deleteImg()" class="btn btn-sm btn-outline-danger ml-2">删除所选图片</button>@endcan
                         </td>
                     </tr>
                 </table>
@@ -153,6 +152,7 @@
                     <th class="td-bill">上游单号</th>
                     <th class="td-bill">WMS订单号</th>
                     <th class="td-bill">运单号</th>
+                    <th class="td-bill">照片</th>
                     <th class="td-transit">收件人</th>
                     <th class="td-transit">收件人电话</th>
                     <th class="td-transit">始发地</th>
@@ -193,7 +193,7 @@
                             @can('运输管理-运单审核')
                                 <button class="btn btn-outline-primary btn-sm" @click="waybillAudit(waybill.id,waybill.waybill_number)">审核</button>
                             @endcan
-                            @can('运输管理-运单编辑')
+                            @can('运输管理-编辑')
                                 <button class="btn btn-outline-secondary btn-sm" @click="waybillUpdate(waybill.id)">修改</button>
                             @endcan
                         </span>
@@ -220,6 +220,16 @@
                     <td class="td-bill">@{{waybill.source_bill}}</td>
                     <td class="td-bill">@{{waybill.wms_bill_number}}</td>
                     <td class="td-bill">@{{waybill.waybill_number}}</td>
+                    <td class="td-bill">
+                        <div align="center" @mouseleave="removeCommonImg('common_img_'+waybill.id)" @mouseenter="commonImg('img_'+waybill.id,waybill.url,waybill.suffix)">
+                            <img v-if="waybill.url" :id="'img_'+waybill.id"  :data-src="waybill.url+'-thumbnail.'+waybill.suffix" src="{{url('icon/img404-thumbnail.jpg')}}">
+                            @can('运输管理-图片上传')<div v-if="!waybill.url">
+                                <input class="btn  btn-sm btn-outline-info" type="button" @click="certiimg(waybill.waybill_number)" value="上传图片"/>
+                                <input type="file" @change="submitFile($event,waybill.waybill_number)" :id="waybill.waybill_number"
+                                       style="display: none" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
+                            </div>@endcan
+                        </div>
+                    </td>
                     <td class="td-transit">@{{waybill.recipient}}</td>
                     <td class="td-transit">@{{waybill.recipient_mobile}}</td>
                     <td class="td-transit text-muted">@{{waybill.origination}}</td>
@@ -258,7 +268,7 @@
                     {{--                            @can('运输管理-运单审核')--}}
                     {{--                                <button class="btn btn-outline-success btn-sm" @click="waybillAudit(waybill.id,waybill.waybill_number)">审核</button>--}}
                     {{--                            @endcan--}}
-                    {{--                            @can('运输管理-运单编辑')--}}
+                    {{--                            @can('运输管理-编辑')--}}
                     {{--                                <button class="btn btn-outline-secondary btn-sm" @click="waybillUpdate(waybill.id)">修改</button>--}}
                     {{--                            @endcan--}}
                     {{--                        </div>--}}
@@ -323,7 +333,7 @@
                 waybills:[
                         @foreach($waybills as $waybill)
                     {
-                        id:'{{$waybill->id}}',created_at:'{{$waybill->created_at}}',updated_at:'{{$waybill->updated_at}}',
+                        id:'{{$waybill->id}}',created_at:'{{$waybill->created_at}}',updated_at:'{{$waybill->updated_at}}',url:'{{$waybill->upload_file_url}}',suffix:'{{$waybill->upload_file_type}}',
                         status:'{{$waybill->status}}',type:'{{$waybill->type}}',waybill_number:'{{$waybill->waybill_number}}',
                         owner:'{{$waybill->owner_name}}',source_bill:'{{$waybill->source_bill}}',wms_bill_number:'{{$waybill->wms_bill_number}}',origination:'{{$waybill->origination}}',
                         destination:'{{$waybill->destination}}',recipient:'{{$waybill->recipient}}',recipient_mobile:'{{$waybill->recipient_mobile}}',
@@ -357,7 +367,10 @@
                     {!! $owner !!},
                     @endforeach
                 ],
+                isOut:false,
+                isBlur:false,
                 isOwnersBtn:false,
+                imgs:'',
             },
             computed:{
                 isBeingFilterConditions:function(){
@@ -388,8 +401,30 @@
                 this.initInputs();
                 $(".tooltipTarget").tooltip({'trigger':'hover'});
                 $('#list').removeClass('d-none');
+                this.imgs=Array.from(document.getElementById('list').querySelectorAll('img'));
+                this.lazy();
+                if (this.imgs&&this.imgs.length>0){
+                    window.addEventListener('scroll',this.lazy)
+                }
             },
             methods:{
+                lazy(){
+                    //可视区域高度
+                    let height=window.innerHeight;
+                    //滚动区域高度
+                    let scrollHeight = document.documentElement.scrollTop || document.body.scrollTop;
+                    let _this=this;
+                    this.imgs.forEach(function (img,i) {
+                        if ((height+scrollHeight)>$('#'+img.getAttribute('id')).offset().top && img.getAttribute('data-src')){
+                            let temp=new Image();
+                            temp.src=img.getAttribute('data-src');
+                            temp.onload=function () {
+                                img.src=img.getAttribute('data-src');
+                                _this.$delete(_this.imgs,i);
+                            }
+                        }
+                    });
+                },
                 initInputs:function(){
                     let data=this;
                     let uriParts =decodeURI(location.href).split("?");
@@ -444,7 +479,7 @@
                     if(!confirm('确定要驳回“'+waybill_number+'”的审核吗?')){return};
                     let _this=this;
                     let w;
-                    let url='{{url('waybill/waybillRetreatAudit')}}';
+                    let url='{{url('files')}}';
                     axios.post(url,{id:id})
                         .then(
                             function (response) {
@@ -601,8 +636,111 @@
                         return;
                     }
                     this.$set(this.filterData.owners,'_'+id,id);
-                    if (this.filterData.owners.length===1)this.filterData.owner_id=id;
+                    if (Object.keys(this.filterData.owners).length===1)this.filterData.owner_id=id;
                     else this.filterData.owner_id='';
+                },
+                owner_seek:function (e) {
+                    let val=e.target.value;
+                    if (this.owners.length<1)return;
+                    let _this=this;
+                    let ownerTemp=_this.owners[0];
+                    this.owners.every(function (owner,i) {
+                        if (owner.name.includes(val)){
+                            if (i===0)return ;
+                            _this.$set(_this.owners,0,owner);
+                            _this.$set(_this.owners,i,ownerTemp);
+                            return false;
+                        }
+                        return  true;
+                    });
+                },
+                mouseleaveOwner:function () {
+                    if(!this.isOut&&!this.isBlur){
+                        this.isOwnersBtn=false;
+                    }
+                },
+                blurOwner:function () {
+                    if (!this.isOut&&!this.isBlur){
+                        this.isOwnersBtn=false;
+                    }
+                },
+                certiimg(waybill_number){
+                    $('#'+waybill_number).click();
+                },
+                submitFile(e,waybill_number){
+                    let file=e.target.files[0];
+                    if (file.size >=5242880){
+                        tempTip.setDuration(3000);
+                        tempTip.show("图片大小不能超过5MB!");
+                        return;
+                    }
+                    let _this=this;
+                    let formData=new FormData();
+                    formData.append("file",file);
+                    formData.append("waybill_number",waybill_number);
+                    axios.post('{{url('waybill/upload')}}',formData)
+                        .then(function (response) {
+                            if (!response.data.success){
+                                tempTip.setDuration(4000);
+                                tempTip.show(response.data.error);
+                                return;
+                            }
+                            _this.waybills.some(function (waybill) {
+                                if (waybill.waybill_number===waybill_number){
+                                    waybill.url=response.data.data.url;
+                                    waybill.suffix=response.data.data.type;
+                                    setTimeout(function () {
+                                        _this.imgs.push(document.getElementById('img_'+waybill.id));
+                                        _this.lazy();
+                                    },1);
+                                    tempTip.setDuration(3000);
+                                    tempTip.showSuccess("上传成功!");
+                                    return true;
+                                }
+                            });
+                        }).catch(function (err) {
+                        tempTip.setDuration(4000);
+                        tempTip.show("网络错误:"+err);
+                    })
+                },
+                commonImg(id,url,suffix){
+                    $('#'+id).after("<div id=\"common_"+id+"\" style=\"position: relative;margin-top: 2px\">" +
+                        "                        <a target='_blank' href='"+url+'-bulky.'+suffix+"'><img src=\""+url+'-common.'+suffix+"\" style=\"position: absolute;left:-50px; \" ></a>" +
+                        "                        <p class='title text-center'><button class='btn btn-outline-light btn-sm'>删除</button></p>" +
+                        "                        </div>");
+                },
+                removeCommonImg(id){
+                    $('#'+id).remove();
+                },
+                deleteImg(){
+                    if (this.checkData.length <= 0) {
+                        tempTip.setDuration(2000);
+                        tempTip.showSuccess('没有勾选任何记录');
+                        return;
+                    }
+                    if (!confirm('确定要删除所选图片吗?'))return;
+                    let _this=this;
+                    axios.post('{{url('waybill/deleteImg')}}',{ids:_this.checkData})
+                        .then(function (response) {
+                            if (!response.data.success){
+                                tempTip.setDuration(4000);
+                                tempTip.show("删除失败");
+                                return;
+                            }
+                            _this.checkData.forEach(function (id) {
+                                _this.waybills.some(function (waybill) {
+                                    if (waybill.id===id){
+                                        waybill.url='';
+                                        return true;
+                                    }
+                                });
+                            });
+                            tempTip.setDuration(3000);
+                            tempTip.showSuccess("删除成功!");
+                        }).catch(function (err) {
+                            tempTip.setDuration(4000);
+                            tempTip.show("网络错误:"+err);
+                        });
                 }
             },
             filters:{

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

@@ -12,7 +12,7 @@
                     <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>
+                                <a class="nav-link" href="@if(!isset($excepted)) {{url('files')}} @else {{url('waybill/waybillFinancialExcepted')}} @endif" :class="{active:isActive('',3)}">全部</a>
                             </li> @endcan
                         @can('财务报表-查询')
                             <li class="nav-item">

+ 40 - 0
routes/web.php

@@ -62,6 +62,8 @@ Route::post('maintenance/paperBox/excel/import','PaperBoxController@import');
 Route::resource('maintenance/paperBox', 'PaperBoxController');
 Route::get('maintenance/paperBox/excel/goImport',function (){return view('maintenance.paperBox.import');});
 
+Route::post('waybill/deleteImg','WaybillsController@deleteImg');
+Route::post('waybill/upload','WaybillsController@upload');
 Route::get('waybill/relating',function (){return view('waybill.menuWaybill');});
 Route::resource('maintenance/waybillPriceModel','WaybillPriceModelsController');
 Route::get('maintenance/waybillPriceModel/excel/goImport',function (){return view('maintenance.waybillPriceModel.import');});
@@ -250,3 +252,41 @@ Route::group(['prefix'=>'order'],function(){
     //批量备注
     Route::post('create/batchComments','OrderController@batchComments');
 });
+
+
+
+/**
+ * 客户
+ */
+Route::group(['prefix'=>'client'],function(){
+    //基础资料
+    Route::resource('base','ClientController');
+    //面积盘点
+    Route::get('areaCheck','ClientController@areaCheckIndex');
+    //面积盘点录入
+    Route::get('areaCheck/create','ClientController@areaCheckCreate');
+    //账单确认
+    Route::get('billCheck','ClientController@billCheckIndex');
+    //账单确认录入
+    Route::get('billCheck/create','ClientController@billCheckCreate');
+    //绩效报表
+    Route::get('performanceReport','ClientController@performanceReportIndex');
+    //即时账单
+    Route::get('instantBill','ClientController@instantBillIndex');
+});
+
+/**
+ * 计价模型
+ */
+Route::group(['prefix'=>'maintenance/priceModel'],function(){
+    //仓储
+    Route::resource('storage','PriceModelStorageController');
+    //作业
+    Route::resource('task','PriceModelTaskController');
+    //快递
+    Route::resource('expressage','PriceModelExpressageController');
+    //物流
+    Route::resource('logistic','PriceModelLogisticController');
+    //直发车
+    Route::resource('nonstop','PriceModelNonstopController');
+});

+ 15 - 0
tests/webApi/thirdPart/weight/PackageController.http

@@ -0,0 +1,15 @@
+# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection).
+##
+## Following HTTP Request Live Templates are available:
+## * 'gtrp' and 'gtr' create a GET request with or without query parameters;
+## * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body;
+## * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);
+
+POST http://bswas/api/thirdPart/weight/new
+Content-Type: application/json
+
+{"barcode":"test","weight":"5","id":"00C66186389","key":"2C7FACD3AFC3FFE547FC54CDA076A25D","time":"2020-2-26 14:17:07"}
+###
+
+
+