X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=models%2FItemsSearch.php;h=b3dbe9a52096d3512347a47c09984214b4878cb5;hb=6a4e0c86e4e59436b1e52efd10fdf0cfdf345712;hp=91a3a230fe1c198703c34799dabfdd2726182a7b;hpb=74ffccc206972e9f301dc7ca0e2d780495e0fdd9;p=invent%2Finvent.git diff --git a/models/ItemsSearch.php b/models/ItemsSearch.php index 91a3a23..b3dbe9a 100644 --- a/models/ItemsSearch.php +++ b/models/ItemsSearch.php @@ -68,7 +68,7 @@ class ItemsSearch extends Items Status::tableName() . '.name AS statusName ') ->joinWith([ 'types', 'moving', 'status', 'locations', 'regions', 'models', ]) ->where([ 'in', Moving::tableName() . '.id', $query ]) - ->andWhere([ 'checked' => false ]); + ->andWhere([ 'checked' => 0 ]); $dataProvider = new ActiveDataProvider([ 'query' => $query, @@ -164,6 +164,9 @@ class ItemsSearch extends Items $dataProvider = new ActiveDataProvider([ 'query' => $query, + 'pagination' => [ + 'pageSize' => \Yii::$app->session['pageSize'] ?? 20, + ], ]); $dataProvider->setSort([ @@ -186,9 +189,11 @@ class ItemsSearch extends Items 'id' => $this->id, ])->andFilterWhere([ 'ilike', Status::tableName() . '.name', $this->statusName - ])->andFilterWhere([ + ])->andFilterWhere([ 'OR', [ 'ilike', Models::tableName() . '.name', $this->modelName - ])->andFilterWhere([ + ], [ + 'ilike', Items::tableName() . '.name', $this->modelName + ]])->andFilterWhere([ 'ilike', Types::tableName() . '.name', $this->typeName ])->andFilterWhere([ 'OR', [ 'ilike', Locations::tableName() . '.name', $this->regionName