From f373bd20252674acd9141a03e64f4b0418249fab Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Mon, 20 Jul 2020 14:24:24 +0800 Subject: [PATCH] upt --- .../StatementMangementController.class.php | 26 +++++++++---------- .../StatementMangement/rewardManageList.html | 12 ++++----- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 7ef2151ae..1251f842e 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -323,32 +323,29 @@ class StatementMangementController extends ThinkController ->field('r.id') ->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT') ->where($map) - ->group('rd.record_id') + ->group('r.id') ->select(); if ($result) { $map = []; - $map['r.id'] = ['in', array_column($result, 'id')]; + $allIds = array_column($result, 'id'); + // 分页 + $count = count($allIds); + + $currentIds = I('is_export', false) ? $allIds : array_slice($allIds, ($p-1)*$row, $row); + + $map['r.id'] = ['in', $currentIds]; } else { $map = '1<>1'; } - $query = M('reward_record', 'tab_')->alias('r') + $list = M('reward_record', 'tab_')->alias('r') ->field(' r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id, rd.id as rid, rd.type as detail_type, rd.company_type as detail_company_type, rd.company_id as detail_company_id , rd.company_name as detail_company_name, rd.settlement_type as detail_settlement_type, rd.promote_account as detail_promote_account,rd.amount as detail_amount ') ->where($map) - ->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT'); - - if(I('is_export', false)){ - $list = $query - ->select(); - }else{ - $list = $query - ->page($p,$row) - ->select(); - } + ->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')->select(); if ($list) { $record = []; @@ -438,7 +435,6 @@ class StatementMangementController extends ThinkController $settlment_info = I('settlement_info'); $accounts = I('account'); $user_types = I('user_type'); - // 处理结算信息 if ($settlment_info) { $tmp = []; @@ -477,6 +473,8 @@ class StatementMangementController extends ThinkController // if (sizeof(array_unique($promoterIds)) != sizeof($promoterIds)) { // return $this->error('含有重复的结算方,请确认!'); // } + } else { + return $this->error('请填写结算信息'); } if ($accounts) { diff --git a/Application/Admin/View/StatementMangement/rewardManageList.html b/Application/Admin/View/StatementMangement/rewardManageList.html index bbee6a2d5..5f28986b2 100644 --- a/Application/Admin/View/StatementMangement/rewardManageList.html +++ b/Application/Admin/View/StatementMangement/rewardManageList.html @@ -55,8 +55,8 @@ @@ -67,7 +67,7 @@
- + @@ -178,7 +178,7 @@ 事件说明 奖惩性质 - 奖惩类型 + 奖惩类别 结算公司类型 结算方 会长账号 @@ -186,7 +186,7 @@ 结算方式 - 奖惩类型 + 奖惩类别 结算公司类型 结算方 会长账号