ANG YU 5 лет назад
Родитель
Сommit
2d6170b9ca

+ 4 - 4
app/Http/Controllers/PackageLogisticController.php

@@ -21,14 +21,14 @@ class PackageLogisticController extends Controller
         $this->middleware('auth');
     }
 
-    public function index(OrderPackageFilters $filters)
+    public function index(Request $request,OrderPackageFilters $filters)
     {
+        $paginateParams = $request->input();
         $orderPackages = OrderPackage::query()->filter($filters)->with(['order' => function ($query) {
             $query->with(['logistic', 'owner', 'packages.commodities']);
-        }])->orderByDesc('id')->paginate(50);
+        }])->orderByDesc('id')->paginate($request->paginate ?? 50);
         $logistics = Logistic::all();
         $owners = Owner::all();
-
-        return view('package.logistic.index', compact('orderPackages', 'logistics', 'owners'));
+        return view('package.logistic.index', compact('orderPackages', 'logistics', 'owners','paginateParams'));
     }
 }

+ 3 - 1
resources/views/package/logistic/index.blade.php

@@ -18,7 +18,7 @@
                     <th>揽收日期</th>
                     <th>称重日期</th>
                     <th>异常标记</th>
-                    <th>最新状态</th>
+                    <th>快递路由</th>
                     <th>客服备注</th>
                 </tr>
                 <tr v-for="(package,i) in packages">
@@ -37,6 +37,8 @@
                     <td>@{{ package.remark }}</td>
                 </tr>
             </table>
+            <div class="text-info h5 btn btn">{{$orderPackages->count()}}/{{$orderPackages->total()}}</div>
+            {{$orderPackages->appends($paginateParams)->links()}}
         </div>
     </div>
 @endsection