月结统计bug修正

master
zyx 5 years ago
parent 3983a086ac
commit 515ffa25b9

@ -1501,8 +1501,6 @@ function getPartner() {
function getGameList($partner_id) {
if ($partner_id) {
$map['partner_id'] = $partner_id;
} else {
return [];
}
$data = M('game','tab_')->field("id,game_name")->where($map)->select();

@ -5305,7 +5305,7 @@ if ($key == 'model'){
array('cash_count','游戏现金流水'),
array('balance_coin_count','平台币流水'),
array('inside_cash_count','内冲流水'),
array('all_cash_count','总流水'),
array('all_count','总流水'),
);
$map = [];
@ -5313,38 +5313,50 @@ if ($key == 'model'){
$map['count_date']=I('count_date');
}
if (!empty(I('game_id'))) {
$map['game_id']=I('game_id');
}
if (!empty(I('collaborate_id'))) {
$map['collaborate_id']=I('collaborate_id');
}
if (empty(I('game_id'))) {
$field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
sum(inside_cash_count) as inside_cash_count,sum(cash_count+balance_coin_count+inside_cash_count) as all_cash_count";
$allField = "cash_count+balance_coin_count+inside_cash_count";
$InsideField = "inside_cash_count";
} else {
$field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
sum(bind_coin_count) as inside_cash_count,sum(cash_count+balance_coin_count+bind_coin_count) as all_cash_count";
$allField = "cash_count+balance_coin_count+bind_coin_count";
$InsideField = "bind_coin_count";
}
$group = "count_date";
// if (!empty(I('game_id'))) {
// $map['game_id']=I('game_id');
// }
// if (!empty(I('collaborate_id'))) {
// $map['collaborate_id']=I('collaborate_id');
// }
//
// if (empty(I('game_id'))) {
// $field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
// sum(inside_cash_count) as inside_cash_count,sum(cash_count+balance_coin_count+inside_cash_count) as all_cash_count";
// $allField = "cash_count+balance_coin_count+inside_cash_count";
// $InsideField = "inside_cash_count";
// } else {
// $field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
// sum(bind_coin_count) as inside_cash_count,sum(cash_count+balance_coin_count+bind_coin_count) as all_cash_count";
// $allField = "cash_count+balance_coin_count+bind_coin_count";
// $InsideField = "bind_coin_count";
// }
// $group = "count_date";
// $order = "id DESC";
// $xlsData = D("spend_count")->getSpendCountData($map,$field,$group,$order);
//
// $sumCash = D("spend_count")->sumSpendCountField($map,"cash_count");
// $sumBalance = D("spend_count")->sumSpendCountField($map,"balance_coin_count");
// $sumInside = D("spend_count")->sumSpendCountField($map,$InsideField);
// $sumAll = D("spend_count")->sumSpendCountField($map,$allField);
$order = "id DESC";
$xlsData = D("spend_count")->getSpendCountData($map,$field,$group,$order);
$xlsData = M('spend_month_count','tab_')
->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date")
->where($map)
->order($order)
->select();
$sumCash = D("spend_count")->sumSpendCountField($map,"cash_count");
$sumBalance = D("spend_count")->sumSpendCountField($map,"balance_coin_count");
$sumInside = D("spend_count")->sumSpendCountField($map,$InsideField);
$sumAll = D("spend_count")->sumSpendCountField($map,$allField);
$sumData = M('spend_month_count','tab_')
->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date")
->where($map)
->order($order)
->find();
$sumData = [['count_date'=>'总计',
'cash_count'=>$sumCash,
'balance_coin_count'=>$sumBalance,
'inside_cash_count'=>$sumInside,
'all_cash_count'=>$sumAll]];
'cash_count'=>$sumData['cash_count'],
'balance_coin_count'=>$sumData['balance_coin_count'],
'inside_cash_count'=>$sumData['inside_cash_count'],
'all_count'=>$sumData['all_count']]];
$xlsData = array_merge($xlsData,$sumData);
$this->exportExcel($xlsName, $xlsCell, $xlsData);
@ -5384,6 +5396,10 @@ if ($key == 'model'){
$map['game_id'] = I("game_id");
}
if (!empty(I('partner_id'))) {
$map['partner_id']=I('collaborate_id');
}
if (I('sign') == 2&&empty(I('root_id'))) {
$map['_string'] = "parent_id >0 or root_id>0";
@ -5405,9 +5421,9 @@ if ($key == 'model'){
}
$map['bind_coin_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"game_id,bind_coin_count as count","promote_id,count_date,game_id");
unset($map['bind_coin_count']);
$map['inside_cash_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"game_id,inside_cash_count as count","promote_id,count_date");
unset($map['inside_cash_count']);
//内充流水与绑定流水数据
$insideDataSum = [];
foreach ($insideData as $key => $value) {
@ -5420,7 +5436,7 @@ if ($key == 'model'){
$field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
sum(bind_coin_count) as inside_cash_count,sum(cash_count+balance_coin_count+bind_coin_count) as all_cash_count,game_name,partner_name";
sum(inside_cash_count) as inside_cash_count,sum(cash_count+balance_coin_count) as all_cash_count,game_id,game_name,partner_name";
$group = "game_id";
$order = "id DESC";
@ -5432,8 +5448,8 @@ if ($key == 'model'){
$sumCash = D("spend_count")->sumSpendCountField($map,"cash_count");
$sumBalance = D("spend_count")->sumSpendCountField($map,"balance_coin_count");
$sumInside = D("spend_count")->sumSpendCountField($map,"bind_coin_count");
$sumAll = D("spend_count")->sumSpendCountField($map,"cash_count+balance_coin_count+bind_coin_count");
$sumInside = number_format(array_sum($insideDataSum),2,'.','');
$sumAll = D("spend_count")->sumSpendCountField($map,"cash_count+balance_coin_count") + array_sum($insideDataSum);
$sumData = [['game_name'=>'总计',
'cash_count'=>$sumCash,
@ -5455,6 +5471,7 @@ if ($key == 'model'){
array('pay_order_number','支付订单号'),
array('pay_time','充值时间'),
array('user_account','玩家账号'),
array('user_nickname','玩家昵称'),
array('game_name','游戏名称'),
array('promote_account','所属推广员'),
array('spend_ip','充值ip'),
@ -5503,13 +5520,13 @@ if ($key == 'model'){
$map['game_id'] = I("game_id");
}
if (!empty(I('user_account'))) {
$map['user_account'] = I("user_account");
$map['user_account'] = array('like','%'.I("user_account").'%');
}
if (!empty(I('user_nickname'))) {
$map['user_nickname'] = I("user_nickname");
$map['user_nickname'] = array('like',I("user_nickname").'%');
}
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$group = "";
$order = "pay_time DESC";
$xlsData = D('spend')->getSpendData($map,$field,$group,$order);

@ -16,17 +16,19 @@ class FinanceController extends ThinkController
$row=10;
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
// var_dump($row);die();
$map = [];
if(!empty(I('count_date'))){
$map['count_date']=I('count_date');
}
if (!empty(I('game_id'))) {
$map['game_id']=I('game_id');
}
if (!empty(I('partner_id'))) {
$map['partner_id']=I('collaborate_id');
}
// if (!empty(I('game_id'))) {
// $map['game_id']=I('game_id');
// }
// if (!empty(I('partner_id'))) {
// $map['partner_id']=I('collaborate_id');
// }
// $data = M("spend_count","tab_")
// ->field("count_date,cash_count,balance_coin_count,inside_cash_count,all_cash_count")
@ -34,61 +36,89 @@ class FinanceController extends ThinkController
// ->page($page,$row)
// ->group("count_date")
// ->select();
if (empty(I('game_id'))) {
$field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
sum(inside_cash_count) as inside_cash_count,sum(cash_count+balance_coin_count) as all_cash_count";
$InsideField = "inside_cash_count";
$map['inside_cash_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"count_date,inside_cash_count as count","promote_id,count_date");
unset($map['inside_cash_count']);
} else {
$field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
sum(bind_coin_count) as inside_cash_count,sum(cash_count+balance_coin_count) as all_cash_count";
$InsideField = "bind_coin_count";
$map['bind_coin_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"count_date,bind_coin_count as count","promote_id,count_date,game_id");
unset($map['bind_coin_count']);
}
//内充流水与绑定流水数据
$insideDataSum = [];
foreach ($insideData as $key => $value) {
if (isset($insideDataSum[$value['count_date']])) {
$insideDataSum[$value['count_date']] = $insideDataSum[$value['count_date']] + $value['count'];
} else {
$insideDataSum[$value['count_date']] = $value['count'];
}
}
// if (empty(I('game_id'))) {
// $field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
// sum(inside_cash_count) as inside_cash_count,sum(cash_count+balance_coin_count) as all_cash_count";
// $InsideField = "inside_cash_count";
// $map['inside_cash_count'] = ['neq',0];
// $insideData = D("spend_count")->getSpendCountData($map,"count_date,inside_cash_count as count","promote_id,count_date");
// unset($map['inside_cash_count']);
// } else {
// $field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
// sum(bind_coin_count) as inside_cash_count,sum(cash_count+balance_coin_count) as all_cash_count";
// $InsideField = "bind_coin_count";
// $map['bind_coin_count'] = ['neq',0];
// $insideData = D("spend_count")->getSpendCountData($map,"count_date,bind_coin_count as count","promote_id,count_date,game_id");
// unset($map['bind_coin_count']);
// }
// //内充流水与绑定流水数据
// $insideDataSum = [];
// foreach ($insideData as $key => $value) {
// if (isset($insideDataSum[$value['count_date']])) {
// $insideDataSum[$value['count_date']] = $insideDataSum[$value['count_date']] + $value['count'];
// } else {
// $insideDataSum[$value['count_date']] = $value['count'];
// }
// }
// var_dump($insideDataSum);
// var_dump(array_sum($insideDataSum));
// echo D("spend_count")->_sql();
// var_dump($insideData);die();
$group = "count_date";
// $group = "count_date";
// $order = "id DESC";
// $data = D("spend_count")->getSpendCountData($map,$field,$group,$order,$page,$row);
//
// foreach ($data as $key => $value) {
// $data[$key]['all_cash_count'] = $value['all_cash_count'] + $insideDataSum[$value['count_date']];
// $data[$key]['inside_cash_count'] = $insideDataSum[$value['count_date']];
// }
//
// $sumCash = D("spend_count")->sumSpendCountField($map,"cash_count");
// $sumBalance = D("spend_count")->sumSpendCountField($map,"balance_coin_count");
// $sumInside = array_sum($insideDataSum);
// $allField = "cash_count+balance_coin_count";
// $sumAll = D("spend_count")->sumSpendCountField($map,$allField)+array_sum($insideDataSum);
//
// $count = D("spend_count")->getSpendCountData($map,$field,$group,'');
$order = "id DESC";
$data = D("spend_count")->getSpendCountData($map,$field,$group,$order,$page,$row);
$data = M('spend_month_count','tab_')
->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date")
->where($map)
->page($page,$row)
->order($order)
->select();
foreach ($data as $key => $value) {
$data[$key]['all_cash_count'] = $value['all_cash_count'] + $insideDataSum[$value['count_date']];
$data[$key]['inside_cash_count'] = $insideDataSum[$value['count_date']];
}
$count = M('spend_month_count','tab_')
->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date")
->where($map)
->order($order)
->select();
$sumCash = D("spend_count")->sumSpendCountField($map,"cash_count");
$sumBalance = D("spend_count")->sumSpendCountField($map,"balance_coin_count");
$sumInside = array_sum($insideDataSum);
$allField = "cash_count+balance_coin_count";
$sumAll = D("spend_count")->sumSpendCountField($map,$allField)+array_sum($insideDataSum);
$sumData = M('spend_month_count','tab_')
->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date")
->where($map)
->order($order)
->find();
$count = D("spend_count")->getSpendCountData($map,$field,$group,$order);
// echo D("spend_count")->_sql();die();
$count = count($count);
$page = set_pagination($count,$row);
// var_dump($page);die();
if($page) {$this->assign('_page', $page);}
$this->meta_title = '月结统计';
$this->assign('sumCash',$sumCash);
$this->assign('sumBalance',$sumBalance);
$this->assign('sumInside',$sumInside);
$this->assign('sumAll',$sumAll);
// $this->assign('sumCash',$sumCash);
// $this->assign('sumBalance',$sumBalance);
// $this->assign('sumInside',$sumInside);
// $this->assign('sumAll',$sumAll);
$this->assign('sumData',$sumData);
$this->assign('data',$data);
@ -106,6 +136,10 @@ class FinanceController extends ThinkController
$map['count_date']=I('count_date');
}
if (!empty(I('root_name'))) {
$map['promote_account'] = array('like','%'.I("root_name").'%');
}
if (!empty(I("game_id"))) {
$map['game_id'] = I("game_id");
}
@ -119,6 +153,12 @@ class FinanceController extends ThinkController
}
}
// if (!empty(I('partner_id'))) {
// $map['partner_id']=I('collaborate_id');
// }
if (I('sign') == 2&&empty(I('root_id'))) {
$map['_string'] = "parent_id >0 or root_id>0";
@ -139,9 +179,9 @@ class FinanceController extends ThinkController
$map['_string'] = "promote_id = {$promote_id}";
}
$map['bind_coin_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"game_id,bind_coin_count as count","promote_id,count_date,game_id");
unset($map['bind_coin_count']);
$map['inside_cash_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"game_id,inside_cash_count as count","promote_id,count_date");
unset($map['inside_cash_count']);
//内充流水与绑定流水数据
$insideDataSum = [];
foreach ($insideData as $key => $value) {
@ -151,16 +191,14 @@ class FinanceController extends ThinkController
$insideDataSum[$value['game_id']] = $value['count'];
}
}
// var_dump($insideDataSum);die();
$field = "count_date,sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,
sum(bind_coin_count) as inside_cash_count,sum(cash_count+balance_coin_count+bind_coin_count) as all_cash_count,game_name,game_id,partner_name";
sum(inside_cash_count) as inside_cash_count,sum(cash_count+balance_coin_count) as all_cash_count,game_name,game_id,partner_name";
$group = "game_id";
$order = "id DESC";
$data = D("spend_count")->getSpendCountData($map,$field,$group,$order,$page,$row);
// echo D("spend_count")->_sql();die();
// echo D("spend_count")->_sql();die();
foreach ($data as $key => $value) {
$data[$key]['inside_cash_count'] = number_format($insideDataSum[$value['game_id']],2,'.','');
@ -168,8 +206,8 @@ class FinanceController extends ThinkController
$sumCash = D("spend_count")->sumSpendCountField($map,"cash_count");
$sumBalance = D("spend_count")->sumSpendCountField($map,"balance_coin_count");
$sumInside = D("spend_count")->sumSpendCountField($map,"bind_coin_count");
$sumAll = D("spend_count")->sumSpendCountField($map,"cash_count+balance_coin_count+bind_coin_count");
$sumInside = number_format(array_sum($insideDataSum),2,'.','');
$sumAll = D("spend_count")->sumSpendCountField($map,"cash_count+balance_coin_count") + array_sum($insideDataSum);
$count = D("spend_count")->getSpendCountData($map,$field,$group,$order);
@ -179,6 +217,7 @@ class FinanceController extends ThinkController
$this->meta_title = '每月情况查看详情';
$this->assign('from',I('from'));
$this->assign('sumCash',$sumCash);
$this->assign('sumBalance',$sumBalance);
$this->assign('sumInside',$sumInside);
@ -242,7 +281,7 @@ class FinanceController extends ThinkController
$map['user_nickname'] = array('like',I("user_nickname").'%');
}
// var_dump($map);die();
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$group = "";
$order = "pay_time DESC";
$data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row);
@ -481,10 +520,7 @@ class FinanceController extends ThinkController
if (I('partner_id')) {
$map['partner_id'] = I('partner_id');
} else {
$this->ajaxReturn([],'json');
}
$data = M('game','tab_')->field("id,game_name")->where($map)->select();
$this->ajaxReturn($data,'json');

@ -39,12 +39,37 @@
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<!--游戏类型搜索END-->
<div class="input-list input-list-server search_label_rehab">
<select id="partner_id" name="partner_id" class="select_gallery" style="width:120px;">
<option value="">请选择合作方</option>
<volist name=":getPartner()" id="vo">
<option partner-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['partner_id']">selected=selected</if>>{$vo.partner}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_id" class="select_gallery" style="width:120px;">
<option value="">请选择游戏</option>
<volist name=":getGameList($_GET['partner_id'])" id="vo">
<option value="{$vo.id}" <if condition="$vo.id eq $_GET['game_id']">selected=selected</if>>{$vo.game_name}</option>
</volist>
</select>
</div>
<input type="hidden" name="count_date" value="{$_GET['count_date']}"/>
<input type="hidden" name="parent_id" value="{$_GET['parent_id']}"/>
<input type="hidden" name="root_id" value="{$_GET['root_id']}"/>
<input type="hidden" name="sign" value="{$_GET['sign']}"/>
<input type="hidden" name="from" value="{$_GET['from']}"/>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/gameFinance','model='.$model['name'].'&row='.I('row'),false)}"
style="width: 100px;border: #3C95C8 solid 1px;">搜索</a>
<a class="sch-btn" href="javascript:history.go(-1)" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>
<a class="sch-btn" href="{:U('Export/exportGameFinance',
array('count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id'],'parent_id'=>$_GET['parent_id'],'promote_id'=>$_GET['promote_id'],'game_id'=>$_REQUEST['game_id'],false))}" style="width: 100px;border: #3C95C8 solid 1px;">导出</a>
array('count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id'],'parent_id'=>$_GET['parent_id'],'promote_id'=>$_GET['promote_id'],'game_id'=>$_REQUEST['game_id'],'partner_id'=>$_REQUEST['partner_id'],false))}" style="width: 100px;border: #3C95C8 solid 1px;">导出</a>
</div>
</div>
</div>
@ -64,7 +89,7 @@
<th >平台币流水</th>
<th >绑定币流水</th>
<th >内充消耗</th>
<th >总流水</th>
@ -95,7 +120,8 @@
<td >
<a href="{:U('Finance/gameFinanceDetail',
array('count_date'=>$_REQUEST['count_date'],'game_id'=>$data['game_id'],
'game_name'=>$data['game_name'],'root_id'=>$_REQUEST['root_id'],'parent_id'=>$_REQUEST['parent_id'],'promote_id'=>$_REQUEST['promote_id']))}" >查看</a>
'game_name'=>$_REQUEST['game_id']?$data['game_name']:'','root_id'=>$_REQUEST['root_id'],
'parent_id'=>$_REQUEST['parent_id'],'promote_id'=>$_REQUEST['promote_id'],'sign'=>$_REQUEST['sign'],'from'=>$_REQUEST['from']))}" >查看</a>
</td>
</tr>
</volist>
@ -107,7 +133,9 @@
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
<td>
<a href="{:U('Finance/gameFinanceDetail',
array('count_date'=>$_REQUEST['count_date'],'root_id'=>$_GET['root_id'],'parent_id'=>$_REQUEST['parent_id'],'promote_id'=>$_REQUEST['promote_id'],'game_id'=>$_REQUEST['game_id']))}" >查看</a>
array('count_date'=>$_REQUEST['count_date'],'root_id'=>$_GET['root_id'],'partner_id'=>$_REQUEST['partner_id'],
'parent_id'=>$_REQUEST['parent_id'],'promote_id'=>$_REQUEST['promote_id'],'game_id'=>$_REQUEST['game_id'],'game_name'=>'1',
'sign'=>$_REQUEST['sign'],'from'=>$_REQUEST['from']))}" >查看</a>
</td>
</tr>
</notemtpy>
@ -130,7 +158,20 @@
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
$('.page a').click(function () {
var href = $(this).attr('href');
$(this).removeAttr('href');
window.location.replace(href)
console.log(href)
});
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){
@ -153,7 +194,7 @@
}else{
url += '?' + query;
}
window.location.href = url;
window.location.replace(url);
});
//回车自动提交
@ -176,20 +217,21 @@
});
});
$("#game_id").change(function(){
$("#partner_id").change(function(){
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
url:"{:U('Finance/getGameList')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
data:{partner_id:$("#partner_id option:selected").attr('partner-id')},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
var str = "<option value=''>请选择游戏</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"'>"+data[i].server_name+"</option>"
str += "<option value='"+data[i].id+"'>"+data[i].game_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
// console.log(str);
$("#game_id").empty();
$("#game_id").append(str);
// $("#server_id").select2();
}
})

@ -78,6 +78,8 @@
<th >玩家账号</th>
<th >玩家昵称</th>
<th >游戏名称</th>
<th >所属推广员</th>
@ -113,6 +115,7 @@
<td >{$data.pay_order_number}</td>
<td >{$data.pay_time}</td>
<td >{$data.user_account}</td>
<td >{$data.user_nickname}</td>
<td >{$data.game_name}</td>
<td >{$data.promote_account}</td>
<td >{$data.spend_ip}</td>
@ -125,7 +128,7 @@
</volist>
<tr>
<td ><span>总计</span></td>
<td colspan="10" ><span><if condition="$sum_amount neq ''">{$sum_amount}<else/>0</if></span></td>
<td colspan="11" ><span><if condition="$sum_amount neq ''">{$sum_amount}<else/>0</if></span></td>
</tr>
</notemtpy>
@ -147,11 +150,23 @@
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){
$('.page a').click(function () {
var href = $(this).attr('href');
$(this).removeAttr('href');
window.location.replace(href)
console.log(href)
});
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
@ -170,7 +185,7 @@
}else{
url += '?' + query;
}
window.location.href = url;
window.location.replace(url);
});
//回车自动提交

