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
shenshaokai
jinfa-admin
Commits
8a2c41f1
Commit
8a2c41f1
authored
Jan 06, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 营销活动执行
parent
12a186ae
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
229 additions
and
15 deletions
+229
-15
index.tsx
src/components/DetailLayout/components/basicLayout/index.tsx
+7
-3
index.tsx
...omponents/DetailLayout/components/generalLayout/index.tsx
+7
-3
index.tsx
src/components/TableModal/index.tsx
+7
-4
tagColor.ts
src/pages/marketingManage/common/tagColor.ts
+36
-0
detail.tsx
...ges/marketingManage/marketing/marketingExecute/detail.tsx
+0
-0
index.tsx
...ages/marketingManage/marketing/marketingExecute/index.tsx
+172
-5
No files found.
src/components/DetailLayout/components/basicLayout/index.tsx
View file @
8a2c41f1
...
...
@@ -6,12 +6,14 @@ import style from './index.less';
export
interface
BasicInfoProps
{
effect
?:
any
,
/** 栅格 */
span
?:
number
}
const
count
=
0
;
const
BasicLayout
:
React
.
FC
<
BasicInfoProps
>
=
(
props
:
any
)
=>
{
const
{
effect
}
=
props
;
const
{
effect
,
span
}
=
props
;
return
(
<
Card
...
...
@@ -20,7 +22,7 @@ const BasicLayout: React.FC<BasicInfoProps> = (props: any) => {
>
<
Row
gutter=
{
[
8
,
8
]
}
>
{
effect
.
length
>
count
&&
effect
.
map
((
item
,
index
)
=>
(
<
Col
key=
{
`effect_${index + 1}`
}
span=
{
8
}
>
<
Col
key=
{
`effect_${index + 1}`
}
span=
{
span
}
>
{
item
.
col
.
map
((
it
,
idx
)
=>
(
<
div
className=
{
style
.
cell
}
key=
{
`effect_col_${idx + 1}`
}
>
<
h5
className=
{
style
.
label
}
>
{
it
.
label
}
:
</
h5
>
...
...
@@ -33,5 +35,7 @@ const BasicLayout: React.FC<BasicInfoProps> = (props: any) => {
</
Card
>
)
}
BasicLayout
.
defaultProps
=
{
span
:
8
,
}
export
default
BasicLayout
src/components/DetailLayout/components/generalLayout/index.tsx
View file @
8a2c41f1
...
...
@@ -15,12 +15,14 @@ export interface GeneraInfoProps {
extra
?:
ReactNode
,
/** 是否开启没数据不显示字段 */
visible
?:
boolean
,
/** 栅格 */
span
?:
number
}
const
count
=
0
;
const
GeneralLayout
:
React
.
FC
<
GeneraInfoProps
>
=
(
props
:
any
)
=>
{
const
{
effect
,
anchor
,
title
,
extra
,
visible
}
=
props
;
const
{
effect
,
anchor
,
title
,
extra
,
visible
,
span
}
=
props
;
return
(
<
Card
...
...
@@ -30,7 +32,7 @@ const GeneralLayout: React.FC<GeneraInfoProps> = (props: any) => {
>
<
Row
gutter=
{
[
8
,
8
]
}
>
{
effect
.
length
>
count
&&
effect
.
map
((
item
,
index
)
=>
(
<
Col
key=
{
`effect_${index + 1}`
}
span=
{
8
}
>
<
Col
key=
{
`effect_${index + 1}`
}
span=
{
span
}
>
{
item
.
col
.
map
((
it
,
idx
)
=>
(
<
Fragment
key=
{
`effect_col_${idx + 1}`
}
>
{
visible
?
<>
...
...
@@ -56,5 +58,7 @@ const GeneralLayout: React.FC<GeneraInfoProps> = (props: any) => {
</
Card
>
)
}
GeneralLayout
.
defaultProps
=
{
span
:
8
}
export
default
GeneralLayout
src/components/TableModal/index.tsx
View file @
8a2c41f1
...
...
@@ -51,11 +51,13 @@ interface Iprops {
onClose
:
()
=>
void
,
onOk
:
(
selectRow
:
number
[]
|
string
[],
selectedRows
:
{
[
key
:
string
]:
any
}[])
=>
void
,
/** customKey */
customKey
?:
string
customKey
?:
string
,
/** 宽度 */
width
?:
number
}
const
TableModal
:
React
.
FC
<
Iprops
>
=
(
props
:
Iprops
)
=>
{
const
{
title
,
visible
,
schema
,
columns
,
effects
,
tableProps
,
mode
,
expressionScope
,
fetchData
,
onClose
,
onOk
,
value
,
format
,
customizeRadio
,
modalType
,
footer
,
customKey
}
=
props
;
const
{
title
,
visible
,
schema
,
columns
,
effects
,
tableProps
,
mode
,
expressionScope
,
fetchData
,
onClose
,
onOk
,
value
,
format
,
customizeRadio
,
modalType
,
footer
,
customKey
,
width
}
=
props
;
const
ref
=
useRef
<
any
>
({});
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
type
:
customizeRadio
&&
mode
===
'radio'
?
'checkbox'
:
mode
,
customKey
:
customKey
});
const
isFirstLoad
=
useRef
<
boolean
>
(
true
);
...
...
@@ -120,7 +122,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
onClose=
{
handleOnClose
}
onCancel=
{
handleOnClose
}
// onOk={handleOk}
width=
{
900
}
width=
{
width
}
{
...
otherProps
}
>
<
StandardTable
...
...
@@ -168,7 +170,8 @@ TableModal.defaultProps = {
format
:
null
,
customizeRadio
:
false
,
modalType
:
"Modal"
,
footer
:
null
footer
:
null
,
width
:
900
}
export
default
TableModal
;
src/pages/marketingManage/common/tagColor.ts
0 → 100644
View file @
8a2c41f1
export
const
OuterStatusColor
=
(
type
)
=>
{
switch
(
type
)
{
case
1
:
case
2
:
case
3
:
case
6
:
return
'warning'
case
4
:
return
'success'
case
5
:
return
'error'
case
7
:
return
'processing'
default
:
return
'default'
}
}
export
const
InnerStatusColor
=
(
type
)
=>
{
switch
(
type
)
{
case
1
:
case
2
:
case
4
:
case
6
:
return
'warning'
case
3
:
case
5
:
return
'error'
case
7
:
return
'processing'
case
9
:
return
'success'
default
:
return
'default'
}
}
src/pages/marketingManage/marketing/marketingExecute/detail.tsx
View file @
8a2c41f1
This diff is collapsed.
Click to expand it.
src/pages/marketingManage/marketing/marketingExecute/index.tsx
View file @
8a2c41f1
/** 平台营销活动执行 */
import
React
from
'react'
;
import
{
useIntl
}
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
}
from
'@/services/MarketingV2Api'
;
import
TableLayout
from
'@/components/TableLayout'
;
import
{
OuterStatusColor
}
from
'../../common/tagColor'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
const
MarketingExecute
=
()
=>
{
return
(
<
div
>
123
</
div
>
const
Search
=
()
=>
{
const
intl
=
useIntl
();
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
render
:
(
text
)
=>
<
Button
type=
'link'
style=
{
{
padding
:
0
}
}
>
{
text
}
</
Button
>
},
{
title
:
'活动名称'
,
dataIndex
:
'activityName'
,
},
{
title
:
'活动类型'
,
dataIndex
:
'activityTypeName'
,
},
{
title
:
'活动开始时间'
,
dataIndex
:
'startTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'活动结束时间'
,
dataIndex
:
'endTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'参与客户数'
,
dataIndex
:
'customerCount'
,
},
{
title
:
'已执行订单单数'
,
dataIndex
:
'orderCount'
,
},
{
title
:
'已执行订单金额'
,
dataIndex
:
'orderAmount'
,
render
:
(
text
)
=>
(
<
Typography
.
Text
>
¥
{
Number
(
text
).
toFixed
(
2
)
}
</
Typography
.
Text
>
)
},
{
title
:
'外部状态'
,
dataIndex
:
'statusName'
,
render
:
(
text
,
_
)
=>
(
<
Tag
color=
{
OuterStatusColor
(
_
.
status
)
}
>
{
text
}
</
Tag
>
)
},
{
title
:
'操作'
,
dataIndex
:
'opertion'
,
render
:
(
text
,
_
)
=>
(
<
Button
type=
'link'
>
查看
</
Button
>
)
}
]
return
(
<
TableLayout
columns=
{
columns
}
effects=
"id"
fetch=
{
getMarketingAbilityActivityExecutePlatformPage
}
schema=
{
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
"object"
,
"x-component"
:
"flex-layout"
,
"x-component-props"
:
{
rowStyle
:
{
justifyContent
:
'space-between'
}
},
properties
:
{
id
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'活动ID'
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
quantity
,
message
:
'请输入ID'
,
},
],
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'Flex-Layout'
,
"x-component-props"
:
{
rowStyle
:
{
justifyContent
:
"flex-start"
,
flexWrap
:
"nowrap"
},
colStyle
:
{
//改变间隔
marginRight
:
20
}
},
properties
:
{
activityName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'活动名称'
,
allowClear
:
true
,
style
:
{
width
:
160
,
},
},
},
'[startTime,endTime]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
allowClear
:
true
,
style
:
{
width
:
240
,
},
},
},
activityType
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'活动类型'
,
allowClear
:
true
,
style
:
{
width
:
160
,
},
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'外部状态'
,
allowClear
:
true
,
style
:
{
width
:
160
,
},
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
}
}
/>
);
}
export
default
MarketingExecute
;
export
default
Search
;
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