Merge branch 'dev_zyx' of 47.111.118.107:/srv/git/platform into dev_zyx

master
chenzhi 5 years ago
commit 483ccdffa2

@ -1439,22 +1439,19 @@ function cash_pay_way()
}
function getMonth() {
$start = "2019-08";
$end = date("Y-m");
$start = date("Y-m", strtotime("now"));
//开始月份
$end = date('Y-m', strtotime($end)); // 转换为月
$range = [];
$i = 0;
$i = 1;
do {
$month = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
$month = date('Y-m', strtotime($start . ' - ' . $i . ' month'));
$range[] = $month;
$i++;
} while ($month < $end);
} while ($i<13);
return $range;
}
function getPayType($type) {
$return = '';

@ -5452,4 +5452,154 @@ if ($key == 'model'){
$this->exportExcel($xlsName, $xlsCell, $xlsData);
}
function exportGetRootUser() {
//获取所有数据
if (!empty(I("count_date"))) {
$map['count_date'] = I("count_date");
} else {
$this->error('月份不能为空');
}
$xlsName = '会长月结统计';
$xlsCell = array(
array('promote_account','会长渠道'),
array('cash_count','游戏现金流水'),
array('balance_coin_count','平台币流水'),
array('inside_cash_count','内充流水'),
array('all_count','总流水'),
);
if (!empty(I("root_name"))) {
$map['promote_account']=['like','%'.I("root_name").'%'];
}
$map['parent_id'] = 0;
$map['root_id'] = 0;
$xlsData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->select();
$sumData = M('spend_user_count','tab_')
->field('sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->find();
$sumData = [['promote_account'=>'总计',
'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);
}
function exportGetParentUser() {
//获取所有数据
if (!empty(I("count_date")) ) {
$month = I("count_date");
$map['count_date'] =$month;
} else {
$this->error('参数错误');
}
if (!empty(I("root_id")) || I("root_id") == 0) {
$root_id = I("root_id");
} else {
$this->error('参数错误');
}
if (!empty(I("root_name"))) {
$map['promote_account']=['like','%'.I("root_name").'%'];
}
$xlsName = '组长月结统计';
$xlsCell = array(
array('promote_account','组长渠道'),
array('cash_count','游戏现金流水'),
array('balance_coin_count','平台币流水'),
array('inside_cash_count','内充流水'),
array('all_count','总流水'),
);
//获取数据
$map['parent_id'] =$root_id;
$xlsData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->select();
$sumData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->find();
$sumData = [['promote_account'=>'总计',
'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);
}
function exportGetPromoteUser() {
//获取所有数据
if (!empty(I("count_date")) && !empty(I("parent_id"))) {
$month = I("count_date");
$parent_id = I("parent_id");
$map['parent_id'] =$parent_id;
$map['count_date'] =$month;
} else {
$this->error('参数错误');
}
$xlsName = '推广员月结统计';
$xlsCell = array(
array('promote_id','推广员渠道'),
array('cash_count','游戏现金流水'),
array('balance_coin_count','平台币流水'),
array('inside_cash_count','内充流水'),
array('all_count','总流水'),
);
//获取数据
$xlsData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->select();
$sumData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->find();
$sumData = [['promote_id'=>'总计',
'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);
}
}

@ -104,23 +104,25 @@ class FinanceController extends ThinkController
$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('root_id'))) {
$root_id = I('root_id');
$map['_string'] = "promote_id = {$root_id} or parent_id = {$root_id} or root_id = {$root_id}";
}
if(!empty(I('parent_id'))) {
$parent_id = I('parent_id');
$map['_string'] = "promote_id = {$parent_id} or parent_id = {$parent_id}";
}
if (!empty(I('promote_id'))) {
$promote_id = I('promote_id');
$map['_string'] = "promote_id = {$promote_id}";
}
// $data = M("spend_count","tab_")
// ->field("count_date,cash_count,balance_coin_count,inside_cash_count,all_cash_count")
// ->where($map)
// ->page($page,$row)
// ->group("game_id")
// ->select();
$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']);
//内充流水与绑定流水数据
//内充流水与绑定流水数据
$insideDataSum = [];
foreach ($insideData as $key => $value) {
if (isset($insideDataSum[$value['game_id']])) {
@ -129,8 +131,6 @@ class FinanceController extends ThinkController
$insideDataSum[$value['game_id']] = $value['count'];
}
}
// var_dump($insideData);
// 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";
@ -138,6 +138,9 @@ class FinanceController extends ThinkController
$group = "game_id";
$order = "id DESC";
$data = D("spend_count")->getSpendCountData($map,$field,$group,$order,$page,$row);
// echo D("spend_count")->_sql();die();
foreach ($data as $key => $value) {
$data[$key]['inside_cash_count'] = $insideDataSum[$value['game_id']];
}
@ -166,6 +169,8 @@ class FinanceController extends ThinkController
function gameFinanceDetail($p = 1) {
// $this->getPromoteList();die();
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
@ -219,174 +224,187 @@ class FinanceController extends ThinkController
}
//按月份获取会长统计
public function getRootUser()
public function getRootUser($p = 1)
{
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
//获取所有数据
if (!empty(I("count_date"))) {
$month = I("count_date");
$map['count_date'] = I("count_date");
} else {
$this->error('月份不能为空');
}
$from = "
(
SELECT root_id,root_name,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,inside_cash_count FROM tab_spend_count WHERE root_id > 0 and count_date='{$month}' group by root_id
UNION
SELECT promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,inside_cash_count FROM tab_spend_count WHERE parent_id = 0 and count_date='{$month}' group by promote_id
UNION
SELECT parent_id,parent_name,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,inside_cash_count FROM tab_spend_count WHERE parent_id > 0 and root_id = 0 and count_date='{$month}' group by parent_id
)
";
$subQueryAll = M()->table($from." a")
->field('root_id,root_name,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count')
// ->limit(1)
->group("a.root_id")
->select();
dump($subQueryAll);
if (!empty(I("root_name"))) {
$map['promote_account']=['like','%'.I("root_name").'%'];
}
$map['parent_id'] = 0;
$map['root_id'] = 0;
$subQueryAll = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->page($page,$row)
->select();
$sumData = M('spend_user_count','tab_')
->field('sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->find();
$count = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->select();
$count = count($count);
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
$this->assign('sumData',$sumData);
$this->assign('data',$subQueryAll);
$this->display();
}
//按月份获取组长统计
public function getParentUser()
public function getParentUser($p = 1)
{
if (!empty(I("count_date")) && !empty(I("root_id"))) {
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
if (!empty(I("count_date")) ) {
$month = I("count_date");
$root_id = I("root_id");
$map['count_date'] =$month;
} else {
$this->error('参数错误');
}
//获取数据
$from = "
(
SELECT parent_id,parent_name,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,inside_cash_count FROM tab_spend_count WHERE root_id = '{$root_id}' and count_date='{$month}' group by parent_id
UNION
SELECT promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,inside_cash_count FROM tab_spend_count WHERE parent_id = '{$root_id}' and count_date='{$month}' group by promote_id
)
";
$subQueryAll = M()->table($from." a")
->field('parent_id,parent_name,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count')
// ->limit(1)
->group("a.parent_id")
->select();
dump($subQueryAll);
# code...
}
public function getPromoteUser()
{
if (!empty(I("count_date")) && !empty(I("parent_id"))) {
$month = I("count_date");
$parent_id = I("parent_id");
if (!empty(I("root_id"))) {
$root_id = I("root_id");
$map['parent_id'] =$root_id;
} else if(!empty(I("sign"))){
$map['parent_id'] = ['neq',0];
$map['root_id'] = ['eq',0];
} else {
$this->error('参数错误');
if (I("root_id") == 0) {
$this->display();
}
}
//获取数据
$from = "
(
SELECT promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,inside_cash_count FROM tab_spend_count WHERE parent_id = '{$parent_id}' and count_date='{$month}' group by promote_id
)
";
$subQueryAll = M()->table($from." a")
->field('promote_id,promote_account,cash_count,balance_coin_count,inside_cash_count')
// ->limit(1)
->group("a.promote_id")
->select();
dump($subQueryAll);
# code...
}
function presidentFinance($p = 1) {
if (!empty(I("root_name"))) {
$rootname = I("root_name");
$map['promote_account'] =['like','%'.$rootname.'%'];
}
$subQueryAll = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->page($page,$row)
->select();
$sumData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->find();
$count = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->select();
$count = count($count);
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
$this->assign('sumData',$sumData);
$this->assign('data',$subQueryAll);
$this->display();
}
public function getPromoteUser($p = 1)
{
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
$map1['_string'] = '';
$map = [];
if (!empty(I('promote_account'))) {
$map['promote_account'] = I('promote_account');
}
if (!empty(I("count_date"))) {
$map['count_date'] = I('count_date');
$map1['_string'] = "count_date = {$map['count_date']} and ";
$month = I("count_date");
$map['count_date'] =$month;
} else {
$this->error('参数错误');
}
$map['parent_id'] = 0;
if (!empty(I("parent_id"))) {
$parent_id = I("parent_id");
$map['parent_id'] =$parent_id;
}
$field = "parent_id,root_id,promote_id,promote_account,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";
if (!empty(I('sign'))) {
$map['parent_id'] = ['neq',0];
$map['root_id'] = I("root_id");
}
$group = "promote_id";
$order = "id DESC";
// $data = D("spend_count")->getSpendCountData($map,$field,$group,$order,$page,$row);
$data =
$data = M("spend_count","tab_")
->field($field)
$subQueryAll = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->page($page,$row)
->group($group)->order($order)->select();
->select();
$map['inside_cash_count'] = ['neq',0];
$insideData = D("spend_count")->getSpendCountData($map,"promote_id,inside_cash_count as count","promote_id,count_date");
unset($map['inside_cash_count']);
$sumData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->find();
$insideDataSum = [];
foreach ($insideData as $key => $value) {
if (isset($insideDataSum[$value['promote_id']])) {
$insideDataSum[$value['promote_id']] = $insideDataSum[$value['promote_id']] + $value['count'];
} else {
$insideDataSum[$value['promote_id']] = $value['count'];
}
}
// echo D("spend_count")->_sql();
// dump($insideDataSum);die();
$count = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map)
->group('promote_id')
->select();
$promote_array = [];
foreach ($data as $key => $value) {
if ($value['promote_id']!=0) {
array_push($promote_array,$value['promote_id']);
}
}
$promote_id = implode(',',$promote_array);
$count = count($count);
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
if ($promote_id) {
$map1['_string'] = "(parent_id IN({$promote_id}) or root_id IN({$promote_id}))";
$sunData = D("spend_count")->getSpendCountData($map1,$field,$group,$order);
$sum = array_sum($sumData);
$map1['inside_cash_count'] = ['neq',0];
$sunInsideData = D("spend_count")->getSpendCountData($map1,"promote_id,inside_cash_count as count","promote_id,count_date");
$this->assign('sumData',$sumData);
$this->assign('data',$subQueryAll);
$this->display();
# code...
}
foreach($sunInsideData as $key => $value) {
if (in_array($value['parent_id'],$promote_array)) {
$insideDataSum[$value['parent_id']] = $insideDataSum[$value['parent_id']] + $value['count'];
}else if (in_array($value['root_id'],$promote_array)) {
$insideDataSum[$value['root_id']] = $insideDataSum[$value['root_id']] + $value['count'];
}
}
function getPromoteList($root_id = 0) {
} else {
$sunData = [];
}
dump($promote_id);die();
$handleData = [];
foreach ($sunData as $key =>$value) {
if (in_array($value['parent_id'],$promote_array)) {
$handleData[$value['parent_id']]['cash_count'] = $handleData[$value['parent_id']]['cash_count']+$value['cash_count'];
$handleData[$value['parent_id']]['balance_coin_count'] = $handleData[$value['parent_id']]['balance_coin_count']+$value['balance_coin_count'];
$handleData[$value['parent_id']]['inside_cash_count'] = $handleData[$value['parent_id']]['inside_cash_count']+$value['inside_cash_count'];
}
if (in_array($value['root_id'],$promote_array)) {
$handleData[$value['root_id']]['cash_count'] = $handleData[$value['root_id']]['cash_count'] + $value['cash_count'];
$handleData[$value['root_id']]['balance_coin_count'] = $handleData[$value['root_id']]['balance_coin_count'] + $value['balance_coin_count'];
$handleData[$value['root_id']]['inside_cash_count'] = $handleData[$value['root_id']]['inside_cash_count']+ $value['inside_cash_count'];
}
}
$data = M('promote')
->field("id")
->where("parent_id={$root_id} and grand_id={$root_id}")
->select();
foreach($data as $key => $value) {
$data[$key]['cash_count'] = $value['cash_count'] + $handleData[$value['promote_id']]['cash_count'];
$data[$key]['balance_coin_count'] = $value['balance_coin_count'] + $handleData[$value['promote_id']]['balance_coin_count'];
$data[$key]['inside_cash_count'] = $value['inside_cash_count'] + $handleData[$value['promote_id']]['inside_cash_count'];
$handleData = [];
foreach ($data as $key => $value) {
array_push($data[$key]['id'],$handleData);
}
return $handleData;
$this->assign('data',$data);
$this->display();
}
}

@ -86,15 +86,15 @@
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td >{$data.game_name}</td>
<td >{$data.partner_name}</td>
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.all_cash_count}</td>
<td ><if condition="$data.game_name neq ''">{$data.game_name}<else/></if></td>
<td ><if condition="$data.partner_name neq ''">{$data.partner_name}<else/></if></td>
<td ><if condition="$data.cash_count neq ''">{$data.cash_count}<else/>0</if></td>
<td ><if condition="$data.balance_coin_count neq ''">{$data.balance_coin_count}<else/>0</if></td>
<td ><if condition="$data.inside_cash_count neq ''">{$data.inside_cash_count}<else/>0</if></td>
<td ><if condition="$data.all_cash_count neq ''">{$data.all_cash_count}<else/>0</if></td>
<td >
<a href="{:U('Finance/gameFinanceDetail',
array('count_date'=>$_REQUEST['count_date'],'game_id'=>$data['game_id'],'game_name'=>$data['game_name']))}" >查看</a>
array('count_date'=>$_REQUEST['count_date'],'game_id'=>$data['game_id'],'game_name'=>$data['game_name'],))}" >查看</a>
</td>
</tr>
</volist>

@ -0,0 +1,222 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$_REQUEST['game_name']}充值流水</h3>
<p class="description_text"></p>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<!--游戏类型搜索END-->
<div class="input-list">
<a class="sch-btn" href="{:U('Finance/getRootUser',array('count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id']))}" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>
<a class="sch-btn" href="{:U('Export/exportGetParentUser',
array('count_date'=>$_GET['count_date'],'root_name'=>$_GET['root_name'],'root_id'=>$_GET['root_id'],'',false))}" style="width: 100px;border: #3C95C8 solid 1px;">导出</a>
</div>
<input type="hidden" name="root_id" value="{$_GET['root_id']}"/>
<input type="hidden" name="count_date" value="{$_GET['count_date']}"/>
<div class="input-list">
<input type="text" name="root_name" placeholder="请输入会长账号搜索" class="" value="{:I('root_name')}"/>&nbsp;
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/getParentUser','model='.$model['name'].'&row='.I('row'),false)}"
style="">搜索</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th >会长渠道</th>
<th>游戏现金流水</th>
<th >平台币流水</th>
<th >内充流水</th>
<th >总流水</th>
<th >操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<style>
.data-table thead th, .data-table tbody td{text-align:center}
.data-table tbody td{border-right:1px solid #DDDDDD;}
.d_list .drop-down ul {z-index:999;}
</style>
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td >{$data.promote_account}</td>
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.all_count}</td>
<td ><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></td>
</volist>
<tr>
<td ><span>总计</span></td>
<td ><span>{$sumData.cash_count}</span></td>
<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')}" >游戏查看</a>
<a href="{:U('Finance/getPromoteUser',array('count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id'],'sign'=>1))}" >渠道查看</a></td>
</tr>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page|default=''}
</div>
</block>
<block name="script">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<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 type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
var endtime = $.trim($('#time-end').val());
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
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.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
$(".ljcz").click(function(){
var id = $(this).attr('data-value');
var game_name = "{:I('game_name')}";
var server_name = "{:I('server_id')}";
layer.open({
type: 2,
title: '游戏消费记录',
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url
});
});
$("#game_id").change(function(){
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"'>"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
});
var game_id = "{:I('game_name')}";
var game_server = "{:I('server_id')}";
if(game_id){
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
type:"post",
data:{game_id:game_id,type:2},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
}
})
</script>
</block>

@ -0,0 +1,212 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$_REQUEST['game_name']}充值流水</h3>
<p class="description_text"></p>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<!--游戏类型搜索END-->
<div class="input-list">
<a class="sch-btn" href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id']))}" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>
<a class="sch-btn" href="{:U('Export/exportGetPromoteUser',
array('count_date'=>$_GET['count_date'],'parent_id'=>$_GET['root_id'],false))}" style="width: 100px;border: #3C95C8 solid 1px;">导出</a>
</div>
<input type="hidden" name="count_date" value="{$_GET['count_date']}"/>
<input type="hidden" name="game_id" value="{$_GET['game_id']}"/>
<input type="hidden" name="game_name" value="{$_GET['game_name']}"/>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th >推广员渠道</th>
<th>游戏现金流水</th>
<th >平台币流水</th>
<th >内充流水</th>
<th >总流水</th>
<th >操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<style>
.data-table thead th, .data-table tbody td{text-align:center}
.data-table tbody td{border-right:1px solid #DDDDDD;}
.d_list .drop-down ul {z-index:999;}
</style>
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td >{$data.promote_account}</td>
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.all_count}</td>
<td ><a href="{:U('Finance/gameFinance',array('promote_id'=>$data['promote_id'],'count_date'=>$_GET['count_date']))}" >游戏查看</a></td>
</volist>
<tr>
<td ><span>总计</span></td>
<td ><span>{$sumData.cash_count}</span></td>
<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')}" >游戏查看</a>
</tr>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page|default=''}
</div>
</block>
<block name="script">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<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 type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
var endtime = $.trim($('#time-end').val());
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
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.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
$(".ljcz").click(function(){
var id = $(this).attr('data-value');
var game_name = "{:I('game_name')}";
var server_name = "{:I('server_id')}";
layer.open({
type: 2,
title: '游戏消费记录',
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url
});
});
$("#game_id").change(function(){
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"'>"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
});
var game_id = "{:I('game_name')}";
var game_server = "{:I('server_id')}";
if(game_id){
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
type:"post",
data:{game_id:game_id,type:2},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
}
})
</script>
</block>

