@ -616,8 +616,12 @@
< / tr >
< empty name = "game_ratio[1]" >
< tr class = "bns" >
< td class = "l noticeinfo" > CP流水大于等于 < / td >
< td class = "l noticeinfo" > CP总 流水< / td >
< td class = "r" >
< select name = "instanceof" style = "width: 50px;margin-right: 5px" >
< option value = "1" > ≥< / option >
< option value = "2" > >< / option >
< / select >
< input type = "text" class = "txt table_text_input" name = "game_amount" value = "" placeholder = "" style = "width: 55px" >
< span class = "form_unit" style = "margin: 0 10px" > 分成比例< / span >
< input type = "text" class = "txt table_text_input" name = "game_ratio" value = "" placeholder = "" style = "width: 50px" >
@ -629,8 +633,12 @@
< foreach name = "game_ratio" item = "vo" key = "k" >
< if condition = "$k gt 0" >
< tr class = "bns" >
< td class = "l noticeinfo" > CP流水大于等于 < / td >
< td class = "l noticeinfo" > CP总 流水< / td >
< td class = "r" >
< select name = "instanceof" style = "width: 50px;margin-right: 5px" >
< option value = "1" < if condition = "$vo['instanceof'] eq 1" > selected < / if > >≥< / option >
< option value = "2" < if condition = "$vo['instanceof'] eq 2" > selected < / if > >>< / option >
< / select >
< input type = "text" class = "txt table_text_input" name = "game_amount" value = "{$vo['begin_total_amount']}" placeholder = "" style = "width: 55px" > < span class = "form_unit" style = "margin: 0 10px" > 分成比例< / span >
< input type = "text" class = "txt table_text_input" name = "game_ratio" value = "{$vo['ratio']}" placeholder = "" style = "width: 50px" > < span class = "form_unit" > %< / span >
< if condition = "$k eq 1" >
@ -2238,8 +2246,12 @@
< script >
$(".bnt_add").bind("click",function(){
var a= '< tr class = "bns" data-id = "0" > '+
'< td class = "l noticeinfo" > CP流水大于等于 < / td > ' +
'< td class = "l noticeinfo" > CP总 流水< / td > ' +
'< td class = "r" > '+
'< select name = "instanceof" style = "width: 50px;margin-right: 5px" > '+
'< option value = "1" > ≥< / option > '+
'< option value = "2" > >< / option > '+
'< / select > '+
'< input type = "text" class = "txt table_text_input" name = "game_amount" value = "" placeholder = "" style = "width: 55px" > ' +
'< span class = "form_unit" style = "margin: 0 10px" > 分成比例< / span > '+
'< input type = "text" class = "txt table_text_input" name = "game_ratio" value = "" placeholder = "" style = "width: 50px" > ' +
@ -2254,6 +2266,7 @@
$(document).on('click', '.bnt_remove', function(){
var that = $(this).parents("tr.bns");
var data_id = $(this).attr("data-id");
if(data_id>0){
layer.confirm('你确定要删除本档分成比例吗?', {icon: 3, title:'提示'}, function(index){
layer.close(index);
$.ajax({
@ -2284,8 +2297,16 @@
}
});
});
}else{
$(that).remove();
}
});
$(document).on('input propertychange', 'select[name=instanceof]', function(){
var that = $(this).parents("tr.bns");
$(that).find("button[class=bnt_save]").css("display","")
})
$(document).on('input propertychange', 'input[name=game_ratio]', function(){
var that = $(this).parents("tr.bns");
$(that).find("button[class=bnt_save]").css("display","")
@ -2310,6 +2331,7 @@
var that = $(this).parents("tr.bns");
var total_amount = $(that).find("input[name=game_amount]").val();
var game_ratio = $(that).find("input[name=game_ratio]").val();
var instanceofs = $(that).find("select[name=instanceof]").val();
$.ajax({
//请求方式
type : "POST",
@ -2320,7 +2342,8 @@
data_id :data_id,
total_amount:total_amount,
game_ratio:game_ratio,
game_id:'{$game_id}'
game_id:'{$game_id}',
instanceof:instanceofs
},
//请求成功
success : function(result) {