Commit 90a5ef67 authored by XieZhiXiong's avatar XieZhiXiong

chore: 删除禁用逻辑

parent d89178ae
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-23 16:14:31
* @LastEditTime: 2021-09-24 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 => {
......
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