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
f000e350
Commit
f000e350
authored
Nov 26, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 店铺装修优惠券可以重复选择的问题修复
parent
c951fc77
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
index.tsx
src/pages/editor/components/drawer/couponsDrawer/index.tsx
+6
-2
index.tsx
src/pages/editor/components/drawer/mixDrawer/index.tsx
+1
-1
index.tsx
...el/propsSettings/components/marketingCardCoupon/index.tsx
+3
-2
No files found.
src/pages/editor/components/drawer/couponsDrawer/index.tsx
View file @
f000e350
...
@@ -25,12 +25,13 @@ interface CouponsDrawerProps {
...
@@ -25,12 +25,13 @@ interface CouponsDrawerProps {
onClose
:
()
=>
void
,
onClose
:
()
=>
void
,
onConfirm
?:
(
record
)
=>
void
,
onConfirm
?:
(
record
)
=>
void
,
selectId
?:
number
,
selectId
?:
number
,
disabledKeys
?:
number
[],
// 1平台,2商家
// 1平台,2商家
belongType
?:
1
|
2
belongType
?:
1
|
2
}
}
const
CouponsDrawer
:
React
.
FC
<
CouponsDrawerProps
>
=
(
props
:
CouponsDrawerProps
)
=>
{
const
CouponsDrawer
:
React
.
FC
<
CouponsDrawerProps
>
=
(
props
:
CouponsDrawerProps
)
=>
{
const
{
visible
,
onClose
,
onConfirm
,
selectId
}
=
props
;
const
{
visible
,
onClose
,
onConfirm
,
disabledKeys
,
selectId
}
=
props
;
const
{
query
:
{
shopId
}
}:
any
=
history
.
location
const
{
query
:
{
shopId
}
}:
any
=
history
.
location
const
[
type
,
setType
]
=
useState
(
2
);
const
[
type
,
setType
]
=
useState
(
2
);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
(
selectId
?
[
selectId
]
:
[]);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
(
selectId
?
[
selectId
]
:
[]);
...
@@ -135,7 +136,10 @@ const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps)
...
@@ -135,7 +136,10 @@ const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps)
setSelectedRows
(
selectedRows
);
setSelectedRows
(
selectedRows
);
setSelectedRowKeys
(
selectedRowKeys
)
setSelectedRowKeys
(
selectedRowKeys
)
},
},
type
:
'radio'
type
:
'radio'
,
getCheckboxProps
:
(
record
:
any
)
=>
({
disabled
:
disabledKeys
?.
includes
(
record
.
id
),
// Column configuration not to be checked
}),
}
}
const
drawerStyle
=
{
background
:
'#FAFBFC'
};
const
drawerStyle
=
{
background
:
'#FAFBFC'
};
...
...
src/pages/editor/components/drawer/mixDrawer/index.tsx
View file @
f000e350
...
@@ -334,7 +334,7 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
...
@@ -334,7 +334,7 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
setSelectedRows
(
selectedRows
);
setSelectedRows
(
selectedRows
);
setSelectedRowKeys
(
selectedRowKeys
)
setSelectedRowKeys
(
selectedRowKeys
)
},
},
type
:
selectType
type
:
selectType
,
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/marketingCardCoupon/index.tsx
View file @
f000e350
...
@@ -5,9 +5,8 @@ import moment from 'moment';
...
@@ -5,9 +5,8 @@ import moment from 'moment';
import
{
postMarketingCouponActivityPageSelectDetail
}
from
'@/services/MarketingV2Api'
;
import
{
postMarketingCouponActivityPageSelectDetail
}
from
'@/services/MarketingV2Api'
;
import
{
formatTimeString
}
from
'@/utils'
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
useSamLevelProps
from
'../../../common/hooks/useSameLevelProps'
;
import
CouponsDrawer
from
'@/pages/editor/components/drawer/couponsDrawer'
;
import
CouponsDrawer
from
'@/pages/editor/components/drawer/couponsDrawer'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
interface
MarketingCardCouponProps
{
interface
MarketingCardCouponProps
{
...
@@ -21,6 +20,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
...
@@ -21,6 +20,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
const
{
id
,
belongType
,
selectedKey
}
=
props
;
const
{
id
,
belongType
,
selectedKey
}
=
props
;
const
[
drawerVisible
,
setDrawerVisible
]
=
useState
(
false
);
const
[
drawerVisible
,
setDrawerVisible
]
=
useState
(
false
);
const
[
record
,
setRecord
]
=
useState
<
any
>
();
const
[
record
,
setRecord
]
=
useState
<
any
>
();
const
sameLevelPropsList
=
useSamLevelProps
({
key
:
selectedKey
})
useEffect
(()
=>
{
useEffect
(()
=>
{
changeStylesByKey
({
changeStylesByKey
({
...
@@ -104,6 +104,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
...
@@ -104,6 +104,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
belongType=
{
belongType
}
belongType=
{
belongType
}
onClose=
{
_onClose
}
onClose=
{
_onClose
}
onConfirm=
{
_onChooseConfirm
}
onConfirm=
{
_onChooseConfirm
}
disabledKeys=
{
sameLevelPropsList
?
sameLevelPropsList
.
map
((
item
)
=>
item
.
id
)
:
[]
}
selectId=
{
id
}
selectId=
{
id
}
/>
/>
</
div
>
</
div
>
...
...
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