魏熙美 5 лет назад
Родитель
Сommit
69499c7bce
2 измененных файлов: 19 добавлений и 7 удалений
  1. 18
    6
      src/pages/building/list/add/components/base.jsx
  2. 1
    1
      src/pages/building/list/index.jsx

+ 18
- 6
src/pages/building/list/add/components/base.jsx Просмотреть файл

115
             {getFieldDecorator('name')(<Input />)}
115
             {getFieldDecorator('name')(<Input />)}
116
           </Form.Item> */}
116
           </Form.Item> */}
117
           <Form.Item label="项目类型">
117
           <Form.Item label="项目类型">
118
-            {getFieldDecorator('buildingProjectType')(<BudildingProjectType />)}
118
+            {getFieldDecorator('buildingProjectType', {
119
+              rules: [{ required: true, message: '请选择项目类型' }],
120
+            })(<BudildingProjectType />)}
119
           </Form.Item>
121
           </Form.Item>
120
           <Form.Item label="均价" >
122
           <Form.Item label="均价" >
121
             {getFieldDecorator('price')(<Input type="number" style={{ width: '210px' }}/>)}元/m²
123
             {getFieldDecorator('price')(<Input type="number" style={{ width: '210px' }}/>)}元/m²
146
             )}
148
             )}
147
           </Form.Item>
149
           </Form.Item>
148
           <Form.Item label="销售状态" >
150
           <Form.Item label="销售状态" >
149
-            {getFieldDecorator('marketStatus')(
151
+            {getFieldDecorator('marketStatus', {
152
+              rules: [{ required: true, message: '请选择销售状态' }],
153
+            })(
150
               <Select placeholder="销售状态" style={{ width: '1016px' }}>
154
               <Select placeholder="销售状态" style={{ width: '1016px' }}>
151
                 <Option value="待定">待定</Option>
155
                 <Option value="待定">待定</Option>
152
                 <Option value="在售">在售</Option>
156
                 <Option value="在售">在售</Option>
162
             )}
166
             )}
163
           </Form.Item>
167
           </Form.Item>
164
           <Form.Item label="项目主图" help="建议图片尺寸:640px*360px">
168
           <Form.Item label="项目主图" help="建议图片尺寸:640px*360px">
165
-            {getFieldDecorator('avatarImage')(
169
+            {getFieldDecorator('avatarImage', {
170
+              rules: [{ required: true, message: '请选择项目主图' }],
171
+            })(
166
               <ImageListUpload />,
172
               <ImageListUpload />,
167
             )}
173
             )}
168
           </Form.Item>
174
           </Form.Item>
198
             )}
204
             )}
199
           </Form.Item>
205
           </Form.Item>
200
           <Form.Item label="楼盘区域" >
206
           <Form.Item label="楼盘区域" >
201
-            {getFieldDecorator('buildingArea')(<Input />)}
207
+            {getFieldDecorator('buildingArea', {
208
+              rules: [{ required: true, message: '请输入楼盘区域' }],
209
+            })(<Input />)}
202
           </Form.Item>
210
           </Form.Item>
203
           <Form.Item label="项目地址" >
211
           <Form.Item label="项目地址" >
204
-            {getFieldDecorator('address')(<Input />)}
212
+            {getFieldDecorator('address', {
213
+              rules: [{ required: true, message: '请输入项目地址' }],
214
+            })(<Input />)}
205
           </Form.Item>
215
           </Form.Item>
206
           <Form.Item label="项目坐标" >
216
           <Form.Item label="项目坐标" >
207
-            {getFieldDecorator('coordinate')(<Input disabled />)}
217
+            {getFieldDecorator('coordinate', {
218
+              rules: [{ required: true, message: '请输入项目坐标' }],
219
+            })(<Input disabled />)}
208
           </Form.Item>
220
           </Form.Item>
209
           <Form.Item label="地图位置" >
221
           <Form.Item label="地图位置" >
210
             {getFieldDecorator('coordinate')(<Amap />)}
222
             {getFieldDecorator('coordinate')(<Amap />)}

+ 1
- 1
src/pages/building/list/index.jsx Просмотреть файл

123
       <p className={Styles.cardItem}>
123
       <p className={Styles.cardItem}>
124
         <span className={Styles.title}>均价</span>
124
         <span className={Styles.title}>均价</span>
125
         <span >
125
         <span >
126
-          :约<span style={{ color: '#FF0707', fontSize: '20px' }}> {data.price} </span>元/m²
126
+          :约<span style={{ color: '#FF0707', fontSize: '20px' }}> {data.price || '待定'} </span>元/m²
127
         </span>
127
         </span>
128
       </p>
128
       </p>
129
       <p className={Styles.cardItem}>
129
       <p className={Styles.cardItem}>