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
d0be42d0
Commit
d0be42d0
authored
Oct 30, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改赠送商品的选择
parent
3cd07ef3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
index.tsx
...n/marketingAbility/components/collocationLayout/index.tsx
+12
-4
index.tsx
...n/marketingAbility/components/productListLayout/index.tsx
+2
-0
No files found.
src/pages/transaction/marketingAbility/components/collocationLayout/index.tsx
View file @
d0be42d0
...
...
@@ -6,7 +6,9 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import
{
PublicApi
}
from
'@/services/api'
;
export
interface
CollocationLayoutProps
{
moda
?:
'checkbox'
|
'radio'
,
/** 活动类型 */
isGift
?:
number
,
moda
?:
'checkbox'
|
'radio'
,
/** */
idNotInList
?:
number
[],
/** 适用商城 */
...
...
@@ -20,7 +22,7 @@ export interface CollocationLayoutProps {
}
const
CollocationLayout
:
React
.
FC
<
CollocationLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
moda
=
'checkbox'
,
idNotInList
,
shopIdList
,
visible
,
toggle
,
onConfirm
}
=
props
;
const
{
isGift
,
moda
=
'checkbox'
,
idNotInList
,
shopIdList
,
visible
,
toggle
,
onConfirm
}
=
props
;
/** 选择活动商品columns */
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -58,8 +60,14 @@ const CollocationLayout: React.FC<CollocationLayoutProps> = (props: any) => {
},
]
const
handleFetchData
=
useCallback
((
params
:
any
)
=>
{
const
newParams
=
{
idNotInList
,
shopIdList
,
...
params
,
}
isGift
===
6
&&
(
newParams
.
isGift
=
true
)
return
new
Promise
(
resolve
=>
{
PublicApi
.
postProductCommodityGetCommoditySkuListByShopId
({
idNotInList
,
shopIdList
,
...
p
arams
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
PublicApi
.
postProductCommodityGetCommoditySkuListByShopId
({
...
newP
arams
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
@@ -84,7 +92,7 @@ const CollocationLayout: React.FC<CollocationLayoutProps> = (props: any) => {
console
.
warn
(
error
)
})
})
},
[
shopIdList
,
idNotInList
])
},
[
shopIdList
,
idNotInList
,
isGift
])
const
handleOk
=
(
selectRowKeys
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
const
rowRecord
:
any
[]
=
[...
selectRowRecord
]
...
...
src/pages/transaction/marketingAbility/components/productListLayout/index.tsx
View file @
d0be42d0
...
...
@@ -64,6 +64,7 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
useEffect
(()
=>
{
if
(
focus$
)
{
console
.
log
(
focus$
,
10086
)
setValue
(
focus$
)
setDataSource
([])
}
...
...
@@ -207,6 +208,7 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
/>
{
/* 选择活动商品 */
}
<
CollocationLayout
isGift=
{
value
}
visible=
{
productVisible
}
idNotInList=
{
idNotInList
}
shopIdList=
{
shopIdList
}
...
...
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