diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 69f8a1e01..7062b1001 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -11,7 +11,6 @@ use User\Api\UserApi as UserApi; class StatementMangementController extends ThinkController { public function lists() { - $map = []; if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { @@ -94,7 +93,6 @@ class StatementMangementController extends ThinkController } $this->meta_title = '结算单管理'; $this->assign('data',$data); - $this->display(); } @@ -252,17 +250,20 @@ class StatementMangementController extends ThinkController if (!empty(I("game_name"))) { $game_ids = array_column(getGameByName(I("game_name")), 'id'); if ($game_ids) { - $map['relation_game_id'] = ['in', $game_ids]; + $map['tab_reward_record.relation_game_id'] = ['in', $game_ids]; } } if (!empty(I('partner_id'))) { - $map['company_id'] = I('partner_id'); + $map['tab_reward_record.company_id'] = I('partner_id'); } if (strlen(I('company_type'))) { - $map['company_type'] = I('company_type'); + $map['tab_reward_record.company_type'] = I('company_type'); } if (!empty(I('account'))) { - $map['accounts'] = ['like', '%' . I('account') . '%']; + //$map['accounts'] = ['like', '%' . I('account') . '%']; + // 获取会长匹配的id + $promoterIds = M('promote', 'tab_')->where(['account'=>['like', '%' . I('account') . '%'], 'level'=>1])->getField('id'); + $map['tab_reward_record.promote_id'] = ['in', $promoterIds]; } $list = M('reward_record', 'tab_') ->field('tab_reward_record.*, tab_promote.account as promote_account, tab_game.partner_id') @@ -300,6 +301,7 @@ class StatementMangementController extends ThinkController $this->assign('_page', $page); } $this->assign('list', $list); + $this->assign('promoters', array_column(M('promote', 'tab_')->where(['level'=>1])->field('id, nickname')->select(), 'nickname', 'id')); $this->display(); } diff --git a/Application/Admin/View/StatementMangement/rewardManageList.html b/Application/Admin/View/StatementMangement/rewardManageList.html index a30a829d0..64cc8b045 100644 --- a/Application/Admin/View/StatementMangement/rewardManageList.html +++ b/Application/Admin/View/StatementMangement/rewardManageList.html @@ -76,9 +76,9 @@