You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

319 lines
14 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/manager.css" rel="stylesheet" >
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
</block>
<block name="body">
<style>
@media screen and (max-width: 1500px) {
.normal_form{padding-top: 45px;}
.trunk-search .normal_txt {width: 100px}
.select2-container--default .select2-selection--single {width: 125px;}
.trunk-search .select-time .txt{width: 100px;}
.form-group .submit{width: 55px;}
}
</style>
<div class="page-search normal_list query-recharge-search jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>数据汇总</span></div>
</div>
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">数据汇总</span>
<span class="details">说明:默认展示当前一级渠道及旗下各子渠道的全部数据</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<div class="tab normal_tab">
</div>
<!-- <form action="{:U('Query/summary')}" method="get" enctype="multipart/form-data" class="normal_form"> -->
<div class="form-group normal_space fr">
<input type="submit" class="submit" id='submit' url="{:U('Query/summary','model='.$model['name'],false)}" value="查询">
</div>
<div class="form-group normal_space fr">
<div class="select-time">
<input type="text" id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{:I('begtime')}" >
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="edate" class="txt" name="endtime" placeholder="结束时间" value="{:I('endtime')}">
</div>
</div>
<div class="form-group normal_space fr">
<select id="promote_account" name="promote_account" class="reselect select_gallery" style="min-width:130px;">
<option game-id="" value="">推广员账号</option>
<option game-id="{:session('promote_auth.pid')}" value="{:session('promote_auth.pid')}" <if condition="I('promote_account') eq session('promote_auth.pid')"> selected="true" </if> >自己</option>
<volist name=":get_promote_chlid_account(PID)" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}" <if condition="I('promote_account') eq $vo['id']"> selected="true" </if> >{$vo.account}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fr">
<select id="promote_id" name="promote_id" class="reselect select_gallery" style="min-width:130px;">
<option game-id="" value="">推广员ID</option>
<option game-id="{:session('promote_auth.pid')}" value="{:session('promote_auth.pid')}" <if condition="I('promote_id') eq session('promote_auth.pid')"> selected="true" </if> >自己</option>
<volist name=":get_promote_chlid_account(PID)" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}" <if condition="I('promote_id') eq $vo['id']"> selected="true" </if> >{$vo.id}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fr">
<select id="game_level" name="game_level" class=" reselect select_gallery" >
<empty name="game_list">
<option value="" id="game_data" selected="true">暂无游戏等级</option>
<else/>
<if condition="I('game_level') neq '' ">
<option value="I('game_level')">{:I('game_level')}</option>
<else/>
<option value="" selected="true">请选择游戏等级</option>
</if>
</empty>
</select>
</div>
<div class="form-group normal_space fr">
<select id="server_name" name="server_id" class=" reselect select_gallery" >
<empty name="game_list">
<option value="" id="game_data" selected="true">暂无游戏区服</option>
<else/>
<if condition="I('server_name') neq '' ">
<option value="I('server_name')">{:I('server_name')}</option>
<else/>
<option value="" selected="true">请选择游戏区服</option>
</if>
</empty>
</select>
</div>
<div class="form-group normal_space fr">
<select id="game_id" name="game_id" class="reselect select_gallery">
<option game-id="0" value="">请选择游戏</option>
<volist name="game_list" id="vo">
<option value="{$vo.relation_game_id}" <if condition="I('game_id') eq $vo['relation_game_id']" > selected="true" </if> > {$vo.relation_game_name}</option>
</volist>
</select>
</div>
<!-- <input type="hidden" name="version" value="{:I('version',1)}"> -->
<!-- </form> -->
</div>
</div>
<div class="page-list apply-app_apply-list query-recharge-list">
<div class="trunk-content article">
<div class="tabcon trunk-list">
<table class="table normal_table">
<tr class="odd">
<th>推广员ID</th>
<th>推广员帐号</th>
<th>注册用户</th>
<th>注册IP数</th>
<th>达标用户</th>
<th>达标游戏</th>
<th>移动端充值人数</th>
<th>安卓充值</th>
<th>苹果充值</th>
</tr>
<volist name="child" id="child" mod="2">
<tr class="num2">
<td>{$child['id']}</td>
<if condition="$child['id'] eq session('promote_auth.pid')">
<td>自己</td>
<else/>
<td>{$child['account']}</td>
</if>
<td>{:IsNull($child['register_user'])}</td>
<td>{:IsNull($child['register_ip'])}</td>
<td>{:IsNull($child['dabiao_user'])}</td>
<if condition="IsNull($child['dabiao_game']) eq 0">
<td>0</td>
<else/>
<td><a class="dabiao_game" href="javascript:;" url="{:U('Query/dabiao_game',array('begtime'=>I('begtime'),'endtime'=>I('endtime'),'promote_id'=>$child['id'],'game_id'=>I('game_id'),'server_id'=>I('server_id'),'game_level'=>I('game_level')))}" style="color: blue">{:IsNull($child['dabiao_game'])}</a></td>
</if>
<td>{:IsNull($child['spend'])}</td>
<td>{:null_to_0($child['and_spend'])}</td>
<td>{:null_to_0($child['ios_spend'])}</td>
</tr>
</volist>
<tr class="num2">
<td>汇总</td>
<td>{$count}</td>
<td>{$all_data['register_user']}</td>
<td>{:IsNull($all_data['register_ip'])}</td>
<td>{:IsNull($all_data['dabiao_user'])}</td>
<td>{:IsNull($all_data['dabiao_game'])}</td>
<td>{:IsNull($all_data['spend'])}</td>
<td>{:null_to_0($all_data['and_spend'])}</td>
<td>{:null_to_0($all_data['ios_spend'])}</td>
</tr>
</table>
</div>
<div class="pagenation clearfix">
<a class="sch-btn" href="{:U('Export/expUser',array(
'id'=>11,
'game_id'=>I('game_id'),
'promote_id'=>I('promote_id'),
'game_server'=>I('game_server'),
'game_level'=>I('game_level'),
'begtime'=>I('begtime'),
'endtime'=>I('endtime'),
'server_name'=>I('server_name'),
'promote_account'=>I('promote_account'),'xlsname'=>'数据管理_数据汇总'
))}" >导出</a>
{$_page}
</div>
</div>
</div>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<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" src="__JS__/20170831/select2.min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript">
$().ready(function(){
setValue('row','{:I("get.row",10)}');
$("#pagehtml a").on("click",function(event){
event.preventDefault();//使a自带的方法失效即无法调整到href中的URL(http://www.baidu.com)
var geturl = $(this).attr('href');
$('#data_form').attr('action',geturl);
$('#data_form').submit();
});
var date="{$setdate}";
$('#sdate').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true,
scrollMonth:false,
scrollTime:false,
scrollInput:false,
endDate:date
});
$('#edate').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true,
pickerPosition:'bottom-left',
scrollMonth:false,
scrollTime:false,
scrollInput:false,
endDate:date
});
$('#submit').click(function(){
var sdate =$('#sdate').val();
var edate =$('#edate').val();
var pid = $('#promote_id').val();
var pac = $('#promote_account').val();
if(pid !='' && pac != '' && pid != pac){
layer.msg("渠道ID与渠道账号不匹配");
return false;
}
if(Date.parse(sdate) > Date.parse(edate)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
var url = $(this).attr('url');
console.log(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;
});
$("#game_id").change(function(){
$.ajax({
url:"{:U('getServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").val()},
dataType:'json',
success:function(data){
str1 = "<option value=''>请选择区服</option>";
str2 = "<option value=''>请选择等级</option>";
for (var i in data.data.server_name){
str1 += "<option value='"+data.data.server_name[i].id+"'>"+data.data.server_name[i].server_name+"</option>"
}
if(data.data.game_level.first_level_name){
str2 +="<option value='"+data.data.game_level.first_level_name+"'>"+data.data.game_level.first_level_name+"</option>";
str2 +="<option value='"+data.data.game_level.second_level_name+"'>"+data.data.game_level.second_level_name+"</option>";
str2 +="<option value='"+data.data.game_level.third_level_name+"'>"+data.data.game_level.third_level_name+"</option>";
}
$("#server_name").empty();
$("#server_name").append(str1);
$("#server_name").select2();
$("#game_level").empty();
$("#game_level").append(str2);
$("#game_level").select2();
}
})
})
var game_id = $("#game_id").val();
var game_server = "{:I('server_id')}";
var game_level = "{:I('game_level')}";
if(game_id>0){
$.ajax({
url:"{:U('getServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").val()},
dataType:'json',
success:function(data){
str1 = "<option value=''>请选择区服</option>";
str2 = "<option value=''>请选择等级</option>";
var server_name = data.data.server_name;
var levle = data.data.game_level;
for (var i in server_name){
str1 += "<option value='"+data.data.server_name[i].id+"' "+(game_server && server_name[i].id == game_server?'selected':'')+" >"+data.data.server_name[i].server_name+"</option>"
}
str2 +="<option value='"+data.data.game_level.first_level_name+"' "+(game_level && levle.first_level_name == game_level?'selected':'') +">"+data.data.game_level.first_level_name+"</option>";
str2 +="<option value='"+data.data.game_level.second_level_name+"' "+(game_level && levle.second_level_name == game_level?'selected':'') +">"+data.data.game_level.second_level_name+"</option>";
str2 +="<option value='"+data.data.game_level.third_level_name+"' "+(game_level && levle.third_level_name == game_level?'selected':'') +">"+data.data.game_level.third_level_name+"</option>";
$("#server_name").empty();
$("#server_name").append(str1);
$("#server_name").select2();
$("#game_level").empty();
$("#game_level").append(str2);
$("#game_level").select2();
}
})
}
$(".select_gallery").select2();
$(".dabiao_game").click(function(){
var href = $(this).attr('url');
layer.open({
type: 2,
title: "达标游戏",
shadeClose: true,
shade: 0.8,
area: ['71%', '80%'],
content: href,
});
return false;
})
});
</script>
</block>