Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
a17deb6a
Commit
a17deb6a
authored
Mar 20, 2026
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
8b798bb2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
146 deletions
+80
-146
addPassenger.vue
src/components/SalesModule/addPassenger.vue
+80
-146
No files found.
src/components/SalesModule/addPassenger.vue
View file @
a17deb6a
...
@@ -157,26 +157,20 @@
...
@@ -157,26 +157,20 @@
</el-form-item>
</el-form-item>
</li>
</li>
<li
v-if=
"addMsg.Nationality==NationalityId"
>
<li
v-if=
"addMsg.Nationality==NationalityId"
>
<el-form-item
:label=
"$t('visaT.Chinesesurname')"
prop=
"SurNameID"
>
<el-form-item
:label=
"$t('visaT.Chinesesurname')"
prop=
"SurName"
>
<el-select
class=
"w230"
ref=
"options"
v-model=
"addMsg.SurNameID"
filterable
remote
reserve-keyword
<el-autocomplete
class=
"w230"
v-model=
"addMsg.SurName"
placeholder=
"请输入关键词"
:remote-method=
"(query)=>remoteMethod(query,1)"
@
change=
"(e)=>getName(e,1)"
>
:fetch-suggestions=
"(queryString, cb) => remoteMethod(queryString, cb, 1)"
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"`$
{item.name}`" :value="item.value">
:placeholder=
"$t('objFill.v101.FinancialModule.qingsrgjzcx')"
:trigger-on-focus=
"false"
<span
style=
"float: left"
>
{{
item
.
label
}}
</span>
@
select=
"(item) => getName(item, 1)"
>
<span
style=
"float: right; color: #8492a6; font-size: 13px"
>
{{
item
.
name
}}
</span>
</el-autocomplete>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
</li>
</li>
<li
v-if=
"addMsg.Nationality==NationalityId"
>
<li
v-if=
"addMsg.Nationality==NationalityId"
>
<el-form-item
:label=
"$t('admin.admin_Surname')"
prop=
"NameID"
>
<el-form-item
:label=
"$t('admin.admin_Surname')"
prop=
"Name"
>
<el-select
class=
"w230"
ref=
"optionsNames"
v-model=
"addMsg.NameID"
filterable
remote
reserve-keyword
<el-autocomplete
class=
"w230"
v-model=
"addMsg.Name"
:placeholder=
"$t('rule.qsrzwm')"
:remote-method=
"(query)=>remoteMethod(query)"
:fetch-suggestions=
"(queryString, cb) => remoteMethod(queryString, cb)"
:placeholder=
"$t('rule.qsrzwm')"
@
change=
"(e)=>getName(e)"
>
:trigger-on-focus=
"false"
@
select=
"(item) => getName(item)"
>
<el-option
v-for=
"item in optionsNames"
:key=
"item.value"
:label=
"`$
{item.name}`" :value="item.value">
</el-autocomplete>
<span
style=
"float: left"
>
{{
item
.
label
}}
</span>
<span
style=
"float: right; color: #8492a6; font-size: 13px"
>
{{
item
.
name
}}
</span>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
</li>
</li>
<li>
<li>
...
@@ -204,7 +198,8 @@
...
@@ -204,7 +198,8 @@
</li>
</li>
<li>
<li>
<!--国内线且国籍是中国的才验证身份证-->
<!--国内线且国籍是中国的才验证身份证-->
<el-form-item
:label=
"$t('admin.admin_IDcard')"
prop=
"IdCard"
v-if=
"LineId==90&&addMsg.Nationality==NationalityId"
>
<el-form-item
:label=
"$t('admin.admin_IDcard')"
prop=
"IdCard"
v-if=
"LineId==90&&addMsg.Nationality==NationalityId"
>
<el-input
v-model=
"addMsg.IdCard"
type=
"text"
:class=
" IdCardSure ? '' : 'colorRed'"
size=
mini
<el-input
v-model=
"addMsg.IdCard"
type=
"text"
:class=
" IdCardSure ? '' : 'colorRed'"
size=
mini
class=
"w230"
:placeholder=
"$t('visaT.Pleasefillin')"
@
blur
.
prevent=
"authentication()"
>
class=
"w230"
:placeholder=
"$t('visaT.Pleasefillin')"
@
blur
.
prevent=
"authentication()"
>
</el-input>
</el-input>
...
@@ -675,7 +670,7 @@
...
@@ -675,7 +670,7 @@
TravelTypeList
:
[],
TravelTypeList
:
[],
UnitTypeList
:
[],
UnitTypeList
:
[],
DutyTypeList
:
[],
DutyTypeList
:
[],
NationalityId
:
0
,
NationalityId
:
0
,
ppAge
:
0
,
ppAge
:
0
,
loading
:
false
,
loading
:
false
,
PassportNoSure
:
true
,
PassportNoSure
:
true
,
...
@@ -900,38 +895,24 @@
...
@@ -900,38 +895,24 @@
};
};
},
},
methods
:
{
methods
:
{
getName
(
e
,
type
)
{
getName
(
selectItem
,
type
)
{
let
findIndex
if
(
type
)
{
if
(
type
)
{
findIndex
=
this
.
options
.
findIndex
(
x
=>
x
.
value
==
e
)
this
.
addMsg
.
SurName
=
selectItem
.
name
.
trim
();
let
obj
=
this
.
options
[
findIndex
]
this
.
addMsg
.
ESurName
=
selectItem
.
label
.
toUpperCase
().
trim
();
this
.
addMsg
.
SurName
=
obj
.
name
.
toUpperCase
();
this
.
addMsg
.
ESurName
=
obj
.
label
.
toUpperCase
();
}
else
{
}
else
{
findIndex
=
this
.
optionsNames
.
findIndex
(
x
=>
x
.
value
==
e
)
this
.
addMsg
.
Name
=
selectItem
.
name
.
trim
();
let
obj
=
this
.
optionsNames
[
findIndex
]
this
.
addMsg
.
EName
=
selectItem
.
label
.
toUpperCase
().
trim
();
this
.
addMsg
.
Name
=
obj
.
name
.
toUpperCase
();
this
.
addMsg
.
EName
=
obj
.
label
.
toUpperCase
();
}
}
},
},
remoteMethod
(
query
,
type
)
{
remoteMethod
(
query
,
cb
,
type
)
{
if
(
query
!==
''
)
{
if
(
query
!==
''
)
{
if
(
type
==
1
)
{
var
tempArray
=
this
.
Transformation
(
query
);
if
(
query
!=
this
.
addMsg
.
SurName
)
{
if
(
tempArray
&&
tempArray
.
length
==
1
)
{
this
.
addMsg
.
SurName
=
query
;
this
.
getName
(
tempArray
[
0
],
type
);
this
.
addMsg
.
SurNameID
=
""
;
cb
([]);
}
this
.
Transformation
(
query
,
'SurName'
)
}
else
{
}
else
{
if
(
query
!=
this
.
addMsg
.
Name
)
{
cb
(
tempArray
);
this
.
addMsg
.
Name
=
query
;
this
.
addMsg
.
NameID
=
''
;
}
}
this
.
Transformation
(
query
,
'Name'
)
}
}
else
{
if
(
type
==
1
)
this
.
options
=
[];
else
this
.
optionsNames
=
[]
}
}
},
},
getDutyType
()
{
getDutyType
()
{
...
@@ -949,12 +930,11 @@
...
@@ -949,12 +930,11 @@
},
},
GetDefaultCountryList
()
{
GetDefaultCountryList
()
{
this
.
apipost
(
this
.
apipost
(
"dict_get_GetDefaultCountryList"
,
{
"dict_get_GetDefaultCountryList"
,
{},
},
res
=>
{
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
NationalityId
=
res
.
data
.
data
.
ID
this
.
NationalityId
=
res
.
data
.
data
.
ID
this
.
addMsg
.
Nationality
=
res
.
data
.
data
.
ID
this
.
addMsg
.
Nationality
=
res
.
data
.
data
.
ID
}
else
{}
}
else
{}
},
},
err
=>
{}
err
=>
{}
...
@@ -1040,7 +1020,7 @@
...
@@ -1040,7 +1020,7 @@
},
},
res
=>
{
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
"res.data.data"
,
res
.
data
.
data
);
console
.
log
(
"res.data.data"
,
res
.
data
.
data
);
this
.
JingDianList
=
res
.
data
.
data
this
.
JingDianList
=
res
.
data
.
data
}
else
{
}
else
{
...
@@ -1345,89 +1325,36 @@
...
@@ -1345,89 +1325,36 @@
dfs
(
0
,
""
);
dfs
(
0
,
""
);
return
result
.
join
(
","
);
return
result
.
join
(
","
);
},
},
Transformation
(
val
,
type
,
input
)
{
Transformation
(
val
)
{
let
text
=
this
.
pinyin
(
val
,
{
let
resultArray
=
[];
let
textArray
=
this
.
pinyin
(
val
,
{
heteronym
:
true
,
// 启用多音字模式
heteronym
:
true
,
// 启用多音字模式
style
:
this
.
pinyin
.
STYLE_NORMAL
,
style
:
this
.
pinyin
.
STYLE_NORMAL
,
segment
:
true
segment
:
true
});
});
// 如果当前字是 "茜",则替换为自定义拼音
// 如果当前字是 "茜",则替换为自定义拼音
if
(
val
.
includes
(
'茜'
))
{
if
(
val
.
includes
(
'茜'
))
{
text
=
text
.
map
(
pinyinArr
=>
{
text
Array
=
textArray
.
map
(
pinyinArr
=>
{
if
(
pinyinArr
[
0
]
===
'qian'
)
{
// 默认返回的是 qian
if
(
pinyinArr
[
0
]
===
'qian'
)
{
// 默认返回的是 qian
return
[
'qian'
,
'xi'
];
// 替换成自定义多音字
return
[
'qian'
,
'xi'
];
// 替换成自定义多音字
}
}
return
pinyinArr
;
return
pinyinArr
;
});
});
}
}
const
pinyinArray
=
text
const
resultStr
=
this
.
combinePinyinDP
(
textArray
);
const
result
=
this
.
combinePinyinDP
(
pinyinArray
);
if
(
resultStr
&&
resultStr
!=
''
)
{
if
(
type
==
"SurName"
)
{
let
tempArray
=
resultStr
.
split
(
','
)
let
upText
=
result
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
this
.
options
=
[]
tempArray
.
forEach
((
x
,
index
)
=>
{
let
names
=
upText
.
split
(
','
)
resultArray
.
push
({
names
.
forEach
((
x
,
index
)
=>
{
label
:
(
x
).
toUpperCase
(),
this
.
options
.
push
({
value
:
(
x
).
toUpperCase
()
+
" "
+
val
,
label
:
x
.
toUpperCase
(),
name
:
val
,
value
:
index
+
1
,
name
:
this
.
addMsg
.
SurName
.
toUpperCase
(),
})
})
})
})
if
(
names
!=
null
&&
names
.
length
==
1
)
{
if
(
input
)
{
this
.
addMsg
.
SurNameID
=
this
.
options
[
0
].
value
;
this
.
addMsg
.
ESurName
=
this
.
options
[
0
].
label
;
}
else
{
setTimeout
(()
=>
{
this
.
addMsg
.
SurNameID
=
this
.
options
[
0
].
value
;
this
.
addMsg
.
ESurName
=
this
.
options
[
0
].
label
;
},
500
);
}
}
else
{
let
findIndex
=
this
.
options
.
findIndex
(
x
=>
x
.
label
==
this
.
addMsg
.
ESurName
)
if
(
findIndex
!=
-
1
)
{
this
.
addMsg
.
SurNameID
=
this
.
options
[
findIndex
].
value
;
}
else
{
this
.
addMsg
.
SurNameID
=
''
;
this
.
addMsg
.
ESurName
=
''
;
}
}
}
}
this
.
$forceUpdate
()
return
resultArray
;
}
if
(
type
==
"Name"
)
{
let
upText
=
result
this
.
optionsNames
=
[]
let
names
=
upText
.
split
(
','
)
names
.
forEach
((
x
,
index
)
=>
{
this
.
optionsNames
.
push
({
label
:
x
.
toUpperCase
(),
value
:
index
+
1
,
name
:
this
.
addMsg
.
Name
.
toUpperCase
(),
})
})
if
(
names
!=
null
&&
names
.
length
==
1
)
{
if
(
input
)
{
this
.
addMsg
.
NameID
=
this
.
optionsNames
[
0
].
value
;
this
.
addMsg
.
EName
=
this
.
optionsNames
[
0
].
label
;
}
else
{
setTimeout
(()
=>
{
if
(
this
.
optionsNames
.
length
>
0
)
{
this
.
addMsg
.
NameID
=
this
.
optionsNames
[
0
].
value
;
this
.
addMsg
.
EName
=
this
.
optionsNames
[
0
].
label
;
}
},
500
);
}
}
else
{
let
findIndex
=
this
.
optionsNames
.
findIndex
(
x
=>
x
.
label
==
this
.
addMsg
.
EName
)
if
(
findIndex
!=
-
1
)
{
this
.
addMsg
.
NameID
=
this
.
optionsNames
[
findIndex
].
value
;
return
}
this
.
addMsg
.
NameID
=
''
;
this
.
addMsg
.
EName
=
''
;
}
}
this
.
$forceUpdate
()
},
},
getVisaIdentityTypeEnum
()
{
getVisaIdentityTypeEnum
()
{
//获取身份证明
//获取身份证明
...
@@ -1511,24 +1438,24 @@
...
@@ -1511,24 +1438,24 @@
},
},
// 中国护照验证逻辑
// 中国护照验证逻辑
isValidPassport
:
function
()
{
isValidPassport
:
function
()
{
var
isCheck
=
true
;
var
isCheck
=
true
;
if
(
this
.
addMsg
.
Nationality
===
2
&&
this
.
LineId
!=
90
)
{
if
(
this
.
addMsg
.
Nationality
===
2
&&
this
.
LineId
!=
90
)
{
if
(
this
.
addMsg
.
PassportNo
.
length
!==
9
)
{
if
(
this
.
addMsg
.
PassportNo
.
length
!==
9
)
{
this
.
$message
.
error
(
"请输入9位护照号"
)
this
.
$message
.
error
(
"请输入9位护照号"
)
isCheck
=
false
;
isCheck
=
false
;
return
;
return
;
}
}
// 单个字母开头(E或G)后跟8位数字
// 单个字母开头(E或G)后跟8位数字
const
pattern1
=
/^
[
EGHA
][
0-9
]{8}
$/
;
const
pattern1
=
/^
[
EGHA
][
0-9
]{8}
$/
;
// 两个字母开头(E开头,第二个字母不能是I或O)后跟7位数字
// 两个字母开头(E开头,第二个字母不能是I或O)后跟7位数字
const
pattern2
=
/^
[
EP
][
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
);
this
.
PassportNoSure
=
pattern1
.
test
(
this
.
addMsg
.
PassportNo
)
||
pattern2
.
test
(
this
.
addMsg
.
PassportNo
);
if
(
!
this
.
PassportNoSure
)
{
if
(
!
this
.
PassportNoSure
)
{
this
.
$message
.
error
(
"护照格式不正确"
)
this
.
$message
.
error
(
"护照格式不正确"
)
isCheck
=
false
;
isCheck
=
false
;
return
;
return
;
}
}
}
}
return
isCheck
;
return
isCheck
;
...
@@ -1536,7 +1463,7 @@
...
@@ -1536,7 +1463,7 @@
//中国护照验证逻辑
//中国护照验证逻辑
isValidPassport
:
function
()
{
isValidPassport
:
function
()
{
var
isCheck
=
true
;
var
isCheck
=
true
;
if
(
this
.
addMsg
.
Nationality
===
2
&&
this
.
LineId
!=
90
)
{
if
(
this
.
addMsg
.
Nationality
===
2
&&
this
.
LineId
!=
90
)
{
if
(
this
.
addMsg
.
PassportNo
.
length
!==
9
)
{
if
(
this
.
addMsg
.
PassportNo
.
length
!==
9
)
{
this
.
$message
.
error
(
"请输入9位护照号"
)
this
.
$message
.
error
(
"请输入9位护照号"
)
isCheck
=
false
;
isCheck
=
false
;
...
@@ -1630,12 +1557,19 @@
...
@@ -1630,12 +1557,19 @@
this
.
addMsg
.
DutyType
=
obj
.
DutyType
.
toString
();
this
.
addMsg
.
DutyType
=
obj
.
DutyType
.
toString
();
this
.
addMsg
.
UnitType
=
obj
.
UnitType
.
toString
();
this
.
addMsg
.
UnitType
=
obj
.
UnitType
.
toString
();
this
.
addMsg
.
TravelType
=
obj
.
TravelType
.
toString
();
this
.
addMsg
.
TravelType
=
obj
.
TravelType
.
toString
();
this
.
addMsg
.
Marriage
=
obj
.
Marriage
?.
toString
()
||
"0"
;
this
.
addMsg
.
Marriage
=
""
if
(
obj
&&
obj
.
Marriage
)
{
console
.
log
(
obj
.
Marriage
,
"obj.Marriage"
);
this
.
addMsg
.
Marriage
=
obj
.
Marriage
.
toString
()
||
"0"
;
}
if
(
this
.
addMsg
.
Marriage
==
"0"
)
{
if
(
this
.
addMsg
.
Marriage
==
"0"
)
{
this
.
addMsg
.
Marriage
=
""
;
this
.
addMsg
.
Marriage
=
""
;
}
}
this
.
addMsg
.
IsCriminalRecord
=
obj
.
IsCriminalRecord
===
null
?
''
:
obj
.
IsCriminalRecord
.
toString
();
this
.
addMsg
.
IsCriminalRecord
=
obj
.
IsCriminalRecord
===
null
?
''
:
obj
.
IsCriminalRecord
.
toString
();
this
.
addMsg
.
IsDepartureRecord
=
obj
.
IsDepartureRecord
?.
toString
()
||
""
;;
this
.
addMsg
.
IsDepartureRecord
=
""
;
if
(
obj
.
IsDepartureRecord
)
{
this
.
addMsg
.
IsDepartureRecord
=
obj
.
IsDepartureRecord
.
toString
();
}
this
.
EconomicCapabilityS
.
forEach
(
x
=>
{
this
.
EconomicCapabilityS
.
forEach
(
x
=>
{
if
(
obj
.
EconomicCapabilityList
)
{
if
(
obj
.
EconomicCapabilityList
)
{
obj
.
EconomicCapabilityList
.
forEach
(
y
=>
{
obj
.
EconomicCapabilityList
.
forEach
(
y
=>
{
...
@@ -1694,7 +1628,7 @@
...
@@ -1694,7 +1628,7 @@
ClearData
()
{
ClearData
()
{
this
.
options
=
[];
this
.
options
=
[];
this
.
optionsNames
=
[];
this
.
optionsNames
=
[];
this
.
addMsg
.
CouponsIds
=
[];
this
.
addMsg
.
CouponsIds
=
[];
this
.
addMsg
.
SurNameID
=
""
;
this
.
addMsg
.
SurNameID
=
""
;
this
.
addMsg
.
NameID
=
""
;
this
.
addMsg
.
NameID
=
""
;
this
.
addMsg
.
SurName
=
""
;
this
.
addMsg
.
SurName
=
""
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment