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.
615 lines
30 KiB
HTML
615 lines
30 KiB
HTML
<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>
|
|
<script type="text/javascript" src="__STATIC__/layer3/layer.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;
|
|
}
|
|
|
|
.tooltip {
|
|
position: relative;
|
|
/* display: block; */
|
|
/* color: #056dae; */
|
|
}
|
|
|
|
.tooltip .tooltiptext {
|
|
display: none;
|
|
width: 100%;
|
|
background-color: #fff;
|
|
text-align: center;
|
|
border-radius: 6px;
|
|
padding: 5px 10px 5px 5px;
|
|
position: absolute;
|
|
z-index: 1;
|
|
bottom: 80%;
|
|
left: 0;
|
|
border: #000 solid 1px;
|
|
line-height: 20px;
|
|
}
|
|
|
|
.tooltip .tooltiptext::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 50%;
|
|
margin-left: -5px;
|
|
border-width: 5px;
|
|
border-style: solid;
|
|
border-color: black transparent transparent transparent;
|
|
}
|
|
|
|
.tooltip:hover .tooltiptext {
|
|
color: #333;
|
|
display: block;
|
|
|
|
}
|
|
.main-place .question_content:before{
|
|
right: 20px;
|
|
left: auto;
|
|
}
|
|
</style>
|
|
<!-- 标题栏 -->
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
|
|
<h3 class="page_title">公会统计</h3>
|
|
<p class="description_text">说明:公会相关统计<if condition="IS_SUBSITE">/ <span style="color: red;">支付信息仅统计已固定的订单数据</span></if></p>
|
|
<div class="question" style="float: right;margin-right: 20px;">
|
|
<i class="question_mark">?</i>
|
|
<ul class="question_content" style="right: -20px;left: auto;">
|
|
<li class="question_title">数据相关说明</li>
|
|
<li class="question_list">
|
|
<span class="">不结算充值合计:</span>
|
|
<span class="">该工会未推广的游戏所产生的流水将被记为不结算充值</span>
|
|
</li>
|
|
<li class="question_list">
|
|
<span class="">下游结算:</span>
|
|
<span class="">下游结算时不包含不结算订单</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<style>
|
|
|
|
|
|
</style>
|
|
<div class="cf top_nav_list">
|
|
<!-- 高级搜索 -->
|
|
<div class="jssearch search_list fl cf">
|
|
<div class="input-list search-title-box">
|
|
<label>搜索:</label>
|
|
</div>
|
|
<div class="input-list input-list-resway search_label_rehab">
|
|
<select id="company_id" name="company_id" class="select_gallery" style="width:150px;">
|
|
<option value="">请选择推广公司</option>
|
|
<volist name=":getPromoteCompany()" id="vo">
|
|
<option value="{$vo.id}" <if condition="I('company_id') && $vo.id eq I('company_id')">selected
|
|
</if> >{$vo.company_name}</option>
|
|
</volist>
|
|
</select>
|
|
</div>
|
|
<div class="input-list search_item input-list-gamenoticestatus">
|
|
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
|
|
<option value="">请选择会长</option>
|
|
<option value="0" <?php if ($_POST['promote_id'] == 0):?>selected<?php endif;?>>123</option>
|
|
<option value="UC" <?php if ($_POST['promote_id'] == 'UC'):?>selected<?php endif;?>>UC用户</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="input-list input-list-server search_label_rehab">
|
|
<select id="company_belong" name="company_belong" class="select_gallery" style="width:120px;">
|
|
<option value="">请选择团体类型</option>
|
|
<volist name=":getCompanyBlong()" id="vo">
|
|
<option value="{$vo.id}" <php> if($_GET['company_belong'] !='' && $vo['id'] == $_GET['company_belong'])echo selected;</php>>{$vo.name}</option>
|
|
</volist>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="input-list input-list-server search_label_rehab">
|
|
<select id="department_id" name="department_id" class="select_gallery" style="width:120px;">
|
|
<option value="">请选择市场部</option>
|
|
<?php foreach($departments as $department):?>
|
|
<option value="<?=$department['id']?>" <?php if($department['id'] == I('department_id')):?>selected<?php endif;?>><?=$department['name']?></option>
|
|
<?php endforeach;?>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="input-list input-list-server search_label_rehab">
|
|
<select id="admin_id" name="admin_id" class="select_gallery" style="width:120px;">
|
|
<option value="">请选择市场专员</option>
|
|
<?php foreach(getMarketAdmins() as $item):?>
|
|
<option value="<?=$item['id']?>" <?php if($item['id'] == I('admin_id')):?>selected<?php endif;?>><?=$item['username']?></option>
|
|
<?php endforeach;?>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="input-list input-list-server search_label_rehab">
|
|
<select id="develop_type" name="develop_type" class="select_gallery" style="width:120px;">
|
|
<option value="">请选择开发类型</option>
|
|
<?php foreach(getCompanyDevelopTypesOther() as $key => $value):?>
|
|
<option value="<?=$key?>" <?php if($key == I('develop_type')):?>selected<?php endif;?>><?=$value?></option>
|
|
<?php endforeach;?>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="input-list">
|
|
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}"
|
|
placeholder="开始时间" />
|
|
-
|
|
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
|
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}"
|
|
placeholder="结束时间" />
|
|
<span class="add-on"><i class="icon-th"></i></span>
|
|
</div>
|
|
</div>
|
|
<div class="input-list input-list-game search_label_rehab">
|
|
<select id="game_name" name="game_name" class="select_gallery">
|
|
<option value="">游戏名称</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>
|
|
<input type="hidden" name="" value="" class="sortBy">
|
|
<div class="input-list">
|
|
<a class="sch-btn" href="javascript:;" id="search"
|
|
url="{:U('FinancePromote/index','model='.$model['name'] .'&row='.I('row'),false)}">
|
|
搜索</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>
|
|
<th class="tooltip"><a class="paixu" data-order='cash_count'>
|
|
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'cash_count'">游戏现金金额▲
|
|
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'cash_count'" />
|
|
游戏现金金额▼
|
|
<else />游戏现金金额<img src="__IMG__/up-down.png" width="13px">
|
|
</if>
|
|
</a> <span class="tooltiptext">第三方支付(微信,支付宝,快捷)</span> </th>
|
|
<th class="tooltip"><a class="paixu" data-order='balance_coin_count'>
|
|
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'balance_coin_count'">
|
|
平台币直充支出▲
|
|
<elseif
|
|
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'balance_coin_count'" />
|
|
平台币直充支出▼
|
|
<else />平台币直充支出<img src="__IMG__/up-down.png" width="13px">
|
|
</if>
|
|
</a> <span class="tooltiptext">平台币购买游戏道具所产生的金额</span> </th>
|
|
<th class="tooltip"><a class="paixu" data-order='bind_coin_count'>
|
|
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'bind_coin_count'">
|
|
内充支出▲
|
|
<elseif
|
|
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'bind_coin_count'" />
|
|
内充支出▼
|
|
<else />内充支出<img src="__IMG__/up-down.png" width="13px">
|
|
</if>
|
|
</a> <span class="tooltiptext">公会下的玩家使用绑定币消费的金额</span> </th>
|
|
<th class="tooltip"><a class="paixu" data-order='inside_cash_count'>
|
|
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'inside_cash_count'">
|
|
平台币内充▲
|
|
<elseif
|
|
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'inside_cash_count'" />
|
|
平台币内充▼
|
|
<else />平台币内充<img src="__IMG__/up-down.png" width="13px">
|
|
</if>
|
|
</a> <span class="tooltiptext">管理后台直接下放给会长的平台币,因存在平台币回收,所以可能会存在负值</span> </th>
|
|
<th class="tooltip">渠道游戏内充值合计 <span class="tooltiptext">游戏现金金额(游戏现金流水+平台币支出+公会内充支出=总流水)</span></th>
|
|
<th class="tooltip">渠道游戏内不结算充值合计 <span class="tooltiptext">游戏现金金额(游戏不结算现金流水)</span></th>
|
|
<th class="tooltip">优惠金额 <span class="tooltiptext">游戏折扣和代金券优惠金额</span></th>
|
|
<if condition="!IS_SUBSITE">
|
|
<th>操作</th>
|
|
</if>
|
|
</tr>
|
|
</thead>
|
|
<!-- 列表 -->
|
|
<tbody>
|
|
<empty name="list_data">
|
|
<td colspan="15" class="text-center">aOh! 暂时还没有内容!</td>
|
|
<else />
|
|
<volist name="list_data" id="data">
|
|
<tr>
|
|
<td>{$data.company_name}</td>
|
|
<td>{$data['promote_account']}</td>
|
|
<td>{$data['admin_username']}</td>
|
|
<td>{$data['admin_department']}</td>
|
|
<td>{$data['company_belong']}</td>
|
|
<td>{$data['develop_type_text']}</td>
|
|
<td>{$data.cash_count}</td>
|
|
<if condition="!IS_SUBSITE">
|
|
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
|
|
{$data.balance_coin_count}
|
|
</td>
|
|
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
|
|
{$data.bind_coin_count}
|
|
</td>
|
|
<td class="coin-detail" data-pay_type="-2" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/insideCoinDetail',array_merge(I('get.'),['promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
|
|
{$data.inside_cash_count}
|
|
</td>
|
|
<else />
|
|
<td>
|
|
{$data.balance_coin_count}
|
|
</td>
|
|
<td>
|
|
{$data.bind_coin_count}
|
|
</td>
|
|
<td>
|
|
{$data.inside_cash_count}
|
|
</td>
|
|
</if>
|
|
<!-- <td><span class='ljzc'
|
|
data-value="{$data['id']}"><a>{$data.inside_cash_count}</a></span></td> -->
|
|
<td>{$data.allcount}</td>
|
|
<td style="color: red;">{$data.unallcount}</td>
|
|
<td style="color: red;">{$data.discount_amount}</td>
|
|
<if condition="!IS_SUBSITE">
|
|
<td>
|
|
<a
|
|
href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>1],I('get.'),['p'=>1]))}">游戏查看</a>
|
|
<if condition="$data['p_id'] GT 0">
|
|
<a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.'),['p'=>1]))}">渠道查看</a>
|
|
</if>
|
|
<!-- <a
|
|
href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>1],I('get.'),['p'=>1]))}">游戏查看</a>
|
|
<if condition="$data['p_id'] GT 0">
|
|
<a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.'),['p'=>1]))}">渠道查看</a>
|
|
</if> -->
|
|
</td>
|
|
</if>
|
|
</tr>
|
|
</volist>
|
|
</empty>
|
|
<tr class="data_summary" style="text-align: center;">
|
|
<td colspan="6" style="text-align: center;">汇总:</td>
|
|
<td style="text-align: center;">{$all_count['cash_count']}</td>
|
|
<td style="text-align: center;">{$all_count['balance_coin_count']}</td>
|
|
<td style="text-align: center;">{$all_count['bind_coin_count']}</td>
|
|
<td style="text-align: center;">{$all_count['inside_cash_count']}</td>
|
|
<td style="text-align: center;">{$all_count['all_count']}</td>
|
|
<td style="text-align: center;color: red;">{$all_count['unallcount']}</td>
|
|
<td style="text-align: center;color: red;">{$all_count['discount_amount']}</td>
|
|
<if condition="!IS_SUBSITE">
|
|
<td style="text-align: center;">
|
|
<a
|
|
href="{:U('FinancePromote/gameStatistics',array_merge(I('get.'),['promote_type'=>1,'p'=>1]))}">游戏查看</a>
|
|
<a href="{:U('FinancePromote/promoteUser',array_merge(I('get.'),['p'=>1]))}">渠道查看</a>
|
|
</td>
|
|
</if>
|
|
</tr>
|
|
<tr class="data_summary">
|
|
<td style="text-align: center;">内外团占比:</td>
|
|
<td colspan="20" style="text-align: center;">内团充值金额占比:{$insideBelong}%    外团充值金额占比:{$outBelong}%    其他团体充值金额占比:{$otherBelong}%</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="page">
|
|
<if condition="$role_export_check eq true ">
|
|
<a class="sch-btn"
|
|
href="{:U('FinancePromote/index',array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
|
</if>
|
|
{$_page|default=''}
|
|
</div>
|
|
|
|
<!-- 添加常用设置 begin-->
|
|
<div class="common_settings">
|
|
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
|
<form class="addShortcutIcon">
|
|
<input type="hidden" name="title" value="{$m_title}">
|
|
<input type="hidden" name="url" value="Member/user_info">
|
|
</form>
|
|
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;"
|
|
target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img
|
|
src="__IMG__/zwmimages/icon_jia.png"><span>
|
|
<notempty name='commonset'>已添加
|
|
<else />添加至常用设置</notempty>
|
|
</span></a>
|
|
</div>
|
|
<!--end 添加常用设置 -->
|
|
|
|
</block>
|
|
|
|
<block name="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">
|
|
</script>
|
|
<script type="text/javascript">
|
|
|
|
//导航高亮
|
|
highlight_subnav('{:U("FinancePromote/index")}');
|
|
$(function () {
|
|
<volist name=":I('get.')" id="vo">
|
|
Think.setValue('{$key}',"{$vo}");
|
|
</volist>
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
function reloadIframe(url) {
|
|
$("iframe").attr('src', url);
|
|
// document.getElementsByTagName('iframe').src=url;
|
|
}
|
|
$(function () {
|
|
$(".coin-detail").click(function () {
|
|
var pay_type = $(this).data('pay_type');
|
|
var url = $(this).data('url');
|
|
var title = pay_type == -1 ? '内充支出明细' :(pay_type == 0 ? '平台币直充明细': '平台币内充明细');
|
|
layer.open({
|
|
type: 2,
|
|
title: title,
|
|
shadeClose: true,
|
|
shade: 0.8,
|
|
area: ['70%', '80%'],
|
|
content: url
|
|
});
|
|
});
|
|
$(".select_gallery").select2();
|
|
//搜索功能
|
|
$("#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;
|
|
}
|
|
var start = $("#time_start").val();
|
|
var end = $("#time_end").val();
|
|
if (start != '' && end != '') {
|
|
if (Date.parse(start) > Date.parse(end)) {
|
|
layer.msg('开始时间必须小于等于结束时间');
|
|
return false;
|
|
}
|
|
}
|
|
window.location.href = url;
|
|
});
|
|
$(".paixu").click(function () {
|
|
var that = $(this);
|
|
$data_order = that.attr('data-order');
|
|
$order_type = '{$userarpu_order}';
|
|
if ($order_type == '' || $order_type == '4') {
|
|
$(".sortBy").attr('name', 'data_order');
|
|
val = '3,' + $data_order;
|
|
$(".sortBy").attr('value', val);
|
|
$("#search").click();
|
|
} else if ($order_type == '3') {
|
|
$(".sortBy").attr('name', 'data_order');
|
|
val = '4,' + $data_order;
|
|
$(".sortBy").attr('value', val);
|
|
$("#search").click();
|
|
}
|
|
});
|
|
|
|
$('.jssamlllist').click(function () {
|
|
var that = $(this), url = that.attr('data-url');
|
|
var url =
|
|
layer.open({
|
|
type: 2,
|
|
title: "【" + that.attr('data-account') + "】小号列表",
|
|
shadeClose: true,
|
|
shade: 0.8,
|
|
area: ['1062px', '80%'],
|
|
content: url,//iframe的url
|
|
});
|
|
|
|
return false;
|
|
});
|
|
|
|
$(".paixu").click(function () {
|
|
var val = $(this).attr('data-order');
|
|
if (val == 1) {
|
|
val = 2;
|
|
} else if (val == 2) {
|
|
val = 1;
|
|
}
|
|
var name = $(this).attr('name');
|
|
if (name == 'balance_status') {
|
|
$('#key').val(1);
|
|
} else {
|
|
$('#key').val(2);
|
|
}
|
|
$("#" + name).val(val);
|
|
$("#search").click();
|
|
});
|
|
//回车自动提交
|
|
$('.jssearch').find('input').keyup(function (event) {
|
|
if (event.keyCode === 13) {
|
|
$("#search").click();
|
|
}
|
|
});
|
|
|
|
$("#total_status").click(function () {
|
|
$("#search").click();
|
|
})
|
|
|
|
|
|
$('#time_start').datetimepicker({
|
|
format: 'yyyy-mm-dd',
|
|
language: "zh-CN",
|
|
minView: 2,
|
|
autoclose: true
|
|
});
|
|
|
|
$('#datetimepicker').datetimepicker({
|
|
format: 'yyyy-mm-dd',
|
|
language: "zh-CN",
|
|
minView: 2,
|
|
autoclose: true,
|
|
pickerPosition: 'bottom-left'
|
|
})
|
|
|
|
var promote_id = "{:I('promote_id')}";
|
|
var company_id = "{:I('company_id')}";
|
|
function getPromotersByCompanyid() {
|
|
var company_id = $("#company_id option:selected").val();
|
|
if(!company_id){
|
|
company_id = -1;
|
|
}
|
|
$.ajax({
|
|
url: "{:U('Ajax/getPromotersByCompanyid')}",
|
|
type: "get",
|
|
data: { company_id:company_id},
|
|
dataType: 'json',
|
|
success: function (response) {
|
|
str = '<option value="">请选择会长</option>';
|
|
data = response.data;
|
|
for (var i in data) {
|
|
str += "<option value='" + data[i].id + "' " + (promote_id && data[i].id == promote_id ? 'selected' : '') + ">" + data[i].nickname + "</option>"
|
|
}
|
|
$("#promote_id").empty();
|
|
$("#promote_id").append(str);
|
|
$("#promote_id").select2();
|
|
}
|
|
})
|
|
}
|
|
getPromotersByCompanyid();
|
|
$("#promote_id").change(function(){
|
|
promote_id = $("#promote_id option:selected").val();
|
|
})
|
|
|
|
$("#company_id").change(function(){
|
|
getPromotersByCompanyid();
|
|
})
|
|
|
|
var adminId = "{:I('admin_id')}";
|
|
var departmentId = "{:I('department_id')}";
|
|
function getAdminsByDepartmentId() {
|
|
var departmentId = $("#department_id option:selected").val();
|
|
if(!departmentId){
|
|
departmentId = -1;
|
|
}
|
|
$.ajax({
|
|
url: "{:U('Ajax/getAdminsByDepartment')}",
|
|
type: "get",
|
|
data: { department_id: departmentId},
|
|
dataType: 'json',
|
|
success: function (response) {
|
|
str = '<option value="">请选择市场专员</option>';
|
|
admins = response.data.admins;
|
|
for (var i in admins) {
|
|
str += "<option value='" + admins[i].uid + "' " + (adminId && admins[i].uid == adminId ? 'selected' : '') + ">" + admins[i].nickname + "</option>"
|
|
}
|
|
$("#admin_id").empty();
|
|
$("#admin_id").append(str);
|
|
$("#admin_id").select2();
|
|
}
|
|
})
|
|
}
|
|
getAdminsByDepartmentId();
|
|
$("#admin_id").change(function(){
|
|
adminId = $("#admin_id option:selected").val();
|
|
})
|
|
|
|
$("#department_id").change(function(){
|
|
getAdminsByDepartmentId();
|
|
})
|
|
})
|
|
|
|
|
|
function shenhe(status) {
|
|
var text = $("input:checkbox[name='ids[]']:checked").map(function (index, elem) {
|
|
return $(elem).val();
|
|
}).get().join("\n");
|
|
var desc = '';
|
|
if (status == 0) {
|
|
desc = '锁定';
|
|
} else {
|
|
desc = '开启';
|
|
}
|
|
layer.prompt({
|
|
formType: 2,
|
|
value: text,
|
|
placeholder: '玩家账号(一个账号一行)',
|
|
title: '请输入要' + desc + '的玩家账号(一个账号一行)',
|
|
area: ['800px', '350px'] //自定义文本域宽高
|
|
}, function (value, index, elem) {
|
|
if (value == '') {
|
|
layer.msg("请输入账户ID");
|
|
return;
|
|
}
|
|
|
|
$.ajax({
|
|
cache: true,
|
|
type: "POST",
|
|
url: "{:U('Member/lock_status')}",
|
|
data: { accounts: value, lock_status: status },// 你的formid
|
|
async: false,
|
|
error: function (data) {
|
|
layer.alert("服务器故障,请稍后重试!", { icon: 2 });
|
|
},
|
|
success: function (data) {
|
|
// var obj = JSON.parse(data);
|
|
// layer.alert(obj.info,{icon:obj.status})
|
|
layer.alert(data.info, { icon: data.status })
|
|
window.location.reload()
|
|
}
|
|
});
|
|
layer.close(index);
|
|
});
|
|
}
|
|
</script>
|
|
|
|
</block> |