Commit 01c87202 authored by 吴春's avatar 吴春

1

parent 274c7982
......@@ -1514,7 +1514,7 @@
isValidPassport:function() {
var isCheck=true;
if(this.addMsg.Nationality===2){
if(this.addMsg.Nationality===2&&this.LineId!=90){
if (this.addMsg.PassportNo.length !== 9) {
this.$message.error("请输入9位护照号")
isCheck=false;
......@@ -1523,7 +1523,7 @@
// 单个字母开头(E或G)后跟8位数字
const pattern1 = /^[EGHA][0-9]{8}$/;
// 两个字母开头(E开头,第二个字母不能是I或O)后跟7位数字
const pattern2 = /^E[A-HJ-NP-Z][0-9]{7}$/;
const pattern2 = /^[EP][A-HJ-NP-Z][0-9]{7}$/;
this.PassportNoSure= pattern1.test(this.addMsg.PassportNo) || pattern2.test(this.addMsg.PassportNo);
if(!this.PassportNoSure){
this.$message.error("护照格式不正确")
......@@ -1536,7 +1536,7 @@
//中国护照验证逻辑
isValidPassport: function () {
var isCheck = true;
if(this.addMsg.Nationality===2){
if(this.addMsg.Nationality===2&&this.LineId!=90){
if (this.addMsg.PassportNo.length !== 9) {
this.$message.error("请输入9位护照号")
isCheck = false;
......@@ -1544,7 +1544,7 @@
}
if (this.addMsg.Nationality === 2) {
// 单个字母开头(E或G)后跟8位数字
const pattern1 = /^[EGH][0-9]{8}$/;
const pattern1 = /^[EGHA][0-9]{8}$/;
// 两个字母开头(E开头,第二个字母不能是I或O)后跟7位数字
// const pattern2 = /^E[A-HJ-NP-Z][0-9]{7}$/;
const pattern2 = /^[EP][A-HJ-NP-Z][0-9]{7}$/;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment