Thêm nút chọn tất cả

This commit is contained in:
2020-11-05 10:49:53 +07:00
parent d447e460c0
commit d420323d4b
6 changed files with 48 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ class AssignController extends Controller {
public function actionSetSchedule() {
if (Yii::$app->request->post()) {
$post = Yii::$app->request->post();
if ($post['currentDepartment'] !== "" && count($post["staffs"]) >= Yii::$app->params["pageSize"]) {
if ($post['all'] == "true") {
$model = new Department();
$childs = $model->departmentChilds($post["currentDepartment"]);
$lists = Staff::find()->andWhere(["IN", "department_id", $childs])->all();