融合代码 提交本地
This commit is contained in:
@@ -43,8 +43,8 @@
|
||||
return true;
|
||||
}
|
||||
// 正常打开
|
||||
top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}", "选择${title}", 320, 420, {
|
||||
ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"<spring:message code='ok'/>":"ok", ${allowClear?"\"<spring:message code='clear'/>\":\"clear\", ":""}"<spring:message code='close'/>":true}, submit:function(v, h, f){
|
||||
top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}", "<spring:message code='choose'/>${title}", 320, 420, {
|
||||
ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"ok":"ok", ${allowClear?"\"clear\":\"clear\", ":""}"close":true}, submit:function(v, h, f){
|
||||
if (v=="ok"){
|
||||
var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
|
||||
var ids = [], names = [], nodes = [];
|
||||
|
||||
@@ -23,18 +23,36 @@
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
errorShow();
|
||||
|
||||
}
|
||||
function errorShow(){
|
||||
var flaelNoSure = false;
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/basics/serviceDictInfo/isLevelTotalSure',
|
||||
data:{parentId:$(".singleClass").val(),currentId:'${serviceDictInfo.serviceDictId}'},
|
||||
success:function(data){
|
||||
if(data){
|
||||
$(".errorShow").hide();
|
||||
}else{
|
||||
$(".errorShow").show();
|
||||
}
|
||||
flaelNoSure = data;
|
||||
}
|
||||
});
|
||||
return flaelNoSure;
|
||||
}
|
||||
$(document).ready(function() {
|
||||
$("#serviceDictInfoId").on('onchange',errorShow);
|
||||
|
||||
//层级校验
|
||||
jQuery.validator.addMethod("isLevelNoSure",function(value,element){
|
||||
//层级校验
|
||||
/* jQuery.validator.addMethod("isLevelNoSure",function(value,element){
|
||||
var flagIsLevelNoSure = false;
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
cache:false,
|
||||
url:'${ctx}/basics/serviceDictInfo/isLevelTotalSure',
|
||||
data:{parentId:$(".singleClass").val(),currentId:'${serviceDictInfo.serviceDictId}'},
|
||||
success:function(data){
|
||||
@@ -43,7 +61,7 @@
|
||||
});
|
||||
return flagIsLevelNoSure;
|
||||
|
||||
},"选择此配置上下层级数将超过最大层级");
|
||||
},"选择此配置上下层级数将超过最大层级"); */
|
||||
|
||||
//类型选择与上级是否冲突
|
||||
jQuery.validator.addMethod("typeSame",function(value,element){
|
||||
@@ -109,9 +127,9 @@
|
||||
//ignore:[],
|
||||
//需验证 item_code item_value
|
||||
rules: {
|
||||
'parent.itemValue':{
|
||||
/* 'parent.itemValue':{
|
||||
isLevelNoSure:true
|
||||
},
|
||||
}, */
|
||||
|
||||
'itemCode':{
|
||||
//isLevelNoSure:true,
|
||||
@@ -132,9 +150,9 @@
|
||||
|
||||
},
|
||||
messages: {
|
||||
'parent.itemValue':{
|
||||
/* 'parent.itemValue':{
|
||||
isLevelNoSure:'<spring:message code="isLevelNoSure"/>'
|
||||
},
|
||||
}, */
|
||||
'itemCode':{
|
||||
//isLevelNoSure:"选择此配置上下层级数将超过四级",
|
||||
required:'<spring:message code="required"/>',
|
||||
@@ -154,6 +172,11 @@
|
||||
},
|
||||
|
||||
submitHandler: function(form){
|
||||
var is_level_wrong=errorShow();
|
||||
if(!is_level_wrong){
|
||||
return false;
|
||||
$(".errorShow").show();
|
||||
}
|
||||
loading('<spring:message code="submitting"/>');
|
||||
form.submit();
|
||||
},
|
||||
@@ -215,6 +238,7 @@
|
||||
<c:set var="fatherName"><spring:message code="root_node"/></c:set>
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue eq 'root_node'?fatherName:fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}"
|
||||
title="菜单" url="/basics/serviceDictInfo/treeData?itType=${itType}" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||
<label class="error errorShow" style="display: none;"><spring:message code="isLevelNoSure"/></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
Reference in New Issue
Block a user