Просмотр исходного кода

API认证接口
运输管理页面改进

Zhouzhendong 4 лет назад
Родитель
Сommit
ea431b3ff8

+ 43 - 29
app/Http/ApiControllers/LoginController.php

@@ -4,42 +4,56 @@
 namespace App\Http\ApiControllers;
 
 
+use Firebase\JWT\JWT;
+use Illuminate\Foundation\Auth\User;
+use Illuminate\Http\JsonResponse;
 use Illuminate\Http\Request;
-use Illuminate\Http\Response;
+use Illuminate\Support\Facades\Hash;
 
 class LoginController
 {
-    public function login(Request $request):Response
+    /**
+     * JWT登录
+     *
+     * @param Request $request
+     * @return JsonResponse
+     */
+    public function login(Request $request):JsonResponse
     {
-        $user_name = $request->get('username','');
+        $userName = $request->get('username','');
         $password = $request->get('password','');
-        $user = Users::where(['username' => $user_name,'password' => $password])->first();
-        if(!$user)
-        {
-            return response()->json('用戶名或密碼錯誤!');
+        $user = User::query()->where("name",$userName)->first();
+        $response = [
+            'message' => '请求成功',
+            'status_code' => 200,
+        ];
+        //验证用户登录
+        if (!$user || !Hash::check(base64_encode($password),$user->password)){
+            $response["message"] = "用户名或密码错误";
+            $response["status_code"] = 401;
+            return response()->json($response);
         }
-        unset($user['password']);
-        //登录成功token
-        $token = $this->getJWTToken($user);
-        cache('user-'.$user['id'],$user);
-        return response()->json(['token' => $token]);
-    }
 
-    public function getJWTToken($value)
-    {
-        $time = time();
-        $payload = [
-            'iat' => $time,
-            'nbf' => $time,
-            'exp' => $time+7200,
-            'data' => [
-                'id' => $value['id'],
-                'username' => $value['user_name']
-            ]
-        ];
-        $key =  env('JWT_SECRET');
-        $alg = 'HS256';
-        $token = JWT::encode($payload,$key,$alg);
-        return $token;
+        //获取公私钥
+        try {
+            $privateKey = file_get_contents(base_path().'/private.pem');
+            //$publicKey = file_get_contents(base_path().'/public.pem');
+        }catch (\Exception $e){
+            $response["status_code"] = 410;
+            if (strpos($e->getMessage(),"No such file or directory")!==false)$response["message"] = "服务器异常,资源丢失";
+            else $response["message"] = "访问某些资源失败";
+            return response()->json($response);
+        }
+
+        try {
+            $response["data"] = ["token"=>$this->getJWTToken($user,$privateKey)];
+            return response()->json($response);
+        }catch (\Exception $e){
+            $response["status_code"] = 409;
+            $response["message"] = "资源异常,无法反馈";
+            return response()->json($response);
+        }
     }
+
+
 }

+ 46 - 114
app/Http/Controllers/TestController.php

@@ -9,6 +9,7 @@ use App\Components\AsyncResponse;
 use App\Components\ErrorPush;
 use App\ErrorTemp;
 use App\Feature;
+use App\Http\ApiControllers\LoginController;
 use App\Http\Requests\OrderDelivering;
 use App\Jobs\CacheShelfTaskJob;
 use App\Jobs\OrderCreateInstantBill;
@@ -54,6 +55,7 @@ use App\ValueStore;
 use App\Waybill;
 use Carbon\Carbon;
 use Carbon\CarbonPeriod;
+use Firebase\JWT\JWT;
 use Illuminate\Database\Eloquent\Collection;
 use Illuminate\Foundation\Http\FormRequest;
 use Illuminate\Http\Request;
@@ -62,6 +64,7 @@ use Illuminate\Support\Facades\Auth;
 use Illuminate\Support\Facades\Cookie;
 use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Http;
+use Illuminate\Support\Facades\URL;
 use PhpOffice\PhpSpreadsheet\Calculation\Web\Service;
 
 class TestController extends Controller
@@ -78,125 +81,54 @@ class TestController extends Controller
     {
         return call_user_func([$this, $method], $request);
     }
-    public function test1(){
-        ini_set('max_execution_time',-1);
-        $date = date("Y-m-d H:i:s");
-        ErrorTemp::query()->truncate();
-        OwnerFeeStorage::query()->truncate();
-        OwnerFeeExpress::query()->truncate();
-        OwnerFeeLogistic::query()->truncate();
-        OwnerFeeOperation::query()->truncate();
-        OwnerFeeOperationDetail::query()->truncate();
-        foreach (Order::query()->where("wms_edittime",">=","2021-08-16 00:00:00")
-                     ->where("wms_status","订单完成")
-                     ->where("wms_edittime","<",$date)->get() as $order){
-            $fee = OwnerFeeDetail::query()->where("outer_table_name","orders")->where("outer_id",$order->id)->first();
-            if ($fee){
-                OwnerFeeDetailLogistic::query()->where("owner_fee_detail_id",$fee->id)->delete();
-                $fee->delete();
-            }
-            $a = new Collection([$order]);
-            $this->dispatch(new OrderCreateInstantBill($a));
-        }
-        foreach (Store::query()->where("updated_at",">=","2021-08-16 00:00:00")
-                     ->where("status","已入库")
-                     ->where("updated_at","<",$date)->get() as $store){
-            OwnerFeeDetail::query()->where("outer_table_name","stores")->where("outer_id",$store->id)->delete();
-            $a = new Collection([$store]);
-            $this->dispatch(new StoreCreateInstantBill($a));
-        }
-    }
-
-    public function test()
+    public function test4()
     {
-        ini_set('max_execution_time',-1);
-        $day = (string)\request("day");
-        $d = (int)$day+1;
-        $d = $d<10 ? '0'.(string)$d : (string)$d;
-        foreach (Order::query()->where("wms_edittime",">=","2021-08-{$day} 00:00:00")
-                     ->where("wms_status","订单完成")
-                     ->where("wms_edittime","<","2021-08-{$d} 00:00:00")->get() as $order){
-            $fee = OwnerFeeDetail::query()->where("outer_table_name","orders")->where("outer_id",$order->id)->first();
-            if ($fee){
-                OwnerFeeDetailLogistic::query()->where("owner_fee_detail_id",$fee->id)->delete();
-                $fee->delete();
-            }
-            $a = new Collection([$order]);
-            $this->dispatch(new OrderCreateInstantBill($a));
+        $user = User::query()->first();
+        $b = file_get_contents(base_path().'/public.pem');
+        $decoded = JWT::decode("eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJkYXRhIjp7ImZpZWxkMSI6MSwiZmllbGQyIjoic3RyaW5nIGRhdGEifSwiaXNzIjoiaHR0cDpcL1wvZXhhbXBsZS5vcmciLCJhdWQiOiJodHRwOlwvXC9leGFtcGxlLmNvbSIsImlhdCI6MTYyOTc3NDUxMywiZWF0IjoxNjI5NzgxNzEzfQ.Twl3_KPMLP4Pi4zaGZig8SKhE9M6nZlCI8bVifWjuYIWuqZtlujp35Zvv1oY0GnPIkUmq-PGJZLU96mmT-RTRDL-83sPF2l7PPTeriYMoiKP1r2rsI421BtrgLs0qP7QCPxH5BmHWXAVbwTtnwv8JagKzcZxkZJRH3Lj8blRapumnCk-tMfHz4xiXHIATfMS1I23vhJJLomC-KW4Ou3pjTu6X3HiiUGe9ZBGTu5mHfiKm25dxXO5Fm3JMg2-anLf_Gy6D6D7IQJ5pM5HFEN-HdD7FibeEMraMxbk5B_82L15OjhaoCV7b7ioXNSs2QAdlRfuRgx0XIE_toFwb_152a", $b, ['RS256']);
+        $payload = [
+            'data' => ['field1' => 1, 'field2' => 'string data'],
+            "iss" => "http://example.org",
+            "aud" => "http://example.com",
+            "iat" => time(),
+            "eat" => time()+7200,
+        ];
+        try {
+            $token = JWT::encode($payload, $a, 'RS256');
+        }catch (\Exception $e){
+            $this->error("HTTP:409,资源异常,无法反馈");
         }
-        foreach (Store::query()->where("updated_at",">=","2021-08-{$day} 00:00:00")
-                     ->where("status","已入库")
-                     ->where("updated_at","<","2021-08-{$d} 00:00:00")->get() as $store){
-            OwnerFeeDetail::query()->where("outer_table_name","stores")->where("outer_id",$store->id)->delete();
-            $a = new Collection([$store]);
-            $this->dispatch(new StoreCreateInstantBill($a));
+        try {
+            $a = file_get_contents("test");
+        }catch (\Exception $e){
+            if (strpos($e->getMessage(),"No such file or directory")!==false)$this->error("HTTP:410,服务器异常,资源丢失");
+            else $this->error("HTTP:403,访问某些资源失败");
         }
-    }
 
-    public function test3()
-    {
-        $sql = <<<SQL
-select * from DOC_ORDER_HEADER
-where ADDTIME>=to_date('2021-08-15 00:00:00','yyyy-mm-dd hh24:mi:ss') AND
-    ADDTIME<=to_date('2021-08-20 16:00:00','yyyy-mm-dd hh24:mi:ss') and SOSTATUS >= '40'
-                                 and CARRIERID in (
-    'BSZFC','BSZX','BSZFCDF','BSZXDF','DBWL','DBWLDF'
-    )
-SQL;
-        $s = new \App\Http\Controllers\api\thirdPart\flux\WaybillController();
-        $arr = DB::connection("oracle")->select(DB::raw($sql));
-        foreach ($arr as $ar){
-            if (Waybill::query()->where("wms_bill_number",'like','%'.$ar->orderno.'%')
-                ->where("created_at",">=",'2021-08-10 00:00:00')->first())continue;
-            $sql = <<<SQL
-select * from DOC_ORDER_DETAILS left join bas_sku on DOC_ORDER_DETAILS.CUSTOMERID = BAS_SKU.CUSTOMERID and DOC_ORDER_DETAILS.sku = BAS_SKU.SKU
-where ORDERNO = ?
-SQL;
-            $details = [];
-            foreach (DB::connection("oracle")->select(DB::raw($sql),[$ar->orderno]) as $item){
-                $details[] = [
-                    "SKU_Descr_c" => $item->descr_c,
-                    "SKU" => $item->sku,
-                    "Alternate_sku1" => $item->alternate_sku1,
-                    "Qtyordered_each" => $item->qtyordered_each,
-                    "Cubic" => $item->cubic,
-                    "GrossWeight" => $item->grossweight,
-                    "NetWeight" => $item->netweight,
-                    "ReservedField01" => $ar->soreference1,
-                    "ReservedField02" => $ar->soreference2,
-                    "ReservedField03" => $ar->soreference3,
-                    "ReservedField04" => $ar->soreference4,
-                    "ReservedField05" => $ar->soreference5,
-                ];
-            }
-            $r = new Request();
-            $res = [
-                "OrderNo" => $ar->orderno,
-                "CustomerID" => $ar->customerid,
-                "CarrierID" => $ar->carrierid,
-                "ConsigneeName" => $ar->consigneename,
-                "C_Tel1" => $ar->c_tel1,
-                "C_Address1" => $ar->c_address1,
-                "C_Province" => $ar->c_province,
-                "C_City" => $ar->c_city,
-                "C_District" => $ar->c_district,
-                "ReservedField01" => $ar->soreference1,
-                "ReservedField02" => $ar->soreference2,
-                "ReservedField03" => $ar->soreference3,
-                "ReservedField04" => $ar->soreference4,
-                "ReservedField05" => $ar->soreference5,
-                "order_list" => $details,
-            ];
-            $a = [$res];
-            $r->offsetSet("request",$a);
-            $s->new_($r);
-        }
 
-    }
-    public function test4()
-    {
-        $unit = Unit::query()->sql();
-        dd($unit);
+        $payload = [
+
+            'data' => ['field1' => 1, 'field2' => 'string data'],
+
+            "iss" => "http://example.org",
+
+            "aud" => "http://example.com",
+
+            "iat" => time(),
+
+            "eat" => time()+7200,
+
+        ];
+
+        $token = JWT::encode($payload, $a, 'RS256');
+
+        echo "Token:\n" . print_r($token, true) . "\n";
+
+        $decoded = JWT::decode($token, $b, ['RS256']);
+
+        $decoded_array = (array) $decoded;
+
+        echo "Decoded:\n" . print_r($decoded_array, true) . "\n";
     }
     public function OwnerStoreFeeReportService_recordReport()
     {

+ 23 - 6
app/Http/Controllers/WaybillController.php

@@ -769,18 +769,22 @@ SQL;
     }
 
     //发运
-    public function delivering(Request $request){
+    public function delivering(){
         if (!Auth::user())return view('exception.login');
-        $waybills= app('waybillService')->paginate($request->input());
+        $waybills= Waybill::query()->where("type","专线")->whereNotNull("deliver_at")
+            ->whereNotNull("logistic_id")->whereIn("status",["已审核","待终审"])
+            ->whereNull("carrier_bill")->orderByDesc("id");
         if (!Auth::user()->isSuperAdmin()){
-            $carriersUsers=DB::table('carrier_user')->where('user_id',Auth::id())->get();
+            $carriersUsers=DB::table('logistic_user')->where('user_id',Auth::id())->get();
             $carrierIds=array_column($carriersUsers->toArray(),'logistic_id');
-            $waybills=$waybills->whereIn("logistic_id",$carrierIds);
+            if ($carrierIds)$waybills->whereIn("logistic_id",$carrierIds);
         }
+        $waybills = $waybills->get();
         return view('transport.waybill.delivering',compact('waybills'));
     }
     //承运商提交
     public function storeCarrierBill(Request $request){
+        if(!Gate::allows("运输管理-承运商调度"))return ["error"=>"无权操作!"];
         $errors=Validator::make($request->input(),[
             'id'=>'required|integer',
             'carrier_bill'=>'required',
@@ -794,15 +798,21 @@ SQL;
             'numeric'=>':attribute 应为数字',
             'required_with'=>':attribute 重量与体积至少存在一项',
         ],[
-            'carrier_bill'=>'专线运单号',
+            'carrier_bill'=>'运单号',
             'inquire_tel'=>'查件电话',
             'amount'=>'件数',
             'carrier_weight'=>'体积',
             'carrier_weight_other'=>'重量',
         ])->errors();
+        $unit = app("UnitService")->getUnit("kg");
+        $unit1 = app("UnitService")->getUnit("件");
+        $unit2 = app("UnitService")->getUnit("m³");
         if (count($errors)>0)return ["errors"=>$errors];
         $waybill=Waybill::query()->find($request->input('id'));
         if (!$waybill)return ["error"=>"未找到该运单!"];
+        $request->offsetSet("carrier_weight_unit_id",$unit2);
+        $request->offsetSet("carrier_weight_unit_id_other",$unit);
+        $request->offsetSet("amount_unit_id",$unit1);
         $waybill->fill($request->input());
         $waybill->update();
         return $waybill;
@@ -1267,7 +1277,14 @@ SQL;
                 'audit_stage'=>'合单发货',
                 'user_id'=>Auth::id(),
             ]);
-        }else $waybill->update(["deliver_at"=>date("Y-m-d H:i:s"),"logistic"=>\request("logistic")]);
+        }else{
+            WaybillAuditLog::query()->create([
+                'waybill_id'=>$waybill->id,
+                'audit_stage'=>'单独发货',
+                'user_id'=>Auth::id(),
+            ]);
+            $waybill->update(["deliver_at"=>date("Y-m-d H:i:s"),"logistic"=>\request("logistic")]);
+        }
         $this->success();
     }
 

