更新校验身份证18位的方法
This commit is contained in:
parent
a40747fa73
commit
fe0a8ed91b
@ -60,15 +60,15 @@
|
||||
}
|
||||
}
|
||||
if(certType=="Ind01"){
|
||||
if(certId.length!=18){
|
||||
alert("身份证必须是18位!");
|
||||
return false;
|
||||
}
|
||||
if(CheckLicense(certId)){
|
||||
return true;
|
||||
}else{
|
||||
//setErrorTips("certId","身份证格式不正确!");
|
||||
if(certId.length==18){
|
||||
alert("身份证格式错误!");
|
||||
}else{
|
||||
alert("身份证必须是18位!");
|
||||
}
|
||||
alert("身份证格式错误!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,6 +41,10 @@
|
||||
<script type="text/javascript">
|
||||
function checkCertId(){//校验共同申请人证件号格式
|
||||
var certId = getItemValue(0,getRow(0),"certid");
|
||||
if(certId.length!=18){
|
||||
alert("身份证必须是18位!");
|
||||
return false;
|
||||
}
|
||||
if(certId==""){
|
||||
//setErrorTips("certId","证件号不能为空!");
|
||||
alert("证件号不能为空!");
|
||||
@ -51,11 +55,7 @@
|
||||
return true;
|
||||
}else{
|
||||
//setErrorTips("certId","身份证格式不正确!");
|
||||
if(certId.length==18){
|
||||
alert("身份证格式错误!");
|
||||
}else{
|
||||
alert("身份证必须是18位!");
|
||||
}
|
||||
alert("身份证格式错误!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -197,6 +197,12 @@
|
||||
|
||||
if(name.length > 0){
|
||||
if(certid.length > 0){
|
||||
if(certid.length!=18){
|
||||
parent.parent.openDWDialog();
|
||||
setErrorTips("certid","身份证必须是18位!");
|
||||
parent.parent.resetDWDialog("配偶身份证信息错误!",false);
|
||||
return false;
|
||||
}
|
||||
if(CheckLicense(certid)){
|
||||
setItemValue(0,0,"certid",certid);
|
||||
//setItemUnit(0,0,"certid","");
|
||||
@ -209,11 +215,7 @@
|
||||
// }
|
||||
else{
|
||||
parent.parent.openDWDialog();
|
||||
if(certid.length==18){
|
||||
setErrorTips("certid","身份证格式错误!");
|
||||
}else{
|
||||
setErrorTips("certid","身份证必须是18位!");
|
||||
}
|
||||
setErrorTips("certid","身份证格式错误!");
|
||||
parent.parent.resetDWDialog("配偶身份证信息错误!",false);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -418,14 +418,14 @@
|
||||
var certid = getItemValue(0,getRow(),"certid");
|
||||
//判断组织机构代码合法性
|
||||
if(certType =='Ind01'){
|
||||
if(CheckLicense(certid) ){
|
||||
if(certid.length!=18){
|
||||
setErrorTips("certid","身份证必须是18位!");
|
||||
return false;
|
||||
}
|
||||
if(CheckLicense(certid) ){
|
||||
return true;
|
||||
}else{
|
||||
if(certid.length==18){
|
||||
setErrorTips("certid","身份证格式错误!");
|
||||
}else{
|
||||
setErrorTips("certid","身份证必须是18位!");
|
||||
}
|
||||
setErrorTips("certid","身份证格式错误!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user