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
9199f48f
Commit
9199f48f
authored
Jan 07, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 定义平台营销执行数据请求
parent
d6d03915
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
245 additions
and
64 deletions
+245
-64
systemManageRoute.ts
config/routes/refactorRoutes/systemManageRoute.ts
+25
-1
columns_10.tsx
src/pages/marketingManage/common/columns/columns_10.tsx
+79
-0
columns_4.tsx
src/pages/marketingManage/common/columns/columns_4.tsx
+0
-18
index.tsx
src/pages/marketingManage/common/columns/index.tsx
+19
-3
constants.tsx
src/pages/marketingManage/common/constants.tsx
+13
-11
detail.tsx
...ges/marketingManage/marketing/marketingExecute/detail.tsx
+102
-23
index.tsx
...ages/marketingManage/marketing/marketingExecute/index.tsx
+7
-8
No files found.
config/routes/refactorRoutes/systemManageRoute.ts
View file @
9199f48f
...
...
@@ -384,7 +384,31 @@ const router = {
hidePageHeader
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/systemManage/appVersion/add'
,
}
},
{
// APP版本管理
path
:
'/system/appLink/index'
,
name
:
'APP下载'
,
hidePageHeader
:
true
,
// hideInMenu: true,
component
:
'@/pages/systemManage/appLink'
,
},
{
// APP版本管理
path
:
'/system/appLink/add'
,
name
:
'新增APP下载'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/systemManage/appLink/edit'
,
},
{
// APP版本管理
path
:
'/system/appLink/edit'
,
name
:
'编辑APP下载'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/systemManage/appLink/edit'
,
},
]
}
export
default
router
src/pages/marketingManage/common/columns/columns_10.tsx
0 → 100644
View file @
9199f48f
import
React
from
'react'
;
import
{
Image
,
Button
,
Typography
}
from
'antd'
;
const
columns_10
=
({
value
,
handlCollocation
})
=>
{
return
(
[
{
title
:
'商品ID'
,
key
:
'productId'
,
dataIndex
:
'productId'
,
render
:
(
text
)
=>
<
Typography
.
Link
target=
"_blank"
href=
{
`/productManage/commodity/products/detail?id=${text}`
}
>
{
text
}
</
Typography
.
Link
>
},
{
title
:
'商品图片'
,
key
:
'productImgUrl'
,
dataIndex
:
'productImgUrl'
,
render
:
(
text
)
=>
<
Image
width=
{
32
}
height=
{
32
}
src=
{
text
}
/>
},
{
title
:
'商品名称'
,
key
:
'productName'
,
dataIndex
:
'productName'
},
{
title
:
'品类'
,
key
:
'category'
,
dataIndex
:
'category'
},
{
title
:
'品牌'
,
key
:
'brand'
,
dataIndex
:
'brand'
},
{
title
:
'单位'
,
key
:
'unit'
,
dataIndex
:
'unit'
},
{
title
:
'商品价格'
,
key
:
'price'
,
dataIndex
:
'price'
,
render
:
(
text
)
=>
`¥
${
Number
(
text
).
toFixed
(
2
)}
`
},
{
title
:
'个人限购数量'
,
key
:
'restrictNum'
,
dataIndex
:
'restrictNum'
,
},
{
title
:
'活动限购总数量'
,
key
:
'restrictTotalNum'
,
dataIndex
:
'restrictTotalNum'
,
},
{
title
:
'操作'
,
key
:
'operation'
,
dataIndex
:
'operation'
,
render
:
(
_text
,
_record
)
=>
(
<>
{
(
value
===
6
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看赠品
</
Button
>
)
}
{
(
value
===
13
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看换购商品
</
Button
>
)
}
{
(
value
===
15
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看搭配商品
</
Button
>
)
}
</>
)
},
]
)
}
export
default
columns_10
src/pages/marketingManage/common/columns/columns_4.tsx
View file @
9199f48f
...
...
@@ -55,24 +55,6 @@ const columns_4 = ({
key
:
'restrictTotalNum'
,
dataIndex
:
'restrictTotalNum'
,
},
{
title
:
'操作'
,
key
:
'operation'
,
dataIndex
:
'operation'
,
render
:
(
_text
,
_record
)
=>
(
<>
{
(
value
===
6
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看赠品
</
Button
>
)
}
{
(
value
===
13
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看换购商品
</
Button
>
)
}
{
(
value
===
15
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看搭配商品
</
Button
>
)
}
</>
)
},
]
)
}
...
...
src/pages/marketingManage/common/columns/index.tsx
View file @
9199f48f
...
...
@@ -3,33 +3,49 @@ import columns_2 from './columns_2';
import
columns_3
from
'./columns_3'
;
import
columns_4
from
'./columns_4'
;
import
columns_5
from
'./columns_4'
;
import
columns_6
from
'./columns_
4
'
;
import
columns_6
from
'./columns_
10
'
;
import
columns_7
from
'./columns_4'
;
import
columns_8
from
'./columns_4'
;
import
columns_9
from
'./columns_5'
;
import
columns_10
from
'./columns_9'
;
import
columns_11
from
'./columns_6'
;
import
columns_12
from
'./columns_7'
;
import
columns_13
from
'./columns_
4
'
;
import
columns_13
from
'./columns_
10
'
;
import
columns_14
from
'./columns_8'
;
import
columns_15
from
'./columns_
4
'
;
import
columns_15
from
'./columns_
10
'
;
import
columns_16
from
'./columns_4'
;
export
const
Columns
=
{
/** 特价促销 */
1
:
columns_1
,
/** 直降促销 */
2
:
columns_2
,
/** 折价促销 */
3
:
columns_3
,
/** 满量促销 */
4
:
columns_4
,
/** 满额促销 */
5
:
columns_5
,
/** 赠送促销 */
6
:
columns_6
,
/** 多件促销 */
7
:
columns_7
,
/** 组合促销 */
8
:
columns_8
,
/** 拼团 */
9
:
columns_9
,
/** 抽奖 */
10
:
columns_10
,
/** 砍价 */
11
:
columns_11
,
/** 秒杀 */
12
:
columns_12
,
/** 换购 */
13
:
columns_13
,
/** 预售 */
14
:
columns_14
,
/** 套餐 */
15
:
columns_15
,
/** 试用 */
16
:
columns_16
,
}
src/pages/marketingManage/common/constants.tsx
View file @
9199f48f
...
...
@@ -3,6 +3,7 @@ import { Space, Tooltip, Typography } from 'antd';
import
StatusTag
from
'@/components/StatusTag'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
format
}
from
'@/constants/dateFormat'
;
import
{
isEmpty
}
from
'@formily/antd/esm/shared'
;
/** * 活动类型 */
export
enum
ACTIVITYTYPE
{
/** 特价促销 */
...
...
@@ -65,6 +66,7 @@ const lotteryNumType = {
}
/** 活动类型 */
export
const
GeneralEffect
=
(
int
,
data
)
=>
{
const
allowActivity
=
(
data
?.
allowActivity
?
data
.
allowActivity
:
[]);
switch
(
Number
(
int
))
{
case
1
:
case
2
:
...
...
@@ -73,7 +75,7 @@ export const GeneralEffect = (int, data) => {
{
col
:
[
{
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
data
.
allowActivity
.
map
((
item
,
index
)
=>
(
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
allowActivity
.
map
((
item
,
index
)
=>
(
<
StatusTag
key=
{
`default_key_${index}`
}
type=
"default"
title=
{
ACTIVITYTYPENAME
[
item
]
}
/>
))
}
</
Space
>
...
...
@@ -115,21 +117,21 @@ export const GeneralEffect = (int, data) => {
{
(
int
===
5
&&
data
.
type
===
2
)
&&
'满额折'
}
</>,
extra
:
<>
{
(
int
===
4
&&
data
.
type
===
1
)
&&
<
Space
direction=
'vertical'
>
{
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${item.key} 个, 减 ${Number(item.value).toFixed(2)} 元`
}
</
div
>))
}
{
!
isEmpty
(
data
.
ladderBOList
)
&&
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${item.key} 个, 减 ${Number(item.value).toFixed(2)} 元`
}
</
div
>))
}
</
Space
>
}
{
(
int
===
4
&&
data
.
type
===
2
)
&&
<
Space
direction=
'vertical'
>
{
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${item.key} 个, 打 ${item.value} 折`
}
</
div
>))
}
{
!
isEmpty
(
data
.
ladderBOList
)
&&
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${item.key} 个, 打 ${item.value} 折`
}
</
div
>))
}
</
Space
>
}
{
(
int
===
5
&&
data
.
type
===
1
)
&&
<
Space
direction=
'vertical'
>
{
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${Number(item.key).toFixed(2)} 元, 减 ${Number(item.value).toFixed(2)} 元`
}
</
div
>))
}
{
!
isEmpty
(
data
.
ladderBOList
)
&&
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${Number(item.key).toFixed(2)} 元, 减 ${Number(item.value).toFixed(2)} 元`
}
</
div
>))
}
</
Space
>
}
{
(
int
===
5
&&
data
.
type
===
2
)
&&
<
Space
direction=
'vertical'
>
{
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value} 折`
}
</
div
>))
}
{
!
isEmpty
(
data
.
ladderBOList
)
&&
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value} 折`
}
</
div
>))
}
</
Space
>
}
</>
},
{
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
data
.
allowActivity
.
map
((
item
,
index
)
=>
(
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
allowActivity
.
map
((
item
,
index
)
=>
(
<
StatusTag
key=
{
`default_key_${index}`
}
type=
"default"
title=
{
ACTIVITYTYPENAME
[
item
]
}
/>
))
}
</
Space
>
...
...
@@ -159,7 +161,7 @@ export const GeneralEffect = (int, data) => {
</>
},
{
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
data
.
allowActivity
.
map
((
item
,
index
)
=>
(
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
allowActivity
.
map
((
item
,
index
)
=>
(
<
StatusTag
key=
{
`default_key_${index}`
}
type=
"default"
title=
{
ACTIVITYTYPENAME
[
item
]
}
/>
))
}
</
Space
>
...
...
@@ -190,11 +192,11 @@ export const GeneralEffect = (int, data) => {
col
:
[
{
label
:
'优惠规则'
,
extra
:
<
Space
direction=
'vertical'
>
{
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${item.discount} 件, 打 ${item.num} 折`
}
</
div
>))
}
{
!
isEmpty
(
data
.
ladderBOList
)
&&
data
.
ladderBOList
.
map
(
item
=>
(<
div
>
{
`满 ${item.discount} 件, 打 ${item.num} 折`
}
</
div
>))
}
</
Space
>
},
{
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
data
.
allowActivity
.
map
((
item
,
index
)
=>
(
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
allowActivity
.
map
((
item
,
index
)
=>
(
<
StatusTag
key=
{
`default_key_${index}`
}
type=
"default"
title=
{
ACTIVITYTYPENAME
[
item
]
}
/>
))
}
</
Space
>
...
...
@@ -219,7 +221,7 @@ export const GeneralEffect = (int, data) => {
col
:
[
{
label
:
'优惠规则'
,
extra
:
`任选
${
data
.
num
}
件, 付
${
data
.
price
}
元`
},
{
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
data
.
allowActivity
.
map
((
item
,
index
)
=>
(
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
allowActivity
.
map
((
item
,
index
)
=>
(
<
StatusTag
key=
{
`default_key_${index}`
}
type=
"default"
title=
{
ACTIVITYTYPENAME
[
item
]
}
/>
))
}
</
Space
>
...
...
@@ -319,7 +321,7 @@ export const GeneralEffect = (int, data) => {
</>
},
{
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
data
.
allowActivity
.
map
((
item
,
index
)
=>
(
label
:
'叠加活动类型'
,
extra
:
<
Space
wrap
>
{
allowActivity
.
map
((
item
,
index
)
=>
(
<
StatusTag
key=
{
`default_key_${index}`
}
type=
"default"
title=
{
ACTIVITYTYPENAME
[
item
]
}
/>
))
}
</
Space
>
...
...
src/pages/marketingManage/marketing/marketingExecute/detail.tsx
View file @
9199f48f
import
{
useIntl
}
from
'umi'
;
import
React
,
{
Fragment
,
useCallback
,
useMemo
,
useState
}
from
'react'
;
import
{
Badge
,
Button
,
Tag
}
from
'antd'
;
import
{
Badge
,
Button
,
Tag
,
Typography
,
Image
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
Context
}
from
'@/components/DetailLayout/components/context'
;
import
PeripheralLayout
from
'@/components/DetailLayout'
;
...
...
@@ -12,7 +12,6 @@ import { useEffect } from 'react';
import
ListLayout
from
'@/components/DetailLayout/components/listLayout'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
remindLayout
,
RemindLayoutProps
}
from
'@/pages/marketingManage/common/remind'
;
import
{
getMarketingAbilityActivityExecutePlatformDetail
,
getMarketingAbilityActivityExecutePlatformDetailGoodsPage
,
getMarketingAbilityActivityExecutePlatformDetailGoodsExecuteDetailPage
}
from
'@/services/MarketingV2Api'
;
import
{
Columns
}
from
'../../common/columns'
;
import
{
ACTIVITYTYPENAME
,
GeneralEffect
}
from
'../../common/constants'
;
import
{
InnerStatusColor
,
OuterStatusColor
}
from
'../../common/tagColor'
;
...
...
@@ -23,6 +22,12 @@ import { ColumnType } from 'antd/lib/table/interface';
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
TableModal
from
'@/components/TableModal'
;
import
{
getMarketingPlatformActivityExecuteDetail
,
getMarketingPlatformActivityExecuteDetailGoodsExecuteDetailPage
,
getMarketingPlatformActivityExecuteDetailGoodsPage
}
from
'@/services/MarketingV2Api'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
import
{
postManageWebShopWebAll
}
from
'@/services/ManageV2Api'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
const
{
onFormMount$
}
=
FormEffectHooks
;
const
DetialLayout
=
()
=>
{
const
intl
=
useIntl
();
...
...
@@ -59,8 +64,8 @@ const DetialLayout = () => {
col
:
[
{
label
:
'活动开始时间'
,
extra
:
format
(
data
.
startTime
)
},
{
label
:
'活动结束时间'
,
extra
:
format
(
data
.
endTime
)
},
{
label
:
'报名开始时间'
,
extra
:
data
.
memberName
},
{
label
:
'报名结束时间'
,
extra
:
format
(
data
.
create
Time
)
},
{
label
:
'报名开始时间'
,
extra
:
format
(
data
.
signUpStartTime
)
},
{
label
:
'报名结束时间'
,
extra
:
format
(
data
.
signUpEnd
Time
)
},
{
label
:
'内部状态'
,
extra
:
<
Badge
status=
{
InnerStatusColor
(
data
.
innerStatus
)
}
text=
{
data
.
innerStatusName
}
/>
},
]
},
...
...
@@ -75,7 +80,7 @@ const DetialLayout = () => {
}
const
fetchDataSource
=
useCallback
(
async
()
=>
{
await
getMarketing
AbilityActivityExecutePlatform
Detail
({
id
}
as
any
).
then
((
res
:
any
)
=>
{
await
getMarketing
PlatformActivityExecute
Detail
({
id
}
as
any
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
@@ -139,22 +144,76 @@ const DetialLayout = () => {
dataIndex
:
'operation'
,
render
:
(
_text
,
_record
)
=>
<
Button
type=
'link'
style=
{
{
padding
:
0
}
}
onClick=
{
()
=>
toggle
(
true
,
_record
)
}
>
执行明细
</
Button
>
}])
}
else
{
return
columns
.
concat
([{
title
:
'参与客户数'
,
key
:
'customerCount'
,
dataIndex
:
'customerCount'
}
else
if
(
value
===
ACTIVITY_TYPE_6
||
value
===
ACTIVITY_TYPE_13
||
value
===
ACTIVITY_TYPE_15
)
{
return
[
{
title
:
'商品ID'
,
key
:
'productId'
,
dataIndex
:
'productId'
,
render
:
(
text
)
=>
<
Typography
.
Link
target=
"_blank"
href=
{
`/productManage/commodity/products/detail?id=${text}`
}
>
{
text
}
</
Typography
.
Link
>
},
{
title
:
'实购数量'
,
key
:
'salesNum'
,
dataIndex
:
'salesNum'
title
:
'商品图片'
,
key
:
'productImgUrl'
,
dataIndex
:
'productImgUrl'
,
render
:
(
text
)
=>
<
Image
width=
{
32
}
height=
{
32
}
src=
{
text
}
/>
},
{
title
:
'实购金额'
,
key
:
'amount'
,
dataIndex
:
'amount'
}])
title
:
'商品名称'
,
key
:
'productName'
,
dataIndex
:
'productName'
},
{
title
:
'品类'
,
key
:
'category'
,
dataIndex
:
'category'
},
{
title
:
'品牌'
,
key
:
'brand'
,
dataIndex
:
'brand'
},
{
title
:
'单位'
,
key
:
'unit'
,
dataIndex
:
'unit'
},
{
title
:
'商品价格'
,
key
:
'price'
,
dataIndex
:
'price'
,
render
:
(
text
)
=>
`¥
${
Number
(
text
).
toFixed
(
2
)}
`
},
{
title
:
'个人限购数量'
,
key
:
'restrictNum'
,
dataIndex
:
'restrictNum'
,
},
{
title
:
'活动限购总数量'
,
key
:
'restrictTotalNum'
,
dataIndex
:
'restrictTotalNum'
,
},
{
title
:
'操作'
,
key
:
'operation'
,
dataIndex
:
'operation'
,
render
:
(
_text
,
_record
)
=>
(
<>
{
(
value
===
6
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看赠品
</
Button
>
)
}
{
(
value
===
13
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看换购商品
</
Button
>
)
}
{
(
value
===
15
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
handlCollocation
(
_record
)
}
>
查看搭配商品
</
Button
>
)
}
{
showExecution
&&
<
Button
type=
'link'
style=
{
{
padding
:
0
}
}
onClick=
{
()
=>
toggle
(
true
,
_record
)
}
>
执行明细
</
Button
>
}
</>
)
},
]
}
},
[
value
])
...
...
@@ -162,7 +221,13 @@ const DetialLayout = () => {
{
title
:
'单据号'
,
key
:
'orderId'
,
dataIndex
:
'orderId'
dataIndex
:
'orderId'
,
render
:
(
_text
,
_r
)
=>
(
<>
{
_r
.
recordType
===
1
&&
<
Button
type=
'link'
target=
'_blank'
onClick=
{
()
=>
history
.
push
(
`/orderSystem/list/detail?id=${_r.skuId}`
)
}
>
{
_r
.
skuId
}
</
Button
>
}
{
_r
.
recordType
===
2
&&
<
Button
type=
'link'
target=
'_blank'
onClick=
{
()
=>
history
.
push
(
`/afterService/returnManage/query/detail?id=${_text}`
)
}
>
{
_r
.
orderNo
}
</
Button
>
}
</>
)
},
{
title
:
'单据类型'
,
...
...
@@ -219,7 +284,7 @@ const DetialLayout = () => {
const
fetchData
=
useCallback
((
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
Array
.
isArray
(
fetch
))
{
getMarketing
AbilityActivityExecutePlatform
DetailGoodsExecuteDetailPage
({
...
params
,
...
param
}).
then
(
res
=>
{
getMarketing
PlatformActivityExecute
DetailGoodsExecuteDetailPage
({
...
params
,
...
param
}).
then
(
res
=>
{
resolve
(
res
.
data
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
...
...
@@ -236,7 +301,7 @@ const DetialLayout = () => {
const
toggle
=
(
flag
:
boolean
,
info
?)
=>
{
if
(
info
)
{
setParam
({
belongType
:
2
,
belongType
:
1
,
activityId
:
id
,
skuId
:
info
.
skuId
,
})
...
...
@@ -244,6 +309,19 @@ const DetialLayout = () => {
setTableModalVisible
(
flag
)
}
const
useStateEffects
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
/** 活动类型 */
postManageWebShopWebAll
({
siteId
:
GlobalConfig
.
global
.
siteInfo
.
id
,
type
:
1
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
id
}
});
linkage
.
enum
(
'shopId'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
})
}
return
(
<
Context
.
Provider
value=
{
dataSource
}
>
<
PeripheralLayout
...
...
@@ -268,7 +346,7 @@ const DetialLayout = () => {
anchor=
"activityProductLayout"
ids=
{
{
activityId
:
id
}
}
title=
'活动商品执行情况'
fetch=
{
getMarketing
AbilityActivityExecutePlatform
DetailGoodsPage
}
fetch=
{
getMarketing
PlatformActivityExecute
DetailGoodsPage
}
columns=
{
coulumsList
}
/>
</
Fragment
>
...
...
@@ -307,6 +385,7 @@ const DetialLayout = () => {
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
"orderNo"
,
FORM_FILTER_PATH
)
useStateEffects
()
}
}
schema=
{
{
type
:
'object'
,
...
...
@@ -355,7 +434,7 @@ const DetialLayout = () => {
'[startTime,endTime]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
`
${intl.formatMessage({ id: 'marketingAbility.kaopingkaishishijian' })}`
,
`${intl.formatMessage({ id: 'marketingAbility.kaopingwanchengshijian' })}
`
],
placeholder
:
[
`
开始时间`
,
`结束时间
`
],
allowClear
:
true
,
style
:
{
width
:
240
,
...
...
@@ -395,7 +474,7 @@ const DetialLayout = () => {
span
:
1
,
},
'x-component-props'
:
{
children
:
`
${intl.formatMessage({ id: 'marketingAbility.chaxun' })}
`
,
children
:
`
查询
`
,
},
},
},
...
...
src/pages/marketingManage/marketing/marketingExecute/index.tsx
View file @
9199f48f
import
React
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
{
Button
,
Tag
,
Typography
}
from
'antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
format
}
from
'@/constants/dateFormat'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
getMarketingAbilityActivityExecutePlatformPage
,
getMarketingPlatformActivityGetOuterStatusList
,
getMarketingPlatformActivitySignupGetActivityTypeList
}
from
'@/services/MarketingV2Api'
;
import
TableLayout
from
'@/components/TableLayout'
;
import
{
OuterStatusColor
}
from
'../../common/tagColor'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
import
{
getMarketingPlatformActivityExecutePage
,
getMarketingPlatformActivityGetOuterStatusList
,
getMarketingPlatformActivitySignupGetActivityTypeList
}
from
'@/services/MarketingV2Api'
;
const
{
onFormMount$
}
=
FormEffectHooks
;
const
Search
=
()
=>
{
const
intl
=
useIntl
();
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
render
:
(
text
)
=>
<
Button
type=
'link'
style=
{
{
padding
:
0
}
}
>
{
text
}
</
Button
>
render
:
(
text
,
record
)
=>
<
Button
type=
'link'
target=
'_blank'
style=
{
{
padding
:
0
}
}
onClick=
{
()
=>
history
.
push
(
`/marketingManage/marketing/marketingSearch/preview?id=${text}`
)
}
>
{
text
}
</
Button
>
},
{
title
:
'活动名称'
,
...
...
@@ -64,8 +63,8 @@ const Search = () => {
{
title
:
'操作'
,
dataIndex
:
'opertion'
,
render
:
(
text
,
_
)
=>
(
<
Button
type=
'link'
>
查看
</
Button
>
render
:
(
_
text
,
_
)
=>
(
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/marketingManage/marketing/marketingExecute/detail?id=${_.id}`
)
}
>
查看
</
Button
>
)
}
]
...
...
@@ -94,7 +93,7 @@ const Search = () => {
<
TableLayout
columns=
{
columns
}
effects=
"id"
fetch=
{
getMarketing
AbilityActivityExecutePlatform
Page
}
fetch=
{
getMarketing
PlatformActivityExecute
Page
}
useStateEffects=
{
useStateEffects
}
schema=
{
{
type
:
'object'
,
...
...
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