<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>kpi模板</title>
|
|
[#include "/business/pages/include/static.html" /]
|
<style type="text/css">
|
html{_overflow-y:scroll}
|
</style>
|
<script type="text/javascript">
|
$(document).ready(function() {
|
$.formValidator.initConfig({formID:"myform",onError:function(msg){alert(msg)},onSuccess:function(){
|
document.getElementById("myform").target = window.top.openDialog("1","操作",
|
{},
|
{"width":40,"height":40,"noclose":true},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
|
return true;
|
}});
|
$("#template_name").formValidator({empty:false,onShow:"模板名称不能为空!",onFocus:"模板名称不能为空!"}).inputValidator({min:1,max:32,onError:"模板名称为1到32个字符!"});
|
$("#version").formValidator({empty:false,onShow:"唯一的版本号",onFocus:"唯一的版本号"}).inputValidator({min:1,max:20,onCorrect:"123",onError:"输入唯一的版本号"})
|
.ajaxValidator({
|
dataType : "html",
|
async : true,
|
url : "checkkpiVersion.html",
|
data :{"type":function(){return $("#template_type").val();},"version":function(){return $("#version").val();},"id":'${map.ID}'},
|
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 : "正在对版本号进行合法性校验,请稍候..."
|
});
|
|
});
|
</script>
|
</head>
|
<body>
|
<div class="pad_10" style="margin-top: 10px;">
|
<div class="col-tab">
|
<div id="div_setting_1" class="contentList pad_10">
|
<form action="" method="post" id="myform" name="myform" enctype="multipart/form-data">
|
<table align="center" width="98%" class="edit_layout2">
|
<tr>
|
<th width="20%" align="right"><label class="required" >模板名称:</label></th>
|
<td>
|
<input type="text" class="general" value="${map.TEMPLATE_NAME}" name="template_name" id="template_name" />
|
<div id="template_nameTip" style="display:inline-block;width: 200px;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th width="20%" align="right"><label class="required" >版本号:</label></th>
|
<td>
|
<input type="text" class="general" value="${map.VERSION}" name="version" id="version" />
|
<div id="versionTip" style="display:inline-block;width: 250px;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th width="20%" align="right">备注:</th>
|
<td>
|
<textarea id="note" name="note" style="width:400px;" class="general">${map.NOTE}</textarea>
|
|
</td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
</div>
|
</div>
|
</body>
|
<script type="text/javascript">
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("#myform").submit();
|
}
|
}
|
</script>
|
</html>
|