@ -30,7 +30,7 @@
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">组长月结统计</h3>
<h3 class="page_title">会长->组长月结统计</h3>
<p class="description_text"></p>
</div>
@ -73,7 +73,7 @@
<th >平台币流水</th>
<th >内充流水</th>
<th >内充发放</th>
<th >总流水</th>
@ -102,8 +102,8 @@
<td >{$data.inside_cash_count}</td>
<td >{$data.all_count}</td>
<td ><if condition="$data['promote_id'] neq $_GET['root_id']">
<a href="{:U('Finance/gameFinance',array('parent_id'=>$data['promote_id'],'count_date'=>$_GET['count_date']))}" >游戏查看</a>
<a href="{:U('Finance/getPromoteUser',array('count_date'=>$_GET['count_date'],'parent_id'=>$data['promote_id'],'root_id'=>$_GET['root_id']))}" >渠道查看</a>
<a href="{:U('Finance/gameFinance',array('sign'=>1,'parent_id'=>$data['promote_id'],'root_id'=>$_GET['root_id'],'count_date'=>$_GET['count_date'],'from'=>'getParentUser'))}" >游戏查看</a>
<a href="{:U('Finance/getPromoteUser',array('count_date'=>$_GET['count_date'],'parent_id'=>$data['promote_id'],'root_id'=>$_GET['root_id'],'root_name'=>$_GET['root_name'],'root_name1'=>$_GET['root_name1']))}" >推广员渠道</a>
<else/>
-------
</if></td>
@ -115,7 +115,7 @@
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td >
<a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id']))}" >游戏查看</a>
<a href="{:U('Finance/gameFinance',array('sign'=>1,'count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id'],'parent_id'=>$data['promote_id'],'from'=>'getParentUser'))}" >游戏查看</a>
<!-- <a href="{:U('Finance/getPromoteUser',array('count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id'],'sign'=>1))}" >渠道查看</a>-->
</td>
</tr>
@ -139,11 +139,24 @@
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){
$('.page a').click(function () {
var href = $(this).attr('href');
$(this).removeAttr('href');
window.location.replace(href)
console.log(href)
});
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
@ -162,7 +175,7 @@
}else{
url += '?' + query;
}
window.location.href = url;
window.location.replace(url);
});
//回车自动提交

