Commit 1e2c4bf9 authored by GuanHua's avatar GuanHua
parents af523deb cbb086af
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-24 10:59:06
* @LastEditTime: 2021-09-27 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);
});
});
// 适用用户角色
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment