<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>添加${Constants.UNIT_CONSTANTS}</title>
|
|
|
</head>
|
<body class="edit_txt_body">
|
[#include "/business/pages/include/static.html" /]
|
<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;
|
}});
|
|
|
$("#customer_name").formValidator({empty:false,onShow:"请输入单位名称!",onFocus: "单位名称不能为空"}).inputValidator({min:1,max:40,onError:"单位名称为1到20个汉字"});
|
$("#contact").formValidator({empty: false, onShow:"请输入联系人!",onFocus: "联系人不能为空"}).inputValidator({min: 1,max:40,onError: "联系人为1到20个汉字"});
|
$("#phone").formValidator({empty:false,onShow:"请输入联系方式!",onFocus:"联系方式不能为空!"}).functionValidator({fun:checkPhone});
|
})
|
|
function checkPhone(value) {
|
if($.util.isEmpty(value)) {
|
return "联系方式不能为空";
|
}
|
if(!$.util.isMobile(value) && !$.util.isTelphone(value)) {
|
return "联系方式格式不正确";
|
}
|
return true;
|
}
|
</script>
|
|
<div class="edit_txt">
|
<form id="myform" action="" method="post">
|
<table class="edit_layout" >
|
<tr><th><label class="required">单位名称:</label></th>
|
<td><input class="general" type="text" name="customer_name" id="customer_name" value="${cus.CUSTOMER_NAME}"/>
|
<div id="customer_nameTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
<tr><th><label class="required">联系人:</label></th>
|
<td><input class="general" type="text" name="contact" id="contact" value="${cus.CONTACT}"/>
|
<div id="contactTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
|
<tr><th><label class="required">联系方式:</label></th>
|
<td><input class="general" type="text" name="phone" id="phone" value="${cus.PHONE}"/>
|
<div id="phoneTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
|
<tr><th><label>备注:</label></th>
|
<td><textarea id="note" class="general" name="note">${cus.NOTE}</textarea></td>
|
</tr>
|
|
</table>
|
</form>
|
</div>
|
|
|
|
<script type="text/javascript">
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("#myform").submit();
|
}
|
}
|
</script>
|
|
</body>
|
</html>
|