+ 49 - 0
app/Services/UserService.php

@@ -8,6 +8,7 @@ use App\Authority;
 use App\Owner;
 use App\User;
 use App\UserWorkgroup;
+use Firebase\JWT\JWT;
 use Illuminate\Support\Facades\Auth;
 use Illuminate\Support\Facades\Cache;
 use Illuminate\Support\Facades\DB;
@@ -118,4 +119,52 @@ class UserService
         Cache::forget("userWorkGroups:user_".$user->id);
         Cache::tags("AUTHORITY_MENU_MAPPING")->forget("am_mapping_".$user->id);
     }
+
+    /**
+     * 获取JWT token
+     *
+     * @param User|\stdClass $user
+     * @param mixed $key
+     * @return string
+     */
+    public function getJWTToken($user,$key):string
+    {
+        $time = time();
+        $payload = [
+            'iss' => $_SERVER["HTTP_HOST"], //签发者
+            'iat' => $time,
+            'nbf' => $time,
+            'exp' => $time+7200,
+            'data' => [
+                'id' => $user->id,
+                'username' => $user->name
+            ]
+        ];
+        $alg = 'RS256';
+        return JWT::encode($payload, $key, $alg);
+    }
+
+    /**
+     * 获取JWT token
+     *
+     * @param User|\stdClass $user
+     * @param mixed $key
+     * @return string
+     */
+    public function checkJWTToken($user,$key):string
+    {
+        $time = time();
+        $payload = [
+            'iss' => $_SERVER["HTTP_HOST"], //签发者
+            'iat' => $time,
+            'nbf' => $time,
+            'exp' => $time+7200,
+            'data' => [
+                'id' => $user->id,
+                'username' => $user->name
+            ]
+        ];
+        $alg = 'RS256';
+        return JWT::encode($payload, $key, $alg);
+    }
 }

