@ -1,14 +1,43 @@
< extend name = "Public/base" / >
< extend name = "Public/base" / >
< block name = "css" >
< link rel = "stylesheet" type = "text/css" href = "__CSS__/admin_table.css" media = "all" >
< link rel = "stylesheet" type = "text/css" href = "__STATIC__/webuploader/webuploader.css" media = "all" >
< style >
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
.bnt_add,.bnt_remove,.bnt_save{
height: 30px;
width: 20px;
font-size: 20px;
line-height: 10px;
color: #3399ff;
background: none;
border: none;
margin-left: 20px;
cursor: pointer;
}
.bnt_remove{
color: #F70909;
}
.bnt_save{
color: #4DB361;
}
< / style >
< / block >
<!-- 管理员用户组新增和编辑页面 -->
<!-- 管理员用户组新增和编辑页面 -->
< block name = "body" >
< block name = "body" >
< form action = "{:U('Member/save_device_bans')}" enctype = "application/x-www-form-urlencoded" method = "POST"
< script src = "__STATIC__/layer/layer.js" type = "text/javascript" > < / script >
< script src = "__STATIC__/layer/extend/layer.ext.js" type = "text/javascript" > < / script >
< script type = "text/javascript" src = "__STATIC__/uploadify/jquery.uploadify.min.js" > < / script >
< form action = "{:U('Game/devide_warn_edit')}" enctype = "application/x-www-form-urlencoded" method = "POST"
class="form-horizontal form_info_ml">
class="form-horizontal form_info_ml">
< div class = "formtitle" > < span > 预警编辑< / span > < / div >
< div class = "formtitle" > < span > 预警编辑< / span > < / div >
< ul class = "form_info " >
< ul class = "form_info " >
< input type = "hidden" name = "id" value = "{$auth_group.id}" / >
< input type = "hidden" name = "id" value = "{$ w arnInf o.id}" / >
< li >
< li >
< label > 预警对象< / label >
< label > 预警对象< / label >
< select id = "type" name = "type" class = "select_gallery" >
< select id = " partner_id" name = "partner_id " class = "select_gallery" >
<?php foreach ($partners as $p):?>
<?php foreach ($partners as $p):?>
< option value = "{$p['id']}" > {$p.partner}< / option >
< option value = "{$p['id']}" > {$p.partner}< / option >
<?php endforeach;?>
<?php endforeach;?>
@ -23,15 +52,32 @@
< input name = "warming_amount" type = "text" class = "txt" placeholder = "预警金额" value = "{$warnInfo.warming_amount}" / >
< input name = "warming_amount" type = "text" class = "txt" placeholder = "预警金额" value = "{$warnInfo.warming_amount}" / >
< / li >
< / li >
< li >
< li >
< label > 预警金额频率< / label >
< input name = "warn_frequency" type = "text" class = "txt" placeholder = "当达到预警值时,每扣除多少流水短信提醒一次" value = "{$warnInfo.warn_frequency}" / >
< / li >
<?php if ($warnInfo['phones']):?>
<?php foreach ($warnInfo['phones'] as $k => $phone):?>
<?php if ($k == 0):?>
< li class = "warn-phone" >
< label > 手机号< / label >
< input type = "text" class = "txt table_text_input" name = "phones[]" value = "{$phone}" placeholder = "" >
< button type = "button" class = "bnt_add" > ✚< / button >
< / li >
<?php else:?>
< li class = "warn-phone" >
< label > 通知手机号< / label >
< label > 通知手机号< / label >
< td class = "r" >
< input type = "text" class = "txt table_text_input" name = "phones[]" value = "{$phone}" placeholder = "" >
< input type = "text" class = "txt table_text_input" name = "game_amount" value = "10000.00" placeholder = "" style = "width: 55px" > < span class = "form_unit" style = "margin: 0 10px" > 分成比例< / span >
< button type = "button" class = "bnt_remove" > ✖< / button >
< input type = "text" class = "txt table_text_input" name = "game_ratio" value = "10.00" placeholder = "" style = "width: 50px" > < span class = "form_unit" > %< / span >
< / li >
< button type = "button" class = "bnt_add" > ✚< / button >
<?php endif;?>
< button type = "button" class = "bnt_remove" data-id = "24" > ✖< / button >
<?php endforeach;?>
< button type = "button" class = "bnt_save" data-id = "24" data-type = "ladder" style = "display: none" > ✔< / button >
<?php else:?>
< / td >
< li class = "warn-phone" >
< label > 手机号< / label >
< input type = "text" class = "txt table_text_input" name = "phones[]" value = "" placeholder = "" >
< button type = "button" class = "bnt_add" > ✚< / button >
< / li >
< / li >
<?php endif;?>
< li >
< li >
< label > < / label > < input type = "submit" id = "submit" value = "确认保存" target-form = "form-horizontal" class = "form_btn ajax-post" >
< label > < / label > < input type = "submit" id = "submit" value = "确认保存" target-form = "form-horizontal" class = "form_btn ajax-post" >
< / li >
< / li >
@ -51,5 +97,12 @@
< block name = "script" >
< block name = "script" >
< script type = "text/javascript" >
< script type = "text/javascript" >
highlight_subnav('{:U('Game/devide_warn_edit')}');
highlight_subnav('{:U('Game/devide_warn_edit')}');
$(".bnt_add").bind("click",function(){
var a= '< li class = "warn-phone" > < label > 手机号< / label > < input type = "text" class = "txt table_text_input" name = "phones[]" value = "" placeholder = "" > < button type = "button" class = "bnt_remove" > ✖< / button > < / li > ';
$(".warn-phone:last").after(a);
});
$(document).on('click', '.bnt_remove', function(){
$(this).parents('li').remove();
});
< / script >
< / script >
< / block >
< / block >