父级菜单不能是自己
parent
2b72ce095f
commit
c71f832aaa
|
|
@ -89,10 +89,10 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
initParentMenuSelect();
|
initParentMenuSelect();
|
||||||
|
var id = getUrlParam("id");
|
||||||
initData();
|
initData();
|
||||||
|
|
||||||
function initData(){
|
function initData(){
|
||||||
var id = getUrlParam("id");
|
|
||||||
if(id != ""){
|
if(id != ""){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'get',
|
type : 'get',
|
||||||
|
|
@ -131,6 +131,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
|
if($("#parentId").val() == id){
|
||||||
|
layer.msg("父级菜单不能是自己");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#form').bootstrapValidator();
|
$('#form').bootstrapValidator();
|
||||||
var bootstrapValidator = $("#form").data('bootstrapValidator');
|
var bootstrapValidator = $("#form").data('bootstrapValidator');
|
||||||
bootstrapValidator.validate();
|
bootstrapValidator.validate();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue