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
2342bc4d
Commit
2342bc4d
authored
Jan 11, 2022
by
前端-钟卫鹏
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
ead944a8
d75d1caf
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
986 additions
and
129 deletions
+986
-129
marketingRoute.ts
...es/refactorRoutes/marketingManageRoutes/marketingRoute.ts
+15
-8
systemManageRoute.ts
config/routes/refactorRoutes/systemManageRoute.ts
+25
-1
index.tsx
src/components/AnchorPage/index.tsx
+1
-1
index.tsx
src/components/Charts/Gauge/index.tsx
+1
-1
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/Mood/index.tsx
+18
-7
index.tsx
src/components/NiceForm/components/AntUpload/index.tsx
+5
-4
SmilingFace.tsx
src/components/NiceForm/components/SmilingFace.tsx
+26
-22
index.tsx
src/components/NiceForm/index.tsx
+1
-1
index.tsx
src/components/TableModal/index.tsx
+7
-4
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
+14
-12
tagColor.ts
src/pages/marketingManage/common/tagColor.ts
+36
-0
useGetLayout.ts
...nagement/activePage/fixtures/common/hooks/useGetLayout.ts
+1
-1
activityProductDrawer.tsx
.../components/ActivityAreaSetting/activityProductDrawer.tsx
+1
-1
detail.tsx
...ges/marketingManage/marketing/marketingExecute/detail.tsx
+492
-0
index.tsx
...ages/marketingManage/marketing/marketingExecute/index.tsx
+195
-5
constants.tsx
...es/marketingManage/merchantMarketing/detail/constants.tsx
+30
-29
index.tsx
src/pages/marketingManage/merchantMarketing/detail/index.tsx
+4
-3
index.tsx
...rchaseManage/purchaseAbility/demandBidMgt/offer/index.tsx
+2
-2
No files found.
config/routes/refactorRoutes/marketingManageRoutes/marketingRoute.ts
View file @
2342bc4d
...
...
@@ -183,14 +183,21 @@ const marketingRoutes = {
noLayout
:
true
,
hideInMenu
:
true
,
},
// {
// /** 平台营销活动执行 - marketingExecute */
// path: '/marketingManage/marketing/marketingExecute',
// name: '平台营销活动执行',
// hidePageHeader: true,
// : true,
// component: '@/pages/marketingManage/marketing/marketingExecute',
// },
{
/** 平台营销活动执行 - marketingExecute */
path
:
'/marketingManage/marketing/marketingExecute'
,
name
:
'平台营销活动执行'
,
hidePageHeader
:
true
,
component
:
'@/pages/marketingManage/marketing/marketingExecute'
,
},
{
/** 平台营销活动执行详情 - marketingExecute */
path
:
'/marketingManage/marketing/marketingExecute/detail'
,
name
:
'平台营销活动执行详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/marketingManage/marketing/marketingExecute/detail'
,
},
// {
// /** 平台营销活动监控 - marketingMonitor */
// path: '/marketingManage/marketing/marketingMonitor',
...
...
config/routes/refactorRoutes/systemManageRoute.ts
View file @
2342bc4d
...
...
@@ -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/components/AnchorPage/index.tsx
View file @
2342bc4d
...
...
@@ -75,7 +75,7 @@ const AnchorPage = (props: IProps) => {
useEffect
(()
=>
{
const
firstKey
=
anchors
.
length
?
`#
${
anchors
[
0
].
key
}
`
:
''
;
if
(
firstKey
&&
firstKey
!==
current
)
{
setCurrent
(
firstKey
);
mounted
.
current
&&
setCurrent
(
firstKey
);
}
},
[
anchors
]);
...
...
src/components/Charts/Gauge/index.tsx
View file @
2342bc4d
...
...
@@ -68,7 +68,7 @@ registerShape('point', 'pointer', {
attrs
:
{
x
:
center
.
x
,
y
:
center
.
y
,
r
:
6
,
r
:
4
,
stroke
:
cfg
.
color
,
lineWidth
:
3
,
fill
:
'#fff'
,
...
...
src/components/DetailLayout/components/basicLayout/index.tsx
View file @
2342bc4d
...
...
@@ -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 @
2342bc4d
...
...
@@ -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/Mood/index.tsx
View file @
2342bc4d
...
...
@@ -5,7 +5,7 @@
* @LastEditTime: 2020-09-22 18:04:44
* @Description: 评价笑脸组件
*/
import
React
from
'react'
;
import
React
,
{
CSSProperties
}
from
'react'
;
import
{
SmileFilled
,
MehFilled
,
...
...
@@ -13,30 +13,40 @@ import {
}
from
'@ant-design/icons'
;
interface
MoodProps
{
/**
* 类型
*/
type
:
'smile'
|
'notBad'
|
'sad'
;
/**
* 自定义外部样式
*/
customStyle
?:
CSSProperties
,
};
const
Mood
:
React
.
FC
<
MoodProps
>
=
({
type
=
'smile'
})
=>
{
let
node
=
null
;
const
Mood
:
React
.
FC
<
MoodProps
>
=
({
type
=
'smile'
,
customStyle
=
{}
})
=>
{
let
node
:
any
=
null
;
switch
(
type
)
{
case
'smile'
:
node
=
<><
SmileFilled
style=
{
{
color
:
'#41CC9E'
,
marginRight
:
4
}
}
/></>;
node
=
<><
SmileFilled
style=
{
{
color
:
'#41CC9E'
,
...
customStyle
}
}
/></>;
break
;
case
'notBad'
:
node
=
<><
MehFilled
style=
{
{
color
:
'#FFC400'
,
marginRight
:
4
}
}
/></>;
node
=
<><
MehFilled
style=
{
{
color
:
'#FFC400'
,
...
customStyle
}
}
/></>;
break
;
case
'sad'
:
node
=
<><
FrownFilled
style=
{
{
color
:
'#EF6260'
,
marginRight
:
4
}
}
/></>;
node
=
<><
FrownFilled
style=
{
{
color
:
'#EF6260'
,
...
customStyle
}
}
/></>;
break
;
default
:
break
;
}
return
node
;
};
Mood
.
defaultProps
=
{
customStyle
:
{},
};
export
default
Mood
;
\ No newline at end of file
src/components/NiceForm/components/AntUpload/index.tsx
View file @
2342bc4d
...
...
@@ -179,6 +179,7 @@ export interface IUploaderProps {
value
:
any
[]
listType
?:
UploadListType
readOnly
?:
boolean
maxCount
?:
number
}
export
const
Upload
=
connect
({
...
...
@@ -274,7 +275,7 @@ export const Upload = connect({
public
render
()
{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const
{
listType
,
locale
,
onChange
,
value
=
[],
...
others
}
=
this
.
props
if
(
listType
.
indexOf
(
'card'
)
>
-
1
)
{
if
(
listType
!
.
indexOf
(
'card'
)
>
-
1
)
{
return
(
<
AntdUpload
{
...
others
}
...
...
@@ -283,13 +284,13 @@ export const Upload = connect({
onRemove=
{
this
.
onRemoveHandler
}
listType=
{
'picture-card'
}
>
{
!
others
.
readOnly
?
(
{
!
others
.
readOnly
&&
(
others
.
maxCount
!==
undefined
?
this
.
state
.
value
.
length
<
others
.
maxCount
:
true
)
?
(
<
UploadPlaceholder
/>
)
:
null
}
</
AntdUpload
>
)
}
if
(
listType
.
indexOf
(
'dragger'
)
>
-
1
)
{
if
(
listType
!
.
indexOf
(
'dragger'
)
>
-
1
)
{
return
(
<
UploadDragger
{
...
others
}
...
...
@@ -297,7 +298,7 @@ export const Upload = connect({
onChange=
{
this
.
onChangeHandler
}
onRemove=
{
this
.
onRemoveHandler
}
// TODO image 类型是跟 picture 一样 ?
listType=
{
listType
.
indexOf
(
'image'
)
>
-
1
?
'picture'
:
'text'
}
listType=
{
listType
!
.
indexOf
(
'image'
)
>
-
1
?
'picture'
:
'text'
}
>
<
p
className=
{
'ant-upload-drag-icon'
}
>
<
InboxOutlined
/>
...
...
src/components/NiceForm/components/SmilingFace.tsx
View file @
2342bc4d
import
React
from
'react'
;
import
Mood
from
'@/components/Mood'
;
import
{
getIntl
}
from
'umi'
;
const
intl
=
getIntl
();
interface
SmilingFaceProps
{
value
:
number
;
};
const
SmilingFace
:
React
.
FC
<
SmilingFaceProps
>
=
({
value
,
})
=>
{
let
node
=
null
;
const
SmilingFace
=
(
props
)
=>
{
const
{
value
,
schema
}
=
props
const
componentProps
=
schema
?.
getExtendsComponentProps
()
||
{};
let
node
:
any
=
null
;
switch
(
value
)
{
case
1
:
case
0
:
case
1
:
case
2
:
{
node
=
(
<>
<
Mood
type=
"sad"
/>
<
span
>
差评
</
span
>
</>
<
div
{
...
componentProps
}
>
<
Mood
type=
"sad"
customStyle=
{
{
marginRight
:
8
}
}
/>
<
span
>
{
intl
.
formatMessage
({
id
:
'components.chaping'
})
}
</
span
>
</
div
>
);
break
;
}
case
3
:
{
node
=
(
<>
<
Mood
type=
"notBad"
/>
<
span
>
中评
</
span
>
</>
<
div
{
...
componentProps
}
>
<
Mood
type=
"notBad"
customStyle=
{
{
marginRight
:
8
}
}
/>
<
span
>
{
intl
.
formatMessage
({
id
:
'components.zhongping'
})
}
</
span
>
</
div
>
);
break
;
}
case
4
:
case
4
:
case
5
:
{
node
=
(
<>
<
Mood
type=
"smile"
/>
<
span
>
好评
</
span
>
</>
<
div
{
...
componentProps
}
>
<
Mood
type=
"smile"
customStyle=
{
{
marginRight
:
8
}
}
/>
<
span
>
{
intl
.
formatMessage
({
id
:
'components.haoping'
})
}
</
span
>
</
div
>
);
break
;
}
default
:
break
;
}
return
node
;
};
export
default
SmilingFace
;
\ No newline at end of file
SmilingFace
.
isFieldComponent
=
true
;
export
default
SmilingFace
;
src/components/NiceForm/index.tsx
View file @
2342bc4d
import
React
,
{
useEffect
}
from
'react'
;
import
SchemaForm
,
{
IAntdSchemaFormProps
,
createVirtualBox
,
registerVirtualBox
,
Schema
,
SchemaField
,
FormButtonGroup
,
Reset
,
createControllerBox
,
registerValidationRules
,
IAntdSchemaFormProps
,
createVirtualBox
,
registerVirtualBox
,
Schema
,
SchemaField
,
FormButtonGroup
,
Reset
,
createControllerBox
,
registerValidationRules
}
from
'@formily/antd'
;
import
{
Button
,
Space
,
Row
,
Col
,
DatePicker
}
from
'antd'
;
import
CustomUpload
from
'./components/CustomUpload'
;
...
...
src/components/TableModal/index.tsx
View file @
2342bc4d
...
...
@@ -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/columns/columns_10.tsx
0 → 100644
View file @
2342bc4d
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 @
2342bc4d
...
...
@@ -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 @
2342bc4d
...
...
@@ -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 @
2342bc4d
import
React
from
'react'
;
import
{
Space
,
Tooltip
,
Typography
}
from
'antd'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
format
}
from
'@/pages/transaction/common/dateFormat'
;
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/common/tagColor.ts
0 → 100644
View file @
2342bc4d
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/marketingActivitiesManagement/activePage/fixtures/common/hooks/useGetLayout.ts
View file @
2342bc4d
...
...
@@ -239,7 +239,7 @@ function useGetLayout() {
const
props
=
_row
.
key
===
'top'
?
{
imageUrl
:
currentProps
.
imageUrl
}
:
{
visible
:
currentProps
.
visible
||
true
,
visible
:
currentProps
.
visible
??
true
,
theme
:
currentProps
.
theme
||
0
,
title
:
currentProps
.
title
,
};
...
...
src/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/ActivityAreaSetting/activityProductDrawer.tsx
View file @
2342bc4d
...
...
@@ -93,7 +93,7 @@ const columns: ColumnsType<GoodListType[0]> = [
render
:
(
_text
,
_record
)
=>
{
return
(
<
div
className=
{
styles
.
priceInfo
}
>
<
span
>
¥
{
_record
.
activityPrice
}
</
span
>
<
span
>
¥
{
_record
.
activityPrice
||
_record
.
plummetPrice
}
</
span
>
<
span
className=
{
styles
.
unit
}
>
(
{
_record
.
unit
}
)
</
span
>
</
div
>
);
...
...
src/pages/marketingManage/marketing/marketingExecute/detail.tsx
0 → 100644
View file @
2342bc4d
import
{
useIntl
}
from
'umi'
;
import
React
,
{
Fragment
,
useCallback
,
useMemo
,
useState
}
from
'react'
;
import
{
Badge
,
Button
,
Tag
,
Typography
,
Image
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
Context
}
from
'@/components/DetailLayout/components/context'
;
import
PeripheralLayout
from
'@/components/DetailLayout'
;
import
GeneralLayout
from
'@/components/DetailLayout/components/generalLayout'
;
import
BasicLayout
from
'@/components/DetailLayout/components/basicLayout'
;
import
moment
from
'moment'
;
import
{
useEffect
}
from
'react'
;
import
ListLayout
from
'@/components/DetailLayout/components/listLayout'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
remindLayout
,
RemindLayoutProps
}
from
'@/pages/marketingManage/common/remind'
;
import
{
Columns
}
from
'../../common/columns'
;
import
{
ACTIVITYTYPENAME
,
GeneralEffect
}
from
'../../common/constants'
;
import
{
InnerStatusColor
,
OuterStatusColor
}
from
'../../common/tagColor'
;
import
ListModalLayout
from
'../../components/listModalLayout'
;
import
CouponsListLayout
from
'../../components/couponsListLayout'
;
import
{
ACTIVITY_TYPE_13
,
ACTIVITY_TYPE_15
,
ACTIVITY_TYPE_6
}
from
'@/constants/const/marketing'
;
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
();
const
{
query
:
{
id
}
}
=
history
.
location
;
const
format
=
(
text
,
fmt
?:
string
)
=>
{
return
<>
{
moment
(
text
).
format
(
fmt
||
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
// 赠送促销/换购/套餐 显示执行明细
const
showExecution
=
true
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
[
basicEffect
,
setBasicEffect
]
=
useState
<
any
>
([]);
const
[
generalEffect
,
setGeneralEffect
]
=
useState
<
any
>
([]);
const
[
value
,
setValue
]
=
useState
<
number
>
(
1
);
const
[
remind
,
setRemind
]
=
useState
<
RemindLayoutProps
>
();
const
[
collocation
,
setCollocation
]
=
useState
<
any
[]
>
([]);
const
[
listModalVisible
,
setListModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
tableModalVisible
,
setTableModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
param
,
setParam
]
=
useState
<
any
>
({});
const
handleBasicEffect
=
(
data
:
any
)
=>
{
setBasicEffect
([
{
col
:
[
{
label
:
'活动ID'
,
extra
:
data
.
id
},
{
label
:
'活动名称'
,
extra
:
data
.
activityName
},
{
label
:
'活动类型'
,
extra
:
data
.
activityTypeName
},
{
label
:
'活动参与类型'
,
extra
:
data
.
activitySignUpTypeName
},
{
label
:
'外部状态'
,
extra
:
<
Tag
color=
{
OuterStatusColor
(
data
.
outerStatus
)
}
>
{
data
.
outerStatusName
}
</
Tag
>
},
]
},
{
col
:
[
{
label
:
'活动开始时间'
,
extra
:
format
(
data
.
startTime
)
},
{
label
:
'活动结束时间'
,
extra
:
format
(
data
.
endTime
)
},
{
label
:
'报名开始时间'
,
extra
:
format
(
data
.
signUpStartTime
)
},
{
label
:
'报名结束时间'
,
extra
:
format
(
data
.
signUpEndTime
)
},
{
label
:
'内部状态'
,
extra
:
<
Badge
status=
{
InnerStatusColor
(
data
.
innerStatus
)
}
text=
{
data
.
innerStatusName
}
/>
},
]
},
])
}
const
handleGeneralEffect
=
(
data
:
any
,
int
?:
number
)
=>
{
console
.
log
(
data
,
10086
)
if
(
!
isEmpty
(
data
))
{
setGeneralEffect
(
GeneralEffect
(
int
,
data
))
}
}
const
fetchDataSource
=
useCallback
(
async
()
=>
{
await
getMarketingPlatformActivityExecuteDetail
({
id
}
as
any
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
let
{
data
}
=
res
;
if
(
data
.
activityType
===
6
)
{
setRemind
(
remindLayout
(
data
.
activityType
,
data
.
activityDefined
.
giveType
,
data
.
activityDefined
.
giftType
));
}
if
(
data
.
activityType
===
13
)
{
setRemind
(
remindLayout
(
data
.
activityType
,
data
.
activityDefined
.
swapType
));
}
if
(
data
.
activityType
===
15
)
{
setRemind
(
remindLayout
(
data
.
activityType
));
}
setDataSource
(
data
);
handleBasicEffect
(
data
);
setValue
(
data
.
activityType
);
handleGeneralEffect
(
data
.
activityDefined
,
data
.
activityType
);
}).
catch
(()
=>
{
})
},
[])
useEffect
(()
=>
{
fetchDataSource
();
},
[])
const
handlCollocation
=
(
record
)
=>
{
const
tableRecord
:
any
=
{
...
record
}
if
(
remind
?.
value
!==
1
&&
tableRecord
.
couponGroupList
!==
undefined
)
{
setCollocation
(
tableRecord
.
couponGroupList
)
}
else
if
(
remind
?.
value
===
1
&&
tableRecord
.
goodsSubsidiaryGroupList
!==
undefined
)
{
setCollocation
(
tableRecord
.
goodsSubsidiaryGroupList
)
}
else
{
setCollocation
([])
}
setListModalVisible
(
true
)
}
const
columns
=
useMemo
(()
=>
{
return
Columns
[
value
]?.({
value
,
handlCollocation
,
showExecution
,
toggle
})
},
[
value
])
const
coulumsList
=
useMemo
(()
=>
{
if
(
value
!==
ACTIVITY_TYPE_6
&&
value
!==
ACTIVITY_TYPE_13
&&
value
!==
ACTIVITY_TYPE_15
)
{
return
columns
.
concat
([{
title
:
'参与客户数'
,
key
:
'customerCount'
,
dataIndex
:
'customerCount'
},
{
title
:
'实购数量'
,
key
:
'salesNum'
,
dataIndex
:
'salesNum'
},
{
title
:
'实购金额'
,
key
:
'amount'
,
dataIndex
:
'amount'
},
{
title
:
'操作'
,
key
:
'operation'
,
dataIndex
:
'operation'
,
render
:
(
_text
,
_record
)
=>
<
Button
type=
'link'
style=
{
{
padding
:
0
}
}
onClick=
{
()
=>
toggle
(
true
,
_record
)
}
>
执行明细
</
Button
>
}])
}
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
:
'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
>
)
}
{
showExecution
&&
<
Button
type=
'link'
style=
{
{
padding
:
0
}
}
onClick=
{
()
=>
toggle
(
true
,
_record
)
}
>
执行明细
</
Button
>
}
</>
)
},
]
}
},
[
value
])
const
tableModalColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'单据号'
,
key
:
'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
:
'单据类型'
,
key
:
'recordTypeName'
,
dataIndex
:
'recordTypeName'
},
{
title
:
'商城'
,
key
:
'shopName'
,
dataIndex
:
'shopName'
},
{
title
:
'客户名称'
,
key
:
'memberName'
,
dataIndex
:
'memberName'
},
{
title
:
'单据时间'
,
key
:
'orderTime'
,
dataIndex
:
'orderTime'
},
{
title
:
'单据状态'
,
key
:
'statusName'
,
dataIndex
:
'statusName'
},
{
title
:
'含税/税率'
,
key
:
'isHasTax'
,
dataIndex
:
'isHasTax'
},
{
title
:
'购买数量'
,
key
:
'quantity'
,
dataIndex
:
'quantity'
},
{
title
:
'应付金额'
,
key
:
'skuPrice'
,
dataIndex
:
'skuPrice'
},
{
title
:
'实付金额'
,
key
:
'amount'
,
dataIndex
:
'amount'
},
{
title
:
'优惠金额'
,
key
:
'discountPrice'
,
dataIndex
:
'discountPrice'
},
]
const
fetchData
=
useCallback
((
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
Array
.
isArray
(
fetch
))
{
getMarketingPlatformActivityExecuteDetailGoodsExecuteDetailPage
({
...
params
,
...
param
}).
then
(
res
=>
{
resolve
(
res
.
data
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
return
}
resolve
({
code
:
1000
,
data
:
fetch
})
})
},
[
param
])
const
toggle
=
(
flag
:
boolean
,
info
?)
=>
{
if
(
info
)
{
setParam
({
belongType
:
1
,
activityId
:
id
,
skuId
:
info
.
skuId
,
})
}
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
no=
{
dataSource
.
id
}
detail=
{
dataSource
.
activityName
}
tabLink=
{
[
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'activityRuleLayout'
,
title
:
'活动规则'
},
{
id
:
'activityProductLayout'
,
title
:
'活动商品执行情况'
},
]
}
components=
{
<
Fragment
>
<
BasicLayout
effect=
{
basicEffect
}
span=
{
12
}
/>
<
GeneralLayout
span=
{
12
}
visible
title=
{
`活动规则-${ACTIVITYTYPENAME[dataSource.activityType]}`
}
anchor=
"activityRuleLayout"
effect=
{
generalEffect
}
/>
<
ListLayout
anchor=
"activityProductLayout"
ids=
{
{
activityId
:
id
}
}
title=
'活动商品执行情况'
fetch=
{
getMarketingPlatformActivityExecuteDetailGoodsPage
}
columns=
{
coulumsList
}
/>
</
Fragment
>
}
/>
{
/* 查看搭配商品 */
}
{
(
!
isEmpty
(
remind
)
&&
remind
?.
value
===
1
)
&&
(
<
ListModalLayout
title=
{
remind
?.
modalTitle
}
remind=
{
remind
}
visible=
{
listModalVisible
}
value=
{
collocation
}
isPreview
onClose=
{
()
=>
setListModalVisible
(
false
)
}
/>
)
}
{
/* 查看优惠券 */
}
{
(
!
isEmpty
(
remind
)
&&
remind
?.
value
!==
1
)
&&
(
<
CouponsListLayout
title=
{
remind
?.
modalTitle
}
remind=
{
remind
}
visible=
{
listModalVisible
}
value=
{
collocation
}
isPreview
onClose=
{
()
=>
setListModalVisible
(
false
)
}
/>
)
}
<
TableModal
title=
'执行明细'
modalType=
'Drawer'
width=
{
1200
}
visible=
{
tableModalVisible
}
columns=
{
tableModalColumns
}
tableProps=
{
{
rowKey
:
'orderId'
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
"orderNo"
,
FORM_FILTER_PATH
)
useStateEffects
()
}
}
schema=
{
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
"object"
,
"x-component"
:
"flex-layout"
,
"x-component-props"
:
{
rowStyle
:
{
justifyContent
:
'space-between'
}
},
properties
:
{
orderNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'单据号'
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'Flex-Layout'
,
"x-component-props"
:
{
rowStyle
:
{
justifyContent
:
"flex-start"
,
flexWrap
:
"nowrap"
},
colStyle
:
{
marginRight
:
20
}
},
properties
:
{
memberName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
`客户名称`
,
allowClear
:
true
,
style
:
{
width
:
160
,
},
},
},
'[startTime,endTime]'
:
{
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
`开始时间`
,
`结束时间`
],
allowClear
:
true
,
style
:
{
width
:
240
,
},
},
},
recordType
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[
{
label
:
'订单'
,
value
:
1
},
{
label
:
'退货申请单'
,
value
:
2
},
],
'x-component-props'
:
{
placeholder
:
`单据类型`
,
allowClear
:
true
,
style
:
{
width
:
160
,
},
},
},
shopId
:
{
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
:
`查询`
,
},
},
},
},
},
}
}
fetchData=
{
fetchData
}
onClose=
{
()
=>
toggle
(
false
,
null
)
}
onOk=
{
()
=>
toggle
(
false
,
null
)
}
mode=
'radio'
/>
</
Context
.
Provider
>
)
}
export
default
DetialLayout
;
src/pages/marketingManage/marketing/marketingExecute/index.tsx
View file @
2342bc4d
/** 平台营销活动执行 */
import
React
from
'react'
;
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
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
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
render
:
(
text
,
record
)
=>
<
Button
type=
'link'
target=
'_blank'
style=
{
{
padding
:
0
}
}
onClick=
{
()
=>
history
.
push
(
`/marketingManage/marketing/marketingSearch/preview?id=${text}`
)
}
>
{
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'
onClick=
{
()
=>
history
.
push
(
`/marketingManage/marketing/marketingExecute/detail?id=${_.id}`
)
}
>
查看
</
Button
>
)
}
]
const
useStateEffects
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
/** 活动类型 */
getMarketingPlatformActivitySignupGetActivityTypeList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
});
linkage
.
enum
(
'activityType'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
/** 外部状态 */
getMarketingPlatformActivityGetOuterStatusList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
});
linkage
.
enum
(
'outerStatus'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
})
}
const
MarketingExecute
=
()
=>
{
return
(
<
div
>
123
</
div
>
)
<
TableLayout
columns=
{
columns
}
effects=
"id"
fetch=
{
getMarketingPlatformActivityExecutePage
}
useStateEffects=
{
useStateEffects
}
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
;
src/pages/marketingManage/merchantMarketing/detail/constants.tsx
View file @
2342bc4d
...
...
@@ -4,6 +4,7 @@ import StatusTag from '@/components/StatusTag';
import
moment
from
'moment'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
isEmpty
}
from
'@formily/shared'
;
import
{
ACTIVITY_TYPE_1
,
ACTIVITY_TYPE_10
,
ACTIVITY_TYPE_11
,
ACTIVITY_TYPE_12
,
ACTIVITY_TYPE_13
,
ACTIVITY_TYPE_14
,
ACTIVITY_TYPE_15
,
ACTIVITY_TYPE_16
,
ACTIVITY_TYPE_2
,
ACTIVITY_TYPE_3
,
ACTIVITY_TYPE_4
,
ACTIVITY_TYPE_5
,
ACTIVITY_TYPE_6
,
ACTIVITY_TYPE_7
,
ACTIVITY_TYPE_8
,
ACTIVITY_TYPE_9
}
from
'@/constants/const/marketing'
;
export
const
format
=
(
text
,
fmt
?:
string
)
=>
{
return
<>
{
moment
(
text
).
format
(
fmt
||
"YYYY-MM-DD HH:mm"
)
}
</>
...
...
@@ -72,9 +73,9 @@ const lotteryNumType = {
/** 活动类型 */
export
const
GeneralEffect
=
(
int
,
data
)
=>
{
switch
(
Number
(
int
))
{
case
1
:
case
2
:
case
3
:
case
ACTIVITY_TYPE_
1
:
case
ACTIVITY_TYPE_
2
:
case
ACTIVITY_TYPE_
3
:
return
[
{
col
:
[
...
...
@@ -100,36 +101,36 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
4
:
case
5
:
case
ACTIVITY_TYPE_
4
:
case
ACTIVITY_TYPE_
5
:
return
[
{
col
:
[
{
label
:
`满
${
int
===
4
?
'量'
:
'额'
}
促销类型`
,
extra
:
<>
{
(
int
===
4
&&
data
.
type
===
1
)
&&
<
StatusTag
type=
"default"
title=
"满量减"
/>
}
{
(
int
===
4
&&
data
.
type
===
2
)
&&
<
StatusTag
type=
"default"
title=
"满量折"
/>
}
{
(
int
===
5
&&
data
.
type
===
1
)
&&
<
StatusTag
type=
"default"
title=
"满额减"
/>
}
{
(
int
===
5
&&
data
.
type
===
2
)
&&
<
StatusTag
type=
"default"
title=
"满额折"
/>
}
label
:
`满
${
int
===
ACTIVITY_TYPE_
4
?
'量'
:
'额'
}
促销类型`
,
extra
:
<>
{
(
int
===
ACTIVITY_TYPE_
4
&&
data
.
type
===
1
)
&&
<
StatusTag
type=
"default"
title=
"满量减"
/>
}
{
(
int
===
ACTIVITY_TYPE_
4
&&
data
.
type
===
2
)
&&
<
StatusTag
type=
"default"
title=
"满量折"
/>
}
{
(
int
===
ACTIVITY_TYPE_
5
&&
data
.
type
===
1
)
&&
<
StatusTag
type=
"default"
title=
"满额减"
/>
}
{
(
int
===
ACTIVITY_TYPE_
5
&&
data
.
type
===
2
)
&&
<
StatusTag
type=
"default"
title=
"满额折"
/>
}
</>
},
{
label
:
<>
{
(
int
===
4
&&
data
.
type
===
1
)
&&
'满量减'
}
{
(
int
===
4
&&
data
.
type
===
2
)
&&
'满量折'
}
{
(
int
===
5
&&
data
.
type
===
1
)
&&
'满额减'
}
{
(
int
===
5
&&
data
.
type
===
2
)
&&
'满额折'
}
{
(
int
===
ACTIVITY_TYPE_
4
&&
data
.
type
===
1
)
&&
'满量减'
}
{
(
int
===
ACTIVITY_TYPE_
4
&&
data
.
type
===
2
)
&&
'满量折'
}
{
(
int
===
ACTIVITY_TYPE_
5
&&
data
.
type
===
1
)
&&
'满额减'
}
{
(
int
===
ACTIVITY_TYPE_
5
&&
data
.
type
===
2
)
&&
'满额折'
}
</>,
extra
:
<>
{
(
int
===
4
&&
data
.
type
===
1
)
&&
<
Space
direction=
'vertical'
>
{
(
int
===
ACTIVITY_TYPE_
4
&&
data
.
type
===
1
)
&&
<
Space
direction=
'vertical'
>
{
!
isEmpty
(
data
.
ladderList
)
&&
data
.
ladderList
.
map
(
item
=>
(<
div
>
{
`满 ${item.key} 个, 减 ${Number(item.value).toFixed(2)} 元`
}
</
div
>))
}
</
Space
>
}
{
(
int
===
4
&&
data
.
type
===
2
)
&&
<
Space
direction=
'vertical'
>
{
(
int
===
ACTIVITY_TYPE_
4
&&
data
.
type
===
2
)
&&
<
Space
direction=
'vertical'
>
{
!
isEmpty
(
data
.
ladderList
)
&&
data
.
ladderList
.
map
(
item
=>
(<
div
>
{
`满 ${item.key} 个, 打 ${item.value / 10} 折`
}
</
div
>))
}
</
Space
>
}
{
(
int
===
5
&&
data
.
type
===
1
)
&&
<
Space
direction=
'vertical'
>
{
(
int
===
ACTIVITY_TYPE_
5
&&
data
.
type
===
1
)
&&
<
Space
direction=
'vertical'
>
{
!
isEmpty
(
data
.
ladderList
)
&&
data
.
ladderList
.
map
(
item
=>
(<
div
>
{
`满 ${Number(item.key).toFixed(2)} 元, 减 ${Number(item.value).toFixed(2)} 元`
}
</
div
>))
}
</
Space
>
}
{
(
int
===
5
&&
data
.
type
===
2
)
&&
<
Space
direction=
'vertical'
>
{
(
int
===
ACTIVITY_TYPE_
5
&&
data
.
type
===
2
)
&&
<
Space
direction=
'vertical'
>
{
!
isEmpty
(
data
.
ladderList
)
&&
data
.
ladderList
.
map
(
item
=>
(<
div
>
{
`满 ${Number(item.key).toFixed(2)} 元, 打 ${item.value /10} 折`
}
</
div
>))
}
</
Space
>
}
</>
...
...
@@ -154,7 +155,7 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
6
:
case
ACTIVITY_TYPE_
6
:
return
[
{
col
:
[
...
...
@@ -190,7 +191,7 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
7
:
case
ACTIVITY_TYPE_
7
:
return
[
{
col
:
[
...
...
@@ -219,7 +220,7 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
8
:
case
ACTIVITY_TYPE_
8
:
return
[
{
col
:
[
...
...
@@ -244,7 +245,7 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
9
:
case
ACTIVITY_TYPE_
9
:
return
[
{
col
:
[
...
...
@@ -263,7 +264,7 @@ export const GeneralEffect = (int, data) => {
]
},
]
case
10
:
case
ACTIVITY_TYPE_
10
:
return
[
{
col
:
[
...
...
@@ -273,7 +274,7 @@ export const GeneralEffect = (int, data) => {
]
},
]
case
11
:
case
ACTIVITY_TYPE_
11
:
return
[
{
col
:
[
...
...
@@ -288,7 +289,7 @@ export const GeneralEffect = (int, data) => {
]
},
]
case
12
:
case
ACTIVITY_TYPE_
12
:
return
[
{
col
:
[
...
...
@@ -307,7 +308,7 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
13
:
case
ACTIVITY_TYPE_
13
:
return
[
{
col
:
[
...
...
@@ -337,7 +338,7 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
14
:
case
ACTIVITY_TYPE_
14
:
return
[
{
col
:
[
...
...
@@ -356,7 +357,7 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
15
:
case
ACTIVITY_TYPE_
15
:
return
[
{
col
:
[
...
...
@@ -365,7 +366,7 @@ export const GeneralEffect = (int, data) => {
]
}
]
case
16
:
case
ACTIVITY_TYPE_
16
:
return
[
{
col
:
[
...
...
src/pages/marketingManage/merchantMarketing/detail/index.tsx
View file @
2342bc4d
...
...
@@ -21,6 +21,7 @@ import { remindLayout, RemindLayoutProps } from '@/pages/marketingManage/common/
import
ListModalLayout
from
'../../components/listModalLayout'
;
import
CouponsListLayout
from
'../../components/couponsListLayout'
;
import
{
getMarketingPlatformMerchantActivityDetail
,
getMarketingPlatformMerchantActivityDetailGoodsPage
,
postMarketingPlatformMerchantActivityExamine
}
from
'@/services/MarketingV2Api'
;
import
{
ACTIVITY_TYPE_13
,
ACTIVITY_TYPE_15
,
ACTIVITY_TYPE_6
}
from
'@/constants/const/marketing'
;
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
...
...
@@ -120,13 +121,13 @@ const DetialLayout = () => {
})
data
.
externalLogs
=
externalLogs
;
}
if
(
data
.
activityType
===
6
)
{
if
(
data
.
activityType
===
ACTIVITY_TYPE_
6
)
{
setRemind
(
remindLayout
(
data
.
activityType
,
data
.
activityDefined
.
giveType
,
data
.
activityDefined
.
giftType
));
}
if
(
data
.
activityType
===
13
)
{
if
(
data
.
activityType
===
ACTIVITY_TYPE_
13
)
{
setRemind
(
remindLayout
(
data
.
activityType
,
data
.
activityDefined
.
swapType
));
}
if
(
data
.
activityType
===
15
)
{
if
(
data
.
activityType
===
ACTIVITY_TYPE_
15
)
{
setRemind
(
remindLayout
(
data
.
activityType
));
}
setAllusers
([
...
...
src/pages/purchaseManage/purchaseAbility/demandBidMgt/offer/index.tsx
View file @
2342bc4d
...
...
@@ -26,7 +26,7 @@ const Offter = () => {
key
:
'purchaseInquiryNo'
,
dataIndex
:
'purchaseInquiryNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/purchase/demandBidMgt/demand/detail?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
<
EyePreview
url=
{
`/purchase/demand
Vouch/demand
BidMgt/demand/detail?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`
}
>
{
text
}
</
EyePreview
>
)
},
{
title
:
'需求摘要'
,
...
...
@@ -88,7 +88,7 @@ const Offter = () => {
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/purchase/demandBidMgt/offer/preview?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`
)
}
>
查看
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/purchase/demand
Vouch/demand
BidMgt/offer/preview?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`
)
}
>
查看
</
Button
>
)
}];
...
...
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