@ -0,0 +1,223 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$_REQUEST['game_name']}充值流水</h3>
<p class="description_text"></p>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<!--游戏类型搜索END-->
<div class="input-list">
<a class="sch-btn" href="{:U('Finance/index')}" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>
<a class="sch-btn" href="{:U('Export/exportGetRootUser',
array('count_date'=>$_GET['count_date'],'root_name'=>$_GET['root_name'],false))}" style="width: 100px;border: #3C95C8 solid 1px;">导出</a>
</div>
<input type="hidden" name="count_date" value="{$_GET['count_date']}"/>
<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="root_name" placeholder="请输入会长账号搜索" class="" value="{:I('root_name')}"/>&nbsp;
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/getRootUser','model='.$model['name'].'&row='.I('row'),false)}"
style="">搜索</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th >会长渠道</th>
<th>游戏现金流水</th>
<th >平台币流水</th>
<th >内充流水</th>
<th >总流水</th>
<th >操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<style>
.data-table thead th, .data-table tbody td{text-align:center}
.data-table tbody td{border-right:1px solid #DDDDDD;}
.d_list .drop-down ul {z-index:999;}
</style>
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td >{$data.promote_account}</td>
<td >{$data.cash_count}</td>
<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>
</volist>
<tr>
<td ><span>总计</span></td>
<td ><span>{$sumData.cash_count}</span></td>
<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')}" >游戏查看</a>
<a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_name'=>$_GET['root_name'],'sign'=>1))}" >渠道查看</a></td>
</tr>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page|default=''}
</div>
</block>
<block name="script">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<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 type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/index')}');
$(function(){
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
var endtime = $.trim($('#time-end').val());
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
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.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
$(".ljcz").click(function(){
var id = $(this).attr('data-value');
var game_name = "{:I('game_name')}";
var server_name = "{:I('server_id')}";
layer.open({
type: 2,
title: '游戏消费记录',
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url
});
});
$("#game_id").change(function(){
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"'>"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
});
var game_id = "{:I('game_name')}";
var game_server = "{:I('server_id')}";
if(game_id){
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
type:"post",
data:{game_id:game_id,type:2},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
}
})
</script>
</block>

@ -122,7 +122,7 @@
<td >
<a href="{:U('Finance/gameFinance',
array('count_date'=>$data['count_date'],'game_id'=>$_GET['game_id'],'collaborate_id'=>$_GET['collaborate_id']))}" >游戏查看</a>
<a href="{:U('Finance/presidentFinance',
<a href="{:U('Finance/getRootUser',
array('count_date'=>$data['count_date'])
,false)}" >渠道查看</a>
</td>

Loading…
Cancel
Save