<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>新增加盟商数据字典</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(){
|
document.getElementById("myform").target = window.top.openDialog("1","操作",
|
{},
|
{"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
|
return true;
|
}});
|
|
|
$("#datakey").formValidator({empty:false,onFocus:"请输入数据标识,不能重复"}).inputValidator({min:2,max:20,onError:"数据标识长度为2-20个字符"})
|
.regexValidator({regExp:"username",dataType:"enum",onError:"数据标识只能是字母或数字"})
|
.ajaxValidator({
|
dataType : "html",
|
async : true,
|
url : "sjzdExists.html",
|
data:{"cateId":'${cateId}',"val":function(){return document.getElementById("datakey").value;}},
|
success : function(data){
|
if( data == 0 ) return true;
|
if( data == 1 ) return false;
|
return false;
|
},
|
buttons: $("#dosubmit"),
|
error: function(jqXHR, textStatus, errorThrown){alert("服务器没有返回数据,可能服务器忙,请重试"+errorThrown);},
|
onError : "标识已存在,请更换",
|
onWait : "正在校验,请稍候..."
|
});
|
$("#datavalue").formValidator({empty:false,onFocus:"请输入数据值"}).inputValidator({min:2,max:50,onError:"数据值为2-50个字符或1-25个汉字"});
|
$("#ordernum").formValidator({empty:false,onFocus:"请输入顺序号"}).inputValidator({min:1,max:5,onError:"顺序号必须为1到5位"})
|
.regexValidator({regExp:"intege1", dataType:"enum", onError:"顺序号必须为正整数"});
|
|
})
|
</script>
|
|
<div class="edit_txt">
|
<form action="" method="post" id="myform" name="myform" >
|
<input type="hidden" name="cateId" value="${cateId}" />
|
<table class="edit_layout" width="99%">
|
<tr><th ><label class="required" >数据标识:</label></th>
|
<td><input class="general" type="text" name="datakey" id="datakey"/>
|
<div id="datakeyTip" style="display:inline-block;width:180px;"></div>
|
</td>
|
</tr>
|
<tr><th><label class="required">数据值:</label></th>
|
<td ><input class="general" type="text" name="datavalue" id="datavalue"/>
|
<div id="datavalueTip" style="display:inline-block;width:240px;"></div>
|
</td>
|
</tr>
|
|
|
<tr><th><label class="required">顺序号:</label></th>
|
<td ><input class="general" type="text" name="ordernum" id="ordernum" />
|
<div id="ordernumTip" style="display:inline-block;width:180px;"></div>
|
</td>
|
</tr>
|
|
|
<tr><th><label >说明:</label></th>
|
<td ><textarea class="general" style="width:360px;" id="beiz" name="beiz" /></textarea>
|
</td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
|
|
|
<script type="text/javascript">
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("#myform").submit();
|
}
|
}
|
|
</script>
|
|
|
</body>
|
</html>
|