Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
pingan-life-index-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fe6170b4
authored
2019-12-23 18:00:22 +0800
by
joe
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
保单号校验
1 parent
8384bac0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
src/pages/custom-service/components/complaint-acceptance.js
src/utils/utils.js
src/pages/custom-service/components/complaint-acceptance.js
View file @
fe6170b
...
...
@@ -4,7 +4,7 @@ import {
httpPost
}
from
'@/api/fetch-api.js'
import
{
contactMethodCheck
}
from
'@utils/utils.js'
;
import
{
contactMethodCheck
,
policyNumberCheck
}
from
'@utils/utils.js'
;
import
Auth
from
'@components/auth/auth.vue'
;
import
modalComp
from
'@/components/modal-comp/modal-comp.vue'
;
...
...
@@ -164,7 +164,7 @@ export default {
},
checkPolicyNumber
()
{
this
.
data
.
policyNumber
=
this
.
data
.
policyNumber
?
this
.
data
.
policyNumber
.
replace
(
/
\s
*/g
,
""
)
:
""
;
if
(
this
.
data
.
policyNumber
&&
this
.
data
.
policyNumber
.
length
!=
16
)
{
if
(
this
.
data
.
policyNumber
&&
!
policyNumberCheck
(
this
.
data
.
policyNumber
)
)
{
this
.
errorTips
.
policyNumberErr
=
this
.
i18n
.
complaintAcceptance
.
errorTips
.
e3
;
return
false
;
}
...
...
src/utils/utils.js
View file @
fe6170b
...
...
@@ -270,3 +270,7 @@ export function contactMethodCheck(type, value) {
}
return
true
;
}
export
function
policyNumberCheck
(
policyNumber
)
{
return
/^P
(
0001|0002
)\d{11}
$/
.
test
(
policyNumber
);
}
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment