Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4ef770e2
authored
Aug 14, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
技师手机号
1 parent
73e7732a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
packageMine/pages/customerManagement/technicianList/constant/data.js
packageMine/pages/customerManagement/technicianList/technicianList.js
packageMine/pages/customerManagement/technicianList/constant/data.js
View file @
4ef770e
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
editFormRule
=
{
technicianName
:
[{
required
:
true
,
message
:
'技师名称不能为空'
}]
}
const
formRule
=
{
const
formRule
=
{
technicianName
:
[{
required
:
true
,
message
:
'技师名称不能为空'
}],
technicianName
:
[{
required
:
true
,
message
:
'技师名称不能为空'
}],
technicianPhone
:
[{
required
:
true
,
message
:
'手机号不能为空'
},
technicianPhone
:
[{
required
:
true
,
message
:
'手机号不能为空'
},
...
@@ -25,6 +28,7 @@ const formItems = [{
...
@@ -25,6 +28,7 @@ const formItems = [{
}]
}]
export
default
{
export
default
{
editFormRule
,
formRule
,
formRule
,
formItems
formItems
}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/technicianList/technicianList.js
View file @
4ef770e
...
@@ -29,7 +29,7 @@ Page({
...
@@ -29,7 +29,7 @@ Page({
let
{
attr
}
=
e
.
currentTarget
.
dataset
let
{
attr
}
=
e
.
currentTarget
.
dataset
let
{
value
}
=
e
.
detail
let
{
value
}
=
e
.
detail
this
.
setData
({
this
.
setData
({
[
'formData.'
+
attr
]:
value
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
""
)
[
'formData.'
+
attr
]:
value
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
""
)
})
})
},
},
...
@@ -75,7 +75,7 @@ Page({
...
@@ -75,7 +75,7 @@ Page({
merchantId
:
customerInfo
.
serviceCenterMerchantId
,
merchantId
:
customerInfo
.
serviceCenterMerchantId
,
merchantName
:
customerInfo
.
serviceCenterMerchantName
merchantName
:
customerInfo
.
serviceCenterMerchantName
}
}
let
validObj
=
wx
.
$util
.
checkRule
(
formData
,
constantData
.
f
ormRule
)
let
validObj
=
wx
.
$util
.
checkRule
(
formData
,
addOrEdit
==
'add'
?
constantData
.
formRule
:
constantData
.
editF
ormRule
)
if
(
validObj
)
{
if
(
validObj
)
{
wx
.
$api
.
showToast
(
validObj
.
message
)
wx
.
$api
.
showToast
(
validObj
.
message
)
return
return
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment