魏熙美 5 年之前
父節點
當前提交
3580fd4ce0
共有 1 個文件被更改,包括 10 次插入4 次删除
  1. 10
    4
      src/pages/building/list/add/components/base.jsx

+ 10
- 4
src/pages/building/list/add/components/base.jsx 查看文件

@@ -102,10 +102,14 @@ function AddBuilding(props) {
102 102
             {getFieldDecorator('buildingId')(<Input disabled />)}
103 103
           </Form.Item>
104 104
           <Form.Item label="楼盘编号" >
105
-            {getFieldDecorator('code')(<Input />)}
105
+            {getFieldDecorator('code', {
106
+              rules: [{ required: true, message: '请输入楼盘编号' }],
107
+            })(<Input />)}
106 108
           </Form.Item>
107 109
           <Form.Item label="楼盘名称" >
108
-            {getFieldDecorator('buildingName')(<Input />)}
110
+            {getFieldDecorator('buildingName', {
111
+              rules: [{ required: true, message: '请输入楼盘名' }],
112
+            })(<Input />)}
109 113
           </Form.Item>
110 114
           <Form.Item label="别名" >
111 115
             {getFieldDecorator('name')(<Input />)}
@@ -116,7 +120,7 @@ function AddBuilding(props) {
116 120
           <Form.Item label="均价" >
117 121
             {getFieldDecorator('price')(<Input type="number" style={{ width: '210px' }}/>)}元/m²
118 122
           </Form.Item>
119
-          <Form.Item label="开盘时间"  >
123
+          <Form.Item label="开盘时间" >
120 124
             {getFieldDecorator('openingDate')(<DatePicker format="YYYY/MM/DD" />)}
121 125
           </Form.Item>
122 126
           <Form.Item label="电话" >
@@ -187,7 +191,9 @@ function AddBuilding(props) {
187 191
             )}
188 192
           </Form.Item>
189 193
           <Form.Item label="所在城市" >
190
-            {getFieldDecorator('cityId')(
194
+            {getFieldDecorator('cityId', {
195
+              rules: [{ required: true, message: '请选择城市' }],
196
+            })(
191 197
               <SelectCity />,
192 198
             )}
193 199
           </Form.Item>