|
@@ -40,7 +40,27 @@ class TypeForm extends React.Component {
|
40
|
40
|
}
|
41
|
41
|
|
42
|
42
|
values.buildingTypeName = this.props.type.buildingTypeName
|
43
|
|
- console.log('valuesvaluesvaluesvalues: ', values)
|
|
43
|
+ if(values["startPrice"] === "") {
|
|
44
|
+ values["startPrice"] = null
|
|
45
|
+ }
|
|
46
|
+ if(values["endPrice"] === "") {
|
|
47
|
+ values["endPrice"] = null
|
|
48
|
+ }
|
|
49
|
+
|
|
50
|
+ if(values["endPrice"] != null && values["startPrice"] == null){
|
|
51
|
+ notification['warn']({
|
|
52
|
+ message: "请填写最低价!",
|
|
53
|
+ description: '',
|
|
54
|
+ })
|
|
55
|
+ return
|
|
56
|
+ }
|
|
57
|
+ if(values["startPrice"] != null && values["endPrice"] != null && Number(values["startPrice"]) > Number(values["endPrice"])){
|
|
58
|
+ notification['warn']({
|
|
59
|
+ message: "最低价不得高于最高价!",
|
|
60
|
+ description: '',
|
|
61
|
+ })
|
|
62
|
+ return
|
|
63
|
+ }
|
44
|
64
|
this.props.onSuccess(values)
|
45
|
65
|
}
|
46
|
66
|
});
|
|
@@ -82,8 +102,8 @@ class TypeForm extends React.Component {
|
82
|
102
|
)}
|
83
|
103
|
</Form.Item>
|
84
|
104
|
<Form.Item label="价格区间" help='最高价与最低价一致时,只展示一个'>
|
85
|
|
- {getFieldDecorator('startPrice')(<Input placeholder="最低价" style={{width: '60px'}} maxLength="9" onChange={e => this.onChange(e, 'startPrice')} />)} --
|
86
|
|
- {getFieldDecorator('endPrice')(<Input placeholder="最高价" style={{width: '60px'}} maxLength="9" onChange={e => this.onChange(e, 'endPrice')} />)}{this.props.type.priceType === "average" ? "元/㎡" : "万元/套"}
|
|
105
|
+ {getFieldDecorator('startPrice')(<Input type="number" placeholder="最低价" style={{width: '60px'}} maxLength="9" onChange={e => this.onChange(e, 'startPrice')} />)} --
|
|
106
|
+ {getFieldDecorator('endPrice')(<Input type="number" placeholder="最高价" style={{width: '60px'}} maxLength="9" onChange={e => this.onChange(e, 'endPrice')} />)}{this.props.type.priceType === "average" ? "元/㎡" : "万元/套"}
|
87
|
107
|
</Form.Item>
|
88
|
108
|
<Form.Item label="销售状态" >
|
89
|
109
|
{getFieldDecorator('marketStatus')(
|