|
|
@@ -3,6 +3,7 @@ import { |
|
|
|
InputNumber, |
|
|
|
Row, |
|
|
|
Col, |
|
|
|
Switch, |
|
|
|
Checkbox, |
|
|
|
Space, |
|
|
|
Steps, |
|
|
@@ -252,25 +253,89 @@ const CreateForm = (props) => { |
|
|
|
{'买满赠送(商品)'} |
|
|
|
</Option> |
|
|
|
<Option key={6} value={6}> |
|
|
|
{'消费次数换购(阶梯)'} |
|
|
|
{'累计消费换购(阶梯)'} |
|
|
|
</Option> |
|
|
|
<Option key={7} value={7}> |
|
|
|
{'消费次数换购(循环)'} |
|
|
|
{'累计消费换购(循环)'} |
|
|
|
</Option > |
|
|
|
<Option key={8} value={8}> |
|
|
|
{'加价换购'} |
|
|
|
</Option> |
|
|
|
</Select > |
|
|
|
</Form.Item > |
|
|
|
|
|
|
|
<Form.Item |
|
|
|
noStyle |
|
|
|
shouldUpdate={(prevValues, currentValues) => |
|
|
|
prevValues.activityType !== currentValues.activityType |
|
|
|
} |
|
|
|
> |
|
|
|
} > |
|
|
|
{({ getFieldValue }) => |
|
|
|
(getFieldValue('activityType') == '6' || getFieldValue('activityType') == '7') ? ( |
|
|
|
<Form.Item> |
|
|
|
<Form.Item |
|
|
|
name="isGiftGoodsParticipate" |
|
|
|
label="赠送商品是否参与活动" |
|
|
|
rules={[ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
]} |
|
|
|
> |
|
|
|
<Select |
|
|
|
showSearch |
|
|
|
optionFilterProp="children" |
|
|
|
filterOption={(input, option) => |
|
|
|
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
|
|
|
} |
|
|
|
placeholder="请选活动消费类型" |
|
|
|
> |
|
|
|
<Option key={1} value={1}> |
|
|
|
{'是'} |
|
|
|
</Option> |
|
|
|
<Option key={0} value={0}> |
|
|
|
{'否'} |
|
|
|
</Option> |
|
|
|
</Select > |
|
|
|
</Form.Item> |
|
|
|
<Form.Item |
|
|
|
name="consumptionType" |
|
|
|
label="活动消费类型" |
|
|
|
rules={[ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
]} |
|
|
|
> |
|
|
|
<Select |
|
|
|
showSearch |
|
|
|
optionFilterProp="children" |
|
|
|
filterOption={(input, option) => |
|
|
|
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
|
|
|
} |
|
|
|
placeholder="请选活动消费类型" |
|
|
|
> |
|
|
|
<Option key={1} value={1}> |
|
|
|
{'钱(元)'} |
|
|
|
</Option> |
|
|
|
<Option key={2} value={2}> |
|
|
|
{'数量(杯/碗/盒/个/.....)'} |
|
|
|
</Option> |
|
|
|
</Select > |
|
|
|
</Form.Item> |
|
|
|
</Form.Item> |
|
|
|
|
|
|
|
) : null |
|
|
|
} |
|
|
|
</Form.Item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Form.Item |
|
|
|
noStyle |
|
|
|
shouldUpdate={(prevValues, currentValues) => |
|
|
|
prevValues.activityType !== currentValues.activityType |
|
|
|
} > |
|
|
|
{({ getFieldValue }) => |
|
|
|
// (getFieldValue('activityType') == '6' || getFieldValue('activityType') == '7') ? ( |
|
|
|
|
|
|
|
// <Form.Item label="消费次数"> |
|
|
@@ -376,12 +441,12 @@ const CreateForm = (props) => { |
|
|
|
})} |
|
|
|
</Select>) : |
|
|
|
(getFieldValue('activityType') == '5' || getFieldValue('activityType') == '8') ? ( |
|
|
|
<Select style={{ width: 200 }} |
|
|
|
showSearch |
|
|
|
optionFilterProp="children" |
|
|
|
filterOption={(input, option) => |
|
|
|
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
|
|
|
} > |
|
|
|
<Select style={{ width: 200 }} |
|
|
|
showSearch |
|
|
|
optionFilterProp="children" |
|
|
|
filterOption={(input, option) => |
|
|
|
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
|
|
|
} > |
|
|
|
{goodsInfo.map((item, index) => { |
|
|
|
return ( |
|
|
|
<Option index={index} value={item.id} key={item.id}> |
|
|
|