Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
linweijiong
jinfa-admin
Commits
9290e40c
Commit
9290e40c
authored
Sep 22, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(平台营销活动管理): 修复BUG
parent
b37a6aee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
add.tsx
...ages/marketingManage/marketing/waitAddedMarketing/add.tsx
+1
-1
index.tsx
...eting/waitAddedMarketing/components/rulesLayout/index.tsx
+8
-0
No files found.
src/pages/marketingManage/marketing/waitAddedMarketing/add.tsx
View file @
9290e40c
...
@@ -248,7 +248,7 @@ const AddedMarketing = (props: any) => {
...
@@ -248,7 +248,7 @@ const AddedMarketing = (props: any) => {
roleType
:
item
.
roleId
,
roleType
:
item
.
roleId
,
roleTypeName
:
item
.
roleName
,
roleTypeName
:
item
.
roleName
,
level
:
item
.
level
,
level
:
item
.
level
,
levelTyp
:
item
.
levelType
,
levelTyp
e
:
item
.
levelType
,
levelTypeName
:
item
.
levelTypeName
,
levelTypeName
:
item
.
levelTypeName
,
levelTag
:
item
.
levelTag
,
levelTag
:
item
.
levelTag
,
}
}
...
...
src/pages/marketingManage/marketing/waitAddedMarketing/components/rulesLayout/index.tsx
View file @
9290e40c
...
@@ -324,15 +324,23 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
...
@@ -324,15 +324,23 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern1
=
/^-
?[
1-9
]\d
*
(\.\d
{1,1}
)?
$/
;
const
pattern1
=
/^-
?[
1-9
]\d
*
(\.\d
{1,1}
)?
$/
;
const
pattern2
=
/^-
?[
1-9
]\d
*
(\.\d
{1,2}
)?
$/
;
const
pattern2
=
/^-
?[
1-9
]\d
*
(\.\d
{1,2}
)?
$/
;
const
pattern3
=
/^
(\d
|
[
1-9
]\d
|99.999
)(\.\d
{1,1}
)?
$/
;
const
pattern4
=
/^
(\d
|
[
1-9
]\d
|99.999
)(\.\d
{1,2}
)?
$/
;
if
(
!
value
)
{
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入'
));
return
Promise
.
reject
(
new
Error
(
'请输入'
));
}
}
if
(
!
pattern1
.
test
(
value
)
&&
(
int
===
4
||
int
===
7
))
{
if
(
!
pattern1
.
test
(
value
)
&&
(
int
===
4
||
int
===
7
))
{
return
Promise
.
reject
(
new
Error
(
`必须大于0最多保留1位小数`
));
return
Promise
.
reject
(
new
Error
(
`必须大于0最多保留1位小数`
));
}
}
if
(
!
pattern3
.
test
(
value
)
&&
(
int
===
4
||
int
===
7
)
&&
type
===
2
)
{
return
Promise
.
reject
(
new
Error
(
`必须大于0且小于100最多保留1位小数`
));
}
if
(
!
pattern2
.
test
(
value
)
&&
int
===
5
)
{
if
(
!
pattern2
.
test
(
value
)
&&
int
===
5
)
{
return
Promise
.
reject
(
new
Error
(
`必须大于0最多保留2位小数`
));
return
Promise
.
reject
(
new
Error
(
`必须大于0最多保留2位小数`
));
}
}
if
(
!
pattern4
.
test
(
value
)
&&
int
===
5
&&
type
===
2
)
{
return
Promise
.
reject
(
new
Error
(
`必须大于0且小于100最多保留2位小数`
));
}
return
Promise
.
resolve
();
return
Promise
.
resolve
();
}
}
}]
}
}]
}
...
...
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