|
|
|
@ -1099,8 +1099,8 @@ function titleOnblur() { |
|
|
|
|
const fpzl = getFpzl(); |
|
|
|
|
const ttlx = $.trim($ttType.val()); |
|
|
|
|
if(fpzl==="02" && ttlx ==="个人"){ |
|
|
|
|
if(titleName ==='(个人)'){ |
|
|
|
|
alert_timing_open("抬头类型是个人时,发票抬头不能是(个人)"); |
|
|
|
|
if (titleName.includes('(个人)')) { |
|
|
|
|
alert_timing_open("抬头类型是个人时,发票抬头不能包含(个人)"); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1176,35 +1176,6 @@ function taxNoOnblurItem(taxpayerId,text) { |
|
|
|
|
|
|
|
|
|
/*验证手机*/ |
|
|
|
|
function telephoneOnblur() { |
|
|
|
|
const telephone = $.trim($("#telephone").val()); |
|
|
|
|
const isDp = getFpzl() === "51" || getFpzl() === "52" || getFpzl() === "01" || getFpzl() === "02"; |
|
|
|
|
if (isDp) { |
|
|
|
|
if (telephone === '') { |
|
|
|
|
alert_timing_open("手机号码不能为空!"); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
const length = telephone.length; |
|
|
|
|
if (length !== 11) { |
|
|
|
|
alert_timing_open("手机号码只能为11个数字!"); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
const regexEl = /^1\d{10}$/; |
|
|
|
|
if (length !== 0 && !regexEl.test(telephone)) { |
|
|
|
|
alert_timing_open("手机号码格式非法!"); |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (telephone.indexOf(" ") >= 0) { |
|
|
|
|
alert_timing_open("手机号码不能包含空格!"); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
for (let i = 0; i < telephone.length; i++) { |
|
|
|
|
if (telephone[i].charCodeAt() >= 55356 && telephone[i].charCodeAt() <= 59000) { |
|
|
|
|
alert_timing_open("手机号码不能输入表情"); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|