Bladeren bron

orderIssue 承运商搜索多选异常

ANG YU 4 jaren geleden
bovenliggende
commit
f386ff2b84
1 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. 6 1
      app/Filters/OrderIssueFilters.php

+ 6 - 1
app/Filters/OrderIssueFilters.php

@@ -251,7 +251,12 @@ class OrderIssueFilters
 
     public function logistic($logistic_id)
     {
-        $this->getOrderQuery()->where('orders.logistic_id',$logistic_id);
+        if (strpos($logistic_id, ',') || strpos($logistic_id, ',') || strpos($logistic_id, ' ')) {
+            $arr = array_filter(preg_split('/[,, ]+/is', $logistic_id));
+            $this->getOrderQuery()->whereIn('orders.logistic_id',$arr);
+        } else {
+            $this->getOrderQuery()->where('orders.logistic_id',$logistic_id);
+        }
     }
 
     public function custom_code($custom_code)