wesley 7 år sedan
förälder
incheckning
413f311fa1

+ 0 - 1
app/Http/Controllers/Admin/Company/InfoController.php

xqd
@@ -40,7 +40,6 @@ class InfoController extends Controller
 
         $list = $this->repository->searchCompany($search, $order);
 
-
         if($request->ajax()){
             $view = view('admin.company.info.data',compact('list'))->render();
 

+ 2 - 2
app/Repositories/Company/InfoRepository.php

xqd xqd
@@ -17,7 +17,7 @@ class InfoRepository extends Repository {
         return \App\Models\CompanyInfoModel::class;
     }
 
-    public function searchCompany(array $search,array $orderby=['id'=>'desc'],$pagesize=16)
+    public function searchCompany(array $search,array $orderby=['id'=>'desc'],$pagesize=10)
     {
         $currentQuery = $this->model;
         if(isset($search['keyword']) && ! empty($search['keyword'])) {
@@ -53,7 +53,7 @@ class InfoRepository extends Repository {
 
         if($orderby && is_array($orderby)){
             foreach ($orderby AS $field => $value){
-                $currentQuery = $currentQuery -> orderBy($field, $value);
+                $currentQuery = $currentQuery->orderBy($field, $value);
             }
         }
         $currentQuery = $currentQuery->paginate($pagesize);

+ 20 - 5
resources/views/admin/company/info/index.blade.php

xqd xqd
@@ -56,21 +56,21 @@
                                 <th>
                                     <select name="startDate" class="form-control filter_company">
                                         <option value="">成立年限</option>
-                                        <option value="">成立年限</option>
-                                        <option value="">成立年限</option>
+                                        <option value="2014">2014</option>
+                                        <option value="2017">2017</option>
                                     </select>
                                 </th>
                                 <th>
                                     <select name="entType" class="form-control filter_company">
                                         <option value="">企业类型</option>
-                                        <option value="">企业类型</option>
-                                        <option value="">企业类型</option>
+                                        <option value="有限责任公司(中外合资)">有限责任公司(中外合资)</option>
+                                        <option value="有限责任公司(台港澳法人独资)">有限责任公司(台港澳法人独资)</option>
                                     </select>
                                 </th>
                                 <th>
                                     <select name="openStatus" class="form-control filter_company">
                                         <option value="">企业状态</option>
-                                        <option value="">企业状态</option>
+                                        <option value="开业">开业</option>
                                         <option value="">企业状态</option>
                                     </select>
                                 </th>
@@ -119,5 +119,20 @@
                 $('#company-list').html(data.html)
             })
         })
+
+        // $('.pagination a').click(function (event) {
+        //     event.preventDefault();
+        //
+        //     if ( $(this).attr('href') != '#' ) {
+        //         data = $('#filter_company').serialize()
+        //         $.ajax({
+        //             url: window.location.href + $(this).attr('href'),
+        //             type: 'get',
+        //             data: data,
+        //         }).done(function (data) {
+        //             $('#company-list').html(data.html)
+        //         })
+        //     }
+        // });
     </script>
 @endsection