不能删除ASN 组中的最后一个ASN IP,做了前台Ajax验证

This commit is contained in:
wangxin
2018-09-03 13:02:24 +08:00
parent ff449143e6
commit ba295706f3
7 changed files with 63 additions and 9 deletions

View File

@@ -49,13 +49,35 @@ function del(url){
if(validateAllNoAudit(checkboxes)){
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
return;
}else{
doAll(checkboxes,url);
}else{
var serviceGroupIds=[],canDel=true;
$(checkboxes).filter(":checked").each(function(){
if($(this).attr("serviceGroupId")){
serviceGroupIds.push($(this).attr("serviceGroupId"));
}
}else{
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
return;
})
if(serviceGroupIds.length>0){
$.ajax({
type:'post',
url:'${ctx}/basics/asn/ajaxIsLast',
data:{"serviceGroupIds":serviceGroupIds.join(',')},
async:false,
success:function(data,textStatus){//处理返回结果
if(data){
top.$.jBox.tip('<spring:message code="last_ip_in_asn_group"/>');
canDel=false;
}
}
});
}
if(canDel){
doAll(checkboxes,url);
}
}
}else{
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
return;
}
}
//修改配置
function update(url){