|
@@ -0,0 +1,217 @@
|
|
1
|
+import React, { useState, useEffect } from 'react';
|
|
2
|
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Radio, Tag, Tooltip, Tabs } from 'antd';
|
|
3
|
+import moment from 'moment';
|
|
4
|
+import request from '../../../../../utils/request';
|
|
5
|
+import apis from '../../../../../services/apis';
|
|
6
|
+import Styles from '../style.less';
|
|
7
|
+import { router } from 'umi';
|
|
8
|
+import ImageUpload from '../../../../../components/XForm/ImageUpload'
|
|
9
|
+import Wangedit from '../../../../../components/Wangedit/Wangedit'
|
|
10
|
+import TagGroup from './tags'
|
|
11
|
+
|
|
12
|
+const { Option } = Select
|
|
13
|
+const { TabPane } = Tabs;
|
|
14
|
+
|
|
15
|
+const formItemLayout = {
|
|
16
|
+ labelCol: {
|
|
17
|
+ xs: { span: 24 },
|
|
18
|
+ sm: { span: 2 },
|
|
19
|
+ },
|
|
20
|
+ wrapperCol: {
|
|
21
|
+ xs: { span: 24 },
|
|
22
|
+ sm: { span: 16 },
|
|
23
|
+ },
|
|
24
|
+};
|
|
25
|
+
|
|
26
|
+function AddBuilding(props) {
|
|
27
|
+ // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
28
|
+ const [dataSource, setDataSource] = useState({ records: [] })
|
|
29
|
+
|
|
30
|
+ const [buildingAreaTags, setBuildingAreaTags] = useState({ tags: ['Unremovable', 'Tag 2', 'Tag 3'], inputVisible: false, inputValue: '' })
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+ const { getFieldDecorator } = props.form;
|
|
34
|
+
|
|
35
|
+ function handleSubmit(e) {
|
|
36
|
+ e.preventDefault();
|
|
37
|
+ props.form.validateFieldsAndScroll((err, values) => {
|
|
38
|
+ if (!err) {
|
|
39
|
+ console.log('Received values of form: ', values);
|
|
40
|
+ }
|
|
41
|
+ });
|
|
42
|
+ }
|
|
43
|
+
|
|
44
|
+ return (
|
|
45
|
+ <Form {...formItemLayout} onSubmit={handleSubmit}>
|
|
46
|
+ <Form.Item label="楼盘编号">
|
|
47
|
+ {getFieldDecorator('code')(<Input />)}
|
|
48
|
+ </Form.Item>
|
|
49
|
+ <Form.Item label="楼盘名称" hasFeedback>
|
|
50
|
+ {getFieldDecorator('buildingName')(<Input />)}
|
|
51
|
+ </Form.Item>
|
|
52
|
+ <Form.Item label="别名" hasFeedback>
|
|
53
|
+ {getFieldDecorator('name')(<Input />)}
|
|
54
|
+ </Form.Item>
|
|
55
|
+ <Form.Item label="项目类型" hasFeedback>
|
|
56
|
+ {getFieldDecorator('name')(<Input />)}
|
|
57
|
+ </Form.Item>
|
|
58
|
+ <Form.Item label="均价" hasFeedback>
|
|
59
|
+ {getFieldDecorator('price')(<Input />)}
|
|
60
|
+ </Form.Item>
|
|
61
|
+ <Form.Item label="开盘时间" hasFeedback>
|
|
62
|
+ {getFieldDecorator('openingDate')(<DatePicker />)}
|
|
63
|
+ </Form.Item>
|
|
64
|
+ <Form.Item label="电话" hasFeedback>
|
|
65
|
+ {getFieldDecorator('tel')(<Input />)}
|
|
66
|
+ </Form.Item>
|
|
67
|
+ <Form.Item label="项目动态" hasFeedback>
|
|
68
|
+ {getFieldDecorator('dynamic')(<Input />)}
|
|
69
|
+ </Form.Item>
|
|
70
|
+ <Form.Item label="物业类型" hasFeedback>
|
|
71
|
+ {getFieldDecorator('buildingProperty')(
|
|
72
|
+ <Select mode="multiple" placeholder="物业类型" style={{ width: '1016px' }}>
|
|
73
|
+ <Option value="未知">未知</Option>
|
|
74
|
+ </Select>,
|
|
75
|
+ )}
|
|
76
|
+ </Form.Item>
|
|
77
|
+ <Form.Item label="销售状态" hasFeedback>
|
|
78
|
+ {getFieldDecorator('marketStatus')(<Input />)}
|
|
79
|
+ </Form.Item>
|
|
80
|
+ <Form.Item label="标签" hasFeedback>
|
|
81
|
+ {getFieldDecorator('tags')(
|
|
82
|
+ <Select mode="multiple" placeholder="标签" style={{ width: '1016px' }}>
|
|
83
|
+ <Option value="未知">未知</Option>
|
|
84
|
+ </Select>,
|
|
85
|
+ )}
|
|
86
|
+ </Form.Item>
|
|
87
|
+ <Form.Item label="项目主图" hasFeedback>
|
|
88
|
+ {getFieldDecorator('tags')(
|
|
89
|
+ <ImageUpload />,
|
|
90
|
+ )}
|
|
91
|
+ </Form.Item>
|
|
92
|
+ <Form.Item label="地址图片" hasFeedback>
|
|
93
|
+ {getFieldDecorator('tags')(
|
|
94
|
+ <ImageUpload />,
|
|
95
|
+ )}
|
|
96
|
+ </Form.Item>
|
|
97
|
+ <Form.Item label="海报底图" hasFeedback>
|
|
98
|
+ {getFieldDecorator('tags')(
|
|
99
|
+ <ImageUpload />,
|
|
100
|
+ )}
|
|
101
|
+ </Form.Item>
|
|
102
|
+ <Form.Item label="排序" hasFeedback>
|
|
103
|
+ {getFieldDecorator('orderNo')(<Input />)}
|
|
104
|
+ </Form.Item>
|
|
105
|
+ <Form.Item label="优惠信息" hasFeedback>
|
|
106
|
+ {getFieldDecorator('discount')(<Input />)}
|
|
107
|
+ </Form.Item>
|
|
108
|
+ <Form.Item label="首页推荐" hasFeedback>
|
|
109
|
+ {getFieldDecorator('isMain')(
|
|
110
|
+ <Radio.Group>
|
|
111
|
+ <Radio value={1}>是</Radio>
|
|
112
|
+ <Radio value={2}>否</Radio>
|
|
113
|
+ </Radio.Group>,
|
|
114
|
+ )}
|
|
115
|
+ </Form.Item>
|
|
116
|
+ <Form.Item label="所在城市" hasFeedback>
|
|
117
|
+ {getFieldDecorator('cityId')(
|
|
118
|
+ <Select placeholder="选择城市" style={{ width: '200px' }}>
|
|
119
|
+ <Option value="red">Red</Option>
|
|
120
|
+ </Select>,
|
|
121
|
+ )}
|
|
122
|
+ </Form.Item>
|
|
123
|
+ <Form.Item label="楼盘区域" hasFeedback>
|
|
124
|
+ {getFieldDecorator('buildingArea')(<Input />)}
|
|
125
|
+ </Form.Item>
|
|
126
|
+ <Form.Item label="项目地址" hasFeedback>
|
|
127
|
+ {getFieldDecorator('address')(<Input />)}
|
|
128
|
+ </Form.Item>
|
|
129
|
+ <Form.Item label="项目坐标" hasFeedback>
|
|
130
|
+ {getFieldDecorator('coordinate')(<Input disabled />)}
|
|
131
|
+ </Form.Item>
|
|
132
|
+ <Form.Item label="项目地址" hasFeedback>
|
|
133
|
+ {getFieldDecorator('coordinate')(<Input />)}
|
|
134
|
+ </Form.Item>
|
|
135
|
+ <Form.Item label="周边交通" hasFeedback>
|
|
136
|
+ {getFieldDecorator('buildingArea')(
|
|
137
|
+ <TagGroup />,
|
|
138
|
+ )}
|
|
139
|
+ </Form.Item>
|
|
140
|
+ <Form.Item label="周边交通" hasFeedback>
|
|
141
|
+ {getFieldDecorator('buildingMall')(
|
|
142
|
+ <TagGroup />,
|
|
143
|
+ )}
|
|
144
|
+ </Form.Item>
|
|
145
|
+ <Form.Item label="周边学校" hasFeedback>
|
|
146
|
+ {getFieldDecorator('buildingEdu')(
|
|
147
|
+ <TagGroup />,
|
|
148
|
+ )}
|
|
149
|
+ </Form.Item>
|
|
150
|
+ <Form.Item label="周边医院" hasFeedback>
|
|
151
|
+ {getFieldDecorator('buildingHospital')(
|
|
152
|
+ <TagGroup />,
|
|
153
|
+ )}
|
|
154
|
+ </Form.Item>
|
|
155
|
+ <Form.Item label="周边银行" hasFeedback>
|
|
156
|
+ {getFieldDecorator('buildingBank')(
|
|
157
|
+ <TagGroup />,
|
|
158
|
+ )}
|
|
159
|
+ </Form.Item>
|
|
160
|
+ <Form.Item label="周边餐饮" hasFeedback>
|
|
161
|
+ {getFieldDecorator('buildingRestaurant')(
|
|
162
|
+ <TagGroup />,
|
|
163
|
+ )}
|
|
164
|
+ </Form.Item>
|
|
165
|
+ <Form.Item label="绿化率" hasFeedback>
|
|
166
|
+ {getFieldDecorator('greeningRate')(<Input />)}
|
|
167
|
+ </Form.Item>
|
|
168
|
+ <Form.Item label="容积率" hasFeedback>
|
|
169
|
+ {getFieldDecorator('volumeRate')(<Input />)}
|
|
170
|
+ </Form.Item>
|
|
171
|
+ <Form.Item label="车位比" hasFeedback>
|
|
172
|
+ {getFieldDecorator('parkingRate')(<Input />)}
|
|
173
|
+ </Form.Item>
|
|
174
|
+ <Form.Item label="规划户数" hasFeedback>
|
|
175
|
+ {getFieldDecorator('familyNum')(<Input />)}
|
|
176
|
+ </Form.Item>
|
|
177
|
+ <Form.Item label="物业公司" hasFeedback>
|
|
178
|
+ {getFieldDecorator('serviceCompany')(<Input />)}
|
|
179
|
+ </Form.Item>
|
|
180
|
+ <Form.Item label="物业费" hasFeedback>
|
|
181
|
+ {getFieldDecorator('serviceFee')(<Input />)}
|
|
182
|
+ </Form.Item>
|
|
183
|
+ <Form.Item label="装修标准" hasFeedback>
|
|
184
|
+ {getFieldDecorator('decoration')(<Input />)}
|
|
185
|
+ </Form.Item>
|
|
186
|
+ <Form.Item label="交房时间" hasFeedback>
|
|
187
|
+ {getFieldDecorator('receivedDate')(<DatePicker />)}
|
|
188
|
+ </Form.Item>
|
|
189
|
+ <Form.Item label="产权年限" hasFeedback>
|
|
190
|
+ {getFieldDecorator('rightsYear')(<Input />)}
|
|
191
|
+ </Form.Item>
|
|
192
|
+ <Form.Item label="预售许可证" hasFeedback>
|
|
193
|
+ {getFieldDecorator('decoration')(
|
|
194
|
+ <ImageUpload />,
|
|
195
|
+ )}
|
|
196
|
+ </Form.Item>
|
|
197
|
+ <Form.Item label="项目备注" hasFeedback>
|
|
198
|
+ {getFieldDecorator('remark')(
|
|
199
|
+ <Wangedit />,
|
|
200
|
+ )}
|
|
201
|
+ </Form.Item>
|
|
202
|
+ <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
|
|
203
|
+ <Button type="primary" htmlType="submit">
|
|
204
|
+ 确定
|
|
205
|
+ </Button>
|
|
206
|
+
|
|
207
|
+ <Button onClick={() => router.go(-1)}>
|
|
208
|
+ 取消
|
|
209
|
+ </Button>
|
|
210
|
+ </Form.Item>
|
|
211
|
+ </Form>
|
|
212
|
+ )
|
|
213
|
+}
|
|
214
|
+
|
|
215
|
+const WrappedAddBuildingForm = Form.create({ name: 'addBuilding' })(AddBuilding);
|
|
216
|
+
|
|
217
|
+export default WrappedAddBuildingForm
|