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
8489dbc0
Commit
8489dbc0
authored
Jan 24, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复营销活动选择商品高级筛选
parent
e08d8611
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
index.tsx
...n/marketingAbility/components/collocationLayout/index.tsx
+34
-1
No files found.
src/pages/transaction/marketingAbility/components/collocationLayout/index.tsx
View file @
8489dbc0
...
...
@@ -4,7 +4,10 @@ import { ColumnType } from 'antd/lib/table';
import
TableModal
from
'@/pages/transaction/components/tableModal'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
postProductCommodityGetCommoditySkuListByShopId
}
from
'@/services/ProductV2Api'
;
import
{
getProductSelectGetSelectBrand
,
getProductSelectGetSelectCustomerCategory
,
postProductCommodityGetCommoditySkuListByShopId
}
from
'@/services/ProductV2Api'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
const
{
onFormMount$
}
=
FormEffectHooks
export
interface
CollocationLayoutProps
{
/** 活动类型 */
...
...
@@ -122,6 +125,35 @@ const CollocationLayout: React.FC<CollocationLayoutProps> = (props: any) => {
onConfirm
(
productList
)
}
const
useBusinessEffects
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
getProductSelectGetSelectCustomerCategory
({
}).
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
(
item
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
id
,
}
})
linkage
.
enum
(
'customerCategoryId'
,
_enum
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
getProductSelectGetSelectBrand
({
}).
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
(
item
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
id
,
}
})
linkage
.
enum
(
'brandId'
,
_enum
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
})
}
return
(
<
TableModal
modalType=
"Drawer"
...
...
@@ -139,6 +171,7 @@ const CollocationLayout: React.FC<CollocationLayoutProps> = (props: any) => {
effects=
{
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
"commodityName"
,
FORM_FILTER_PATH
)
useBusinessEffects
()
}
}
schema=
{
{
type
:
"object"
,
...
...
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