公会统计5

master
chenzhi 5 years ago
parent 904b707cf4
commit b97a956cbc

@ -63,10 +63,11 @@ class FinancePromoteController extends AdminController
$inside = self::getJoinPromoteData([],$istimeselect,"promote_coin");
foreach($inside as $k=>$v){
if(array_key_exists($v['p_id'],$senddata)){
$senddata[$v['p_id']]['inside_cash_count']= $v['pay_amount'];
$senddata[$v['p_id']]['inside_cash_count']= $v['pay_amount']-$v['back_amount'];
}else{
$v['inside_cash_count'] = $v['pay_amount'];
$v['inside_cash_count'] = $v['pay_amount']-$v['back_amount'];
unset($v['pay_amount']);
unset($v['back_amount']);
$senddata[$v['p_id']] = $v;
};
}
@ -147,8 +148,7 @@ class FinancePromoteController extends AdminController
}
$map['s.status']=1;
$map['s.source_id']=0;
$map['s.type']=1;
$field= "sum(num) pay_amount,IFNULL(if(substring_index(substring_index(`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(`chain`,'/',2),'/',-1)),0) p_id";
$field= "SUM(CASE WHEN s.type = 1 THEN num ELSE 0 END) as pay_amount,SUM(CASE WHEN s.type = 2 THEN num ELSE 0 END) as back_amount,IFNULL(if(substring_index(substring_index(`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(`chain`,'/',2),'/',-1)),0) p_id";
return M("promote_coin s","tab_")
->field($field)
->where($map)
@ -564,7 +564,9 @@ class FinancePromoteController extends AdminController
if (!empty(I("game_id"))) {
$map['tab_spend.game_id'] = I("game_id");
}
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
$map["tab_spend.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
}
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
@ -585,24 +587,6 @@ class FinancePromoteController extends AdminController
}
}
// if (!empty(I("promote_id"))) {
// $promote_id[] = I("promote_id");
// }
// if (!empty(I("root_id"))) {
// $root_id = I("root_id");
// $promote_id = $this->getPromoteList($root_id);
// array_push($promote_id, $root_id);
// }
// if ($_REQUEST['root_id']=='0') {
// $map['tab_spend.promote_id'] = $_REQUEST['root_id'];
// }
// $promote_id = implode(',',$promote_id);
// if ($promote_id) {
// $map['tab_spend.promote_id'] = ['in',$promote_id];
// }
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
@ -657,5 +641,23 @@ class FinancePromoteController extends AdminController
$this->assign('data',$data);
$this->display();
}
//平台币内充弹框
public function insideCoinDetail($p = 1)
{
$isgf = false;//是否事官方渠道
if ($_REQUEST['promote_id'] != '') {
if($_REQUEST['promote_id'] == 0){
$isgf = true;
}
$map['tab_spend.promote_id'] = $_REQUEST['promote_id'];
}
//
if($isgf){
}
}
}