+ 27 - 0
private.pem

@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAmVVfu9IeFX2izWMTZRaXBeuMBAwnpw7OsG0O7Vxg7xet35UK
+Fd/PCqZrGSA0ZWx5du6gHglnBPoXbqfNpRSUytMJsV2tU98eOYQnC6xu8667Fnwa
+5bsU2JLozXiLiUeibLI7i+H16KlI7o9Fi8wN1HfLNZE3FxBOmAtBLHe9c14OOGhW
+PF4syp4elsB+Jx4lcT5vNU1yx6qkMDcooQnu/LmGM8YSOVcyo5ABLc40XfrIaNSX
+9BzvryOcmCBX2M09Y7ho4bfKqPrlV2isSaCFHLMNJTmGppcVHfDIO/8CVDjGmbS8
+91ACX1UHJJM/PeGTrG8AZ9FaQWxurDdYLHuuRwIDAQABAoIBAHcQjlhAXs/9UQ//
+oS3cDsWwFHeIILpeiy0AYpj6JONEFeYJy10U/6abd4p5MXaYdvFddsQcNPzuXoe0
+kcFga/HbUimCPndkSAoNjmxIJ5fd1LUvBYvia9uIqHH06xVcpMmW1RpYCiXyXgmx
+AyX8+7hClW8xJgAoz37NLnyjNl+ANAQHFVqCCPLtF/8DVcP2lJM5bMJROfSL971m
+rApmgLqd1n30ic65qNKNiVFSmWlTD4b/apN5ISjfp4ro1X8fSmVjwWqmpaxsh+ux
+S13VntJiKrATEidoxxrL9C6NlxrptAYsR8LIsWhHQyEz/2q6KaJIkeFNDf++zlaT
+CIJ/ujECgYEAxuU4RZwl99Q+alcuSrDj96RQvOCIfstm2AlFmmHeJK8lE/uMIjTW
+hpsP8WdsPDpLU+OD3QYEe82+Yo5PpFsfiWeOd8Q54g/e6sjvuXwwtwVw6A7HXIkQ
+jK2J53dlf1+6r+cA/r4/Y29okIox/dDEcK8d1F9KVQ2bj+AcU/gdO9MCgYEAxVtc
+m5RHw4fieKMJY4a+3AvmV5fQu6fNyA99UIw+uB4KCFbv5oYXA7kblXrtHj2PRqxB
+pBZZyPnE1/OedHMPb+33lToQg734sYDLJp7ert8vFYhELMdwjBp3XOg01Wv99Uvj
+WgVZeyVIjcfzPxQRF4m3VGiN3YIQzpee8ydWvz0CgYB4afv4gMGn2fJztRZMl+1c
+VzmeMB3TDdfUwUBHaCrycKr0/xzm9LBQS/6J+0BW8j/6qMqDfIooXfZ+eoQTECv2
+pyBkuAMHLu6ZnE8uL9baZ0vk4lWmW0EOul28KdfkFpPSvPsoPwvnamKW52O+s67K
+PerEUXCSL6vXninoWFVyiwKBgGwl0Yyr59t9NhxXc0inyST6HGJ5nfeHT9vGqSwf
+fisUwvio81OGvUvb/wKd1xxQLZhTwrCxUsgwHq8cIAO+HYJ/i8GpjO00h/h1FF34
+hxyazslk378OF12fDzPJR1KAmCz4RgDJl6xE1QpkvKYfT/JvFBhcJwlwQdeD/KVQ
+NFgdAoGBAJiXip6LlEVh7LWB8xZtLxwNQEDPUHfrHfRkiLOOU3r9yc1uHt1+26PL
+lSXtzna8srqHDtelLz85RPPtjaS4SKJRku4BGqOLRJoT0fUM/hjSZ33veRDK9BP9
+NTo5csSr5S7WdIv7Obrnw8Ko95aAGmzgY+QIxz1W98bMPTf1BPJ+
+-----END RSA PRIVATE KEY-----

