update filters
This commit is contained in:
@@ -12,13 +12,20 @@ use app\models\Logs;
|
||||
*/
|
||||
class LogsSearch extends Logs {
|
||||
|
||||
public $plate;
|
||||
public $type;
|
||||
public $company;
|
||||
public $driver;
|
||||
public $telephone;
|
||||
public $cmt;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function rules() {
|
||||
return [
|
||||
[['id', 'vehicle_id'], 'integer'],
|
||||
[['frame_image_in', 'frame_image_out', 'seal_no', 'note', 'factory'], 'safe'],
|
||||
[['frame_image_in', 'frame_image_out', 'seal_no', 'note', 'factory', 'plate', 'type', 'company', 'driver', 'telephone', 'cmt'], 'safe'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -70,7 +77,12 @@ class LogsSearch extends Logs {
|
||||
->andFilterWhere(['like', 'seal_no', $this->seal_no])
|
||||
->andFilterWhere(['like', 'note', $this->note])
|
||||
->andFilterWhere(['like', 'factory', $this->factory])
|
||||
->andFilterWhere(['like', 'vehicle.plate', $this->vehicle_id]);
|
||||
->andFilterWhere(['like', 'vehicle.plate', $this->plate])
|
||||
->andFilterWhere(['like', 'vehicle.type', $this->type])
|
||||
->andFilterWhere(['like', 'vehicle.company', $this->company])
|
||||
->andFilterWhere(['like', 'vehicle.driver', $this->driver])
|
||||
->andFilterWhere(['like', 'vehicle.telephone', $this->telephone])
|
||||
->andFilterWhere(['like', 'vehicle.indentity_card', $this->cmt]);
|
||||
|
||||
return $dataProvider;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user