|
@@ -1,9 +1,16 @@
|
1
|
1
|
import React from 'react'
|
2
|
|
-import { Form, Input, notification, Select } from 'antd'
|
|
2
|
+import { Form, Input, InputNumber, Radio, notification, Select } from 'antd'
|
3
|
3
|
import FileUpload from '@/components/XForm/FileUpload';
|
|
4
|
+import ImageUpload from '@/components/XForm/ImageUpload';
|
|
5
|
+import ImageListUpload from '@/components/XForm/ImageListUpload';
|
|
6
|
+import SelectCity from '@/components/SelectButton/CitySelect'
|
|
7
|
+import AreaSelect from '@/components/SelectButton/AreaSelect'
|
4
|
8
|
import BuildingType from './components/BuildingTypeSelect'
|
|
9
|
+import OpenTimePicker from './components/OpenTimePicker'
|
5
|
10
|
import { formItemLayout } from './utils'
|
6
|
11
|
|
|
12
|
+const fullWidth= { width: '100%' }
|
|
13
|
+
|
7
|
14
|
const Item = Form.Item
|
8
|
15
|
|
9
|
16
|
const BuildingBasic = (props) => {
|
|
@@ -48,7 +55,9 @@ const BuildingBasic = (props) => {
|
48
|
55
|
{getFieldDecorator('price')(<Input />)}
|
49
|
56
|
</Form.Item>
|
50
|
57
|
<Form.Item label="开盘时间" >
|
51
|
|
- {getFieldDecorator('openingDate')(<Input placeholder="预计xxxx年xx月开盘" />)}
|
|
58
|
+ {getFieldDecorator('openingDate')(
|
|
59
|
+ <OpenTimePicker placeholder="请选择开盘时间" style={fullWidth} />
|
|
60
|
+ )}
|
52
|
61
|
</Form.Item>
|
53
|
62
|
<Form.Item label="电话" >
|
54
|
63
|
{getFieldDecorator('tel', {
|
|
@@ -63,14 +72,14 @@ const BuildingBasic = (props) => {
|
63
|
72
|
<Form.Item label="项目说明" >
|
64
|
73
|
{getFieldDecorator('dynamic')(<Input placeholder="项目动态等,不超过30个字" maxLength={30}/>)}
|
65
|
74
|
</Form.Item>
|
66
|
|
- <Form.Item label="物业类型" >
|
|
75
|
+ {/* <Form.Item label="物业类型" >
|
67
|
76
|
{getFieldDecorator('propertyType')(<Input />)}
|
68
|
|
- </Form.Item>
|
|
77
|
+ </Form.Item> */}
|
69
|
78
|
<Form.Item label="销售状态" >
|
70
|
79
|
{getFieldDecorator('marketStatus', {
|
71
|
80
|
rules: [{ required: true, message: '请选择销售状态' }],
|
72
|
81
|
})(
|
73
|
|
- <Select placeholder="销售状态" style={{ width: '100%' }}>
|
|
82
|
+ <Select placeholder="销售状态" style={fullWidth}>
|
74
|
83
|
<Select.Option value="待售">待售</Select.Option>
|
75
|
84
|
<Select.Option value="在售">在售</Select.Option>
|
76
|
85
|
<Select.Option value="售罄">售罄</Select.Option>
|
|
@@ -80,7 +89,7 @@ const BuildingBasic = (props) => {
|
80
|
89
|
</Form.Item>
|
81
|
90
|
<Form.Item label="项目标签" >
|
82
|
91
|
{getFieldDecorator('tag')(
|
83
|
|
- <Select mode="tags" placeholder="输入后选中" style={{ width: '100%' }} />
|
|
92
|
+ <Select mode="tags" placeholder="输入后选中" style={fullWidth} />
|
84
|
93
|
)}
|
85
|
94
|
</Form.Item>
|
86
|
95
|
<Form.Item label="项目视频" help="视频仅支持mp4格式,建议尺寸:750*600,比例5:4,用于楼盘详情">
|
|
@@ -88,6 +97,55 @@ const BuildingBasic = (props) => {
|
88
|
97
|
<FileUpload accept=".mp4" beforeUpload={fileUploadBeforeUpload} label="上传视频" size={1} />,
|
89
|
98
|
)}
|
90
|
99
|
</Form.Item>
|
|
100
|
+ <Form.Item label="视频封面图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于视频封面" >
|
|
101
|
+ {getFieldDecorator('videoImage', {
|
|
102
|
+ rules: [{ required: true, message: '请选择视频封面图' }],
|
|
103
|
+ })(
|
|
104
|
+ <ImageUpload />,
|
|
105
|
+ )}
|
|
106
|
+ </Form.Item>
|
|
107
|
+ <Form.Item label="楼盘主图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于楼盘详情">
|
|
108
|
+ {getFieldDecorator('avatarImage', {
|
|
109
|
+ rules: [{ required: true, message: '请选择项目主图' }],
|
|
110
|
+ })(
|
|
111
|
+ <ImageListUpload unlimited />,
|
|
112
|
+ )}
|
|
113
|
+ </Form.Item>
|
|
114
|
+ <Form.Item label="楼盘封面图" help="建议图片尺寸:750*420px,比例16:9,格式:jpg,用于楼盘列表">
|
|
115
|
+ {getFieldDecorator('listImage', {
|
|
116
|
+ rules: [{ required: true, message: '请选择列表图' }],
|
|
117
|
+ })(
|
|
118
|
+ <ImageUpload />,
|
|
119
|
+ )}
|
|
120
|
+ </Form.Item>
|
|
121
|
+ <Form.Item label="排序" help="数值越大,楼盘在小程序列表页中展示越靠前">
|
|
122
|
+ {getFieldDecorator('orderNo')(<InputNumber min={0} />)}
|
|
123
|
+ </Form.Item>
|
|
124
|
+ <Form.Item label="首页推荐" >
|
|
125
|
+ {getFieldDecorator('isMain', { initialValue: 1 })(
|
|
126
|
+ <Radio.Group>
|
|
127
|
+ <Radio value={1}>是</Radio>
|
|
128
|
+ <Radio value={2}>否</Radio>
|
|
129
|
+ </Radio.Group>,
|
|
130
|
+ )}
|
|
131
|
+ </Form.Item>
|
|
132
|
+ <Form.Item label="所在城市" >
|
|
133
|
+ {getFieldDecorator('cityId', {
|
|
134
|
+ rules: [{ required: true, message: '请选择城市' }],
|
|
135
|
+ })(
|
|
136
|
+ <SelectCity />,
|
|
137
|
+ )}
|
|
138
|
+ </Form.Item>
|
|
139
|
+ <Form.Item label="楼盘区域" >
|
|
140
|
+ {getFieldDecorator('buildingArea', {
|
|
141
|
+ rules: [{ required: true, message: '请输入楼盘区域' }],
|
|
142
|
+ })(<AreaSelect />)}
|
|
143
|
+ </Form.Item>
|
|
144
|
+ <Form.Item label="项目地址" >
|
|
145
|
+ {getFieldDecorator('address', {
|
|
146
|
+ rules: [{ required: true, message: '请输入项目地址' }],
|
|
147
|
+ })(<Input />)}
|
|
148
|
+ </Form.Item>
|
91
|
149
|
|
92
|
150
|
</Form>
|
93
|
151
|
)
|