1.修订业务辅助表-业务字典 业务辅助表=-系统字典管理平台
2.新增修改页面添加校验
①校验必填项
②校验itemCode是否重复
③校验父级与添加或修改配置的数据类型是否一致
④校验修改配置的数据类型类型与其下级数据类型是否一致
⑤无上级时、有下级时不得选为叶子节点
3.待解决项:
①点击操作弹出项样式
②校验程序偶有存在报出提示但无法阻止提交 情况
This commit is contained in:
@@ -1,34 +1,2 @@
|
||||
$(document).ready(function() {
|
||||
jQuery.validator.addMethod("codeNumber",function(value,element){
|
||||
return value>=0&value<=20000000},"请填写正确的数值");
|
||||
$("#name").focus();
|
||||
$("#searchForm").validate({
|
||||
//需验证 item_code item_value
|
||||
rules: {
|
||||
'itemCode':{
|
||||
digits:true,
|
||||
codeNumber:true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
'itemCode':{
|
||||
digits:'请填写整数值',
|
||||
codeNumber:'请填写合适的数值(0~200000000)'
|
||||
}
|
||||
},
|
||||
|
||||
submitHandler: function(form){
|
||||
loading('正在处理,请稍等...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
errorPlacement: function(error, element) {
|
||||
$("#messageBox").text("输入有误,请先更正。");
|
||||
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
||||
error.appendTo(element.parent().parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user