@ -70,7 +70,7 @@
< / div >
< div class = "input-list input-list-game search_label_rehab" >
< select id = "relation_game_id" name = "relation_game_id" class = "select_gallery" >
< option value = "" > 游戏名称 < / option >
< option value = "" > 现包名 < / option >
< volist name = "gameList" id = "vo" >
< option value = "{$vo.relation_game_id}" < if condition = "$vo.relation_game_id eq I('relation_game_id')" > selected< / if > >{$vo.relation_game_name}< / option >
< / volist >
@ -102,19 +102,12 @@
< input class = "check-all" type = "checkbox" >
< / th >
< th > 游戏类型< / th >
< th > 现包名< / th >
< th > 原包名< / th >
< th > 公司类型< / th >
< th > 比例分成< / th >
< th > 时间< / th >
< th > 操作人< / th >
< th > 操作< / th >
< / tr >
< / thead >
@ -138,22 +131,17 @@
< td > {$data.game_type_name}< / td >
< td > {$data.relation_game_name}< / td >
< td > {$data.original_package_name}< / td >
< td > 下游{$data.company_belong}< / td >
< td > {$data.company_belong}< / td >
< td style = "line-height: 16px;text-indent: 0;" >
< div style = "text-align: left;width: 90%;margin-left: 5%;margin-top: 10px;margin-bottom: 10px;" >
{$data.turnover_ratio_str}
< / div >
< / td >
< td > {$data.create_time}< / td >
< td > {$data.admin_name}< / td >
< td >
< a href = "{:U('edit', array('id'=>$data['id']))}" class = "" > 修改< / a >
< a href = "{:U('del', array('id'=>$data['id']))}" class = " "> 删除< / a >
< a data-url = "{:U('del', array('id'=>$data['id']))}" class = " ratio_del "> 删除< / a >
< / td >
< / tr >
< / volist >
@ -218,124 +206,28 @@ $(function(){
$("#search").click();
}
});
})
function refuse() {
if ($('.ids[type=checkbox]:checked').length > 0) {
layer.open({
type: 1,
title: '审核拒绝',
shadeClose: true,
shade: 0.8,
area: ['387px', '500px'],
content: $('.promote-layer')
});
$('#deny').addClass('promote-show');
$('#remark').addClass('ids');
} else {
updateAlert('请选择需要操作的数据','tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
}
}
< / 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');
$.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{
lis.push('< input type = "checkbox" value = "'+ele.id+'" name = "game_ids[]" class = "fl pro_promot_game_check jsgameid" id = "gameCheck'+index+'" / > ');
}
}
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 > ');
$(".ratio_del").on("click",function(){
var url = $(this).data("url");
layer.confirm('删除后将无法恢复,请慎重选择', {
btn: ['取消','删除'] //按钮
}, function(index){
layer.close(index);
}, function(){
$.get(url,function(data){
if(data.code == 1){
layer.msg('< span style = "color:white" > '+data.msg+'< span > ',{time: 1000},function(){
window.location.reload();
});
$("#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{
alert('请求失败' );
layer.msg(data.msg,{icon: 2});
}
});
});
})
})
//保存修改
$(".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);
});
$(".export-btn").on("click",function(e){
e.preventDefault();
window.location.href=$(this).attr("href")
})
< / script >
< / block >