@ -30,7 +30,7 @@
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">推广员月结统计</h3>
<h3 class="page_title">会长->组长->推广员月结统计</h3>
<p class="description_text"></p>
</div>
@ -65,7 +65,7 @@
<th >平台币流水</th>
<th >内充流水</th>
<th >内充发放</th>
<th >总流水</th>
@ -94,7 +94,7 @@
<td >{$data.inside_cash_count}</td>
<td >{$data.all_count}</td>
<td ><if condition="$data['promote_id'] neq $_GET['parent_id']">
<a href="{:U('Finance/gameFinance',array('promote_id'=>$data['promote_id'],'count_date'=>$_GET['count_date']))}" >游戏查看</a>
<a href="{:U('Finance/gameFinance',array('promote_id'=>$data['promote_id'],'count_date'=>$_GET['count_date'],'from'=>'getPromoteUser'))}" >游戏查看</a>
<else/>
-------
</if></td>
@ -105,7 +105,7 @@
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td ><a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'parent_id'=>$_GET['parent_id'],'sign'=>3))}" >游戏查看</a>
<td ><a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'parent_id'=>$_GET['parent_id'],'sign'=>3,'from'=>'getPromoteUser'))}" >游戏查看</a>
</tr>
</notemtpy>
@ -127,11 +127,23 @@
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){
$('.page a').click(function () {
var href = $(this).attr('href');
$(this).removeAttr('href');
window.location.replace(href)
console.log(href)
});
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
@ -150,7 +162,7 @@
}else{
url += '?' + query;
}
window.location.href = url;
window.location.replace(url);
});
//回车自动提交

