master
yulingwei 5 years ago
parent 7b9bb91e16
commit 9a380d7756

@ -3585,6 +3585,9 @@ class ExportController extends Controller
}
private function promote_statistics_export($p=0){
$user = M('User', 'tab_');
// $map['promote_id'] = array('egt', 0);
// $map['puid'] = 0;
if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['register_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)];
unset($_REQUEST['timestart']);
@ -3599,7 +3602,7 @@ class ExportController extends Controller
//TODO:应需求取消玩家表只要user表的fgame有就算注册无需在play表存在
$play_map = false;
if (isset($_REQUEST['game_name'])) {
$map['fgame_name'] = $_REQUEST['game_name'];
$map['fgame_name'] = ['like', "{$_REQUEST['game_name']}%"];
// $play_map = " and up.game_name = '{$_REQUEST['game_name']}' ";
}
$play_info_map = false;
@ -3608,6 +3611,14 @@ class ExportController extends Controller
$play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name = '{$_REQUEST['game_name']}'";
}
if (!empty($_REQUEST['admin_id'])) {
$map['promote.admin_id'] = $_REQUEST['admin_id'];
}
if (!empty($_REQUEST['game_type'])) {
$map['tab_game.sdk_version'] = $_REQUEST['game_type'];
}
$today = total(1);
$week = total(2);
$mounth = total(3);
@ -3619,27 +3630,30 @@ class ExportController extends Controller
}
}
if (!empty($_REQUEST['admin_id'])) {
$map['promote.admin_id'] = $_REQUEST['admin_id'];
}
//为数据权限添加
setPowerPromoteIds($map, 'u.promote_id');
// 如果是市场专员那么只能看自己的
// 如果是市场专员那么只能看自己的会长信息
$isMarketAdmin = isMarketAdmin();
if ($isMarketAdmin) {
$map['promote.admin_id'] = is_login();
}
//为数据权限添加
setPowerPromoteIds($map, 'u.promote_id');
$data = M("User u","tab_")
->field("count(u.id) as count,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id")
->field("
count(u.id) as count,
tab_game.relation_game_id,
tab_game.relation_game_name,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',
u.promote_id,
substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id")
->join("tab_promote promote ON u.promote_id = promote.id","left")
->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false)
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
// ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
->join('tab_game on u.fgame_id = tab_game.id')
->where($map)
->group('id')
->group('tab_game.relation_game_id, id')
->order('count desc, register_time')
->select();
//今日/本周/本月不变
@ -3662,44 +3676,56 @@ class ExportController extends Controller
->field("count(IF(register_time {$today},1,null)) as today,
count(IF(register_time {$week},1,null)) as week,
count(IF(register_time {$mounth},1,null)) as mounth,
tab_game.relation_game_id,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id")
->join("tab_promote promote ON u.promote_id = promote.id","left")
->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false)
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
->join('tab_game on u.fgame_id = tab_game.id')
->where($tmap)
->group('id')
->group('tab_game.relation_game_id, id')
->order('register_time')
->select();
$tmdata = [];
foreach($data as $k=>$v){
$v['today'] = 0;
$v['week'] = 0;
$v['mounth'] = 0;
$tmdata[$v['id']] = $v;
$tag = "{$v['id']}-{$v['relation_game_id']}";
$tmdata[$tag] = $v;
}
// 填入日/周/月统计
if(!empty($tdata)){
foreach ($tdata as $k => $v) {
$tmdata[$v['id']]['today'] = $v['today'];
$tmdata[$v['id']]['week'] = $v['week'];
$tmdata[$v['id']]['mounth'] = $v['mounth'];
$tmdata[$v['id']]['id'] = $v['id'];
}
}
if(count($tmdata) >0){
//获取推广员
$idstr = implode(",",array_keys($tmdata));
$promoteRes = M("Promote","tab_")->field("id,account promote_account")->where("id in ({$idstr})")->select();
foreach($promoteRes as $k=>$v){
$tmdata[$v['id']]['promote_account'] = $v['promote_account'];
}
}
$data = [];
foreach($tmdata as $k => $v){
if($v['id'] == 0){
$v['promote_account'] = C('OFFICIEL_CHANNEL');
$tag = "{$v['id']}-{$v['relation_game_id']}";
$tmdata[$tag]['today'] = $v['today'];
$tmdata[$tag]['week'] = $v['week'];
$tmdata[$tag]['mounth'] = $v['mounth'];
$tmdata[$tag]['id'] = $v['id'];
if (empty($tmdata[$tag]['relation_game_name']) && !empty($v['relation_game_name'])) {
$tmdata[$tag]['relation_game_name'] = $v['relation_game_name'];
}
}
$data[] = $v;
}
// if(count($tmdata) >0){
// //获取推广员
// $idstr = implode(",",array_keys($tmdata));
// $promoteRes = M("Promote","tab_")->field("id,account promote_account")->where("id in ({$idstr})")->select();
// foreach($promoteRes as $k=>$v){
// $tmdata[$v['id']]['promote_account'] = $v['promote_account'];
// }
// }
// $data = [];
// foreach($tmdata as $k => $v){
// if($v['id'] == 0){
// $v['promote_account'] = C('OFFICIEL_CHANNEL');
// }
// $data[] = $v;
// }
$data = array_values($tmdata);
unset($map['tp1.id']);
unset($map['tp1.chain']);
unset($tmap['tp1.id']);
@ -3711,7 +3737,6 @@ class ExportController extends Controller
$last_names = array_column($data,'count');
array_multisort($last_names,SORT_DESC,$data);
$count = count($data);
foreach ($data as $key => $value) {
static $i = 0;
$i++;
@ -3722,23 +3747,27 @@ class ExportController extends Controller
if ($_REQUEST['data_order'] != '') {
$data_order = reset(explode(',', $_REQUEST['data_order']));
$data_order_type = end(explode(',', $_REQUEST['data_order']));
$this->assign('userarpu_order', $data_order);
$this->assign('userarpu_order_type', $data_order_type);
}
//$this->checkListOrCountAuthRestMap($map,[]);
$data = my_sort($data, $data_order_type, (int)$data_order);
//用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度)
$companys = !empty($data) ? M('promote', 'tab_')
->field('tab_promote.id, company_name, sys_member.nickname as admin_username')
->field('tab_promote.id, tab_promote.account as promote_account, company_name, sys_member.nickname as admin_username')
->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left')
->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left')
->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : [];
$companys = $companys ? array_column($companys, null, 'id') : [];
foreach ($data as &$item) {
$item['company_name'] = $companys[$item['id']]['company_name'] ?? '无';
$item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无';
if($item['id'] == 0){
$item['promote_account'] = C('OFFICIEL_CHANNEL');
} else {
$item['promote_account'] = $companys[$item['id']]['promote_account'];
}
}
$xlsName = $_REQUEST['xlsname']?$_REQUEST['xlsname']:'推广员注册统计';
@ -3746,7 +3775,7 @@ class ExportController extends Controller
array('company_name' , "公司"),
array('promote_account', "会长账号"),
array('admin_username' , "市场专员"),
//array('relation_game_name' , "游戏"),
array('relation_game_name' , "游戏"),
array('count' , "累计注册"),
array('rand' , "排行榜"),
array('today' , "今日注册"),

@ -443,7 +443,7 @@ class PlatformController extends ThinkController
//TODO:应需求取消玩家表只要user表的fgame有就算注册无需在play表存在
$play_map = false;
if (isset($_REQUEST['game_name'])) {
$map['fgame_name'] = $_REQUEST['game_name'];
$map['fgame_name'] = ['like', "{$_REQUEST['game_name']}%"];
// $play_map = " and up.game_name = '{$_REQUEST['game_name']}' ";
}
$play_info_map = false;
@ -456,6 +456,10 @@ class PlatformController extends ThinkController
$map['promote.admin_id'] = $_REQUEST['admin_id'];
}
if (!empty($_REQUEST['game_type'])) {
$map['tab_game.sdk_version'] = $_REQUEST['game_type'];
}
$today = total(1);
$week = total(2);
$mounth = total(3);
@ -478,13 +482,19 @@ class PlatformController extends ThinkController
setPowerPromoteIds($map, 'u.promote_id');
$data = M("User u","tab_")
->field("count(u.id) as count,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id")
->field("
count(u.id) as count,
tab_game.relation_game_id,
tab_game.relation_game_name,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',
u.promote_id,
substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id")
->join("tab_promote promote ON u.promote_id = promote.id","left")
->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false)
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
// ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
->join('tab_game on u.fgame_id = tab_game.id')
->where($map)
->group('id')
->group('tab_game.relation_game_id, id')
->order('count desc, register_time')
->select();
//今日/本周/本月不变
@ -507,45 +517,56 @@ class PlatformController extends ThinkController
->field("count(IF(register_time {$today},1,null)) as today,
count(IF(register_time {$week},1,null)) as week,
count(IF(register_time {$mounth},1,null)) as mounth,
tab_game.relation_game_id,tab_game.relation_game_name,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id")
->join("tab_promote promote ON u.promote_id = promote.id","left")
->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false)
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
->join('tab_game on u.fgame_id = tab_game.id')
->where($tmap)
->group('id')
->group('tab_game.relation_game_id, id')
->order('register_time')
->select();
$tmdata = [];
foreach($data as $k=>$v){
$v['today'] = 0;
$v['week'] = 0;
$v['mounth'] = 0;
$tmdata[$v['id']] = $v;
$tag = "{$v['id']}-{$v['relation_game_id']}";
$tmdata[$tag] = $v;
}
// 填入日/周/月统计
if(!empty($tdata)){
foreach ($tdata as $k => $v) {
$tmdata[$v['id']]['today'] = $v['today'];
$tmdata[$v['id']]['week'] = $v['week'];
$tmdata[$v['id']]['mounth'] = $v['mounth'];
$tmdata[$v['id']]['id'] = $v['id'];
}
}
if(count($tmdata) >0){
//获取推广员
$idstr = implode(",",array_keys($tmdata));
$promoteRes = M("Promote","tab_")->field("id,account promote_account")->where("id in ({$idstr})")->select();
foreach($promoteRes as $k=>$v){
$tmdata[$v['id']]['promote_account'] = $v['promote_account'];
}
}
$data = [];
foreach($tmdata as $k => $v){
if($v['id'] == 0){
$v['promote_account'] = C('OFFICIEL_CHANNEL');
$tag = "{$v['id']}-{$v['relation_game_id']}";
$tmdata[$tag]['today'] = $v['today'];
$tmdata[$tag]['week'] = $v['week'];
$tmdata[$tag]['mounth'] = $v['mounth'];
if (empty($tmdata[$tag]['relation_game_name']) && !empty($v['relation_game_name'])) {
$tmdata[$tag]['relation_game_name'] = $v['relation_game_name'];
}
$tmdata[$tag]['id'] = $v['id'];
}
$data[] = $v;
}
// if(count($tmdata) >0){
// //获取推广员
// $idstr = implode(",",array_keys($tmdata));
// $promoteRes = M("Promote","tab_")->field("id,account promote_account")->where("id in ({$idstr})")->select();
// foreach($promoteRes as $k=>$v){
// $tmdata[$v['id']]['promote_account'] = $v['promote_account'];
// }
// }
// $data = [];
// foreach($tmdata as $k => $v){
// if($v['id'] == 0){
// $v['promote_account'] = C('OFFICIEL_CHANNEL');
// }
// $data[] = $v;
// }
$data = array_values($tmdata);
unset($map['tp1.id']);
unset($map['tp1.chain']);
unset($tmap['tp1.id']);
@ -584,16 +605,21 @@ class PlatformController extends ThinkController
$pnum = ceil(count($data) / $size); //总页数ceil()函数用于求大于数字的最小整数
//用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度)
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$companys = !empty($data) ? M('promote', 'tab_')
->field('tab_promote.id, company_name, sys_member.nickname as admin_username')
->field('tab_promote.id, tab_promote.account as promote_account, company_name, sys_member.nickname as admin_username')
->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left')
->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left')
->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : [];
$companys = $companys ? array_column($companys, null, 'id') : [];
foreach ($data as &$item) {
$item['company_name'] = $companys[$item['id']]['company_name'] ?? '无';
$item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无';
if($item['id'] == 0){
$item['promote_account'] = C('OFFICIEL_CHANNEL');
} else {
$item['promote_account'] = $companys[$item['id']]['promote_account'];
}
}
$this->meta_title = '渠道注册统计列表';
$this->assign("is_admin",is_administrator());
@ -662,13 +688,17 @@ class PlatformController extends ThinkController
}
if (isset($_REQUEST['game_name'])) {
$map['s.game_name'] = $_REQUEST['game_name'];
$map['s.game_name'] = ['like', "{$_REQUEST['game_name']}%"];
if (isset($_REQUEST['server_id'])) {
$map['s.server_id'] = $_REQUEST['server_id'];
unset($_REQUEST['server_id']);
}
}
if (!empty($_REQUEST['game_type'])) {
$map['s.sdk_version'] = $_REQUEST['game_type'];
}
if (isMarketAdmin()) {
$map['s.market_admin_id'] = is_login();
} else if (!empty($_REQUEST['admin_id'])) {
@ -679,13 +709,13 @@ class PlatformController extends ThinkController
}
$data = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,
->field('tp1.account as promote_account,tp1.id,g.relation_game_id,g.relation_game_name,
floor(sum(pay_amount)*100) as count')
->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
->join("tab_spend as s use INDEX(search) on tp2.id = s.promote_id", 'left')
->join("tab_game as g on g.id = s.game_id", 'left')
->where($map)
->group('tp1.id')
->group('tp1.id, g.relation_game_id')
->order('count desc')
->select();
@ -719,7 +749,7 @@ class PlatformController extends ThinkController
$tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])];
}
$tdata = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,
->field('tp1.account as promote_account,tp1.id,g.relation_game_id,g.relation_game_name,
floor(sum(IF(s.pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(s.pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
@ -727,28 +757,37 @@ class PlatformController extends ThinkController
->join("tab_spend as s on tp2.id = s.promote_id", 'left')
->join("tab_game as g on g.id = s.game_id", 'left')
->where($tmap)
->group('tp1.id')
->group('tp1.id, g.relation_game_id')
->select();
$tmdata = [];
foreach($data as $k=>$v){
$v['today'] = 0;
$v['week'] = 0;
$v['mounth'] = 0;
$tmdata[$v['id']] = $v;
$tag = "{$v['id']}-{$v['relation_game_id']}";
$tmdata[$tag] = $v;
}
//dd($data);
foreach ($tdata as $k => $v) {
$tmdata[$v['id']]['today'] = $v['today'];
$tmdata[$v['id']]['week'] = $v['week'];
$tmdata[$v['id']]['mounth'] = $v['mounth'];
if (!$tmdata[$v['id']]['promote_account']) {
$tmdata[$v['id']]['promote_account'] = $v['promote_account'];
$tmdata[$v['id']]['count'] = 0;
$tag = "{$v['id']}-{$v['relation_game_id']}";
$tmdata[$tag]['today'] = $v['today'];
$tmdata[$tag]['week'] = $v['week'];
$tmdata[$tag]['mounth'] = $v['mounth'];
if (!$tmdata[$tag]['promote_account']) {
$tmdata[$tag]['promote_account'] = $v['promote_account'];
$tmdata[$tag]['count'] = 0;
}
if (empty( $tmdata[$tag]['relation_game_name']) && !empty($v['relation_game_name'])) {
$tmdata[$tag]['relation_game_name'] = $v['relation_game_name'];
}
$tmdata[$v['id']]['id'] = $v['id'];
$tmdata[$tag]['id'] = $v['id'];
}
$data = [];
foreach($tmdata as $k => $v){
$data[] = $v;

@ -71,18 +71,26 @@
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_name" class="select_gallery" style="width:120px;">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.id}" value="{$vo.game_name}">{$vo.game_name}</option>
<volist name=":getAllGame()" id="vo">
<option value="{$vo.game_name}" <if condition="$vo.game_name eq I('game_name')">selected</if> >{$vo.game_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="game_type" class="select_gallery" >
<option value="">设备类型</option>
<option value="1" <?php echo I('game_type') == 1 ? "selected" : ''?>>安卓</option>
<option value="2" <?php echo I('game_type') == 2 ? "selected" : ''?>>苹果</option>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="server_id" name="server_id" class="select_gallery" style="width:120px;">
<option value="">区服名称</option>
</select>
</div>
<br>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Platform/promote_statistics','model='.$model['name'].'&row='.I('row'),false)}">搜索</a>
@ -104,6 +112,8 @@
<th >市场专员</th>
<th >游戏</th>
<th ><a class="paixu" data-order='count'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'count'">累计注册▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'count'"/>累计注册▼
<else />累计注册<img src="__IMG__/up-down.png" width="13px">
@ -158,6 +168,7 @@
</if> -->
</td>
<td>{$data['admin_username']}</td>
<td>{$data['relation_game_name']}</td>
<td ><span class='ljzc' data-value="{$data['id']}"><a>{$data.count}</a></span></td>
<td ><strong><if condition="$data.rand eq 1"><span>{$data.rand}</span><elseif condition="$data.rand eq 2"/><span>{$data.rand}</span><elseif condition="$data.rand eq 3"/><span>{$data.rand}</span><else/>{$data.rand}</if></strong></td>
<td >{$data.today}</td>
@ -168,7 +179,7 @@
</volist>
</empty>
<tr class="data_summary">
<td colspan="3"><span>汇总</span></td>
<td colspan="4"><span>汇总</span></td>
<td ><span>{$total.sum_count}</span></td>
<td>---</td>
<td>{$total.sum_today}</td>
@ -299,32 +310,13 @@
// endDate:date
})
$("#game_id").change(function(){
$.ajax({
url:"{:U('getSpendServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
console.log(data)
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_id+"'>"+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){
$("#game_type").change(function(){
console.log({sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()})
$.ajax({
url:"{:U('getSpendServer')}",
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{game_name:game_id},
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
console.log(data)
@ -335,10 +327,15 @@
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
}
});
$("#game_name").change(function(){
$("#game_type").change();
});
$("#game_name").change();
})
</script>
</block>

@ -70,18 +70,26 @@
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_name" class="select_gallery" style="width:120px;">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.id}" value="{$vo.game_name}">{$vo.game_name}</option>
<volist name=":getAllGame()" id="vo">
<option value="{$vo.game_name}" <if condition="$vo.game_name eq I('game_name')">selected</if> >{$vo.game_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="game_type" class="select_gallery" >
<option value="">设备类型</option>
<option value="1" <?php echo I('game_type') == 1 ? "selected" : ''?>>安卓</option>
<option value="2" <?php echo I('game_type') == 2 ? "selected" : ''?>>苹果</option>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="server_id" name="server_id" class="select_gallery" style="width:120px;">
<option value="">区服名称</option>
</select>
</div>
<br>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Platform/promotepay_statistics','model='.$model['name'].'&row='.I('row'),false)}">搜索</a>
@ -118,6 +126,8 @@
<th >当前市场专员</th>
<th >游戏</th>
<th ><a class="paixu" data-order='count'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'count'">累计充值▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'count'"/>累计充值▼
<else />累计充值<img src="__IMG__/up-down.png" width="13px">
@ -165,6 +175,7 @@
<td>{$data['company_name']}</td>
<td >{$data['promote_account']}</td>
<td>{$data['admin_username']}</td>
<td>{$data['relation_game_name']}</td>
<td ><span class='ljcz' data-value="{$data['promote_id']}"><a>{$data.count}</a></span></td>
<td ><strong><if condition="$data.rand eq 1"><span>{$data.rand}</span><elseif condition="$data.rand eq 2"/><span>{$data.rand}</span><elseif condition="$data.rand eq 3"/><span>{$data.rand}</span><else/>{$data.rand}</if></strong></td>
<td >{$data.today}</td>
@ -174,7 +185,7 @@
</volist>
</empty>
<tr class="data_summary">
<td colspan="3"><span>汇总</span></td>
<td colspan="4"><span>汇总</span></td>
<td ><span>{$total.sum_count}</span></td>
<td>---</td>
<td>{$total.sum_today}</td>
@ -367,34 +378,14 @@
pickerPosition:'bottom-left',
// endDate:date
})
$("#game_id").change(function(){
console.log($("#game_id option:selected").attr('game-id'));
$.ajax({
url:"{:U('getSpendServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
console.log(data)
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_id+"'>"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
});
var game_name = "{:I('game_name')}";
var game_server = "{:I('server_id')}";
if(game_name){
console.log({game_name:game_name})
$("#game_type").change(function(){
console.log({sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()})
$.ajax({
url:"{:U('getSpendServer')}",
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{game_name:game_name},
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
console.log(data)
@ -405,10 +396,15 @@
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
}
});
$("#game_name").change(function(){
$("#game_type").change();
});
$("#game_name").change();
})
</script>
</block>
Loading…
Cancel
Save