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.
494 lines
20 KiB
HTML
494 lines
20 KiB
HTML
<extend name="Public/promote_base"/>
|
|
<block name="css">
|
|
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
|
|
</block>
|
|
<block name="body">
|
|
<script src="__STATIC__/jquery.form.js"></script>
|
|
<script src="__STATIC__/layer/layer.js"></script>
|
|
<script type="text/javascript" src="__JS__/bootstrap.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>
|
|
<style>
|
|
.search_list .form-group{
|
|
float: left;
|
|
height: 28px;
|
|
margin-right: 20px;
|
|
}
|
|
.sch-btn {
|
|
background: #3C95C8;
|
|
font-size: 14px;
|
|
font-weight: normal;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
border-radius: 3px;
|
|
display: inline-block;
|
|
text-align: center;
|
|
border-bottom: none;
|
|
width: 55px;
|
|
height: 28px;
|
|
line-height: 26px;
|
|
}
|
|
.search_list select {
|
|
color: #000;
|
|
resize: none;
|
|
border-width: 1px;
|
|
border-style: solid;
|
|
border-radius: 0;
|
|
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
|
box-shadow: 0px 3px 3px #F7F8F9 inset;
|
|
height: 28px;
|
|
height: auto\9;
|
|
padding: 0 5px;
|
|
padding: 5px\9;
|
|
margin-top: 0px;
|
|
line-height: 28px;
|
|
line-height: 28px\9;
|
|
*line-height: 28px;
|
|
_line-height: 28px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
width: 120px;
|
|
}
|
|
</style>
|
|
<div class="page-list normal_list promote-mychlid-list">
|
|
<div class="trunk-title">
|
|
<div class="location">
|
|
<div class="location-container">当前位置:<span>管理中心></span><span>推广员列表</span></div>
|
|
</div>
|
|
<img src="__IMG__/20180207/icon_normal_game.png">
|
|
<span class="title_main">推广员列表</span>
|
|
</div>
|
|
<div class="trunk-content article">
|
|
<div class="jssearch trunk-search clearfix search_list">
|
|
<div class="form-group">
|
|
<select id="promote_id" name="promote_id" class="select_gallery">
|
|
<option value="">推广员账号</option>
|
|
<volist name="promotes" id="vo">
|
|
<option promote-id="{$vo.id}" value="{$vo.id}">{$vo.account}</option>
|
|
</volist>
|
|
</select>
|
|
</div>
|
|
<empty name='show_status'>
|
|
<div class="form-group fr">
|
|
<select id="parent_id" name="parent_id" class="select_gallery" >
|
|
<option value="">上线推广员</option>
|
|
<volist name="promotes" id="vo">
|
|
<option parent-id="{$vo.id}" value="{$vo.id}">{$vo.account}</option>
|
|
</volist>
|
|
</select>
|
|
</div>
|
|
<div class="form-group fr">
|
|
<select name="promote_level">
|
|
<option value="">推广员等级</option>
|
|
<option value="1">一级推广员</option>
|
|
<option value="2">二级推广员</option>
|
|
<option value="3">三级推广员</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group fr">
|
|
<select id="admin_id" name="admin_id" class="select_gallery" >
|
|
<option value="">商务专员</option>
|
|
<volist name=":get_business_affairs_list()" id="vo">
|
|
<option ba-id="{$vo.id}" value="{$vo.id}">{$vo.account}</option>
|
|
</volist>
|
|
</select>
|
|
</div>
|
|
<div class="form-group fr">
|
|
<select name="status">
|
|
<option value="">渠道状态</option>
|
|
<option value="1">正常</option>
|
|
<option value="2">{:L('Lock')}</option>
|
|
<option value="0">待审核</option>
|
|
</select>
|
|
</div>
|
|
<else/>
|
|
<div class="form-group fr">
|
|
<select name="url_type">
|
|
<option value="">站点来源</option>
|
|
<option value="1">系统分配</option>
|
|
<option value="2">自主添加</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group fr">
|
|
<select name="status">
|
|
<option value="">审核状态</option>
|
|
<option value="1">已审核</option>
|
|
<option value="2">未审核</option>
|
|
</select>
|
|
</div>
|
|
</empty>
|
|
<div class="form-group">
|
|
<input type="hidden" name="" value="" class="sortBy">
|
|
<input type="hidden" name="type" value="{$_GET['type']}">
|
|
<div class="input-list">
|
|
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Promote/promoteList','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="trunk-list list_normal">
|
|
<table class="table normal_table">
|
|
<tr class="odd">
|
|
<th>推广员ID</th>
|
|
<th>推广员账号</th>
|
|
<th>手机号</th>
|
|
<th>平台币余额</th>
|
|
<th>总流水</th>
|
|
<th>注册时间</th>
|
|
<th>最后登录时间</th>
|
|
<th>渠道类型</th>
|
|
<th>上线推广员</th>
|
|
<th>商务专员</th>
|
|
<th>状态</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
<empty name="list_data">
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td colspan="5" style="text-align: center;height: 45vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td>
|
|
</tr>
|
|
<else />
|
|
<volist name="list_data" id="data">
|
|
<tr data-id="{$data.id}" data-realname="{$data.real_name}" class="<eq name='mod' value='1'>odd</eq>">
|
|
<td>{$data.id}</td>
|
|
<td class="account">{$data.account}</td>
|
|
<td>{$data.mobile_phone}</td>
|
|
<td>{$data.balance_coin}</td>
|
|
<td>{:sum_promote_total_money($data['id'])}</td>
|
|
<td>{:set_show_time($data['create_time'])}</td>
|
|
<td>{:set_show_time($data['last_login_time'])}</td>
|
|
<td>{:get_promote_levels($data['id'])}</td>
|
|
<td><empty name="data.grand_id">{:get_top_promote($data['id'],$data['parent_id'])}<else/>{:get_top_promote($data['id'],$data['grand_id'])}</empty></td>
|
|
<td>{:get_business_affairs_account($data['ba_id'])}</td>
|
|
<td><if condition="$data['status'] eq 0">
|
|
<span class="preview_status">{:get_info_status($data['status'],3)}</span>
|
|
<elseif condition="$data['status'] eq 2 " />
|
|
<span class="disabled_status">{:get_info_status($data['status'],3)}</span>
|
|
<else/>
|
|
{:get_info_status($data['status'],3)}
|
|
</if>
|
|
</td>
|
|
<td>
|
|
<a href="{:U('Promote/edit_chlid','id='.$data['id'])}" class="editbtn">修改</a>
|
|
<if condition="$data['status'] eq 1">
|
|
<a href="javascript:;" class="froze-btn editbtn">冻结</a>
|
|
<elseif condition="$data['status'] eq 2"/>
|
|
<a href="javascript:;" style="color: red;" class="unfreeze-btn editbtn">解冻</a>
|
|
</if>
|
|
<a href="javascript:;" class="reset-password-btn editbtn">重置密码</a>
|
|
<if condition="($data['grand_id'] eq 0) and ($data['parent_id'] gt 0)">
|
|
<a href="javascript:;" class="shift-btn editbtn">换组</a>
|
|
</if>
|
|
<if condition="($data['grand_id'] gt 0) and ($data['parent_id'] gt 0)">
|
|
<a href="javascript:;" class="shift-player-btn editbtn">玩家迁移</a>
|
|
</if>
|
|
</td>
|
|
</tr>
|
|
</volist>
|
|
</empty>
|
|
</table>
|
|
|
|
</div>
|
|
<div class="pagenation clearfix">
|
|
{$_page}
|
|
</div>
|
|
</div>
|
|
<div class="page-explain promote-mychlid-explain">
|
|
<div class="trunk-content article border_normal">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="shift-box" class="layer-box" style="display: none;">
|
|
<form action="{:U('Promote/mychlid',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="promote_id" value="">
|
|
<div class="form-group">
|
|
<label>账号(真实姓名)</label>
|
|
<div class="form-item">
|
|
<p class="show-account static-input"></p>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>转移至推广账号</label>
|
|
<div class="form-item">
|
|
<select name="new_promote_id" class="reselect select_gallery" style="width: 220px;" >
|
|
<option value="0">请选择所属上级</option>
|
|
<volist name="promotes" id="promote">
|
|
<option ba-id="{$promote.id}" value="{$promote.id}">{$promote.account}</option>
|
|
</volist>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>指定订单日期</label>
|
|
<div class="form-item">
|
|
<input type="text" id="sdate" class="form-input" name="order_time" placeholder="订单日期"" value="" style="width: 199px;">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>平台币管理</label>
|
|
<div class="form-item">
|
|
<label class="radio-item"><input type="radio" value="1" name="balance_coin_mode" checked> 平台币平移最高账户</label>
|
|
<label class="radio-item"><input type="radio" value="2" name="balance_coin_mode"> 平台币清零</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label></label>
|
|
<a id="shift-submit" href="javascript:;" class="shift-submit btn">确定</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div id="shift-player-box" class="layer-box" style="display: none;">
|
|
<form action="{:U('Promote/mychlid',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="promote_id" value="">
|
|
<div class="form-group">
|
|
<label>账号(真实姓名)</label>
|
|
<div class="form-item">
|
|
<p class="static-input show-account"></p>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>转移至推广账号</label>
|
|
<div class="form-item">
|
|
<select name="new_promote_id" class="reselect select_gallery" style="width: 220px;" >
|
|
<option value="0">请选择推广账号</option>
|
|
<volist name="promotes" id="promote">
|
|
<option ba-id="{$promote.id}" value="{$promote.id}">{$promote.account}</option>
|
|
</volist>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>指定订单日期</label>
|
|
<div class="form-item">
|
|
<input type="text" id="sdate" class="form-input" name="order_time" placeholder="订单日期"" value="" style="width: 199px;">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label></label>
|
|
<a id="shift-player-submit" href="javascript:;" class="shift-submit btn">确定</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</block>
|
|
<block name="script">
|
|
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></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">
|
|
setValue('row','{:I("get.row",10)}');
|
|
<volist name=":I('get.')" id="vo">
|
|
setValue('{$key}',"{$vo}");
|
|
</volist>
|
|
$(".select_gallery").select2();
|
|
|
|
$('#sdate').datetimepicker({
|
|
format: 'yyyy-mm-dd',
|
|
language:"zh-CN",
|
|
minView:2,
|
|
autoclose:true,
|
|
scrollMonth:false,
|
|
scrollTime:false,
|
|
scrollInput:false
|
|
});
|
|
|
|
//搜索功能
|
|
$("#search").click(function(){
|
|
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;
|
|
});
|
|
$('.froze-btn').on({
|
|
click: function() {
|
|
var id = $(this).parents('tr').eq(0).attr('data-id')
|
|
layer.confirm('是否确认冻结帐号?', {icon: 3, title:'提示'}, function(index){
|
|
$.ajax({
|
|
url: "{:U('Promote/froze')}",
|
|
data: {promote_id: id},
|
|
type: 'post',
|
|
dataType: 'json',
|
|
success: function(response) {
|
|
layer.msg(response.msg, {time: 1000}, function() {
|
|
window.location.href = window.location.href
|
|
})
|
|
}
|
|
})
|
|
})
|
|
}
|
|
})
|
|
|
|
$('.unfreeze-btn').on({
|
|
click: function() {
|
|
var id = $(this).parents('tr').eq(0).attr('data-id')
|
|
layer.confirm('是否确认解冻帐号?', {icon: 3, title:'提示'}, function(index){
|
|
$.ajax({
|
|
url: "{:U('Promote/unfreeze')}",
|
|
data: {promote_id: id},
|
|
type: 'post',
|
|
dataType: 'json',
|
|
success: function(response) {
|
|
layer.msg(response.msg, {time: 1000}, function() {
|
|
window.location.href = window.location.href
|
|
})
|
|
}
|
|
})
|
|
})
|
|
}
|
|
})
|
|
|
|
$('.reset-password-btn').on({
|
|
click: function() {
|
|
var id = $(this).parents('tr').eq(0).attr('data-id')
|
|
layer.confirm('是否确认重置密码?', {icon: 3, title:'提示'}, function(index){
|
|
$.ajax({
|
|
url: "{:U('Promote/resetPassword')}",
|
|
data: {promote_id: id},
|
|
type: 'post',
|
|
dataType: 'json',
|
|
success: function(response) {
|
|
layer.close(index)
|
|
if (response.status == 1) {
|
|
layer.open({
|
|
content: '重置密码成功,您的新密码为:' + response.data.password
|
|
})
|
|
} else {
|
|
layer.msg(response.msg)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
})
|
|
|
|
$('.shift-btn').on({
|
|
click: function() {
|
|
var box = $('#shift-box')
|
|
var id = $(this).parents('tr').eq(0).attr('data-id')
|
|
var account = $(this).parents('tr').eq(0).find('td.account').html();
|
|
var realName = $(this).parents('tr').eq(0).attr('data-realname')
|
|
box.find('.show-account').html(account + (realName == '' ? '' : '(' + realName + ')'))
|
|
box.find('[name=promote_id]').val(id)
|
|
layer.open({
|
|
title: '渠道迁移',
|
|
type: 1,
|
|
content: box,
|
|
area: ['600px', '350px'],
|
|
zIndex: 250,
|
|
})
|
|
}
|
|
})
|
|
|
|
$('#shift-submit').on({
|
|
click: function() {
|
|
var box = $('#shift-box')
|
|
var id = box.find('[name=promote_id]').val()
|
|
var newPromoteId = box.find('[name=new_promote_id]').val()
|
|
var orderTime = box.find('[name=order_time]').val()
|
|
var balanceCoinMode = box.find('[name=balance_coin_mode]:checked').val()
|
|
if (newPromoteId == 0) {
|
|
layer.msg('请选择转移至的推广账号')
|
|
return
|
|
}
|
|
var data = {
|
|
old_promote_id: id,
|
|
new_promote_id: newPromoteId,
|
|
order_time: orderTime,
|
|
balance_coin_mode: balanceCoinMode,
|
|
}
|
|
console.log(data)
|
|
return
|
|
$.ajax({
|
|
url: "{:U('Promote/shift')}",
|
|
data: data,
|
|
type: 'post',
|
|
dataType: 'json',
|
|
success: function(response) {
|
|
layer.msg(response.msg, {time: 1000}, function() {
|
|
window.location.href = window.location.href
|
|
})
|
|
}
|
|
})
|
|
}
|
|
})
|
|
|
|
$('.shift-player-btn').on({
|
|
click: function() {
|
|
var box = $('#shift-player-box')
|
|
var id = $(this).parents('tr').eq(0).attr('data-id')
|
|
var account = $(this).parents('tr').eq(0).find('td.account').html();
|
|
var realName = $(this).parents('tr').eq(0).attr('data-realname')
|
|
box.find('.show-account').html(account + (realName == '' ? '' : '(' + realName + ')'))
|
|
box.find('[name=promote_id]').val(id)
|
|
layer.open({
|
|
title: '渠道迁移',
|
|
type: 1,
|
|
content: box,
|
|
area: ['600px', '350px'],
|
|
zIndex: 250,
|
|
})
|
|
}
|
|
})
|
|
|
|
$('#shift-player-submit').on({
|
|
click: function() {
|
|
var box = $('#shift-player-box')
|
|
var id = box.find('[name=promote_id]').val()
|
|
var newPromoteId = box.find('[name=new_promote_id]').val()
|
|
var orderTime = box.find('[name=order_time]').val()
|
|
var balanceCoinMode = box.find('[name=balance_coin_mode]:checked').val()
|
|
if (newPromoteId == 0) {
|
|
layer.msg('请选择转移至的推广账号')
|
|
return
|
|
}
|
|
var data = {
|
|
old_promote_id: id,
|
|
new_promote_id: newPromoteId,
|
|
order_time: orderTime,
|
|
balance_coin_mode: balanceCoinMode,
|
|
}
|
|
console.log(data)
|
|
return
|
|
$.ajax({
|
|
url: "{:U('Promote/shift')}",
|
|
data: data,
|
|
type: 'post',
|
|
dataType: 'json',
|
|
success: function(response) {
|
|
layer.msg(response.msg, {time: 1000}, function() {
|
|
window.location.href = window.location.href
|
|
})
|
|
}
|
|
})
|
|
}
|
|
})
|
|
</script>
|
|
</block> |