Skip to content

Commit

Permalink
fixed minimum value conversion issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cybertriton committed Sep 4, 2020
1 parent b384d1c commit 0ee2fc7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/views/campaign/configureRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class ConfigureRules extends Component {
exps.push("#MinimumValue");
rules.push({
name: "MinimumValue",
option: values.minimum,
option: parseFloat(values.minimum)*100,
});
}
// 这是商户规则部分
Expand Down Expand Up @@ -315,7 +315,7 @@ class ConfigureRules extends Component {
tagType: tagType,
regionType: regionType,
//new
minimum: minimum,
minimum: minimum ? (parseFloat(minimum)/100).toFixed(2):"",
}}
validateMessages={defaultValidateMessages.defaultValidateMessages}
>
Expand Down Expand Up @@ -346,10 +346,10 @@ class ConfigureRules extends Component {
</Form.Item>
{orderStatus ? (
<Form.Item label="最低消费金额(元):" name="minimum">
<InputNumber
defaultValue={
orderRule && orderRule.option ? orderRule.option : ""
}
<InputNumber min={0}
// defaultValue={
// orderRule && orderRule.option ? (parseFloat(orderRule.option)/100).toFixed(2) : ""
// }
/>
</Form.Item>
) : null}
Expand Down

0 comments on commit 0ee2fc7

Please sign in to comment.