优化支付数据查看

master
chenzhi 4 years ago
parent ccd5b487a9
commit 9da9941c9f

@ -11,6 +11,11 @@ use User\Api\UserApi as UserApi;
class SpendController extends ThinkController
{
const model_name = 'Spend';
const IsCheckStr=[
"1"=>"是",
"2"=>"否"
];
public $OpAuthList;
public function lists()
{
@ -24,6 +29,10 @@ class SpendController extends ThinkController
unset($_REQUEST['timestart']);
unset($_REQUEST['timeend']);
if (isset($_REQUEST['is_check'])) {
$map['is_check'] = (int)($_REQUEST['is_check']);
}
if (isset($_REQUEST['user_account'])) {
$map['user_account'] = array('like', trim($_REQUEST['user_account']));
unset($_REQUEST['user_account']);
@ -142,13 +151,13 @@ class SpendController extends ThinkController
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find());
$data = D(self::model_name)->lists($_GET["p"], $map, $order);
$adminUsernameList = getAdminUsernameList(array_column($data['data'], 'market_admin_id'));
foreach ($data['data'] as $key=>&$value ) {
($value['promote_account']=='官方渠道')?($value['promote_account']=C('OFFICIEL_CHANNEL')):'';
$value['market_admin_username'] = $adminUsernameList[$value['market_admin_id']] ?? '无';
$value['is_check_str'] = self::IsCheckStr[$value['is_check']];
}
$this->assign('showMarketAdmin', session('user_auth')['show_market_admin']);
$this->assign('showPromote', session('user_auth')['show_promote']);
$this->assign('isMarketAdmin', $isMarketAdmin);
@ -159,8 +168,33 @@ class SpendController extends ThinkController
$this->assign('_page', $data['page']);
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
if(!IS_ROOT){
$this->OpAuthList= getModuleControllerAuth();
}
$this->assign('menubtn',$this->menuAuth());
$this->display();
}
protected function menuAuth()
{
$mentBtn = [
"addStatement"=>"<a class='butn' id='addStatement'>参与结算</a>",
"removeStatement"=>"<a class='butn' id='removeStatement' style='background-color: red;'>移出结算</a>",
];
$resarr = [];
foreach ($mentBtn as $k => $v) {
if(IS_ROOT){
$resarr[] = $v;
}else{
if(in_array($k,$this->OpAuthList)){
$resarr[] = $v;
}
}
}
return $resarr;
}
/**
* 充值补单功能

@ -31,6 +31,34 @@
line-height: 1.5;
padding:5px;
}
.search_list{
margin-bottom: 15px;
}
.butnbox {padding:10px 0 10px;}
.butnbox .butnlist {overflow:hidden;clear:both;}
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
.butnbox .butnlist .butn.last {background:#009900;}
.butnbox .butnlist .butn~.butn {margin-left:20px;}
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
.layui-layer-title {
text-align: center;
height: 80px;
line-height: 80px;
font-weight: 600;
font-size: 18px;
}
.data_list table td{
line-height: 2;
}
.layui-layer-title {
text-align: center;
height: 42px;
line-height: 42px;
font-weight: 400;
font-size: 14px;
}
</style>
<!-- 标题栏 -->
@ -158,6 +186,16 @@
</volist>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select id="is_check" name="is_check" class="select_gallery">
<option value="">是否参与结算</option>
<option value="1"></option>
<option value="2"></option>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list search_item">
@ -166,7 +204,13 @@
</div>
</div>
</div>
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<foreach name="menubtn" item="vo" >
{$vo}
</foreach>
</div>
</div>
@ -177,6 +221,7 @@
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>支付订单号</th>
<th style="max-width: 100px;">CP订单号</th>
<th><a class="paixu" data-order='pay_time'>
@ -206,16 +251,18 @@
<th>充值方式</th>
<th>订单状态</th>
<th>游戏通知状态</th>
<th>是否参与结算</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name="list_data">
<td colspan="19" class="text-center">aOh! 暂时还没有内容!</td>
<td colspan="22" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="list_data" id="data">
<tr>
<td ><input class="ids" type="checkbox" data-status="{$data.verify_status}" data-export="{$data.can_export}" value="{$data['id']}" name="ids[]"></td>
<td>
<if condition="$show_data_power eq true ">
{$data.pay_order_number}
@ -295,6 +342,7 @@
{:get_info_status($data['pay_game_status'],14)}
</if>
</td>
<td>{$data.is_check_str}</td>
<td style="text-indent:0;">
<?php
@ -326,8 +374,8 @@
<if condition="$rule_count_check">
<tr class="data_summary">
<td>汇总</td>
<td colspan="19">
<td colspan="2">汇总</td>
<td colspan="20">
当页充值:{:null_to_0(array_sum(array_column(array_status2value('pay_status','',$list_data),'pay_amount')))}
<!-- 今日充值:{$ttotal}-->
<!-- 昨日充值:{$ytotal}-->

Loading…
Cancel
Save