Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
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
b9b6a2d3
authored
2023-10-17 16:18:11 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:证书领取表单验证
1 parent
c45b2615
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
src/views/workflow/components/dialog/zslq.vue
src/views/workflow/components/dialog/zslq.vue
View file @
b9b6a2d
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-
09-14 16:37:15
* @LastEditTime: 2023-
10-17 16:16:41
-->
<
template
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
>
...
...
@@ -64,6 +64,27 @@
</el-form>
</
template
>
<
script
>
const
checkPhone
=
(
rule
,
value
,
callback
)
=>
{
let
regPone
=
null
let
mobile
=
/^
(
1
[
3456789
]\d{9})
$/
//手机号
let
tel
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
3584
]\d{9}))
$/
// 座机
if
(
value
&&
value
[
0
]
===
'0'
)
{
// 检查 value 是否存在并且不是 null 或者 undefined
regPone
=
tel
}
else
if
(
value
&&
value
[
0
]
!==
'0'
)
{
regPone
=
mobile
}
if
(
regPone
===
null
)
{
return
callback
(
new
Error
(
'请输入电话'
)
)
}
else
if
(
!
regPone
.
test
(
value
))
{
return
callback
(
new
Error
(
"请输入正确的电话格式,其中座机格式'区号-座机号码'"
)
)
}
else
{
callback
()
}
};
import
Vue
from
'vue'
import
store
from
'@/store/index.js'
import
table
from
"@/utils/mixin/table"
;
...
...
@@ -104,7 +125,7 @@
{
required
:
true
,
message
:
'请输入证件号'
,
trigger
:
'blur'
}
],
lzrdh
:
[
{
required
:
true
,
message
:
'请输入电话号码'
,
trigger
:
'blur'
}
{
required
:
true
,
validator
:
checkPhone
,
trigger
:
[
"blur"
]
}
]
},
tableData
:
{
...
...
Please
register
or
sign in
to post a comment