fix một số bug nhỏ

This commit is contained in:
2020-10-27 17:34:09 +07:00
parent 758b8d29c3
commit 02418afb11
16 changed files with 117 additions and 37 deletions

View File

@@ -54,12 +54,15 @@ class StaffSearch extends Staff {
return $dataProvider;
}
if ($this->department_id) {
$m = new Department();
$departmentChild = $m->departmentChilds($this->department_id);
$query->andFilterWhere(["IN", "department_id", $departmentChild]);
}
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'code' => $this->code,
'card_number' => $this->card_number,
'department_id' => $this->department_id,
'birthday' => $this->birthday,
'date_in' => $this->date_in,
'created_at' => $this->created_at,
@@ -70,6 +73,7 @@ class StaffSearch extends Staff {
->andFilterWhere(['like', 'gender', $this->gender])
->andFilterWhere(['like', 'email', $this->email])
->andFilterWhere(['like', 'phone', $this->phone])
->andFilterWhere(['like', 'code', $this->code])
->andFilterWhere(['like', 'address', $this->address]);
return $dataProvider;