+ 9 - 0
public.pem

@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmVVfu9IeFX2izWMTZRaX
+BeuMBAwnpw7OsG0O7Vxg7xet35UKFd/PCqZrGSA0ZWx5du6gHglnBPoXbqfNpRSU
+ytMJsV2tU98eOYQnC6xu8667Fnwa5bsU2JLozXiLiUeibLI7i+H16KlI7o9Fi8wN
+1HfLNZE3FxBOmAtBLHe9c14OOGhWPF4syp4elsB+Jx4lcT5vNU1yx6qkMDcooQnu
+/LmGM8YSOVcyo5ABLc40XfrIaNSX9BzvryOcmCBX2M09Y7ho4bfKqPrlV2isSaCF
+HLMNJTmGppcVHfDIO/8CVDjGmbS891ACX1UHJJM/PeGTrG8AZ9FaQWxurDdYLHuu
+RwIDAQAB
+-----END PUBLIC KEY-----

+ 7 - 7
resources/views/store/inStorage/androidIndex.blade.php

@@ -20,15 +20,15 @@
         <div class="w-100 center h-75 row align-items-center justify-content-center">
             <div class="w-100">
 <!--                <a href="{{url('store/inStorage/cacheRackStorage')}}"><button class="btn btn-info w-75 text-white" style="height: 60px"><h4>整箱入库</h4></button></a>-->
