<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>增加/修改DSL分类</title>
|
|
[#include "/business/pages/include/static.html" /]
|
</head>
|
<body class="edit_txt_body">
|
|
<script type="text/javascript">
|
$(function() {
|
$.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
|
if(!window.top.openConfirm("确定要提交吗?")) return false;
|
document.getElementById("myform").target = window.top.openDialog("tip","操作",
|
{},
|
{"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
|
return true;
|
}});
|
|
|
$("#category_name").formValidator({empty:false,onShow:"请填写分类名称",onFocus:"分类名称不能为空!"})
|
.inputValidator({min:1,max:50,onError:"分类名称长度不能超过50个字符!"})
|
.ajaxValidator({
|
dataType : "html",
|
async : true,
|
data:"id=${info.ID}",
|
url : "checkCategoryName.html?pId=${RequestParameters.pId}",
|
success : function(data){
|
if( data == 1 ) return true;
|
if( data == 0 ) return false;
|
return false;
|
},
|
buttons: $("#dosubmit"),
|
error: function(jqXHR, textStatus, errorThrown){alert("服务器没有返回数据,可能服务器忙,请重试"+errorThrown);},
|
onError : "该分类名称已存在,请更换",
|
onWait : "正在对分类名称进行校验,请稍候..."
|
});
|
var cateId = '${info.ID}';
|
if($.util.isEmpty(cateId)){
|
$("#cate_code").formValidator({empty:false,onShow:"请输入分类编码!",onFocus:"分类编码不能为空!"})
|
.inputValidator({min:2,max:5,onError:"分类编码必须为2-5个字母!"})
|
.regexValidator({
|
regExp : "letter_u",
|
dataType : "enum",
|
onError : "分类编码格式必须为大写字母"
|
}).ajaxValidator({
|
dataType : "html",
|
async : true,
|
data:"id=${info.ID}",
|
url : "checkCodeName.html?pId=${RequestParameters.pId}",
|
success : function(data){
|
if( data == 1 ) return true;
|
if( data == 0 ) return false;
|
return false;
|
},
|
buttons: $("#dosubmit"),
|
error: function(jqXHR, textStatus, errorThrown){alert("服务器没有返回数据,可能服务器忙,请重试"+errorThrown);},
|
onError : "该分类编码已存在,请更换",
|
onWait : "正在对分类编码进行校验,请稍候..."
|
});
|
}
|
|
|
$("#order_num").formValidator({empty:false,onFocus:"请输入顺序号"}).inputValidator({min:1,max:5,onError:"顺序号必须为1到5位正整数数字"})
|
.regexValidator({regExp:"intege1", dataType:"enum", onError:"顺序号必须为1到5位正整数数字"});
|
|
})
|
</script>
|
|
<div class="edit_txt">
|
<form action="" method="post" id="myform" name="myform" enctype="multipart/form-data">
|
<input type="hidden" name="level" value="${info.LEVEL}"/>
|
<input type="hidden" name="pId" id="pId" value="${RequestParameters.pId}"/>
|
<table class="edit_layout" width="99%">
|
<tr><th ><label class="required" >分类名称:</label></th>
|
<td><input class="general" type="text" value="${info.CATEGORY_NAME}" name="category_name" id="category_name"/>
|
<div id="category_nameTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr><th ><label class="required" >分类编码:</label></th>
|
<td><input class="general" type="text" [#if info.ID??] disabled="disabled" [/#if]type="text" value="${info.CATE_CODE}" name="cate_code" id="cate_code"/>
|
<div id="cate_codeTip" style="display:inline-block;width:200px;"></div>
|
</td>
|
</tr>
|
<tr><th ><label class="required" >显示顺序:</label></th>
|
<td><input class="general" type="text" value="${info.ORDER_NUM}" name="order_num" id="order_num"/>
|
<div id="order_numTip" style="display:inline-block;width:200px;"></div>
|
</td>
|
</tr>
|
|
<tr><th><label >分类说明:</label></th>
|
<td ><textarea class="general" style="width:360px;" name="note" id="note"/>${info.note}</textarea>
|
</td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
|
|
|
<script type="text/javascript">
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("#myform").submit();
|
}
|
}
|
|
</script>
|
|
|
</body>
|
</html>
|