<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>修改${Constants.CUSTOMER_CONSTANTS}联系人</title>
|
|
|
</head>
|
<body class="end_task_body widthauto">
|
[#include "/business/pages/include/static.html" /]
|
[#include "/component/newsel.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;
|
}});
|
|
|
$("#contractsName").formValidator({empty:false,onShow:"请输入联系人名称!"}).inputValidator({min:2,max:100,onError:"联系人名称2-200个字符或1-50个汉字"});
|
$("#login_name").formValidator({empty:false,onShow:"请填写登录名称!",onFocus:"登录名长度为6~20位"}).inputValidator({min:6,max:20,onError:"登录名长度至少为6~20位"})
|
.regexValidator({regExp:"username",dataType:"enum",onError:"登录名只能由字母或数字组成"})
|
.ajaxValidator({
|
dataType : "html",
|
async : true,
|
url : "checkLogin_name.html",
|
data :{"login_name":$.util.encode($("#login_name").val())},
|
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 : "请稍候..."
|
});
|
$("#email").formValidator({empty:true,onShow:"请输入邮箱",onFocus:"请输入邮箱"})
|
.regexValidator({regExp:"email",dataType:"enum",onError:"你输入的邮箱格式不正确"})
|
.ajaxValidator({
|
dataType : "html",
|
async : true,
|
url : "checkEmail.html?id=${RequestParameters.id}",
|
data :{"email":$.util.encode($("#email").val())},
|
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 : "请稍候..."
|
});
|
$("#contacts_type").formValidator({empty:false,onShow:"请输入联系方式!"}).inputValidator({min:1,max:200,onError:"联系方式不能为空"}).regexValidator({regExp:["tel","mobile"],dataType:"enum",onError:"你输入的联系方式格式不正确"});
|
$("#ywks").formValidator({empty:false,onShow:"请输入业务科室!"}).inputValidator({min:2,max:100,onError:"业务科室2-100个字符或1-50个汉字"});
|
$("#zw").formValidator({empty:false,onShow:"请输入职务!"}).inputValidator({min:2,max:40,onError:"职务2-40个字符或1-20个汉字"});
|
// $("#telePhone").formValidator({empty:true,onShow:"请输入电话,格式为'0371-66666666'",onFocus:"请输入电话,格式为'0371-66666666'"})
|
// .regexValidator({regExp:"^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$",onError:"你输入的办公电话格式不正确"});
|
$("#mobile").formValidator({empty:true,onShow:"手机号码",onFocus:"11位手机号码"}).inputValidator({min:11,max:11,onError:"手机号码必须为11位数字"})
|
.regexValidator({regExp:"mobile",dataType:"enum",onError:"你输入的手机号码格式不正确"});
|
// .ajaxValidator({
|
// dataType : "html",
|
// async : true,
|
// url : "checkMobile.html?id=${RequestParameters.id}",
|
// data :{"mobile":$("#mobile").val()},
|
// 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 : "请稍候..."
|
// });
|
$("#levelId").formValidator({empty:false,onShow:"请选择等级名称!",onFocus:"等级名称不能为空"}).inputValidator({min:1,max:200,onError:"等级名称不能为空"});
|
|
var allow = '${contact.ALLOW_LOGIN}';
|
if(allow == 1){
|
$(".login").show();
|
if($.util.isEmpty($("#login_name").val())){
|
$("#login_name").attr("disabled",false).unFormValidator(false);
|
}else{
|
$("#login_name").attr("disabled",true).unFormValidator(true);
|
}
|
|
}else{
|
$(".login").hide();
|
$("#login_name").attr("disabled",true).unFormValidator(true);
|
}
|
|
$(".yhzx").click(function(){
|
if($(this).val()==1){
|
$(".login").show();
|
if($.util.isEmpty($("#login_name").val())){
|
$("#login_name").attr("disabled",false).unFormValidator(false);
|
}else{
|
$("#login_name").attr("disabled",true).unFormValidator(true);
|
}
|
}else{
|
$(".login").hide();
|
$("#login_name").attr("disabled",true).unFormValidator(true);
|
}
|
});
|
|
})
|
</script>
|
|
<div class="edit_txt">
|
<form id="myform" action="${base}/business/pages/servicelist/slaproject/saveProjectContacts.html" method="post">
|
<input type="hidden" name="customerId" value="${customerId}"/>
|
<input type="hidden" name="id" value="${contact.ID}"/>
|
<table class="edit_layout2">
|
|
<tr><th><label class="required">联系人名称:</label></th>
|
<td style="width:160px;"><input class="general" type="text" name="contractsName" id="contractsName" value="${contact.CONTACT_NAME}"/>
|
<div id="contractsNameTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr><th><label class="required">用户中心登录:</label></th>
|
<td >
|
<input type="radio" value="1" name="allow_login" class="yhzx audit" [#if contact.ALLOW_LOGIN == 1]checked[/#if]/>允许
|
<input type="radio" value="2" name="allow_login" class="yhzx audit" [#if contact.ALLOW_LOGIN == 2]checked[/#if]/>禁止
|
</td>
|
</tr>
|
<tr class="login"><th ><label class="required" >登录名:</label></th>
|
<td ><input class="general" type="text" name="login_name" id="login_name" value="${contact.LOGIN_NAME}" [#if contact.ALLOW_LOGIN == 1]readonly[/#if] />
|
<div id="login_nameTip" style="display:inline-block;width:280px;"></div>
|
</td>
|
</tr>
|
<tr class="login"><th ></th>
|
<td >
|
<font color="red">默认密码为88888888</font>
|
</td>
|
</tr>
|
<tr><th ><label >邮箱:</label></th>
|
<td ><input class="general" type="text" name="email" id="email" value="${contact.EMAIL}" />
|
<div id="emailTip" style="display:inline-block;width:180px;"></div>
|
</td>
|
</tr>
|
|
<tr><th ><label>${Constants.UNIT_CONSTANTS}:</label></th>
|
<td ><input class="general" type="text" name="sub_customer_name" id="sub_customer_name" value="${contact.SUB_CUSTOMER_NAME}" readOnly onclick="subCus();"/>
|
<input type="hidden" name="sub_customer_id" id="sub_customer_id" value="${contact.SUB_CUSTOMER_ID}"/>
|
</td>
|
</tr>
|
|
<tr><th ><label class="required">联系方式 :</label></th>
|
<td ><input class="general" type="text" name="contacts_type" id="contacts_type" value="${contact.CONTACTS_TYPE}"/>
|
<div id="contacts_typeTip" style="display:inline-block;width:200px;"></div>
|
</td>
|
</tr>
|
|
|
<tr><th><label class="required">业务科室:</label></th>
|
<td style="width:160px;"><input class="general" type="text" name="ywks" id="ywks" value="${contact.YWKS}"/>
|
<div id="ywksTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr><th><label class="required">职务:</label></th>
|
<td style="width:160px;"><input class="general" type="text" name="zw" id="zw" value="${contact.ZW}"/>
|
<div id="zwTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<!-- <tr><th><label>办公电话:</label></th>
|
<td style="width:160px;"><input class="general" type="text" name="telePhone" id="telePhone" value="${contact.TELEPHONE}"/>
|
<div id="telePhoneTip" style="display:inline-block;width:280px;"></div>
|
</td>
|
</tr>
|
-->
|
<tr><th><label>手机号:</label></th>
|
<td style="width:160px;"><input class="general" type="text" name="mobile" id="mobile" value="${contact.MOBILE}"/>
|
<div id="mobileTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr><th><label class="required">等级名称:</label></th>
|
<td style="width:160px;">
|
[@sel id="levelId" name="levelId" source=levelList textField="ID" valueField="DATAVALUE" value="${contact.LEVEL_ID}" /]
|
<div id="levelIdTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr><th><label class="required">是否满意度调查:</label></th>
|
<td style="width:160px;">
|
<input type="radio" value="0" name="isStais" class="mark audit" [#if contact.IS_SATIS==0]checked=[/#if] />否
|
<input type="radio" value="1" name="isStais" class="mark audit" [#if contact.IS_SATIS==1]checked=[/#if] />是
|
</td>
|
</tr>
|
|
<tr><th><label >联系人说明:</label></th>
|
<td ><textarea class="general" style="width:360px;" name="contactsNote" id="note" />${contact.CONSTACTS_NOTE}</textarea>
|
</td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
|
|
|
<script type="text/javascript">
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("#myform").submit();
|
}
|
}
|
|
function subCus() {
|
var customer_id = '${RequestParameters.customerId}';
|
var sub_customer_id = $("#sub_customer_id").val();
|
|
var url = "${base}/business/pages/servicelist/slaproject/subCus.html?type=3&customerId="+customer_id+"&subCustomerId="+sub_customer_id;
|
window.top.openDialog("selectSubCus","操作",
|
{},
|
{"width":60,"height":80},
|
[{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
|
}
|
|
function showCus(labelId,labelName) {
|
$("#sub_customer_name").val(labelName);
|
$("#sub_customer_id").val(labelId);
|
}
|
</script>
|
|
</body>
|
</html>
|