-                <a href="{{url('store/handInStorage/receive')}}"><button class="btn btn-info w-75 h-25 text-white" style="height: 60px"><h4>收货</h4></button></a>
-                <a href="{{url('store/handInStorage/putaway')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>上架</h4></button></a>
-                <a href="{{url('store/inStorage/halfChestStorage')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>半箱入库</h4></button></a>
+                @can("入库管理-手持入库-收货")<a href="{{url('store/handInStorage/receive')}}"><button class="btn btn-info w-75 h-25 text-white" style="height: 60px"><h4>收货</h4></button></a>@endcan
+                @can("入库管理-手持入库-上架")<a href="{{url('store/handInStorage/putaway')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>上架</h4></button></a>@endcan
+                @can("入库管理-入库-半箱补货入库")<a href="{{url('store/inStorage/halfChestStorage')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>半箱入库</h4></button></a>
                 <a href="{{url('store/inStorage/boxBindShelf')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>新箱上架</h4></button></a>
                 <a href="{{url('store/inStorage/boxBindModel')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>料箱型号</h4></button></a>
-                <a href="{{url('store/inStorage/commodityBindModel')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>商品型号</h4></button></a>
-                <a href="{{url('store/blindReceive')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>盲收</h4></button></a>
-                @can("运输管理-编辑")<a href="{{url('transport/waybill/android/shipment')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>运单发货</h4></button></a>
-                <a href="{{url('transport/waybill/android/waybillDispatch')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>运单调配</h4></button></a>@endcan
+                <a href="{{url('store/inStorage/commodityBindModel')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>商品型号</h4></button></a>@endcan
+                @can("入库管理-手持入库-收货")<a href="{{url('store/blindReceive')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>盲收</h4></button></a>@endcan
+                @can("运输管理-编辑")<a href="{{url('transport/waybill/android/shipment')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>运单发货</h4></button></a>@endcan
+                @can("运输管理-承运商调度")<a href="{{url('transport/waybill/delivering')}}"><button class="btn btn-info w-75 h-25 mt-3 text-white" style="height: 60px"><h4>运单调配</h4></button></a>@endcan
 
     <a href="{{ route('logout') }}" onclick="event.preventDefault();
                                                      document.getElementById('logout-form').submit();">

+ 1 - 1
resources/views/transport/waybill/delivering.blade.php

@@ -198,7 +198,7 @@
                 created_at_start:'',created_at_end:'',waybill_number:'',carrier_bill:''
             },
             errors:{},
-            sum:{!! $waybills->total() !!},
+            sum:{!! $waybills->count() !!},
         },
         mounted:function(){
             let _this=this;