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
project
jinfa-admin
Commits
6df65374
Commit
6df65374
authored
Dec 03, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 移动端C端商城装修优惠券重复选择问题修复
parent
f46164ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
index.tsx
...pageCustomized/components/drawers/couponsDrawer/index.tsx
+7
-3
index.tsx
...el/propsSettings/components/marketingCardCoupon/index.tsx
+4
-0
No files found.
src/pages/pageCustomized/components/drawers/couponsDrawer/index.tsx
View file @
6df65374
...
...
@@ -30,11 +30,12 @@ interface CouponsDrawerProps {
onConfirm
?:
(
record
)
=>
void
,
selectId
?:
number
,
// 1平台,2商家
belongType
?:
1
|
2
belongType
?:
1
|
2
,
disabledKeys
?:
number
[],
}
const
CouponsDrawer
:
React
.
FC
<
CouponsDrawerProps
>
=
(
props
:
CouponsDrawerProps
)
=>
{
const
{
visible
,
onClose
,
onConfirm
,
selectId
,
belongType
}
=
props
;
const
{
visible
,
onClose
,
onConfirm
,
selectId
,
belongType
,
disabledKeys
}
=
props
;
const
{
query
:
{
shopId
}
}:
any
=
history
.
location
;
const
[
type
,
setType
]
=
useState
(
belongType
||
1
);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
(
selectId
?
[
selectId
]
:
[]);
...
...
@@ -145,7 +146,10 @@ const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps)
setSelectedRows
(
selectedRows
);
setSelectedRowKeys
(
selectedRowKeys
)
},
type
:
'radio'
type
:
'radio'
,
getCheckboxProps
:
(
record
:
any
)
=>
({
disabled
:
disabledKeys
?.
includes
(
record
.
id
),
// Column configuration not to be checked
}),
};
const
drawerStyle
=
{
background
:
'#FAFBFC'
};
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/marketingCardCoupon/index.tsx
View file @
6df65374
...
...
@@ -10,6 +10,7 @@ import { priceFormat } from '@/utils/numberFomat';
import
{
postMarketingCouponPlatformActivityPageSelectDetail
}
from
'@/services/MarketingV2Api'
;
import
CouponsDrawer
from
'@/pages/pageCustomized/components/drawers/couponsDrawer'
;
import
useSamLevelProps
from
'../../../common/hooks/useSameLevelProps'
;
interface
MarketingCardCouponProps
{
...
...
@@ -23,6 +24,8 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
const
{
id
,
belongType
,
selectedKey
}
=
props
;
const
[
drawerVisible
,
setDrawerVisible
]
=
useState
(
false
);
const
[
record
,
setRecord
]
=
useState
<
any
>
();
const
sameLevelPropsList
=
useSamLevelProps
({
key
:
selectedKey
})
const
_onClose
=
()
=>
{
setDrawerVisible
(
false
);
};
...
...
@@ -110,6 +113,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
belongType=
{
belongType
}
onClose=
{
_onClose
}
onConfirm=
{
_onChooseConfirm
}
disabledKeys=
{
sameLevelPropsList
?
sameLevelPropsList
.
map
((
item
)
=>
item
.
id
)
:
[]
}
selectId=
{
id
}
/>
</
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