@ -74,7 +74,7 @@
<th >平台币流水</th>
<th >内充流水</th>
<th >内充发放</th>
<th >总流水</th>
@ -102,8 +102,8 @@
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.all_count}</td>
<td ><a href="{:U('Finance/gameFinance',array('root_id'=>$data['promote_id'],'count_date'=>$_GET['count_date']))}" >游戏查看</a>
<a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_name'=>$_GET['root_name'],'root_id'=>$data['promote_id']))}" >渠道查看</a></td>
<td ><a href="{:U('Finance/gameFinance',array('root_id'=>$data['promote_id'],'count_date'=>$_GET['count_date'],'from'=>'getRootUser','sign'=>1))}" >游戏查看</a>
<a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_id'=>$data['promote_id']))}" >组长渠道</a></td>
</volist>
<tr>
<td ><span>总计</span></td>
@ -111,7 +111,7 @@
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td ><a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'sign'=>1))}" >游戏查看</a>
<td ><a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'sign'=>1,'root_id'=>$_GET['root_name']?$data['promote_id']:'','from'=>'getRootUser'))}" >游戏查看</a>
<!-- <a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_name'=>$_GET['root_name'],'sign'=>1))}" >渠道查看</a></td>-->
</tr>
</notemtpy>
@ -134,11 +134,32 @@
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){
$('.page a').click(function () {
var href = $(this).attr('href');
$(this).removeAttr('href');
window.location.replace(href)
console.log(href)
});
// $('#pagechange').removeAttr('onchange');
//
// $('#pagechange').change(function () {
// var val = $(this).val();
// var href = location.search;
// console.log(val);
// console.log(href);
// });
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
@ -157,7 +178,7 @@
}else{
url += '?' + query;
}
window.location.href = url;
window.location.replace(url);
});
//回车自动提交
@ -198,6 +219,8 @@
}
})
});
var game_id = "{:I('game_name')}";
var game_server = "{:I('server_id')}";
if(game_id){

@ -48,22 +48,22 @@
</volist>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="partner_id" name="partner_id" class="select_gallery" style="width:120px;">
<option value="">请选择合作方</option>
<volist name=":getPartner()" id="vo">
<option partner-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['partner_id']">selected=selected</if>>{$vo.partner}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_id" class="select_gallery" style="width:120px;">
<option value="">请选择游戏</option>
<volist name=":getGameList($_GET['partner_id'])" id="vo">
<option value="{$vo.id}" <if condition="$vo.id eq $_GET['game_id']">selected=selected</if>>{$vo.game_name}</option>
</volist>
</select>
</div>
<!-- <div class="input-list input-list-server search_label_rehab">-->
<!-- <select id="partner_id" name="partner_id" class="select_gallery" style="width:120px;">-->
<!-- <option value="">请选择合作方</option>-->
<!-- <volist name=":getPartner()" id="vo">-->
<!-- <option partner-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['partner_id']">selected=selected</if>>{$vo.partner}</option>-->
<!-- </volist>-->
<!-- </select>-->
<!-- </div>-->
<!-- <div class="input-list input-list-game search_label_rehab">-->
<!-- <select id="game_id" name="game_id" class="select_gallery" style="width:120px;">-->
<!-- <option value="">请选择游戏</option>-->
<!-- <volist name=":getGameList($_GET['partner_id'])" id="vo">-->
<!-- <option value="{$vo.id}" <if condition="$vo.id eq $_GET['game_id']">selected=selected</if>>{$vo.game_name}</option>-->
<!-- </volist>-->
<!-- </select>-->
<!-- </div>-->
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">
@ -79,6 +79,7 @@
<!-- 数据列表 -->
<div class="data_list">
<empty name="show_status">
<div class="">
<table>
<!-- 表头 -->
@ -93,7 +94,7 @@
<th >平台币流水</th>
<th ><if condition="$_GET['game_id'] neq ''">绑定币流水<else/>内充流水</if></th>
<th >内充流水</th>
<th >总流水</th>
@ -119,25 +120,25 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.all_cash_count}</td>
<td >{$data.all_count}</td>
<td >
<a href="{:U('Finance/gameFinance',
array('count_date'=>$data['count_date'],'game_id'=>$_GET['game_id'],'collaborate_id'=>$_GET['collaborate_id'],'sign'=>1))}" >游戏查看</a>
array('sign'=>$_GET['count_date']?1:'','count_date'=>$data['count_date'],'game_id'=>$_GET['game_id'],'partner_id'=>$_GET['partner_id'],'from'=>'index'))}" >游戏查看</a>
<a href="{:U('Finance/getRootUser',
array('count_date'=>$data['count_date'])
array('sign'=>$_GET['count_date']?1:'','count_date'=>$data['count_date'],'game_id'=>$_GET['game_id'],'partner_id'=>$_GET['partner_id'])
,false)}" >渠道查看</a>
</td>
</tr>
</volist>
<tr>
<td><span>总计</span></td>
<td ><span><if condition="$sumCash neq ''">{$sumCash}<else/>0</if></span></td>
<td><if condition="$sumBalance neq ''">{$sumBalance}<else/>0</if></td>
<td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td>
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
<td ><span><if condition="$sumData.cash_count neq ''">{$sumData.cash_count}<else/>0</if></span></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.balance_coin_count}<else/>0</if></td>
<td><if condition="$sumData.inside_cash_count neq ''">{$sumData.inside_cash_count}<else/>0</if></td>
<td><if condition="$sumData.all_count neq ''">{$sumData.all_count}<else/>0</if></td>
<td>
<a href="{:U('Finance/gameFinance',array('sign'=>1,'game_id'=>$_GET['game_id']))}" >游戏查看</a>
<a href="{:U('Finance/getRootUser')}" >渠道查看</a>
<a href="{:U('Finance/gameFinance',array('sign'=>1,'game_id'=>$_GET['game_id'],'count_date'=>$_GET['count_date'],'partner_id'=>$_GET['partner_id'],'from'=>'index'))}" >游戏查看</a>
<a href="{:U('Finance/getRootUser',array('sign'=>1,'count_date'=>$_GET['count_date'],'game_id'=>$_GET['game_id'],'partner_id'=>$_GET['partner_id']))}" >渠道查看</a>
</td>
</tr>
</notemtpy>
@ -145,13 +146,12 @@
</tbody>
</table>
</div>
</empty>
</div>
<div class="page">
<a class="sch-btn" href="{:U('Export/exportFinanceIndex',
array('count_date'=>$_GET['count_date'],'game_id'=>$_GET['game_id'],'collaborate_id'=>$_GET['collaborate_id'])
,false)}">导出</a>
{$_page|default=''}
</div>
</block>
<block name="script">
@ -162,6 +162,11 @@
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
@ -215,7 +220,7 @@
data:{partner_id:$("#partner_id option:selected").attr('partner-id')},
dataType:'json',
success:function(data){
var str = "<option value=''>请选择区服</option>";
var str = "<option value=''>请选择游戏</option>";
for (var i in data){
str += "<option value='"+data[i].id+"'>"+data[i].game_name+"</option>"
}

Loading…
Cancel
Save