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
03bc128c
Commit
03bc128c
authored
Sep 17, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into v2
parents
6ee1b9df
cbd3b5fa
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
268 additions
and
79 deletions
+268
-79
marketingRoutes.ts
config/routes/marketingRoutes.ts
+52
-52
merchantMarketingRoute.ts
config/routes/merchantMarketingRoute.ts
+10
-10
index.tsx
.../marketingManage/marketing/components/dateModal/index.tsx
+2
-1
add.tsx
...ages/marketingManage/marketing/waitAddedMarketing/add.tsx
+1
-1
index.tsx
...eting/waitAddedMarketing/components/applyMember/index.tsx
+1
-0
index.tsx
...eting/waitAddedMarketing/components/basicLayout/index.tsx
+11
-0
index.tsx
...eting/waitAddedMarketing/components/rulesLayout/index.tsx
+191
-15
No files found.
config/routes/marketingRoutes.ts
View file @
03bc128c
...
...
@@ -4,194 +4,194 @@ const marketingRoutes = {
routes
:
[
{
/** 平台营销活动查询 - marketingSearch */
path
:
'/marketing/marketingSearch'
,
path
:
'/marketing
Manage/marketing
/marketingSearch'
,
name
:
'平台营销活动查询'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/marketingSearch'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/marketingSearch'
,
},
{
/** 平台营销活动查询详情 - preview */
path
:
'/marketing/marketingSearch/preview'
,
path
:
'/marketing
Manage/marketing
/marketingSearch/preview'
,
name
:
'平台营销活动查询详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 待新增平台营销活动 - waitAddedMarketing */
path
:
'/marketing/waitAddedMarketing'
,
path
:
'/marketing
Manage/marketing
/waitAddedMarketing'
,
name
:
'待新增平台营销活动'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/waitAddedMarketing'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/waitAddedMarketing'
,
},
{
/** 待新增平台营销活动 - preview */
path
:
'/marketing/waitAddedMarketing/preview'
,
path
:
'/marketing
Manage/marketing
/waitAddedMarketing/preview'
,
name
:
'待新增平台营销活动详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 新增平台营销活动 - add */
path
:
'/marketing/waitAddedMarketing/add'
,
path
:
'/marketing
Manage/marketing
/waitAddedMarketing/add'
,
name
:
'新增平台营销活动'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/marketingManage/marketing/waitAddedMarketing/add'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/waitAddedMarketing/add'
,
},
{
/** 编辑平台营销活动 - edit */
path
:
'/marketing/waitAddedMarketing/edit'
,
path
:
'/marketing
Manage/marketing
/waitAddedMarketing/edit'
,
name
:
'编辑平台营销活动'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/marketingManage/marketing/waitAddedMarketing/add'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/waitAddedMarketing/add'
,
},
{
/** 待审核报名 - waitAuditApply */
path
:
'/marketing/waitAuditApply'
,
path
:
'/marketing
Manage/marketing
/waitAuditApply'
,
name
:
'待审核报名'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/waitAuditApply'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/waitAuditApply'
,
},
{
/** 待审核报名 - preview */
path
:
'/marketing/waitAuditApply/preview'
,
path
:
'/marketing
Manage/marketing
/waitAuditApply/preview'
,
name
:
'待审核报名详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 待审核报名 - detail */
path
:
'/marketing/waitAuditApply/detail'
,
path
:
'/marketing
Manage/marketing
/waitAuditApply/detail'
,
name
:
'待审核报名详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 待提交审核平台营销活动 - waitSubmitMarketing */
path
:
'/marketing/waitSubmitMarketing'
,
path
:
'/marketing
Manage/marketing
/waitSubmitMarketing'
,
name
:
'待提交审核平台营销活动'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/waitSubmitMarketing'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/waitSubmitMarketing'
,
},
{
/** 待提交审核平台营销活动 - preview */
path
:
'/marketing/waitSubmitMarketing/preview'
,
path
:
'/marketing
Manage/marketing
/waitSubmitMarketing/preview'
,
name
:
'待提交审核平台营销活动详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 待审核平台营销活动(一级) - waitAuditMarketingOne */
path
:
'/marketing/waitAuditMarketingOne'
,
path
:
'/marketing
Manage/marketing
/waitAuditMarketingOne'
,
name
:
'待审核平台营销活动(一级)'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/waitAuditMarketingOne'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/waitAuditMarketingOne'
,
},
{
/** 待审核平台营销活动(一级) - preview */
path
:
'/marketing/waitAuditMarketingOne/preview'
,
path
:
'/marketing
Manage/marketing
/waitAuditMarketingOne/preview'
,
name
:
'待审核平台营销活动(一级)详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 待审核平台营销活动(一级) - detail */
path
:
'/marketing/waitAuditMarketingOne/detail'
,
path
:
'/marketing
Manage/marketing
/waitAuditMarketingOne/detail'
,
name
:
'待审核平台营销活动(一级)详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 待审核平台营销活动(二级) - waitAuditMarketingTwo */
path
:
'/marketing/waitAuditMarketingTwo'
,
path
:
'/marketing
Manage/marketing
/waitAuditMarketingTwo'
,
name
:
'待审核平台营销活动(二级)'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/waitAuditMarketingTwo'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/waitAuditMarketingTwo'
,
},
{
/** 待审核平台营销活动(二级) - preview */
path
:
'/marketing/waitAuditMarketingTwo/preview'
,
path
:
'/marketing
Manage/marketing
/waitAuditMarketingTwo/preview'
,
name
:
'待审核平台营销活动(二级)详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 待审核平台营销活动(二级) - detail */
path
:
'/marketing/waitAuditMarketingTwo/detail'
,
path
:
'/marketing
Manage/marketing
/waitAuditMarketingTwo/detail'
,
name
:
'待审核平台营销活动(二级)详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 待上线平台营销活动 - waitLineMarketing */
path
:
'/marketing/waitLineMarketing'
,
path
:
'/marketing
Manage/marketing
/waitLineMarketing'
,
name
:
'待上线平台营销活动'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/waitLineMarketing'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/waitLineMarketing'
,
},
{
/** 待上线平台营销活动 - preview */
path
:
'/marketing/waitLineMarketing/preview'
,
path
:
'/marketing
Manage/marketing
/waitLineMarketing/preview'
,
name
:
'待上线平台营销活动详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketingManage/marketing/detail'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/detail'
,
},
{
/** 平台营销活动页管理 - activePage */
path
:
'/marketing/activitiesManagement'
,
path
:
'/marketing
Manage/marketing
/activitiesManagement'
,
name
:
'平台营销活动页管理'
,
component
:
'@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage'
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/marketingActivitiesManagement/activePage'
},
{
path
:
'/marketing/activitiesManagement/add'
,
path
:
'/marketing
Manage/marketing
/activitiesManagement/add'
,
name
:
'新增平台营销活动页管理'
,
component
:
'@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/add/index'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/marketingActivitiesManagement/activePage/add/index'
,
hidePageHeader
:
true
,
noMargin
:
true
,
hideInMenu
:
true
,
},
{
path
:
'/marketing/activitiesManagement/edit'
,
path
:
'/marketing
Manage/marketing
/activitiesManagement/edit'
,
name
:
'修改平台营销活动页管理'
,
component
:
'@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/add/index'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/marketingActivitiesManagement/activePage/add/index'
,
hidePageHeader
:
true
,
noMargin
:
true
,
hideInMenu
:
true
,
},
{
path
:
'/marketing/activitiesManagement/view'
,
path
:
'/marketing
Manage/marketing
/activitiesManagement/view'
,
name
:
'查看平台营销活动页管理'
,
component
:
'@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/add/index'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/marketingActivitiesManagement/activePage/add/index'
,
hidePageHeader
:
true
,
noMargin
:
true
,
hideInMenu
:
true
,
},
/** 装修营销活动页 */
{
path
:
'/marketing/activitiesManagement/fixtures'
,
path
:
'/marketing
Manage/marketing
/activitiesManagement/fixtures'
,
name
:
'营销活动页管理装修'
,
component
:
'@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/index'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/marketingActivitiesManagement/activePage/fixtures/index'
,
hidePageHeader
:
true
,
noMargin
:
true
,
noLayout
:
true
,
...
...
@@ -199,17 +199,17 @@ const marketingRoutes = {
},
{
/** 平台营销活动执行 - marketingExecute */
path
:
'/marketing/marketingExecute'
,
path
:
'/marketing
Manage/marketing
/marketingExecute'
,
name
:
'平台营销活动执行'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/marketingExecute'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/marketingExecute'
,
},
{
/** 平台营销活动监控 - marketingMonitor */
path
:
'/marketing/marketingMonitor'
,
path
:
'/marketing
Manage/marketing
/marketingMonitor'
,
name
:
'平台营销活动监控'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/marketingMonitor'
,
component
:
'@/pages/marketingManage/marketing
Manage/marketing
/marketingMonitor'
,
},
]
};
...
...
config/routes/merchantMarketingRoute.ts
View file @
03bc128c
...
...
@@ -4,44 +4,44 @@ const merchantMarketing = {
routes
:
[
{
/** 商家营销活动查询 - merchantMarketingSearch */
path
:
'/merchantMarketing/merchantMarketingSearch'
,
path
:
'/m
arketingManage/m
erchantMarketing/merchantMarketingSearch'
,
name
:
'商家营销活动查询'
,
hidePageHeader
:
true
,
component
:
'@/pages/merchantMarketing/merchantMarketingSearch'
,
component
:
'@/pages/m
arketingManage/m
erchantMarketing/merchantMarketingSearch'
,
},
{
/** 商家营销活动查询详情 - preview */
path
:
'/merchantMarketing/merchantMarketingSearch/preview'
,
path
:
'/m
arketingManage/m
erchantMarketing/merchantMarketingSearch/preview'
,
name
:
'商家营销活动查询详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/merchantMarketing/detail'
,
component
:
'@/pages/m
arketingManage/m
erchantMarketing/detail'
,
},
{
/** 待审核商家营销活动 - waitAuditMerchantMarketing */
path
:
'/merchantMarketing/waitAuditMerchantMarketing'
,
path
:
'/m
arketingManage/m
erchantMarketing/waitAuditMerchantMarketing'
,
name
:
'待审核商家营销活动'
,
hidePageHeader
:
true
,
component
:
'@/pages/merchantMarketing/waitAuditMerchantMarketing'
,
component
:
'@/pages/m
arketingManage/m
erchantMarketing/waitAuditMerchantMarketing'
,
},
{
/** 待审核商家营销活动详情 - preview */
path
:
'/merchantMarketing/waitAuditMerchantMarketing/preview'
,
path
:
'/m
arketingManage/m
erchantMarketing/waitAuditMerchantMarketing/preview'
,
name
:
'待审核商家营销活动详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/merchantMarketing/detail'
,
component
:
'@/pages/m
arketingManage/m
erchantMarketing/detail'
,
},
{
/** 待审核商家营销活动详情 - detail */
path
:
'/merchantMarketing/waitAuditMerchantMarketing/detail'
,
path
:
'/m
arketingManage/m
erchantMarketing/waitAuditMerchantMarketing/detail'
,
name
:
'待审核商家营销活动详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/merchantMarketing/detail'
,
component
:
'@/pages/m
arketingManage/m
erchantMarketing/detail'
,
},
]
}
...
...
src/pages/marketingManage/marketing/components/dateModal/index.tsx
View file @
03bc128c
...
...
@@ -28,7 +28,6 @@ const DateModalLayout: React.FC<DateModalProps> = (props: any) => {
time
:
moment
(
res
.
time
).
format
(
'x'
),
reason
:
res
.
reason
,
}
console
.
log
(
params
,
fieldApi
)
setLoading
(
true
)
fieldApi
(
params
).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
...
...
@@ -36,6 +35,8 @@ const DateModalLayout: React.FC<DateModalProps> = (props: any) => {
return
}
onSubmit
();
form
.
resetFields
()
setLoading
(
false
)
}).
catch
(
err
=>
{
setLoading
(
false
)
})
...
...
src/pages/marketingManage/marketing/waitAddedMarketing/add.tsx
View file @
03bc128c
...
...
@@ -248,7 +248,7 @@ const AddedMarketing = (props: any) => {
roleType
:
item
.
roleId
,
roleTypeName
:
item
.
roleName
,
level
:
item
.
level
,
levelTyp
:
item
.
levelTyp
,
levelTyp
:
item
.
levelTyp
e
,
levelTypeName
:
item
.
levelTypeName
,
levelTag
:
item
.
levelTag
,
}
...
...
src/pages/marketingManage/marketing/waitAddedMarketing/components/applyMember/index.tsx
View file @
03bc128c
...
...
@@ -282,6 +282,7 @@ const ApplyMemberLayout: React.FC<ApplyMemberLayoutProps> = (props: any) => {
}
}
}
}
value=
{
dataSource
}
/>
</
CardLayout
>
)
...
...
src/pages/marketingManage/marketing/waitAddedMarketing/components/basicLayout/index.tsx
View file @
03bc128c
...
...
@@ -65,6 +65,13 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
focus$
.
emit
(
option
);
}
useEffect
(()
=>
{
if
(
isEdit
)
{
setActivitySignUpType
(
1
);
form
.
setFieldsValue
({
'activitySignUpType'
:
1
})
}
},
[
isEdit
])
return
(
<
CardLayout
id=
"basicInfoLayout"
...
...
@@ -136,6 +143,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
startTimeDisabled
(
current
,
'endTime'
)
}
/>
...
...
@@ -173,6 +181,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
endTimeDisabled
(
current
,
'startTime'
)
}
/>
...
...
@@ -215,6 +224,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
startTimeDisabled
(
current
,
'signUpEndTime'
)
}
/>
...
...
@@ -249,6 +259,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
endTimeDisabled
(
current
,
'signUpStartTime'
)
}
/>
...
...
src/pages/marketingManage/marketing/waitAddedMarketing/components/rulesLayout/index.tsx
View file @
03bc128c
...
...
@@ -56,7 +56,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
name=
{
[
'activityDefined'
,
'allowActivity'
]
}
tooltip=
"允许叠加活动类型表明在同一时间内允许同一个商品可以叠加的活动类型"
label=
"叠加活动类型"
rules=
{
[{
required
:
tru
e
,
message
:
'请选择叠加活动类型'
}]
}
rules=
{
[{
required
:
fals
e
,
message
:
'请选择叠加活动类型'
}]
}
className=
{
style
.
rulesLayout
}
>
<
Checkbox
.
Group
>
...
...
@@ -181,7 +181,22 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'randomStartPrice'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
dependencies=
{
[[
'activityDefined'
,
'randomEndPrice'
]]
}
rules=
{
[
({
getFieldValue
})
=>
({
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^
(\-)?\d
+
(\.\d
{1,2}
)?
$/
;
const
randomEndPrice
=
getFieldValue
(
'activityDefined'
)[
'randomEndPrice'
];
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入最小随机金额'
));
}
if
(
!
pattern
.
test
(
value
)
||
!
(
Number
(
value
)
<
Number
(
randomEndPrice
)))
{
return
Promise
.
reject
(
new
Error
(
'必须大于0且小于最大随机金额'
));
}
return
Promise
.
resolve
();
},
})
]
}
>
<
Input
style=
{
{
width
:
'160px'
}
}
addonAfter=
"元"
/>
</
Form
.
Item
>
...
...
@@ -189,7 +204,22 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'randomEndPrice'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
dependencies=
{
[[
'activityDefined'
,
'randomStartPrice'
]]
}
rules=
{
[
({
getFieldValue
})
=>
({
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^
(\-)?\d
+
(\.\d
{1,2}
)?
$/
;
const
randomStartPrice
=
getFieldValue
(
'activityDefined'
)[
'randomStartPrice'
];
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入最大随机金额'
));
}
if
(
!
pattern
.
test
(
value
)
||
!
(
Number
(
value
)
>
Number
(
randomStartPrice
)))
{
return
Promise
.
reject
(
new
Error
(
'必须大于0且大于最小随机金额'
));
}
return
Promise
.
resolve
();
},
})
]
}
>
<
Input
style=
{
{
width
:
'160px'
}
}
addonAfter=
"元"
/>
</
Form
.
Item
>
...
...
@@ -200,7 +230,18 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'restrictPrice'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入每次砍价金额'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`每次砍价金额必须大于0`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
style=
{
{
width
:
'160px'
}
}
addonAfter=
"元"
/>
</
Form
.
Item
>
...
...
@@ -248,7 +289,28 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
style=
{
{
margin
:
0
}
}
name=
{
[
name
,
`${int === 7 ? 'num' : 'key'}`
]
}
fieldKey=
{
[
fieldKey
,
`${int === 7 ? 'num' : 'key'}`
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern1
=
/^-
?[
1-9
]\d
*$/
;
const
pattern2
=
/^-
?[
1-9
]\d
*
(\.\d
{1,2}
)?
$/
;
if
(
!
value
&&
int
===
4
)
{
return
Promise
.
reject
(
new
Error
(
'请输入数量'
));
}
if
(
!
value
&&
int
===
5
)
{
return
Promise
.
reject
(
new
Error
(
'请输入金额'
));
}
if
(
!
value
&&
int
===
7
)
{
return
Promise
.
reject
(
new
Error
(
'请输入件数'
));
}
if
(
!
pattern1
.
test
(
value
)
&&
(
int
===
4
||
int
===
7
))
{
return
Promise
.
reject
(
new
Error
(
`必须大于0`
));
}
if
(
!
pattern2
.
test
(
value
)
&&
int
===
5
)
{
return
Promise
.
reject
(
new
Error
(
`必须大于0最多保留2位小数`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
addonAfter=
{
LADDERBOLIST
(
int
,
type
)?.
addon
}
/>
</
Form
.
Item
>
...
...
@@ -258,7 +320,22 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
style=
{
{
margin
:
0
}
}
name=
{
[
name
,
`${int === 7 ? 'discount' : 'value'}`
]
}
fieldKey=
{
[
fieldKey
,
`${int === 7 ? 'discount' : 'value'}`
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern1
=
/^-
?[
1-9
]\d
*
(\.\d
{1,1}
)?
$/
;
const
pattern2
=
/^-
?[
1-9
]\d
*
(\.\d
{1,2}
)?
$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入'
));
}
if
(
!
pattern1
.
test
(
value
)
&&
(
int
===
4
||
int
===
7
))
{
return
Promise
.
reject
(
new
Error
(
`必须大于0最多保留1位小数`
));
}
if
(
!
pattern2
.
test
(
value
)
&&
int
===
5
)
{
return
Promise
.
reject
(
new
Error
(
`必须大于0最多保留2位小数`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
addonAfter=
{
LADDERBOLIST
(
int
,
type
)?.
addonBefore
}
/>
</
Form
.
Item
>
...
...
@@ -285,7 +362,18 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'num'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入件数'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`必须大于0`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
addonAfter=
"件"
/>
</
Form
.
Item
>
...
...
@@ -293,7 +381,18 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'price'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*
(\.\d
{1,2}
)?
$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入金额'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`金额必须大于0最多保留2位小数`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
addonAfter=
"元"
/>
</
Form
.
Item
>
...
...
@@ -360,7 +459,19 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'restrictNum'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
initialValue=
{
1
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入限制次数'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`限制次数必须大于0`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
style=
{
{
width
:
'160px'
}
}
addonAfter=
"次"
/>
</
Form
.
Item
>
...
...
@@ -379,7 +490,18 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
tooltip=
"要求成团必须达到的人数,如只有参加团购的人数满足成团人数设置要求,团购才成立"
label=
"成团人数"
name=
{
[
'activityDefined'
,
'assembleNum'
]
}
required
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入成团人数'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`成团人数必须大于0`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
style=
{
{
width
:
'359px'
}
}
addonAfter=
"人"
/>
</
Form
.
Item
>
...
...
@@ -426,6 +548,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
{
const
_startTime
=
form
.
getFieldValue
(
'startTime'
);
...
...
@@ -466,7 +589,19 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'joinAssembleNum'
]
}
rules=
{
[{
required
:
true
,
message
:
'请选择'
}]
}
initialValue=
{
1
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入参团限制次数'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`参团限制次数必须大于0`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
style=
{
{
width
:
'191px'
}
}
addonAfter=
"次"
/>
</
Form
.
Item
>
...
...
@@ -541,6 +676,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
style=
{
{
width
:
'168px'
}
}
allowClear
disabledDate=
{
(
current
)
=>
{
...
...
@@ -556,6 +692,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
style=
{
{
width
:
'168px'
}
}
allowClear
disabledDate=
{
(
current
)
=>
{
...
...
@@ -601,7 +738,18 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'orderPrice'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*
(\.\d
{1,2}
)?
$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入订单金额'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`订单金额必须大于0`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
style=
{
{
width
:
'160px'
}
}
addonAfter=
"元"
/>
</
Form
.
Item
>
...
...
@@ -613,7 +761,18 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'integral'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入消耗积分'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`消耗积分必须大于0`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
style=
{
{
width
:
'160px'
}
}
addonAfter=
"积分"
/>
</
Form
.
Item
>
...
...
@@ -659,7 +818,19 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
[
'activityDefined'
,
'lotteryNum'
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入抽奖次数'
}]
}
initialValue=
{
1
}
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/^-
?[
1-9
]\d
*$/
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入抽奖次数'
));
}
if
(
!
pattern
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
`抽奖次数必须大于0`
));
}
return
Promise
.
resolve
();
}
}]
}
>
<
Input
style=
{
{
width
:
'160px'
}
}
addonAfter=
"次"
/>
</
Form
.
Item
>
...
...
@@ -701,6 +872,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
{
return
current
&&
current
<
moment
().
startOf
(
'day'
);
...
...
@@ -729,6 +901,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
{
return
current
&&
current
<
moment
().
startOf
(
'day'
);
...
...
@@ -763,6 +936,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
{
return
current
&&
current
<
moment
().
startOf
(
'day'
);
...
...
@@ -791,6 +965,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
{
return
current
&&
current
<
moment
().
startOf
(
'day'
);
...
...
@@ -821,6 +996,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
disabledDate=
{
(
current
)
=>
{
return
current
&&
current
<
moment
().
startOf
(
'day'
);
...
...
@@ -836,7 +1012,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<
CardLayout
id=
"rulesLayout"
weight
title=
{
`活动规则-${!isEmpty(option) ? option.children : '特价促销'}`
}
title=
{
`活动规则-${!isEmpty(option) ? option
?
.children : '特价促销'}`
}
>
{
secondKill
(
option
?.
value
)
}
{
type
(
option
?.
value
)
}
...
...
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