master
yulingwei 4 years ago
parent 28a44019e4
commit f373bd2025

@ -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) {

@ -55,8 +55,8 @@
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">记录管理</h3>
<p class="description_text">上下游奖记录管理</p>
<h3 class="page_title">记录管理</h3>
<p class="description_text">上下游奖记录管理</p>
</div>
@ -67,7 +67,7 @@
<!--公司类型搜索END-->
<div class="input-list input-list-server search_label_rehab">
<select id="reward_type" name="reward_type" class="select_gallery" style="width:120px;">
<option value="">性质</option>
<option value="">性质</option>
<option value="3" <if condition="'3' eq $_GET['reward_type']">selected=selected</if>>双向</option>
<option value="1" <if condition="'1' eq $_GET['reward_type']">selected=selected</if>>单向-奖励</option>
<option value="2" <if condition="'2' eq $_GET['reward_type']">selected=selected</if>>单向-惩罚</option>
@ -102,7 +102,7 @@
<div class="input-list search_label_rehab">
<select id="detail_reward_type" name="detail_reward_type" class="select_gallery">
<option value="">结算奖类型</option>
<option value="">结算奖类型</option>
<option value="1" <if condition="'1' eq $_GET['detail_reward_type']">selected=selected</if>>奖励</option>
<option value="2" <if condition="'2' eq $_GET['detail_reward_type']">selected=selected</if>>惩罚</option>
</select>
@ -178,7 +178,7 @@
<th>事件说明</th>
<th>奖惩性质</th>
<!-- 惩罚方 -->
<th>奖惩类</th>
<th>奖惩类</th>
<th>结算公司类型</th>
<th>结算方</th>
<th>会长账号</th>
@ -186,7 +186,7 @@
<th>结算方式</th>
<!-- 奖励方 -->
<th>奖惩类</th>
<th>奖惩类</th>
<th>结算公司类型</th>
<th>结算方</th>
<th>会长账号</th>

Loading…
Cancel
Save