@ -38,11 +38,13 @@
.select2-results__option[aria-selected] {
font-size: 12px;
}
.tooltip {
position: relative;
/* display: block; */
/* color: #056dae; */
}
.tooltip .tooltiptext {
display: none;
width: 100%;
@ -68,6 +70,7 @@
border-style: solid;
border-color: black transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
color: #333;
display: block;
@ -187,7 +190,8 @@
<else />平台币内充<img src="__IMG__/up-down.png" width="13px">
</if>
</a> <span class="tooltiptext">管理后台直接下放给会长的平台币</span> </th>
<th class="tooltip">渠道游戏内充值合计 <span class="tooltiptext">游戏现金金额(游戏现金流水+平台币支出+公会内充支出=总流水</span> </th>
<th class="tooltip">渠道游戏内充值合计 <span class="tooltiptext">游戏现金金额(游戏现金流水+平台币支出+公会内充支出=总流水</span>
</th>
<th>操作</th>
</tr>
</thead>
@ -202,9 +206,12 @@
<td>{:get_promote_name($data['p_id'])}</td>
<td>{$data.cash_count}</td>
<td><span class='ljzc'
data-value="{$data['id']}"><a>{$data.balance_coin_count}</a></span></td>
<td><span class='ljzc' data-value="{$data['id']}"><a>{$data.bind_coin_count}</a></span>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.balance_coin_count}
</td>
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.bind_coin_count}
</td>
</td>
<td><span class='ljzc'
data-value="{$data['id']}"><a>{$data.inside_cash_count}</a></span></td>
@ -212,8 +219,10 @@
<td>
<a href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>1],I('get.')))}" >游戏查看</a>
<a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.')))}" >渠道查看</a>
<a
href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>1],I('get.')))}">游戏查看</a>
<a
href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.')))}">渠道查看</a>
</td>
</tr>
</volist>
@ -226,9 +235,10 @@
<td>{$all_count['inside_cash_count']}</td>
<td>{$all_count['all_count']}</td>
<td style="text-align: center;">
<a href="{:U('FinancePromote/gameStatistics',array_merge(I('get.'),['promote_type'=>1]))}" >游戏查看</a>
<a href="{:U('FinancePromote/promoteUser',I('get.'))}" >渠道查看</a>
</td>
<a
href="{:U('FinancePromote/gameStatistics',array_merge(I('get.'),['promote_type'=>1]))}">游戏查看</a>
<a href="{:U('FinancePromote/promoteUser',I('get.'))}">渠道查看</a>
</td>
</tr>
</tbody>
</table>
@ -280,6 +290,19 @@
</script>
<script type="text/javascript">
$(function () {
$(".coin-detail").click(function () {
var pay_type = $(this).data('pay_type');
var url = $(this).data('url');
var title = pay_type == -1 ? '内充支出明细' : '平台币直充明细';
layer.open({
type: 2,
title: title,
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: [url, 'no']
});
});
$(".select_gallery").select2();
//搜索功能
$("#search").click(function () {

@ -0,0 +1,148 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>游戏登陆列表|----软件管理平台</title>
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px;
}
</style>
<body>
<div id="main" class="main" style="min-height: 342px;">
<!-- 标题栏 -->
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<!--游戏类型搜索END-->
<input type="hidden" name="game_id" value="{$_GET['game_id']}"/>
<input type="hidden" name="game_name" value="{$_GET['game_name']}"/>
<div class="input-list">
<input type="text" name="pay_order_number" placeholder="请输入支付订单号" class="" value="{:I('pay_order_number')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<input type="text" name="user_account" placeholder="请输入玩家账号" class="" value="{:I('user_account')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<input type="text" name="user_nickname" placeholder="请输入角色名称" class="" value="{:I('user_nickname')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/coinDetail','model='.$model['name'].'&row='.I('row'),false)}"
style="">搜索</a>
<if condition="$_GET['all'] neq 1">
<a class="sch-btn" href="{:U('Export/coinDetail',
array(
'game_id'=>$_GET['game_id'],
'game_name'=>$_GET['game_name'],
'pay_way'=>$_GET['pay_way'],
'timestart'=>$_GET['timestart'],
'timeend'=>$_GET['timeend'],
'user_account'=>$_GET['user_account'],
'pay_order_number'=>$_GET['pay_order_number'],
false))}">导出</a>
</if>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list box_mt">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th >支付订单号</th>
<th>充值时间</th>
<th >玩家账号</th>
<th >游戏名称</th>
<th >游戏区服</th>
<th >角色名称</th>
<th >订单金额</th>
<th >实付金额</th>
<th >充值方式</th>
<th ><if condition="$pay_way eq -1">绑定币余额<else/>平台币余额</if></th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<volist name="data" id="data">
<tr>
<td >{$data.pay_order_number}</td>
<td >{$data.pay_time}</td>
<td >{$data.user_account}</td>
<td >{$data.game_name}</td>
<td >{$data.server_name}</td>
<td >{$data.game_player_name}</td>
<td >{$data.cost}</td>
<td >{$data.pay_amount}</td>
<td >{$data.pay_way}</td>
<if condition="$pay_way eq -1">
<td >{$data.bind_balance}</td>
<else/>
<td >{$data.balance}</td>
</if>
</tr>
</volist>
<tr>
<td colspan="6" ><span>总计</span></td>
<td ><span><if condition="$total_cost neq ''">{$total_cost}<else/>0</if></span></td>
<td><if condition="$total_pay_amount neq ''">{$total_pay_amount}<else/>0</if></td>
<td colspan="2"> </td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page}
</div>

</div>
<script>
$(function(){
//搜索功能
$("#search").click(function(){
console.log(222);
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if ( url.indexOf('?')>0 ){
url += '&' + query;
} else {
url += '?' + query;
}
window.parent.reloadIframe(url);
parent.document.getElementsByTagName('iframe').src = url;
});
});
</script>
</body>
</html>
Loading…
Cancel
Save