瀏覽代碼

Merge branch 'zzd'

LD 5 年之前
父節點
當前提交
82d141bdb2

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

@@ -24,7 +24,7 @@ class LaborReportController extends Controller
         $laborReportsTem=clone $laborReports;
         $laborReportsTem=$laborReportsTem->where($column,'like','%'.$request->input($column).'%')->where('created_at','>',$today->format('Y-m-d'));
         if($laborReportsTem->count()==0
-            ||$laborReportsTem->first()[$column]==$request->input($column)){
+            ||$laborReportsTem->get()[0][$column]==$request->input($column)){
             $laborReports=$laborReports->where($column,$request->input($column));
         }else{
             $laborReports=$laborReportsTem;

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

@@ -36,7 +36,7 @@ class PackageController extends Controller
         $packagesTem=clone $packages;
         $packagesTem=$packagesTem->where($column,'like','%'.$request->input($column).'%')->where('created_at','>',$today->format('Y-m-d'));
         if($packagesTem->count()==0
-            ||$packagesTem->first()[$column]==$request->input($column)){
+            ||$packagesTem->get()[0][$column]==$request->input($column)){
             $packages=$packages->where($column,$request->input($column));
         }else{
             $packages=$packagesTem;

+ 6 - 4
app/Http/Controllers/RejectedController.php

@@ -119,7 +119,7 @@ class RejectedController extends Controller
         $logistic_number_return = $params['logistic_number_return'];
         $logistic_number = $params['logistic_number'];
         $id_logistic_return= $params['id_logistic_return'];
-        $rejectedBillsQuery=RejectedBill::with(['owner','logistic','items',]);
+        $rejectedBillsQuery=RejectedBill::with(['owner','logistic','items']);
         if($created_at_start&&!$created_at_end){
             $created_at_end = $created_at_start;
         }
@@ -184,7 +184,7 @@ class RejectedController extends Controller
             $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('created_at','>',$startDay->format('Y-m-d'));
             $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('order_number','like','%'.$order_number.'%');
             if($rejectedBillsQueryTem->count()==0
-                ||$rejectedBillsQueryTem->first()['order_number']==$order_number){
+                ||$rejectedBillsQueryTem->get()[0]['order_number']==$order_number){
                 $rejectedBillsQuery=$rejectedBillsQuery->where('order_number',$order_number);
             }else{
                 $rejectedBillsQuery=$rejectedBillsQueryTem;
@@ -200,7 +200,7 @@ class RejectedController extends Controller
                 $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('created_at','>',$startDay->format('Y-m-d'));
                 $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('logistic_number_return','like','%'.$logistic_number_return.'%');
                 if($rejectedBillsQueryTem->count()==0
-                    ||$rejectedBillsQueryTem->first()['logistic_number_return']==$logistic_number_return){
+                    ||$rejectedBillsQueryTem->get()[0]['logistic_number_return']==$logistic_number_return){
                     $rejectedBillsQuery=$rejectedBillsQuery->where('logistic_number_return',$logistic_number_return);
                 }else{
                     $rejectedBillsQuery=$rejectedBillsQueryTem;
@@ -212,8 +212,9 @@ class RejectedController extends Controller
             $rejectedBillsQueryTem=clone $rejectedBillsQuery;
             $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('created_at','>',$startDay->format('Y-m-d'));
             $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('logistic_number','like','%'.$logistic_number.'%');
+
             if($rejectedBillsQueryTem->count()==0
-                ||$rejectedBillsQueryTem->first()['logistic_number']==$logistic_number){
+                ||$rejectedBillsQueryTem->get()[0]['logistic_number']==$logistic_number){
                 $rejectedBillsQuery=$rejectedBillsQuery->where('logistic_number',$logistic_number);
             }else{
                 $rejectedBillsQuery=$rejectedBillsQueryTem;
@@ -222,6 +223,7 @@ class RejectedController extends Controller
         if ($id_logistic_return){
             $rejectedBillsQuery=$rejectedBillsQuery->where('id_logistic_return',$id_logistic_return);
         }
+
         return $rejectedBillsQuery;
     }
 

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

@@ -35,7 +35,7 @@ class WaybillsController extends Controller
         $waybillsTem=clone $waybills;
         $waybillsTem=$waybillsTem->where($column,'like','%'.$request->input($column).'%')->where('waybills.created_at','>',$today->format('Y-m-d'));
         if($waybillsTem->count()==0
-            ||$waybillsTem->first()[$column]==$request->input($column)){
+            ||$waybillsTem->get()[0][$column]==$request->input($column)){
             $waybills=$waybills->where($column,$request->input($column));
         }else{
             $waybills=$waybillsTem;

+ 0 - 1
resources/views/process/index.blade.php

@@ -528,7 +528,6 @@
             </table>
             {{$processes->appends($request)->links()}}
         </div>
-    </div>
 </div>