Thêm nút chọn tất cả
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -383,7 +383,7 @@ class DeviceController extends Controller {
|
||||
Yii::$app->response->format = "json";
|
||||
$post = Yii::$app->request->post();
|
||||
$lists = $post["lists"];
|
||||
if ($post["all"] && count($lists) >= 20) {
|
||||
if ($post["all"] === "true") {
|
||||
$temp = [];
|
||||
$devices = Device::find()->all();
|
||||
foreach ($devices as $key => $value) {
|
||||
@@ -548,7 +548,7 @@ class DeviceController extends Controller {
|
||||
Yii::$app->response->format = "json";
|
||||
$post = Yii::$app->request->post();
|
||||
$lists = $post["lists"];
|
||||
if ($post["all"] && count($lists) >= 20) {
|
||||
if ($post["all"] === "true") {
|
||||
$temp = [];
|
||||
$devices = Device::find()->all();
|
||||
foreach ($devices as $key => $value) {
|
||||
|
||||
Reference in New Issue
Block a user