update tính năng thống kê chấm công và xuất dữ liệu chấm công
This commit is contained in:
@@ -14,13 +14,14 @@ class LogsSearch extends Logs {
|
||||
|
||||
public $staff_name;
|
||||
public $staff_department;
|
||||
public $staff_code;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function rules() {
|
||||
return [
|
||||
[['id', 'staff_id', 'device_id', 'in_out_state', 'event_type', 'card_number', 'staff_department'], 'integer'],
|
||||
[['id', 'staff_id', 'device_id', 'in_out_state', 'event_type', 'card_number', 'staff_department', 'staff_code'], 'integer'],
|
||||
[['staff_name'], 'safe'],
|
||||
];
|
||||
}
|
||||
@@ -62,6 +63,8 @@ class LogsSearch extends Logs {
|
||||
$query->andFilterWhere(['LIKE', 'name', $this->staff_name]);
|
||||
if ($this->staff_department)
|
||||
$query->andFilterWhere(['department_id' => $this->staff_department]);
|
||||
if ($this->staff_code)
|
||||
$query->andFilterWhere(['code' => $this->staff_code]);
|
||||
|
||||
// grid filtering conditions
|
||||
$query->andFilterWhere([
|
||||
|
||||
Reference in New Issue
Block a user