|
@@ -60,6 +60,9 @@ function AddBuilding(props) {
|
60
|
60
|
if (res.receivedDate !== null) {
|
61
|
61
|
res.receivedDate = moment(res.receivedDate)
|
62
|
62
|
}
|
|
63
|
+ if (res.buildingTag !== null) {
|
|
64
|
+ res.tag = res.buildingTag.map((item, _) => item.tagName)
|
|
65
|
+ }
|
63
|
66
|
|
64
|
67
|
res.avatarImage = res.buildingImg.map(item => item.url)
|
65
|
68
|
props.form.setFieldsValue(res)
|
|
@@ -80,6 +83,9 @@ function AddBuilding(props) {
|
80
|
83
|
data.receivedDate = moment(data.receivedDate, 'yyyy-MM-dd HH:mm:ss')
|
81
|
84
|
// 项目主图
|
82
|
85
|
data.img = data.avatarImage && data.avatarImage.map((item, index) => ({ imgType: 'banner', url: item, orderNo: index + 1 }))
|
|
86
|
+ if (data.tag) {
|
|
87
|
+ data.tag = data.tag.map((item, _) => ({ tagName: item }))
|
|
88
|
+ }
|
83
|
89
|
|
84
|
90
|
const api = data.buildingId === undefined ? apis.building.addBuilding : apis.building.updateBuilding
|
85
|
91
|
request({ ...api, data: { ...data } }).then(() => {
|
|
@@ -108,7 +114,7 @@ function AddBuilding(props) {
|
108
|
114
|
{getFieldDecorator('buildingProjectType')(<BudildingProjectType />)}
|
109
|
115
|
</Form.Item>
|
110
|
116
|
<Form.Item label="均价" hasFeedback>
|
111
|
|
- {getFieldDecorator('price')(<Input />)}
|
|
117
|
+ {getFieldDecorator('price')(<Input type="number" style={{ width: '210px' }}/>)}m²/元
|
112
|
118
|
</Form.Item>
|
113
|
119
|
<Form.Item label="开盘时间" hasFeedback>
|
114
|
120
|
{getFieldDecorator('openingDate')(<DatePicker format="YYYY/MM/DD" />)}
|
|
@@ -128,12 +134,18 @@ function AddBuilding(props) {
|
128
|
134
|
)}
|
129
|
135
|
</Form.Item>
|
130
|
136
|
<Form.Item label="销售状态" hasFeedback>
|
131
|
|
- {getFieldDecorator('marketStatus')(<Input />)}
|
|
137
|
+ {getFieldDecorator('marketStatus')(
|
|
138
|
+ <Select placeholder="销售状态" style={{ width: '1016px' }}>
|
|
139
|
+ <Option value="待定">待定</Option>
|
|
140
|
+ <Option value="在售">在售</Option>
|
|
141
|
+ <Option value="售完">售完</Option>
|
|
142
|
+ </Select>,
|
|
143
|
+ )}
|
132
|
144
|
</Form.Item>
|
133
|
|
- <Form.Item label="标签" hasFeedback style={{ display: 'none' }}>
|
134
|
|
- {getFieldDecorator('tags')(
|
135
|
|
- <Select mode="multiple" placeholder="标签" style={{ width: '1016px' }}>
|
136
|
|
- <Option value="未知">未知</Option>
|
|
145
|
+ <Form.Item label="项目标签" hasFeedback>
|
|
146
|
+ {getFieldDecorator('tag')(
|
|
147
|
+ <Select mode="tags" placeholder="输入后选中" style={{ width: '1016px' }}>
|
|
148
|
+
|
137
|
149
|
</Select>,
|
138
|
150
|
)}
|
139
|
151
|
</Form.Item>
|