thay doi filter va Viet hoa
This commit is contained in:
@@ -31,7 +31,7 @@ class ControlLogsController extends Controller {
|
||||
];
|
||||
}
|
||||
|
||||
public function actionIndex($from = "", $to = "", $name = "", $type = "all", $gender = "all") {
|
||||
public function actionIndex($from = "", $to = "", $name = "", $type = "all", $gender = "all", $id = "") {
|
||||
$f = date_format(date_create_from_format('H:i d/m/Y', "00:00 " . date("d/m/Y")), 'U');
|
||||
$t = date_format(date_create_from_format('H:i d/m/Y', "23:59 " . date("d/m/Y")), 'U');
|
||||
if ($from !== "" && $to !== "") {
|
||||
@@ -44,6 +44,8 @@ class ControlLogsController extends Controller {
|
||||
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
|
||||
$dataProvider->query->andWhere(["<>", "capture_logs.staff_id", 0]);
|
||||
$dataProvider->query->andWhere(["BETWEEN", "capture_logs.time", $f, $t]);
|
||||
if ($id !== "")
|
||||
$dataProvider->query->andWhere(["LIKE", "list_management.code", $id]);
|
||||
if ($name !== "")
|
||||
$dataProvider->query->andWhere(["LIKE", "list_management.name", $name]);
|
||||
if ($type !== "all")
|
||||
|
||||
@@ -31,7 +31,7 @@ class ListManagementController extends Controller {
|
||||
];
|
||||
}
|
||||
|
||||
public function actionIndex($from = "", $to = "", $name = "", $type = "all", $gender = "all") {
|
||||
public function actionIndex($from = "", $to = "", $name = "", $type = "all", $gender = "all", $id = "") {
|
||||
$f = date_format(date_create_from_format('H:i d/m/Y', "00:00 " . date("d/m/Y")), 'U');
|
||||
$t = date_format(date_create_from_format('H:i d/m/Y', "23:59 " . date("d/m/Y")), 'U');
|
||||
$this->view->title = "List management";
|
||||
@@ -42,6 +42,8 @@ class ListManagementController extends Controller {
|
||||
$t = date_format(date_create_from_format('H:i d/m/Y', $to), 'U');
|
||||
$dataProvider->query->andWhere(["BETWEEN", "time", $f, $t]);
|
||||
}
|
||||
if ($id !== "")
|
||||
$dataProvider->query->andWhere(["LIKE", "code", $id]);
|
||||
if ($name !== "")
|
||||
$dataProvider->query->andWhere(["LIKE", "name", $name]);
|
||||
if ($type !== "all")
|
||||
|
||||
Reference in New Issue
Block a user