修改公共组管理删除校验

This commit is contained in:
zhangwenqing
2019-06-05 18:33:30 +08:00
parent 94e764f97e
commit d0499163b3
4 changed files with 8 additions and 65 deletions

View File

@@ -34,11 +34,16 @@
var checkboxes = $("tbody tr td input.i-checks:checkbox");
var ids = "";
var str = "";
var canDel = true;
checkboxes.each(function(){
if(true == $(this).is(':checked')){
str += $(this).attr("id")+"_"+$(this).attr("groupType")+",";
ids += $(this).attr("id")+",";
if($(this).attr("udFlag") != 0){ // 存在被引用的分组
canDel = false;
return false;
}
}
});
@@ -51,21 +56,7 @@
}
if(str.length >0){
// 删除时 校验分组是否已被引用,未引用可删除
var canDel = true;
var tip='<spring:message code="can_not_delete_issued_group"/>';
$.ajax({
type:'post',
url:'${ctx}/basics/commonGroup/ajaxCheckGroupUse',
data:{"groupIds":str},
async:false,
success:function(data,textStatus){
if(data){
canDel=false;
}
}
});
if(canDel){
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
if(v=="ok"){
@@ -231,7 +222,7 @@
<tbody>
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
<tr>
<td><input type="checkbox" class="i-checks" id="${cfg.groupId}" groupType="${cfg.groupType}" serviceGroupId="${cfg.serviceGroupId}"></td>
<td><input type="checkbox" class="i-checks" id="${cfg.groupId}" groupType="${cfg.groupType}" serviceGroupId="${cfg.serviceGroupId}" udFlag="${cfg.udFlag }"></td>
<td>
<a href="javascript:;" data-original-title="${cfg.groupName}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">