优化显示

master
chenzhi 3 years ago
parent aeb83f0ddc
commit 5532c1f690

@ -9,6 +9,26 @@ namespace Admin\Controller;
*/ */
class OldCountController extends \Think\Controller class OldCountController extends \Think\Controller
{ {
/**
* 奖惩初始化
*/
public function rewardResetInit()
{
$dbres = M('reward_detail', 'tab_')->alias('rd')
->field('rd.*,r.is_verify verify,r.verify_detail v_detail')
->join('tab_reward_record as r on rd.record_id = r.id', 'LEFT')
->select();
foreach ($dbres as $k => $v) {
# code...
$v['is_verify'] = $v['verify'];
$v['verify_detail'] = $v['v_detail'];
unset($v['verify'],$v['v_detail']);
$res = M('reward_detail', 'tab_')->save($v);
var_dump($res);
}
}
/** /**
* 新增市场部其他用户组 * 新增市场部其他用户组
*/ */

@ -383,7 +383,7 @@ class StatementMangementController extends ThinkController
$list = SM('reward_record', 'tab_')->alias('r') $list = SM('reward_record', 'tab_')->alias('r')
->field(' ->field('
r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id,is_verify,verify_detail,IFNULL(pc.company_belong,0) company_belong, r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id,r.is_verify,rd.is_verify detail_verify,rd.verify_detail,IFNULL(pc.company_belong,0) company_belong,
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 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) ->where($map)
@ -399,9 +399,9 @@ class StatementMangementController extends ThinkController
if($item["is_verify"] == 0) { if($item["is_verify"] == 0) {
$verify_detail = "未审核"; $verify_detail = "未审核";
} elseif($item["is_verify"] == 1) { } elseif($item["is_verify"] == 1) {
$verify_detail="审核通过<br>"."(".$item["verify_detail"]["user"].")<br>".$item["verify_detail"]["time"]; $verify_detail="审核通过";
} else{ } else{
$verify_detail="审核拒绝<br>"."(".$item["verify_detail"]["user"].")<br>".$item["verify_detail"]["time"]; $verify_detail="审核拒绝";
} }
if (!isset($record[$item['id']])) if (!isset($record[$item['id']]))
@ -424,6 +424,15 @@ class StatementMangementController extends ThinkController
]; ];
} }
if (!empty($item['rid'])) { if (!empty($item['rid'])) {
if($item["detail_verify"] == 0) {
$verify_detail = "未审核";
} elseif($item["detail_verify"] == 1) {
$verify_detail="审核通过<br>"."(".$item["verify_detail"]["user"].")<br>".$item["verify_detail"]["time"];
} else{
$verify_detail="审核拒绝<br>"."(".$item["verify_detail"]["user"].")<br>".$item["verify_detail"]["time"];
}
$record[$item['id']]['detail'][] = [ $record[$item['id']]['detail'][] = [
'company_type_text' => RewardModel::$companyTypes[$item['detail_company_type']] ?? '-', 'company_type_text' => RewardModel::$companyTypes[$item['detail_company_type']] ?? '-',
'settlement_type_text' => RewardModel::$settlementTypes[$item['detail_settlement_type']] ?? '-', 'settlement_type_text' => RewardModel::$settlementTypes[$item['detail_settlement_type']] ?? '-',
@ -431,7 +440,9 @@ class StatementMangementController extends ThinkController
'amount' => $item['detail_type'] == RewardModel::REWARD_TYPE_PUNISH ? -$item['detail_amount'] : $item['detail_amount'], 'amount' => $item['detail_type'] == RewardModel::REWARD_TYPE_PUNISH ? -$item['detail_amount'] : $item['detail_amount'],
'promote_account' => $item['detail_promote_account'] ?? '无', 'promote_account' => $item['detail_promote_account'] ?? '无',
'company_belong'=>$item['detail_company_type'] == 2 ? getCompanyBlong($item['company_belong']) : "无", 'company_belong'=>$item['detail_company_type'] == 2 ? getCompanyBlong($item['company_belong']) : "无",
'detail_type' =>RewardModel::$rewardTypes[$item['detail_type']] 'detail_type' =>RewardModel::$rewardTypes[$item['detail_type']],
'detail_verify'=>$item["detail_verify"],
'verify'=>$verify_detail,
]; ];
$record[$item['id']]['row'] += 1; $record[$item['id']]['row'] += 1;

@ -201,10 +201,10 @@
<th>游戏合作方</th> <th>游戏合作方</th>
<th >结算时间</th> <th >结算时间</th>
<th>奖惩确认时间</th> <th>奖惩确认时间</th>
<th>事件说明</th> <th style="width: 350px;">事件说明</th>
<th>奖惩性质</th> <th>奖惩性质</th>
<th>添加人</th> <th>添加人</th>
<th>审核状态</th> <th rowspan="2">审核状态</th>
<th rowspan="2">操作</th> <th rowspan="2">操作</th>
</tr> </tr>
<tr> <tr>
@ -217,7 +217,6 @@
<th>会长账号</th> <th>会长账号</th>
<th>奖惩金额</th> <th>奖惩金额</th>
<th>结算方式</th> <th>结算方式</th>
<th>审核状态</th>
</tr> </tr>
</thead> </thead>
@ -230,7 +229,7 @@
</if> </if>
<notemtpy name = "list"> <notemtpy name = "list">
<volist name="list" id="data"> <volist name="list" id="data">
<tr style="border-top:dotted 1px #c7c7c7;color: #000;background: #f5f8fa;"> <tr style="border-top:dotted 1px #c7c7c7;color: #000;background: #f5f8fa;height: 60px;line-height: 60px;">
<td rowspan="{$data['row']}"><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td> <td rowspan="{$data['row']}"><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data['relation_game_name']}</td> <td>{$data['relation_game_name']}</td>
<td>{$data['relation_game_partner']}</td> <td>{$data['relation_game_partner']}</td>
@ -266,6 +265,14 @@
<td><?=$data['detail'][$i]['promote_account'] ?? '无'?></td> <td><?=$data['detail'][$i]['promote_account'] ?? '无'?></td>
<td><?=$data['detail'][$i]['amount'] ?? '无'?></td> <td><?=$data['detail'][$i]['amount'] ?? '无'?></td>
<td><?=$data['detail'][$i]['settlement_type_text'] ?? '无'?></td> <td><?=$data['detail'][$i]['settlement_type_text'] ?? '无'?></td>
<if condition="$data['detail'][$i]['detail_verify'] eq 1">
<td>{$data['detail'][$i].verify}</td>
<elseif condition="$data['detail'][$i]['detail_verify'] eq -1"/>
<td style="color:red;">{$data['detail'][$i].verify}</td>
<else/>
<td>--</td>
</if>
</tr> </tr>
<?php endfor;?> <?php endfor;?>
<?php endif;?> <?php endif;?>
@ -273,10 +280,7 @@
</volist> </volist>
</notemtpy> </notemtpy>
<tr style="border-top:dotted 1px #c7c7c7;background: #f5f8fa;"> <tr style="border-top:dotted 1px #c7c7c7;background: #f5f8fa;">
<td colspan="4" class="text-center">罚款合计</td> <td colspan="10" class="text-center">罚款合计:-{:array_sum(array_column($list, 'totalPunish'))} / 奖励合计:{:array_sum(array_column($list, 'totalReward'))}</td>
<td class="text-center" id="total_reward">-{:array_sum(array_column($list, 'totalPunish'))}</td>
<td colspan="4" class="text-center">奖励合计</td>
<td class="text-center" id="total_punish">{:array_sum(array_column($list, 'totalReward'))}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Loading…
Cancel
Save