更改承租人、担保人、共同申请人、扣款卡信息中的手机号验证

This commit is contained in:
tangfutang 2018-07-31 15:44:13 +08:00
parent e425f7eeb1
commit 5a31ef8548
4 changed files with 60 additions and 13 deletions

View File

@ -76,13 +76,21 @@
alert("预留手机号不能为空!");
return false;
}
if(CheckPhoneCode(mobile)){
var phone = /^[1][3,4,5,7,8][0-9]{9}$/;
if(phone.test(mobile)){
setErrorTips("MOBILE","");
return true;
}else{
setErrorTips("MOBILE","手机号格式不正确!");
return false;
}
/* if(CheckPhoneCode(mobile)){
return true;
}else{
//setErrorTips("mobile","手机号格式不正确!");
alert("预留手机号格式不正确!");
return false;
}
} */
}
function save(){

View File

@ -84,13 +84,22 @@
alert("手机号不能为空!");
return false;
}
if(CheckPhoneCode(mobile)){
var phone = /^[1][3,4,5,7,8][0-9]{9}$/;
if(phone.test(mobile)){
setErrorTips("mobile","");
return true;
}else{
setErrorTips("mobile","手机号格式不正确!");
//alert("手机号格式不正确!");
return false;
}
/* if(CheckPhoneCode(mobile)){
return true;
}else{
//setErrorTips("mobile","手机号格式不正确!");
alert("手机号格式不正确!");
return false;
}
} */
}
function checkWorkTel(){//校验担保人单位电话格式
@ -115,9 +124,13 @@
var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=sFlowUnid%>";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobileRepeat",sParams);
if(sReturnInfo=="8"){
alert("该手机号已重复!");
setItemValue(0,0,"MOBILE","");
return;
/* alert("该手机号已重复!");
setItemValue(0,0,"MOBILE",""); */
setErrorTips("MOBILE","该手机号已重复!");
return false;
}else{
setErrorTips("MOBILE","");
return true;
}
}
@ -130,6 +143,10 @@
if(TelResult==false){
return;
}
var falgs = checkMobileRepeat();
if(falgs==false){
return;
}
// var WorkTelResult = checkWorkTel();
// if(WorkTelResult==false){
// return;

View File

@ -68,7 +68,8 @@
//alert("手机号不能为空!");
return false;
}
if(CheckPhoneCode(tel)){
var phone = /^[1][3,4,5,7,8][0-9]{9}$/;
if(phone.test(tel)){
setErrorTips("tel","");
return true;
}else{
@ -76,6 +77,14 @@
//alert("手机号格式不正确!");
return false;
}
/* if(CheckPhoneCode(tel)){
setErrorTips("tel","");
return true;
}else{
setErrorTips("tel","手机号格式不正确!");
//alert("手机号格式不正确!");
return false;
} */
}
function checkSuphone(){//校验单位电话格式和不为空
@ -103,10 +112,10 @@
if(sReturnInfo=="8"){
setErrorTips("tel","该手机号已重复!");
//alert("该手机号已重复!");
setItemValue(0,0,"tel","");
return;
return false;
}else{
setErrorTips("tel","");
return true;
}
}
@ -151,6 +160,10 @@
if(SuphoneResult==false){
return;
}
var falgs = checkTelRepeat();
if(falgs==false){
return;
}
/*var ID = getItemValue(0,getRow(0),'ID');
if("undefined"==ID||""==ID || null==ID){
AsDebug.showMessage("提示","请选中一条数据!","","",true);

View File

@ -360,13 +360,22 @@
alert("手机号不能为空!");
return false;
}
if(CheckPhoneCode(mobile)){
var phone = /^[1][3,4,5,7,8][0-9]{9}$/;
if(phone.test(mobile)){
setErrorTips("mobile","");
return true;
}else{
setErrorTips("mobile","手机号格式不正确!");
//alert("手机号格式不正确!");
return false;
}
/* if(CheckPhoneCode(mobile)){
return true;
}else{
//setErrorTips("mobile","手机号格式不正确!");
alert("手机号格式不正确!");
return false;
}
} */
}
function saveRecord(leasfrom,projectSource){//保存
@ -384,7 +393,7 @@
}
var mobileResult = checkTel();
if(mobileResult=="false"){
if(mobileResult==false){
return;
}