public function searchOffice($params, $office_id) { $query = MOfficeScoreEvent::find()->where(["office_id" => $office_id])->where(['>', "cat", 100]); $dataProvider = new ActiveDataProvider(['query' => $query]); if (!($this->load($params) && $this->validate())) { return $dataProvider; } $query->andFilterWhere(['id' => $this->id, 'office_id' => $this->office_id, 'cat' => $this->cat, 'create_time' => $this->create_time, 'score' => $this->score, 'status' => $this->status]); $query->andFilterWhere(['like', 'gh_id', $this->gh_id])->andFilterWhere(['like', 'openid', $this->openid])->andFilterWhere(['like', 'memo', $this->memo])->andFilterWhere(['like', 'code', $this->code]); return $dataProvider; }
</div> <!-- /.modal-dialog --> </div> <?php } ?> <div class="modal fade in" id="office-score-event-modal" style="display: none;"> <?php if (null === $target_office) { $office_id = 0; } else { $office_id = $target_office->office_id; } $office_sore_events = \app\models\MOfficeScoreEvent::find()->where(['office_id' => $office_id])->orderBy(['create_time' => SORT_DESC])->limit(20)->all(); ?> <div class="modal-dialog"> <div class="modal-content" style="width:680px"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title">渠道积分明细 (最近20条)</h4> <a class="btn btn-danger btn-lg" href='<?php echo \yii\helpers\Url::to(['office-score-event/office-index', 'office_id' => $office_id]); ?> '>优惠券兑换</a> </div> <div class="modal-body"> <div class="row">