$query, ]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $shop=$params['shop']??1; // grid filtering conditions $query->andFilterWhere([ 'id' => $this->id, 'receiptdate' => $this->receiptdate, 'num' => $this->num, 'shop'=>$shop, ]); $query->orderBy([ 'id'=>SORT_DESC ]); $query->andFilterWhere(['like', 'deliveryid', $this->deliveryid]) ->andFilterWhere(['like', 'website', $this->website]) ->andFilterWhere(['like', 'customer', $this->customer]) ->andFilterWhere(['like', 'delivery', $this->delivery]) ->andFilterWhere(['like', 'origin_goodsinfo', $this->origin_goodsinfo]) ->andFilterWhere(['like', 'goodsinfo', $this->goodsinfo]) ->andFilterWhere(['like', 'usage', $this->usage]) ->andFilterWhere(['like', 'mark', $this->mark]); return $dataProvider; } }