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
linweijiong
jinfa-admin
Commits
90a5ef67
Commit
90a5ef67
authored
Sep 24, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 删除禁用逻辑
parent
d89178ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
32 deletions
+1
-32
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+1
-32
No files found.
src/pages/marketingManage/platformCoupon/platformCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
90a5ef67
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-2
3 16:14:31
* @LastEditTime: 2021-09-2
4 10:59:06
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
...
...
@@ -176,37 +176,6 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
}
});
});
// 领券方式
onFieldValueChange$
(
'getWay'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
;
const
suitableMemberTypesEnum
=
[...
getFieldState
(
'suitableMemberTypes'
,
state
=>
state
.
props
.
enum
)];
const
newData
=
suitableMemberTypesEnum
.
map
((
item
)
=>
{
const
newItem
=
{...
item
};
newItem
.
disabled
=
false
;
if
(
(
value
===
MERCHANT_COUPON_RECEIVE_DESIGNATED
||
value
===
MERCHANT_COUPON_RECEIVE_OPERATE
)
&&
(
newItem
.
value
===
SUITABLE_TYPE_NEW_USER
||
newItem
.
value
===
SUITABLE_TYPE_OLD_USER
)
)
{
newItem
.
disabled
=
true
;
}
return
newItem
;
});
const
showReceiveCondition
=
value
===
MERCHANT_COUPON_RECEIVE_FRONT
;
setFieldState
(
'suitableMemberTypes'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
newData
);
});
setFieldState
(
'receiveCondition'
,
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
showReceiveCondition
);
});
});
// 适用用户角色
onFieldInputChange$
(
'applicationUserRole'
).
subscribe
(
state
=>
{
...
...
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