cqpCow 1 year ago
parent
commit
7aec790394
1 changed files with 8 additions and 0 deletions
  1. 8 0
      app/Service/SupplierService.php

+ 8 - 0
app/Service/SupplierService.php

@@ -144,6 +144,14 @@ class SupplierService extends Service
             ->orderby('id', 'asc');
 
         if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
+        if(! empty($data['mobile'])) $model->where('mobile', 'LIKE', '%'.$data['mobile'].'%');
+        if(! empty($data['mark'])) $model->where('mark', 'LIKE', '%'.$data['mark'].'%');
+        if(! empty($data['crt_time'][0]) && ! empty($data['crt_time'][1])) {
+            $return = $this->changeDateToTimeStampAboutRange($data['crt_time']);
+            $model->where('crt_time','>=',$return[0]);
+            $model->where('crt_time','<=',$return[1]);
+        }
+
         if(! empty($data['get_all'])) $model->orWhere('is_main',Supplier::is_main);
         $list = $this->limit($model,'',$data);
         $list = $this->fillData($list);