Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
黄庭坚
jinfa-platform
Commits
28d9e5c4
Commit
28d9e5c4
authored
Jun 16, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 营销能力-选择优惠券&修改detaillayout
parent
01a889d4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
2 deletions
+62
-2
index.tsx
src/pages/transaction/components/DetailLayout/index.tsx
+4
-1
index.tsx
...action/marketingAbility/components/addFormGoods/index.tsx
+7
-1
index.less
...components/addFormGoods/modal/addCouponsDrawer/index.less
+0
-0
index.tsx
.../components/addFormGoods/modal/addCouponsDrawer/index.tsx
+48
-0
add.tsx
...arketingAbility/selfManagement/readySubmitExamine/add.tsx
+3
-0
No files found.
src/pages/transaction/components/DetailLayout/index.tsx
View file @
28d9e5c4
...
...
@@ -23,6 +23,8 @@ export interface IProps {
effect
?:
React
.
ReactNode
,
/** 页面的组件 */
components
?:
React
.
ReactNode
,
/** 隐藏头部分割线 */
hideBreak
?:
boolean
}
const
PeripheralLayout
:
React
.
FC
<
IProps
>
=
(
props
:
any
)
=>
{
...
...
@@ -32,6 +34,7 @@ const PeripheralLayout: React.FC<IProps> = (props: any) => {
tabLink
,
effect
,
components
,
hideBreak
}
=
props
;
const
dataSource
=
useContext
(
Context
)
...
...
@@ -71,7 +74,7 @@ const PeripheralLayout: React.FC<IProps> = (props: any) => {
<
ArrowLeftOutlined
className=
{
style
.
goBack
}
onClick=
{
()
=>
history
.
goBack
()
}
/>
<
span
className=
{
style
.
titleContext
}
>
{
detail
?
detail
:
dataSource
.
details
}
|
{
!
hideBreak
&&
'|'
}
{
no
}
</
span
>
</
div
>
...
...
src/pages/transaction/marketingAbility/components/addFormGoods/index.tsx
View file @
28d9e5c4
...
...
@@ -6,6 +6,7 @@ import Card from '@/pages/transaction/components/card';
import
TableModel
from
'./tableModel'
;
import
AddGoodsDrawer
from
'./modal/addGoodsDrawer'
;
import
AddCouponsDrawer
from
'./modal/addCouponsDrawer'
;
interface
AddFormGoodsProps
{
currentRef
?:
any
,
...
...
@@ -26,6 +27,7 @@ const AddFormGoods: React.FC<AddFormGoodsProps> = (props: any) => {
const
[
form
]
=
Form
.
useForm
();
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([]);
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
couponVisible
,
setCouponVisible
]
=
useState
<
boolean
>
(
false
);
const
_deleteRow
=
(
index
:
number
)
=>
{
const
_dataSource
=
[...
dataSource
];
...
...
@@ -68,7 +70,7 @@ const AddFormGoods: React.FC<AddFormGoodsProps> = (props: any) => {
autoComplete=
'off'
>
<
Space
direction=
'vertical'
style=
{
{
display
:
'flex'
}
}
>
{
ruleType
!=
10
&&
<
Button
type=
"dashed"
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
setVisible
(
true
)
}
}
>
选择活动商品
</
Button
>
}
{
ruleType
!=
10
&&
<
Button
type=
"dashed"
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
set
Coupon
Visible
(
true
)
}
}
>
选择活动商品
</
Button
>
}
<
Table
columns=
{
columns
}
dataSource=
{
dataSource
}
...
...
@@ -82,6 +84,10 @@ const AddFormGoods: React.FC<AddFormGoodsProps> = (props: any) => {
effects=
'name'
onClose=
{
()
=>
{
setVisible
(
false
)
}
}
/>
<
AddCouponsDrawer
visible=
{
couponVisible
}
onClose=
{
()
=>
{
setCouponVisible
(
false
)
}
}
/>
</
Card
>
);
}
...
...
src/pages/transaction/marketingAbility/components/addFormGoods/modal/addCouponsDrawer/index.less
0 → 100644
View file @
28d9e5c4
src/pages/transaction/marketingAbility/components/addFormGoods/modal/addCouponsDrawer/index.tsx
0 → 100644
View file @
28d9e5c4
import
React
,
{
useRef
,
useCallback
,
useEffect
,
useState
}
from
'react'
;
import
{
Space
,
Button
,
Select
,
Input
,
Drawer
,
Row
,
Col
}
from
'antd'
;
const
{
Search
}
=
Input
;
const
AddCouponsDrawer
=
(
props
:
any
)
=>
{
const
{
visible
,
onClose
,
onConfirm
,
effects
,
fetch
}
=
props
;
const
_onConfirm
=
()
=>
{
}
const
onSearch
=
()
=>
{
}
return
(
<
Drawer
title=
"选择优惠券"
width=
{
600
}
onClose=
{
onClose
}
visible=
{
visible
}
bodyStyle=
{
{
paddingBottom
:
80
}
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
onClick=
{
_onConfirm
}
type=
"primary"
>
确认
</
Button
>
</
div
>
}
>
<
Space
style=
{
{
display
:
'flex'
}
}
direction=
'vertical'
>
<
Row
gutter=
{
8
}
>
<
Col
>
<
Select
style=
{
{
width
:
'200px'
}
}
></
Select
>
</
Col
>
<
Col
>
<
Search
placeholder=
"搜索"
onSearch=
{
onSearch
}
style=
{
{
width
:
200
}
}
/>
</
Col
>
<
Col
>
<
Button
>
重置
</
Button
>
</
Col
>
</
Row
>
</
Space
>
</
Drawer
>
);
}
export
default
AddCouponsDrawer
;
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/add.tsx
View file @
28d9e5c4
...
...
@@ -23,6 +23,7 @@ const TABLINK = [
]
const
Add
=
()
=>
{
const
{
query
:
{
id
}
}
=
history
.
location
;
const
[
ruleType
,
setRuleType
]
=
useState
(
1
);
const
[
extraType
,
setExtraType
]
=
useState
(
1
);
...
...
@@ -43,9 +44,11 @@ const Add = () => {
return
(
<
PeripheralLayout
detail=
{
`${id ? '编辑' : '新增'}营销活动`
}
no=
{
<
ProgressBar
ratio=
{
85
}
/>
}
tabLink=
{
TABLINK
}
effect=
{
<
Button
type=
"primary"
onClick=
{
_handleSave
}
><
SaveOutlined
/>
保存
</
Button
>
}
hideBreak=
{
true
}
components=
{
<>
<
AddFormBasicItem
currentRef=
{
basicForm
}
setRuleType=
{
setRuleType
}
/>
...
...
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