解决冲突
commit
0c91774854
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,164 @@
|
||||
<!-- 成员授权编辑页面 -->
|
||||
<extend name="Public/base" />
|
||||
<block name="body">
|
||||
<div class="main-place">
|
||||
<span class="main-placetitle">位置</span>
|
||||
<ul class="main-placeul">
|
||||
<li><a href="{:U('User/index')}">用户</a></li>
|
||||
<li><a href="{:U('User/index')}">管理组</a></li>
|
||||
<li><a href="#">{$meta_title}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-wrap">
|
||||
<div class="tab_nav">
|
||||
<ul>
|
||||
<li><a href="{:U('AuthManager/access',array('group_name'=>I('group_name') ,'group_id'=> I('group_id')))}">访问授权</a></li>
|
||||
<li><a href="{:U('AuthManager/category',array('group_name'=>I('group_name') ,'group_id'=> I('group_id')))}">分类授权</a></li>
|
||||
<li><a href="{:U('AuthManager/dataempower',array('group_name'=>I('group_name') ,'group_id'=> I('group_id')))}">数据授权</a></li>
|
||||
<li><a href="{:U('AuthManager/user',array('group_name'=>I('group_name') ,'group_id'=> I('group_id')))}">成员授权</a></li>
|
||||
<li class="current"><a href="javascript:;">市场专员分成</a></li>
|
||||
<li class="fr tab_select">
|
||||
<select name="group">
|
||||
<volist name="auth_group" id="vo">
|
||||
<option value="{:U('AuthManager/AuthMarketMember',array('group_id'=>$vo['id'],'group_name'=>$vo['title']))}" <eq name="vo['id']" value="$_GET['group_id']">selected</eq> >{$vo.title}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-wrap">
|
||||
|
||||
<div class="tab-content tabcon1711" style="margin-top: 20px;">
|
||||
<span style="font-size: 20px;font-weight: 600;padding-left: 15px;padding-bottom: 30px">市场专员分成</span>
|
||||
<!-- 表单 -->
|
||||
<form id="form" action="{:U('AuthMarketMember?model='.$model['id'])}" method="post" class="form-horizontal">
|
||||
<!-- 基础文档模型 -->
|
||||
<div id="tab1" class="tab-pane in tab1" style="margin-top: 10px;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">业绩提成起提流水:</td>
|
||||
<td class="r table_radio">
|
||||
<input type="text" name="performance_revenue" id="performance_revenue" value="{$data.performance_revenue}" onkeyup ="value=value.replace(/[^\d]/g,'')">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">开发业绩提成比例:</td>
|
||||
<td class="r table_radio">
|
||||
<input type="text" name="develop_commission_ratio" id="develop_commission_ratio" value="{$data['develop_commission_ratio']}" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">维护业绩提成比例:</td>
|
||||
<td class="r table_radio">
|
||||
<input type="text" name="maintain_commission_ratio" id="maintain_commission_ratio" value="{$data['maintain_commission_ratio']}" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">业绩月发放比例:</td>
|
||||
<td class="r table_radio">
|
||||
<input type="text" name="performance_monthly_ratio" id="performance_monthly_ratio" value="{$data['performance_monthly_ratio']}" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">余下业绩发放时间选择:</td>
|
||||
<td class="r table_radio">
|
||||
<select name="time" class="select_gallery" id="time" style="text-align: center">
|
||||
<option value="0" <if condition="$data['time'] eq '0'">selected</if>>月</option>
|
||||
<option value="1" <if condition="$data['time'] eq '1'">selected</if>>跨季</option>
|
||||
<option value="2" <if condition="$data['time'] eq '2'">selected</if>>半年</option>
|
||||
<option value="3" <if condition="$data['time'] eq '3'">selected</if>>一年</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">考核奖金起提流水:</td>
|
||||
<td class="r table_radio">
|
||||
<input type="text" name="appraisal_bonuses" id="appraisal_bonuses" value="{$data['appraisal_bonuses']}" onkeyup ="value=value.replace(/[^\d]/g,'')">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">开发考核奖金比例:</td>
|
||||
<td class="r table_radio">
|
||||
<input type="text" name="appraisal_bonuses_ratio" id="appraisal_bonuses_ratio" value="{$data['appraisal_bonuses_ratio']}" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">维护考核奖金比例:</td>
|
||||
<td class="r table_radio">
|
||||
<input type="text" name="maintain_appraisal_bonuses_ratio" id="maintain_appraisal_bonuses_ratio" value="{$data['maintain_appraisal_bonuses_ratio']}" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">奖金月发放比例:</td>
|
||||
<td class="r table_radio">
|
||||
<input type="text" name="month_bonus_ratio" id="month_bonus_ratio" value="{$data['month_bonus_ratio']}" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">余下奖金发放时间选择:</td>
|
||||
<td class="r table_radio">
|
||||
<select name="remain_time" class="select_gallery" id="remain_time">
|
||||
<option value="0" <if condition="$data.remain_time eq '0'">selected</if>>月</option>
|
||||
<option value="1" <if condition="$data.remain_time eq '1'">selected</if>>跨季</option>
|
||||
<option value="2" <if condition="$data.remain_time eq '2'">selected</if>>半年</option>
|
||||
<option value="3" <if condition="$data.remain_time eq '3'">selected</if>>一年</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="form-item cf">
|
||||
|
||||
<input type="hidden" name="group_id" id="group_id" value="{$_GET['group_id']}">
|
||||
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal" >
|
||||
确认
|
||||
</button>
|
||||
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="{:U('index')}" style="color:#000000;background:#ffffff;border: solid 1px #000">
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-title" style="border-bottom: 0px solid #C1C1C1 !important;margin-bottom: 0;padding-bottom: 0">
|
||||
<div class="page_nav fl">
|
||||
{$_page}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabcon1711">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<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="AuthManager/index">
|
||||
</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>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$('select[name=group]').change(function(){
|
||||
location.href = this.value;
|
||||
});
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('AuthManager/index')}');
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,130 @@
|
||||
<extend name="Public/base" />
|
||||
|
||||
<block name="body">
|
||||
<!-- <link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all"> -->
|
||||
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/jquery-1.7.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
|
||||
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">公司税率修改</h3>
|
||||
<p class="description_text">提示:修改税率后请点击“重算”</p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 标签页导航 -->
|
||||
<div class="tab-wrap">
|
||||
|
||||
<div class="tab-content tabcon1711">
|
||||
<!-- 表单 -->
|
||||
<form id="form" action="{:U('editTaxRatio?model='.$model['id'])}" method="post" class="form-horizontal">
|
||||
<!-- 基础文档模型 -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l" style="width: 150px;">原税率:</td>
|
||||
<td class="l" style="width: 250px;">
|
||||
{$data['tax_radio']}%
|
||||
</td>
|
||||
|
||||
<td class="l" style="width: 150px;">修改后税率:</td>
|
||||
<td class="l">
|
||||
<input type="text" class="txt" name="tax_radio" value="" onKeyUp="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">生效时间点:</td>
|
||||
<td class="r">
|
||||
<input type="text" id="timestart" name="timestart" class="" value="{$data['timestart']}" placeholder="下单开始时间" autocomplete="off"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="form-item cf">
|
||||
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">
|
||||
应用
|
||||
</button>
|
||||
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back(-1);" >
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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="Promote/lists/type/1">
|
||||
</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>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></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">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('MarketPercentage/index')}");
|
||||
|
||||
$(function(){
|
||||
|
||||
$('#timestart').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
})
|
||||
// var pro="{:$data['bank_area']['0']}";
|
||||
// alert (pro);
|
||||
showTab();
|
||||
prov="{:substr($data['bank_area'],0,2)}";
|
||||
city="{:substr($data['bank_area'],2,2)}";
|
||||
ciarea="{:substr($data['bank_area'],4,2)}";
|
||||
//initComplexArea('seachprov', 'seachcity', 'seachdistrict', area_array, sub_array, prov, city, ciarea);
|
||||
|
||||
$("input[name=company_belong]").click(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#company_relation').show();
|
||||
} else {
|
||||
$('#company_relation').hide();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</block>
|
||||
|
@ -0,0 +1,487 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
||||
<script src="__STATIC__/jquery.form.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.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;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
</style>
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">市场毛利统计</h3>
|
||||
<p class="description_text">说明:市场毛利统计</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
<div class="fl button_list">
|
||||
<div class="tools">
|
||||
<if condition="$caculate_check eq true">
|
||||
<empty name="show_status">
|
||||
<a class="recaculate" url="{:U('reCaculateBonus?pay_time='.$_GET['pay_time'])}"><span class="button_icon button_icon1"></span>重算</a>
|
||||
</empty>
|
||||
</if>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<!-- <div class="input-list input-list-promote search_label_rehab">-->
|
||||
<!-- <select id="pay_time" name="pay_time" class="select_gallery" style="width:150px;">-->
|
||||
<!-- <option value="">请选择月份</option>-->
|
||||
<!-- <volist name=":getMonth()" id="vo">-->
|
||||
<!-- <option value="{$vo}" <if condition="$vo eq $_GET['pay_time']">selected=selected</if>>{$vo}</option>-->
|
||||
<!-- </volist>-->
|
||||
<!-- </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-parent search_label_rehab">
|
||||
<select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择会长账号</option>
|
||||
<volist name=":promote_listsMarket(1)" id="vo">
|
||||
<option data-company_belong="{$vo['company_belong']}" data-belong="{:getCompanyBlong($vo['company_belong'])}" promote_id-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $_GET['promote_id']">selected=selected</if>>{$vo.account}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="relation_game_id" name="relation_game_id" class="select_gallery" style="width:120px;">
|
||||
<option value="" selected="">请选择游戏</option>
|
||||
<volist name=':get_game_list(null,2)' id='vo'>
|
||||
<option value="{$vo.relation_game_id}" <if condition="$vo.relation_game_id eq $_GET['relation_game_id']"></if>>{$vo.relation_game_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<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('index','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<empty name="show_status">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间</th>
|
||||
<th>会长账号</th>
|
||||
<th>内外团</th>
|
||||
<th>所属市场专员</th>
|
||||
<th>类型</th>
|
||||
<th >游戏名称</th>
|
||||
<th >总流水</th>
|
||||
<th>上游结算流水</th>
|
||||
<th>下游结算流水</th>
|
||||
<th>支付渠道费用</th>
|
||||
<th><a href="{:U('editTaxRatio')}" style="text-decoration:none;">公司税费</a></th>
|
||||
<th>税后毛利额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<if condition = "empty($list_data)">
|
||||
<tr>
|
||||
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "list_data">
|
||||
<volist name="list_data" id="data">
|
||||
<tr>
|
||||
<td>{$data.pay_time}</td>
|
||||
<td>{$data.promote_account}</td>
|
||||
<td>{$data.company_belong}</td>
|
||||
<td>{$data.real_name}</td>
|
||||
<td>{$data['develop_type']}</td>
|
||||
<td>{$data['game_name']}</td>
|
||||
<td>{$data['pay_amount']}</td>
|
||||
<td>{$data['cp_amount']}</td>
|
||||
<td>{$data['promote_amount']}</td>
|
||||
<td>{$data['channel_amount']}</td>
|
||||
<td>{$data['company_tax']}</td>
|
||||
<td>{$data['company_profit']}</td>
|
||||
</tr>
|
||||
</volist>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>合计</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{$sum['pay_amount']}</td>
|
||||
<td>{$sum['cp_amount']}</td>
|
||||
<td>{$sum['promote_amount']}</td>
|
||||
<td>{$sum['channel_amount']}</td>
|
||||
<td>{$sum['company_tax']}</td>
|
||||
<td>{$sum['company_profit']}</td>
|
||||
</tr>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<else/>
|
||||
</empty>
|
||||
|
||||
</div>
|
||||
<div class="page">
|
||||
<if condition="$role_export_check eq true ">
|
||||
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
</if>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</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">
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('MarketPercentage/index')}');
|
||||
$(function(){
|
||||
//搜索功能
|
||||
$("#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();
|
||||
}
|
||||
});
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
$("#admin").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$(this).find('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#admin #i_list_id').on('keyup',function(event) {
|
||||
var val = $.trim($(this).val()).toLowerCase();
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(val);
|
||||
});
|
||||
|
||||
$("#admin #i_list_li").find("a").each(function(){
|
||||
$(this).click(function(){
|
||||
var text = $.trim($(this).text()).toLowerCase();
|
||||
$(this).closest('.drop-down').find("#i_list_id").val(text);
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(text);
|
||||
})
|
||||
});
|
||||
|
||||
$('#time_start').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
})
|
||||
|
||||
//下拉内容框
|
||||
$(".drop-down2").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
/* 状态搜索子菜单 */
|
||||
/*渠道删除*/
|
||||
$('.delete').click(function(){
|
||||
var id = $(this).attr('data-id');
|
||||
layer.confirm('渠道删除后,下级渠道同时被删除,所属数据归属于自然渠道!', {
|
||||
title:'确定要删除该渠道?',
|
||||
icon:0,
|
||||
btn: ['删除','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('del_promote')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {id:id},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg(data.msg);
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$('.recaculate').click(function(){
|
||||
var url = $(this).attr('url');
|
||||
layer.confirm('是否确认重算提成!', {
|
||||
title:'重算提成?',
|
||||
icon:0,
|
||||
btn: ['重算','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success:function(data){
|
||||
if(data.status == 1) {
|
||||
layer.msg("重新计算需要时间,请等待5分钟后再查看");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
} else {
|
||||
layer.msg(data.info);
|
||||
}
|
||||
},
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//点击字母按照条件按钮筛选
|
||||
$(".pro_promot_select_list_con").click(function(){
|
||||
//选中高亮样式
|
||||
$(this).addClass('active');
|
||||
$(this).siblings().removeClass('active');
|
||||
|
||||
var that = $(this);
|
||||
var index = $(this).attr("data-index");
|
||||
|
||||
$("#game_list li").each(function(index,ele){
|
||||
var short = $(this).attr('data-short');
|
||||
$(this).show();
|
||||
if(that.attr('data-index')){
|
||||
if(that.attr('data-index')!=short.charAt(0)){
|
||||
$(this).hide();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//打开弹窗
|
||||
$(".ajax-view").click(function(){
|
||||
//获取游戏列表
|
||||
var url = "{:U('Promote/getPromoteGame')}";
|
||||
var id = $(this).attr('data-id');
|
||||
var checked = 'checked';
|
||||
|
||||
|
||||
|
||||
$.post(url,{id:id},function(res){
|
||||
if(res.code==1){
|
||||
|
||||
$(".pro_promot_select_list a").eq(0).addClass('active');
|
||||
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
|
||||
|
||||
var game_list = res.data.game_list;
|
||||
var promote_info = res.data.promote_info;
|
||||
var lis = [];
|
||||
|
||||
$.each(game_list,function(index,ele){
|
||||
if(ele.game_name.length>6){
|
||||
ele.game_name = ele.game_name .substring(0,6)+"..."
|
||||
}
|
||||
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
|
||||
|
||||
|
||||
if(promote_info['game_ids']==''){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
if(promote_info['game_ids'].indexOf(ele.id)>-1){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
$(".jsgamecheckall").attr('checked',false);
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
|
||||
checked = '';
|
||||
}
|
||||
}
|
||||
|
||||
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
|
||||
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
|
||||
lis.push('</li>');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").attr('checked',checked);
|
||||
|
||||
$("#game_list").html(lis.join(''));
|
||||
$(".pro_promot_number").text(res.data.promote_info.account);
|
||||
$("#se_promote_id").val(res.data.promote_info.id);
|
||||
$(".pro_promot").css("display","block");
|
||||
|
||||
jsgameid();
|
||||
|
||||
}else{
|
||||
var tip_msg = res.info ? res.info : '操作失败';
|
||||
layer.msg(tip_msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//保存修改
|
||||
$(".pro_promot_btn_confirm").click(function(){
|
||||
$("#ajaxForm").ajaxSubmit(function(res){
|
||||
layer.msg(res.msg);
|
||||
$(".pro_promot").hide();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//关闭弹窗
|
||||
$(".pro_promot_close").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
});
|
||||
//取消修改
|
||||
$(".pro_promot_btn_cancel").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
layer.msg('修改已取消');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").click(function(){
|
||||
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
|
||||
});
|
||||
|
||||
//可申请游戏 全选及全选反选 功能 @author zwm date 20180604
|
||||
function jsgameid(){
|
||||
$(".jsgameid").click(function(){
|
||||
var option = $(this).closest('ul').find(".jsgameid"),
|
||||
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
|
||||
option.each(function(i){
|
||||
if(!this.checked){
|
||||
checkall.prop("checked", false);
|
||||
return false;
|
||||
}else{
|
||||
checkall.prop("checked", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,480 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
||||
<script src="__STATIC__/jquery.form.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.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;
|
||||
}
|
||||
a:link ,a:visited,a:hover,a:active { text-decoration: none;}
|
||||
.select2-results__option[aria-selected] {font-size:12px;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
</style>
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">市场业绩提成</h3>
|
||||
<p class="description_text">说明:公会统计仅表示符合筛选条件下的数据统计,当搜索所属市场专员时,因为存在换绑等原因,所以不作为市场业绩统计依据</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
<div class="fl button_list">
|
||||
<div class="tools">
|
||||
<if condition="$caculate_check eq true">
|
||||
<empty name="show_status">
|
||||
<a class="recaculate" url="{:U('reCaculateBonus?pay_time='.$_GET['pay_time'])}"><span class="button_icon button_icon1"></span>重算</a>
|
||||
</empty>
|
||||
</if>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<!-- <div class="input-list input-list-promote search_label_rehab">-->
|
||||
<!-- <select id="pay_time" name="pay_time" class="select_gallery" style="width:150px;">-->
|
||||
<!-- <option value="">请选择时间</option>-->
|
||||
<!-- <volist name=":getMonth()" id="vo">-->
|
||||
<!-- <option value="{$vo}" <if condition="$vo eq $_GET['pay_time']">selected=selected</if>>{$vo}</option>-->
|
||||
<!-- </volist>-->
|
||||
<!-- </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-parent search_label_rehab">
|
||||
<select id="admin_id" name="admin_id" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择人员</option>
|
||||
<volist name=":getMarketAdmin()" id="vo">
|
||||
<option value="{$vo.uid}" <if condition="$vo.uid eq $_GET['admin_id']">selected=selected</if>>{$vo.real_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="group_id" name="group_id" class="select_gallery" style="width:120px;">
|
||||
<option value="" selected="">请选择级别</option>
|
||||
<option value="21" <if condition="$_GET['group_id'] eq 1">selected</if>>初级</option>
|
||||
<option value="11" <if condition="$_GET['group_id'] eq 2">selected</if>>中级</option>
|
||||
<option value="12" <if condition="$_GET['group_id'] eq 2">selected</if>>高级</option>
|
||||
</select>
|
||||
</div>
|
||||
<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('marketStaffSettle','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<empty name="show_status">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间</th>
|
||||
<th>市场专员</th>
|
||||
<th>级别</th>
|
||||
<th>开发总流水</th>
|
||||
<th>维护总流水</th>
|
||||
<th >业绩提成</th>
|
||||
<th >绩效考核奖金</th>
|
||||
<th>当月合计</th>
|
||||
<th>应发金额</th>
|
||||
<th>待发金额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<if condition = "empty($list_data)">
|
||||
<tr>
|
||||
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "list_data">
|
||||
<volist name="list_data" id="data">
|
||||
<tr>
|
||||
<td>{$data.pay_time|default='无'}</td>
|
||||
<td>{$data.real_name|default='无'}</td>
|
||||
<td>{$data.level|default='无'}</td>
|
||||
<td><a href="{:U('FinancePromote/index',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'admin_id'=>$data['admin_id'],'develop_type'=>'1,2'))}" >{$data.performance_revenue|default='0.00'}</a></td>
|
||||
|
||||
<td><a href="{:U('FinancePromote/index',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'admin_id'=>$data['admin_id'],'develop_type'=>3))}" >{$data['appraisal_bonuses']|default='0.00'}</a></td>
|
||||
<td>{$data['performance_commission']|default='0.00'}</td>
|
||||
<td>{$data['achievement_bonus']|default='0.00'}</td>
|
||||
<td>{$data['commission']|default='0.00'}</td>
|
||||
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'admin_id'=>$data['admin_id']))}" >{$data['extend_commission']|default='0.00'}</a></td>
|
||||
<td><a href="{:U('MarketPercentage/showBonusList',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'real_name'=>$data['real_name'],'level'=>$data['group_id']))}" >{$data['wait_commission']|default='0.00'}</a></td>
|
||||
</tr>
|
||||
</volist>
|
||||
<td colspan="3">合计</td>
|
||||
<td><a href="{:U('FinancePromote/index',array('time_start'=>$start_time,'time_end'=>$end_time,'develop_type'=>'1,2'))}" >{$sum['performance_revenue']|default="0.00"}</a></td>
|
||||
<td><a href="{:U('FinancePromote/index',array('time_start'=>$start_time,'time_end'=>$end_time,'develop_type'=>3))}" >{$sum['appraisal_bonuses']|default='0.00'}</a></td>
|
||||
<td>{$sum['performance_commission']|default='0.00'}</td>
|
||||
<td>{$sum['achievement_bonus']|default='0.00'}</td>
|
||||
<td>{$sum['commission']|default='0.00'}</td>
|
||||
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$start_time,'time_end'=>$end_time))}" >{$sum['extend_commission']|default='0.00'}</a></td>
|
||||
<td></td>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<else/>
|
||||
</empty>
|
||||
|
||||
</div>
|
||||
<div class="page">
|
||||
<if condition="$role_export_check eq true ">
|
||||
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
</if>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</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">
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('MarketPercentage/marketStaffSettle')}');
|
||||
$(function(){
|
||||
//搜索功能
|
||||
$("#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();
|
||||
}
|
||||
});
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
$("#admin").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$(this).find('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#admin #i_list_id').on('keyup',function(event) {
|
||||
var val = $.trim($(this).val()).toLowerCase();
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(val);
|
||||
});
|
||||
|
||||
$("#admin #i_list_li").find("a").each(function(){
|
||||
$(this).click(function(){
|
||||
var text = $.trim($(this).text()).toLowerCase();
|
||||
$(this).closest('.drop-down').find("#i_list_id").val(text);
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(text);
|
||||
})
|
||||
});
|
||||
|
||||
//下拉内容框
|
||||
$(".drop-down2").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
/* 状态搜索子菜单 */
|
||||
/*渠道删除*/
|
||||
$('.delete').click(function(){
|
||||
var id = $(this).attr('data-id');
|
||||
layer.confirm('渠道删除后,下级渠道同时被删除,所属数据归属于自然渠道!', {
|
||||
title:'确定要删除该渠道?',
|
||||
icon:0,
|
||||
btn: ['删除','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('del_promote')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {id:id},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg(data.msg);
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$('#time_start').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
})
|
||||
|
||||
$('.recaculate').click(function(){
|
||||
var url = $(this).attr('url');
|
||||
layer.confirm('是否确认重算提成!', {
|
||||
title:'重算提成?',
|
||||
icon:0,
|
||||
btn: ['重算','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success:function(data){
|
||||
if(data.status == 1) {
|
||||
layer.msg("重新计算需要时间,请等待5分钟后再查看");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
} else {
|
||||
layer.msg(data.info);
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//点击字母按照条件按钮筛选
|
||||
$(".pro_promot_select_list_con").click(function(){
|
||||
//选中高亮样式
|
||||
$(this).addClass('active');
|
||||
$(this).siblings().removeClass('active');
|
||||
|
||||
var that = $(this);
|
||||
var index = $(this).attr("data-index");
|
||||
|
||||
$("#game_list li").each(function(index,ele){
|
||||
var short = $(this).attr('data-short');
|
||||
$(this).show();
|
||||
if(that.attr('data-index')){
|
||||
if(that.attr('data-index')!=short.charAt(0)){
|
||||
$(this).hide();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//打开弹窗
|
||||
$(".ajax-view").click(function(){
|
||||
//获取游戏列表
|
||||
var url = "{:U('Promote/getPromoteGame')}";
|
||||
var id = $(this).attr('data-id');
|
||||
var checked = 'checked';
|
||||
|
||||
|
||||
|
||||
$.post(url,{id:id},function(res){
|
||||
if(res.code==1){
|
||||
|
||||
$(".pro_promot_select_list a").eq(0).addClass('active');
|
||||
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
|
||||
|
||||
var game_list = res.data.game_list;
|
||||
var promote_info = res.data.promote_info;
|
||||
var lis = [];
|
||||
|
||||
$.each(game_list,function(index,ele){
|
||||
if(ele.game_name.length>6){
|
||||
ele.game_name = ele.game_name .substring(0,6)+"..."
|
||||
}
|
||||
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
|
||||
|
||||
|
||||
if(promote_info['game_ids']==''){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
if(promote_info['game_ids'].indexOf(ele.id)>-1){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
$(".jsgamecheckall").attr('checked',false);
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
|
||||
checked = '';
|
||||
}
|
||||
}
|
||||
|
||||
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
|
||||
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
|
||||
lis.push('</li>');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").attr('checked',checked);
|
||||
|
||||
$("#game_list").html(lis.join(''));
|
||||
$(".pro_promot_number").text(res.data.promote_info.account);
|
||||
$("#se_promote_id").val(res.data.promote_info.id);
|
||||
$(".pro_promot").css("display","block");
|
||||
|
||||
jsgameid();
|
||||
|
||||
}else{
|
||||
var tip_msg = res.info ? res.info : '操作失败';
|
||||
layer.msg(tip_msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//保存修改
|
||||
$(".pro_promot_btn_confirm").click(function(){
|
||||
$("#ajaxForm").ajaxSubmit(function(res){
|
||||
layer.msg(res.msg);
|
||||
$(".pro_promot").hide();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//关闭弹窗
|
||||
$(".pro_promot_close").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
});
|
||||
//取消修改
|
||||
$(".pro_promot_btn_cancel").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
layer.msg('修改已取消');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").click(function(){
|
||||
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
|
||||
});
|
||||
|
||||
//可申请游戏 全选及全选反选 功能 @author zwm date 20180604
|
||||
function jsgameid(){
|
||||
$(".jsgameid").click(function(){
|
||||
var option = $(this).closest('ul').find(".jsgameid"),
|
||||
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
|
||||
option.each(function(i){
|
||||
if(!this.checked){
|
||||
checkall.prop("checked", false);
|
||||
return false;
|
||||
}else{
|
||||
checkall.prop("checked", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,538 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
||||
<script src="__STATIC__/jquery.form.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.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;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
</style>
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">个人总提成列表</h3>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
<div class="fl button_list">
|
||||
<div class="tools">
|
||||
<if condition="$caculate_check eq true">
|
||||
<a class="recaculate" url="{:U('reCaculateBonus?pay_time='.$_GET['pay_time'])}"><span class="button_icon button_icon1"></span>重算</a>
|
||||
</if>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<!-- <div class="input-list input-list-promote search_label_rehab">-->
|
||||
<!-- <select id="pay_time" name="pay_time" class="select_gallery" style="width:150px;">-->
|
||||
<!-- <option value="">请选择时间</option>-->
|
||||
<!-- <volist name=":getMonth()" id="vo">-->
|
||||
<!-- <option value="{$vo}" <if condition="$vo eq $_GET['pay_time']">selected=selected</if>>{$vo}</option>-->
|
||||
<!-- </volist>-->
|
||||
<!-- </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-parent search_label_rehab">
|
||||
<select id="admin_id" name="admin_id" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择人员</option>
|
||||
<volist name=":getMarketAdmin()" id="vo">
|
||||
<option value="{$vo.uid}" <if condition="$vo.uid eq $_GET['admin_id']">selected=selected</if>>{$vo.real_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-parent search_label_rehab">
|
||||
<select id="status" name="status" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择剩余金额发放状态</option>
|
||||
<option value="1">已发放</option>
|
||||
<option value="0">未发放</option>
|
||||
</select>
|
||||
</div>
|
||||
<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('personMarketStaffSettle','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<empty name="show_status">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间</th>
|
||||
<th>市场专员</th>
|
||||
<th>账号</th>
|
||||
<th>级别</th>
|
||||
<th>开发总流水</th>
|
||||
<th>维护总流水</th>
|
||||
<th>税后毛利</th>
|
||||
<th >业绩提成</th>
|
||||
<th >绩效考核奖金</th>
|
||||
<th>当月总提成</th>
|
||||
<th>本月发放</th>
|
||||
<th>本月未发</th>
|
||||
<th>剩余金额发放状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<if condition = "empty($list_data)">
|
||||
<tr>
|
||||
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "list_data">
|
||||
<volist name="list_data" id="data" key="index">
|
||||
<tr>
|
||||
<td>{$data.pay_time|default='无'}</td>
|
||||
<td>{$data.real_name|default='无'}</td>
|
||||
<td>{$data.nickname|default='无'}</td>
|
||||
<td>{$data.level|default='无'}</td>
|
||||
<td>{$data.performance_revenue|default='0.00'}</td>
|
||||
|
||||
<td>{$data['appraisal_bonuses']|default='0.00'}</td>
|
||||
<td>{$data.company_profit|default="0.00"}</td>
|
||||
<td>{$data['performance_commission']|default='0.00'}</td>
|
||||
<td>{$data['achievement_bonus']|default='0.00'}</td>
|
||||
<td>{$data['commission']|default='0.00'}</td>
|
||||
<td>{$data['extend_commission']|default='0.00'}</td>
|
||||
<td>{$data['wait_commission']|default='0.00'}</td>
|
||||
<td>{$data['is_send']|default='未发放'}</td>
|
||||
|
||||
<td>
|
||||
<if condition="$send_bonus_check eq true">
|
||||
<if condition="$data['status'] eq 0">
|
||||
<a data-admin_id="{$data.admin_id}" data-time="{$data.pay_time}" class="send">发放</a>
|
||||
<a data-admin_id="{$data.admin_id}" data-time="{$data.pay_time}" class="send_back">离职发放</a>
|
||||
</if>
|
||||
</if>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</volist>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>合计</td>
|
||||
<td>{$sum.performance_revenue|default="0.00"}</td>
|
||||
<td>{$sum.appraisal_bonuses|default="0.00"}</td>
|
||||
<td>{$sum.company_profit|default="0.00"}</td>
|
||||
<td>{$sum['performance_commission']|default='0.00'}</td>
|
||||
<td>{$sum['achievement_bonus']|default='0.00'}</td>
|
||||
<td>{$sum['commission']|default='0.00'}</td>
|
||||
<td>{$sum['extend_commission']|default='0.00'}</td>
|
||||
<td>{$sum['wait_commission']|default='0.00'}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<else/>
|
||||
</empty>
|
||||
|
||||
</div>
|
||||
<div class="page">
|
||||
<if condition="$role_export_check eq true ">
|
||||
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
</if>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</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">
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('MarketPercentage/personMarketStaffSettle')}');
|
||||
$(function(){
|
||||
//搜索功能
|
||||
$("#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();
|
||||
}
|
||||
});
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
$("#admin").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$(this).find('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#admin #i_list_id').on('keyup',function(event) {
|
||||
var val = $.trim($(this).val()).toLowerCase();
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(val);
|
||||
});
|
||||
|
||||
$("#admin #i_list_li").find("a").each(function(){
|
||||
$(this).click(function(){
|
||||
var text = $.trim($(this).text()).toLowerCase();
|
||||
$(this).closest('.drop-down').find("#i_list_id").val(text);
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(text);
|
||||
})
|
||||
});
|
||||
|
||||
//下拉内容框
|
||||
$(".drop-down2").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
/* 状态搜索子菜单 */
|
||||
/*发放提成*/
|
||||
$('.send').click(function(){
|
||||
var time = $(this).attr('data-time');
|
||||
var admin_id = $(this).attr('data-admin_id');
|
||||
|
||||
layer.confirm('是否确认发放提成!', {
|
||||
title:'发放提成?',
|
||||
icon:0,
|
||||
closeBtn:0,
|
||||
btn: ['发放','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('sendBonus')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {pay_time:time,admin_id:admin_id},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg(data.msg);
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
} else {
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$('#time_start').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
})
|
||||
|
||||
$('.send_back').click(function(){
|
||||
var time = $(this).attr('data-time');
|
||||
var admin_id = $(this).attr('data-admin_id');
|
||||
|
||||
layer.confirm('是否确认发放提成!', {
|
||||
title:'发放提成?',
|
||||
icon:0,
|
||||
closeBtn:0,
|
||||
btn: ['发放','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('sendBonus')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {pay_time:time,admin_id:admin_id,all:1},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg(data.msg);
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
} else {
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$('.recaculate').click(function(){
|
||||
var url = $(this).attr('url');
|
||||
layer.confirm('是否确认重算提成!', {
|
||||
title:'重算提成?',
|
||||
icon:0,
|
||||
btn: ['重算','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success:function(data){
|
||||
if(data.status == 1) {
|
||||
layer.msg("重新计算需要时间,请等待5分钟后再查看");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
} else {
|
||||
layer.msg(data.info);
|
||||
}
|
||||
},
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//点击字母按照条件按钮筛选
|
||||
$(".pro_promot_select_list_con").click(function(){
|
||||
//选中高亮样式
|
||||
$(this).addClass('active');
|
||||
$(this).siblings().removeClass('active');
|
||||
|
||||
var that = $(this);
|
||||
var index = $(this).attr("data-index");
|
||||
|
||||
$("#game_list li").each(function(index,ele){
|
||||
var short = $(this).attr('data-short');
|
||||
$(this).show();
|
||||
if(that.attr('data-index')){
|
||||
if(that.attr('data-index')!=short.charAt(0)){
|
||||
$(this).hide();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//打开弹窗
|
||||
$(".ajax-view").click(function(){
|
||||
//获取游戏列表
|
||||
var url = "{:U('Promote/getPromoteGame')}";
|
||||
var id = $(this).attr('data-id');
|
||||
var checked = 'checked';
|
||||
|
||||
|
||||
|
||||
$.post(url,{id:id},function(res){
|
||||
if(res.code==1){
|
||||
|
||||
$(".pro_promot_select_list a").eq(0).addClass('active');
|
||||
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
|
||||
|
||||
var game_list = res.data.game_list;
|
||||
var promote_info = res.data.promote_info;
|
||||
var lis = [];
|
||||
|
||||
$.each(game_list,function(index,ele){
|
||||
if(ele.game_name.length>6){
|
||||
ele.game_name = ele.game_name .substring(0,6)+"..."
|
||||
}
|
||||
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
|
||||
|
||||
|
||||
if(promote_info['game_ids']==''){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
if(promote_info['game_ids'].indexOf(ele.id)>-1){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
$(".jsgamecheckall").attr('checked',false);
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
|
||||
checked = '';
|
||||
}
|
||||
}
|
||||
|
||||
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
|
||||
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
|
||||
lis.push('</li>');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").attr('checked',checked);
|
||||
|
||||
$("#game_list").html(lis.join(''));
|
||||
$(".pro_promot_number").text(res.data.promote_info.account);
|
||||
$("#se_promote_id").val(res.data.promote_info.id);
|
||||
$(".pro_promot").css("display","block");
|
||||
|
||||
jsgameid();
|
||||
|
||||
}else{
|
||||
var tip_msg = res.info ? res.info : '操作失败';
|
||||
layer.msg(tip_msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//保存修改
|
||||
$(".pro_promot_btn_confirm").click(function(){
|
||||
$("#ajaxForm").ajaxSubmit(function(res){
|
||||
layer.msg(res.msg);
|
||||
$(".pro_promot").hide();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//关闭弹窗
|
||||
$(".pro_promot_close").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
});
|
||||
//取消修改
|
||||
$(".pro_promot_btn_cancel").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
layer.msg('修改已取消');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").click(function(){
|
||||
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
|
||||
});
|
||||
|
||||
//可申请游戏 全选及全选反选 功能 @author zwm date 20180604
|
||||
function jsgameid(){
|
||||
$(".jsgameid").click(function(){
|
||||
var option = $(this).closest('ul').find(".jsgameid"),
|
||||
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
|
||||
option.each(function(i){
|
||||
if(!this.checked){
|
||||
checkall.prop("checked", false);
|
||||
return false;
|
||||
}else{
|
||||
checkall.prop("checked", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,479 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
||||
<script src="__STATIC__/jquery.form.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.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;}
|
||||
.layui-layer-dialog .layui-layer-content{color:red}
|
||||
</style>
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">提成数据汇总表</h3>
|
||||
<!-- <p class="description_text">说明:此功是查看并管理推广员的功能</p>-->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
<div class="fl button_list">
|
||||
<div class="tools">
|
||||
<empty name="show_status">
|
||||
<a class="recaculate" url="{:U('reCaculateBonus?pay_time='.$_GET['pay_time'])}"><span class="button_icon button_icon1"></span>重算</a>
|
||||
</empty>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<!-- <div class="input-list input-list-promote search_label_rehab">-->
|
||||
<!-- <select id="pay_time" name="pay_time" class="select_gallery" style="width:150px;">-->
|
||||
<!-- <option value="">请选择月份</option>-->
|
||||
<!-- <volist name=":getMonth()" id="vo">-->
|
||||
<!-- <option value="{$vo}" <if condition="$vo eq $_GET['pay_time']">selected=selected</if>>{$vo}</option>-->
|
||||
<!-- </volist>-->
|
||||
<!-- </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-parent search_label_rehab">
|
||||
<select id="real_name" name="real_name" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择人员</option>
|
||||
<volist name=":getMarketAdmin()" id="vo">
|
||||
<option value="{$vo.real_name}" <if condition="$vo.real_name eq $_GET['real_name']">selected=selected</if>>{$vo.real_name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="nickname" name="nickname" class="select_gallery" style="width:120px;">
|
||||
<option value="">请选择账号</option>
|
||||
<volist name=":getMarketAdmin()" id="vo">
|
||||
<option value="{$vo.nickname}" <if condition="$vo.nickname eq $_GET['nickname']">selected=selected</if>>{$vo.nickname}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="level" name="level" class="select_gallery" style="width:120px;">
|
||||
<option value="" selected="">请选择级别</option>
|
||||
<option value="21" <if condition="$_GET['level'] eq 1">selected</if>>初级</option>
|
||||
<option value="11" <if condition="$_GET['level'] eq 2">selected</if>>中级</option>
|
||||
<option value="12" <if condition="$_GET['level'] eq 2">selected</if>>高级</option>
|
||||
</select>
|
||||
</div>
|
||||
<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('showBonusList','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<empty name="show_status">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>姓名</th>
|
||||
<th>账号</th>
|
||||
<th>级别</th>
|
||||
<th>总流水</th>
|
||||
<th>总提成</th>
|
||||
<th>已发放总提成</th>
|
||||
<th >剩余未发放总提成</th>
|
||||
<th >操作备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<if condition = "empty($list_data)">
|
||||
<tr>
|
||||
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<notemtpy name = "list_data">
|
||||
<volist name="list_data" id="data">
|
||||
<tr>
|
||||
<td>{$data.real_name}</td>
|
||||
<td>{$data.nickname}</td>
|
||||
<td>{$data.level}</td>
|
||||
<td><a href="{:U('FinancePromote/index',array('time_start'=>$start_time,'time_end'=>$end_time,'admin_id'=>$data['admin_id']))}" >{$data.pay_amount}</a></td>
|
||||
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$_REQUEST['time_start'],'time_end'=>$_REQUEST['time_end'],'admin_id'=>$data['admin_id']))}" >{$data.commission}</a></td>
|
||||
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$_REQUEST['time_start'],'time_end'=>$_REQUEST['time_end'],'admin_id'=>$data['admin_id'],'status'=>1))}" >{$data['extend_commission']}</a></td>
|
||||
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$_REQUEST['time_start'],'time_end'=>$_REQUEST['time_end'],'admin_id'=>$data['admin_id'],'status'=>0))}" >{$data['wait_commission']}</a></td>
|
||||
<td>{$data['remark']}</td>
|
||||
</tr>
|
||||
</volist>
|
||||
<td colspan="3">合计</td>
|
||||
<td><a href="{:U('FinancePromote/index',array('time_start'=>$start_time,'time_end'=>$end_time))}" >{$sum['pay_amount']|default="0.00"}</a></td>
|
||||
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$_REQUEST['time_start'],'time_end'=>$_REQUEST['time_end']))}" >{$sum['commission']|default="0.00"}</a></td>
|
||||
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$_REQUEST['time_start'],'time_end'=>$_REQUEST['time_end'],'status'=>1))}" >{$sum['extend_commission']|default='0.00'}</a></td>
|
||||
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$_REQUEST['time_start'],'time_end'=>$_REQUEST['time_end'],'status'=>0))}" >{$sum['wait_commission']|default='0.00'}</a></td>
|
||||
<td></td>
|
||||
</notemtpy>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<else/>
|
||||
</empty>
|
||||
|
||||
</div>
|
||||
<div class="page">
|
||||
<if condition="$role_export_check eq true ">
|
||||
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||
</if>
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
</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>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('MarketPercentage/showBonusList')}');
|
||||
$(function(){
|
||||
//搜索功能
|
||||
$("#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();
|
||||
}
|
||||
});
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
$("#admin").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$(this).find('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#admin #i_list_id').on('keyup',function(event) {
|
||||
var val = $.trim($(this).val()).toLowerCase();
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(val);
|
||||
});
|
||||
|
||||
$("#admin #i_list_li").find("a").each(function(){
|
||||
$(this).click(function(){
|
||||
var text = $.trim($(this).text()).toLowerCase();
|
||||
$(this).closest('.drop-down').find("#i_list_id").val(text);
|
||||
$(this).closest('.drop-down').find('#i_list_idh').val(text);
|
||||
})
|
||||
});
|
||||
|
||||
//下拉内容框
|
||||
$(".drop-down2").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
/* 状态搜索子菜单 */
|
||||
/*渠道删除*/
|
||||
$('.delete').click(function(){
|
||||
var id = $(this).attr('data-id');
|
||||
layer.confirm('渠道删除后,下级渠道同时被删除,所属数据归属于自然渠道!', {
|
||||
title:'确定要删除该渠道?',
|
||||
icon:0,
|
||||
btn: ['删除','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('del_promote')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {id:id},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg(data.msg);
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$('#time_start').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm',
|
||||
language:"zh-CN",
|
||||
// minView:2,
|
||||
weekStart: 1,
|
||||
todayBtn: true,
|
||||
todayHighlight: false,
|
||||
startView: 3,
|
||||
minView: 3,
|
||||
forceParse: 0,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
})
|
||||
|
||||
$('.recaculate').click(function(){
|
||||
var url = $(this).attr('url');
|
||||
layer.confirm('是否确认重算提成!', {
|
||||
title:'重算提成?',
|
||||
icon:0,
|
||||
btn: ['重算','取消'] //按钮
|
||||
}, function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success:function(data){
|
||||
if(data.status == 1) {
|
||||
layer.msg("重新计算需要时间,请等待5分钟后再查看");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
} else {
|
||||
layer.msg(data.info);
|
||||
}
|
||||
},
|
||||
});
|
||||
}, function(){
|
||||
layer.close();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//点击字母按照条件按钮筛选
|
||||
$(".pro_promot_select_list_con").click(function(){
|
||||
//选中高亮样式
|
||||
$(this).addClass('active');
|
||||
$(this).siblings().removeClass('active');
|
||||
|
||||
var that = $(this);
|
||||
var index = $(this).attr("data-index");
|
||||
|
||||
$("#game_list li").each(function(index,ele){
|
||||
var short = $(this).attr('data-short');
|
||||
$(this).show();
|
||||
if(that.attr('data-index')){
|
||||
if(that.attr('data-index')!=short.charAt(0)){
|
||||
$(this).hide();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//打开弹窗
|
||||
$(".ajax-view").click(function(){
|
||||
//获取游戏列表
|
||||
var url = "{:U('Promote/getPromoteGame')}";
|
||||
var id = $(this).attr('data-id');
|
||||
var checked = 'checked';
|
||||
|
||||
|
||||
|
||||
$.post(url,{id:id},function(res){
|
||||
if(res.code==1){
|
||||
|
||||
$(".pro_promot_select_list a").eq(0).addClass('active');
|
||||
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
|
||||
|
||||
var game_list = res.data.game_list;
|
||||
var promote_info = res.data.promote_info;
|
||||
var lis = [];
|
||||
|
||||
$.each(game_list,function(index,ele){
|
||||
if(ele.game_name.length>6){
|
||||
ele.game_name = ele.game_name .substring(0,6)+"..."
|
||||
}
|
||||
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
|
||||
|
||||
|
||||
if(promote_info['game_ids']==''){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
if(promote_info['game_ids'].indexOf(ele.id)>-1){
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||||
}else{
|
||||
$(".jsgamecheckall").attr('checked',false);
|
||||
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
|
||||
checked = '';
|
||||
}
|
||||
}
|
||||
|
||||
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
|
||||
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
|
||||
lis.push('</li>');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").attr('checked',checked);
|
||||
|
||||
$("#game_list").html(lis.join(''));
|
||||
$(".pro_promot_number").text(res.data.promote_info.account);
|
||||
$("#se_promote_id").val(res.data.promote_info.id);
|
||||
$(".pro_promot").css("display","block");
|
||||
|
||||
jsgameid();
|
||||
|
||||
}else{
|
||||
var tip_msg = res.info ? res.info : '操作失败';
|
||||
layer.msg(tip_msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//保存修改
|
||||
$(".pro_promot_btn_confirm").click(function(){
|
||||
$("#ajaxForm").ajaxSubmit(function(res){
|
||||
layer.msg(res.msg);
|
||||
$(".pro_promot").hide();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//关闭弹窗
|
||||
$(".pro_promot_close").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
});
|
||||
//取消修改
|
||||
$(".pro_promot_btn_cancel").click(function(){
|
||||
$(".pro_promot").css("display","none");
|
||||
layer.msg('修改已取消');
|
||||
});
|
||||
|
||||
$(".jsgamecheckall").click(function(){
|
||||
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
|
||||
});
|
||||
|
||||
//可申请游戏 全选及全选反选 功能 @author zwm date 20180604
|
||||
function jsgameid(){
|
||||
$(".jsgameid").click(function(){
|
||||
var option = $(this).closest('ul').find(".jsgameid"),
|
||||
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
|
||||
option.each(function(i){
|
||||
if(!this.checked){
|
||||
checkall.prop("checked", false);
|
||||
return false;
|
||||
}else{
|
||||
checkall.prop("checked", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</block>
|
Loading…
Reference in New Issue