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.

428 lines
17 KiB
HTML

<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;}
.butnbox {padding:10px 0 10px;}
.butnbox .butnlist {overflow:hidden;clear:both;}
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
.butnbox .butnlist .butn.last {background:#009900;}
.butnbox .butnlist .butn~.butn {margin-left:20px;}
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
.layui-layer-title {
text-align: center;
height: 80px;
line-height: 80px;
font-weight: 600;
font-size: 18px;
}
.data_list table td{
line-height: 2;
}
.layui-layer-title {
text-align: center;
height: 42px;
line-height: 42px;
font-weight: 400;
font-size: 14px;
}
.main-place .question_content:before{
right: 20px;
left: auto;
}
.tooltip {
position: relative;
display: inline-block;
color: #056dae;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250%;
background-color: #fff;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 80%;
left: 0;
margin-left: -70%;
border: #000 solid 1px;
}
.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: #000;
visibility: visible;
line-height: 20px;
}
</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="jssearch fl cf search_list">
<div class="fl button_list">
<div class="tools">
<if condition="$caculate_check eq true">
<empty name="show_status">
<a class="recaculate" url="{:U('reCaculate?pay_time='.$_GET['pay_time'])}" style="width: 60px;text-align: center;padding-right: 0;margin-right: 0;">重算</a>
</empty>
</if>
</div>
</div>
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<input type="text" readonly id="time" name="time" class="" value="{:I('time')}" placeholder="时间" />
</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=":get_game_list(null, $_GET['game_type'])" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist> -->
</select>
</div>
<div class="input-list">
<input type="text" id="game_belong_name" name="game_belong_name" class="" value="{:I('game_belong_name')}" placeholder="请输入奖金归属人" />
</div>
<div class="input-list">
<select id="verify_status" name="verify_status" class="select_gallery" >
<option value="">请选择审核状态</option>
<option value="0">未审核</option>
<option value="1">审核通过</option>
<option value="2">审核拒绝</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('businessAffairsList','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
</div>
</div>
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<if condition="$verify_check eq true">
<a class='butn verify' data-status="1" style='background-color: #3C95C8;'>审核通过</a>
<a class='butn verify' data-status="0" style='background-color: red;'>审核拒绝</a>
</if>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<empty name="show_status">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></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)">
<tr>
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "list">
<volist name="list" id="data">
<tr>
<td><input class="ids" type="checkbox" value="{$data['id']} "data-verify_status="{$data['verify_status']}" name="ids[]"></td>
<td>{$data.time|default='无'}</td>
<td>{$data.game_belong_name|default='无'}</td>
<td>{$data.relation_game_name|default='无'}</td>
<td>{$data.pay_amount|default='0'}</td>
<td>{$data.game_bonus_pool|default='0'}</td>
<td>{$data.month_award|default='0'}</td>
<td>{$data.game_assistant_name|default='无'}</td>
<td>{$data.assistant_month_award|default='0'}</td>
<td>{$data.department_award|default='0'}</td>
<td>{$data.person_award|default='0'}</td>
<td>{$data.verify_detail|default='无'}</td>
</tr>
</volist>
<tr>
<td colspan="16" class="text-center">奖金池总额:{$gameBonusPool}</td>
</tr>
</notemtpy>
</tbody>
</table>
</div>
<else/>
</empty>
</div>
<div class="page">
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
{$_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('BusinessAffairsAward/businessAffairsList')}');
function reload(){
location.reload();
}
$(function(){
$('.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();
});
});
$(".verify").on("click",function(){
var status = $(this).data("status");
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
if($(elem).data("verify_status") == 0){
return $(elem).val();
}
}).get();
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请勾选数据,在进行操作</font>');
return;
}
text = text.join(",");
layer.confirm('【警告】[审核操作]将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(index){
layer.close(index);
_doAgreeApply();
});
function _doAgreeApply(){
//执行
layer.load(2);
$.ajax({
type: "POST",
url: "{:U('verify')}",
dataType: 'json',
async: true,
data: {ids:text,status:status},
success:function(data){
layer.closeAll('loading');
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
}
});
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
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;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
$('#time').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 game_name = "{:I('game_name')}";
function getGameList() {
$.ajax({
url:"{:U('Ajax/getGameList')}",
type:"get",
data:{sdk_type:$("#sdk_version1 option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">游戏名称</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
// });
data = response.data;
for (var i in data){
str += "<option value='"+data[i].relation_game_name+"' "+(game_name && data[i].relation_game_name == game_name?'selected':'')+">"+data[i].relation_game_name+"</option>"
}
$("#game_name").empty();
$("#game_name").append(str);
$("#game_name").select2();
$("#game_name").change();
}
})
}
getGameList();
})
</script>
</block>