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
linweijiong
jinfa-platform
Commits
7e45bc48
Commit
7e45bc48
authored
Sep 08, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复0元抵扣券商品还是多选的问题
parent
5d4ef078
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
index.tsx
...nUnsubmitted/components/ApplicableGoodsFormItem/index.tsx
+1
-0
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+8
-1
index.tsx
...erchantCouponUnsubmitted/components/GoodsDrawer/index.tsx
+7
-2
No files found.
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/ApplicableGoodsFormItem/index.tsx
View file @
7e45bc48
...
@@ -134,6 +134,7 @@ const ApplicableGoodsFormItem = (props) => {
...
@@ -134,6 +134,7 @@ const ApplicableGoodsFormItem = (props) => {
<
GoodsDrawer
<
GoodsDrawer
visible=
{
visibleGoodsDrawer
}
visible=
{
visibleGoodsDrawer
}
shopIds=
{
XComponentProps
.
shopIds
}
shopIds=
{
XComponentProps
.
shopIds
}
multiple=
{
XComponentProps
.
multiple
}
onClose=
{
handleVisibleGoodsDrawer
}
onClose=
{
handleVisibleGoodsDrawer
}
checkeds=
{
value
}
checkeds=
{
value
}
onSubmit=
{
handleGoodsDrawerSubmit
}
onSubmit=
{
handleGoodsDrawerSubmit
}
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
7e45bc48
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
7-30 17:48:32
* @LastEditTime: 2021-0
9-08 19:26:41
* @Description:
* @Description:
*/
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
...
@@ -105,6 +105,13 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
...
@@ -105,6 +105,13 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
linkage
.
hide
(
'*(APPLICABLE_GOODS,APPLICABLE_CATEGORIES)'
);
linkage
.
hide
(
'*(APPLICABLE_GOODS,APPLICABLE_CATEGORIES)'
);
linkage
.
show
(
'APPLICABLE_BRANDS'
);
linkage
.
show
(
'APPLICABLE_BRANDS'
);
}
}
// 0元抵扣券只能选择一个商品
setFieldState
(
'goodsList'
,
fieldState
=>
{
FormPath
.
setIn
(
fieldState
,
'props.x-component-props'
,
Object
.
assign
({},
fieldState
.
props
[
'x-component-props'
],
{
multiple
:
value
!==
MERCHANT_COUPON_TYPE_VOUCHER
,
}));
});
});
});
// 券面额
// 券面额
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/GoodsDrawer/index.tsx
View file @
7e45bc48
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-06-24 16:11:55
* @Date: 2021-06-24 16:11:55
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
7-30 10:10:15
* @LastEditTime: 2021-0
9-08 19:29:00
* @Description: 商品选择抽屉
* @Description: 商品选择抽屉
*/
*/
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
...
@@ -81,6 +81,10 @@ interface IProps {
...
@@ -81,6 +81,10 @@ interface IProps {
* 商城id
* 商城id
*/
*/
shopIds
:
number
[],
shopIds
:
number
[],
/**
* 是否支持多选,默认为 true
*/
multiple
?:
boolean
,
}
}
type
ExtraFetchType
=
FetchParamsType
&
{
type
ExtraFetchType
=
FetchParamsType
&
{
...
@@ -105,8 +109,9 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
...
@@ -105,8 +109,9 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
onSubmit
,
onSubmit
,
onClose
,
onClose
,
shopIds
,
shopIds
,
multiple
=
true
,
}
=
props
;
}
=
props
;
const
[
rowSelection
,
rowCtl
]
=
useRowSelectionTable
({
type
:
'checkbox
'
,
customKey
:
'id'
});
const
[
rowSelection
,
rowCtl
]
=
useRowSelectionTable
({
type
:
multiple
?
'checkbox'
:
'radio
'
,
customKey
:
'id'
});
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
checkeds
)
{
if
(
checkeds
)
{
...
...
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