推广平台>数据管理>推广员指标--更新

master
chenxiaojun 5 years ago
commit db6aeb26eb

@ -1963,7 +1963,7 @@ class QueryController extends BaseController
$map['sdk_version'] = $sdkVersion;
}
$gameIds = M('game', 'tab_')->where($map)->getField('id', true);
$servers = M('server', 'tab_')->field(['id', 'server_id', 'server_name'])->where(['game_id' => ['in', $gameIds]])->order('server_id asc')->select();
$servers = M('server', 'tab_')->field(['id', 'server_id', 'server_name'])->where(['game_id' => ['in', $gameIds]])->group('server_id')->order('server_id asc')->select();
}
$this->ajaxReturn([
'status' => 1,
@ -2234,7 +2234,7 @@ class QueryController extends BaseController
$sdkVersion = I('sdk_version', 0);
$relationGameId = I('relation_game_id', 0);
$serverId = I('server_id', 0);
$parentId = I('parent_id', 0);
$parentId = I('get.parent_id', 0);
$promoteId = I('promote_id', 0);
$levelBegin = I('level_begin', '');
$levelEnd = I('level_end', '');

@ -26,10 +26,10 @@
<span class="title_main">{$meta_title}</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('Query/promoteQuota',['row'=>I('get.row')])}" method="post" enctype="multipart/form-data">
<input type="hidden" name="parent_id" value="{:I('parent_id', 0)}">
<div class="trunk-search clearfix jssearch">
<!-- <form action="" method="get" enctype="multipart/form-data">-->
<div class="form-group normal_space">
<input type="hidden" id="parent_id" name="parent_id" value="{:I('parent_id', 0)}">
<select name="promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择{$searchLevelName}</option>
<volist name="subPromotes" id="promote">
@ -67,14 +67,14 @@
<input type="text" class="txt float-input" name="level_end" style="width: 50px" value="{:I('level_end')}" >
</div>
<div class="form-group">
<input type="submit" class="submit normal_space" value="查询">
<input type="submit" id="submit" class="submit normal_space" value="查询" url="{:U('Query/promoteQuota','model='.$model['name'],false)}">
</div>
<?php if ($prevParentId > 0):?>
<div class="form-group">
<a class="submit normal_space" href="{:U('Query/promoteQuota', ['row'=>I('get.row'), 'parent_id' => $prevParentId,'time'=>$time])}" style="line-height: 36px; display: inline-block; text-align: center; background: #E5E5E5; color: #2bd8ed; cursor: pointer;">返回上级</a>
<a class="submit normal_space search-parent" parent-id="{$prevParentId}" href="javascript:;" style="line-height: 36px; display: inline-block; text-align: center; background: #E5E5E5; color: #2bd8ed; cursor: pointer;">返回上级</a>
</div>
<?php endif;?>
</form>
<!-- </form>-->
</div>
<div class="trunk-list list_normal">
<table class="table normal_table">
@ -102,7 +102,7 @@
<td>{$record.role_num}</td>
<td>
<?php if($record['current_display'] == '' && $record['level'] < 4):?>
<a href="{:U('Query/promoteQuota', ['parent_id' => $record['id'], 'time' => $time])}">查看下级</a>
<a class="search-children" parent-id="{$record['id']}" href="javascript:;">查看下级</a>
<?php endif;?>
<?php if($record['current_display'] != ''):?>
<a href="{:U('Query/quotaDtl', ['parent_id' => I('parent_id', 0), 'time' => $time, 'promote_id' => $record['id'], 'relation_game_id' => I('relation_game_id', ''), 'sdk_version' => I('sdk_version', ''), 'server_id' => I('server_id', ''), 'level_begin' => I('level_begin', ''), 'level_end' => I('level_end', ''), 'is_self' => 1])}">查看详情</a>
@ -184,6 +184,28 @@
}
})
}
$('#submit').click(function () {
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;
});
$('.search-children, .search-parent').click(function (e) {
var parentId = $(this).attr('parent-id');
$('#parent_id').val(parentId);
$('#submit').click();
});
})
</script>
</block>

@ -93,7 +93,7 @@ $(function() {
setValue('row', '{:I("get.row",10)}');
$('.back-btn').on('click', function () {
location.href = "{:U('Query/promoteQuota', ['parent_id' => I('parent_id'), 'time' => $time])}";
window.history.go(-1);
});
})
</script>

Loading…
Cancel
Save