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
shenshaokai
jinfa-admin
Commits
1e2c4bf9
Commit
1e2c4bf9
authored
Sep 27, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into v2
parents
af523deb
cbb086af
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+8
-6
No files found.
src/pages/marketingManage/platformCoupon/platformCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
1e2c4bf9
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-2
4 10:59:06
* @LastEditTime: 2021-09-2
7 10:08:44
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
...
...
@@ -14,11 +14,7 @@ import {
MERCHANT_COUPON_TYPE_PRODUCT
,
MERCHANT_COUPON_TYPE_VOUCHER
,
MERCHANT_COUPON_RECEIVE_FRONT
,
MERCHANT_COUPON_RECEIVE_DESIGNATED
,
MERCHANT_COUPON_RECEIVE_ACTIVITY
,
MERCHANT_COUPON_RECEIVE_OPERATE
,
SUITABLE_TYPE_NEW_USER
,
SUITABLE_TYPE_OLD_USER
,
}
from
'@/constants/const/marketing'
;
const
{
...
...
@@ -169,12 +165,18 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
});
// 领券方式
onFieldInputChange$
(
'getWay'
).
subscribe
(()
=>
{
onFieldInputChange$
(
'getWay'
).
subscribe
((
state
)
=>
{
const
{
value
}
=
state
;
const
showReceiveCondition
=
value
===
MERCHANT_COUPON_RECEIVE_FRONT
;
setFieldState
(
'suitableMemberTypes'
,
state
=>
{
if
(
state
.
value
&&
state
.
value
.
length
)
{
FormPath
.
setIn
(
state
,
'value'
,
[]);
}
});
setFieldState
(
'receiveCondition'
,
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
showReceiveCondition
);
});
});
// 适用用户角色
...
...
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