魏超 5 vuotta sitten
vanhempi
commit
c9ba023fb4

+ 5
- 5
src/pages/house/house/add/HouseBatchAdd.jsx Näytä tiedosto

127
     dataIndex: 'price',
127
     dataIndex: 'price',
128
     key: 'price',
128
     key: 'price',
129
   },
129
   },
130
-  {
131
-    title: '预选基础热度',
132
-    dataIndex: 'heat',
133
-    key: 'heat',
134
-  },
130
+  // {
131
+  //   title: '预选基础热度',
132
+  //   dataIndex: 'heat',
133
+  //   key: 'heat',
134
+  // },
135
   {
135
   {
136
     title: '发布状态',
136
     title: '发布状态',
137
     dataIndex: 'status',
137
     dataIndex: 'status',

+ 38
- 34
src/pages/house/house/edit/components/house.jsx Näytä tiedosto

143
       key: 'houseId',
143
       key: 'houseId',
144
     },
144
     },
145
     {
145
     {
146
-      title: '期/区',
147
-      dataIndex: 'termName',
148
-      key: 'termName',
149
-    },
150
-    {
151
-      title: '楼栋',
152
-      dataIndex: 'blockName',
153
-      key: 'blockName',
154
-    },
155
-    {
156
-      title: '单元',
157
-      dataIndex: 'unitName',
158
-      key: 'unitName',
159
-    },
160
-    {
161
-      title: '层',
162
-      dataIndex: 'floorName',
163
-      key: 'floorName',
164
-    },
165
-    {
166
-      title: '房号',
167
-      dataIndex: 'roomName',
168
-      key: 'roomName',
146
+      title: '房源',
147
+      render:  (x, row) => <><span>{row.termName}/{row.blockName}/{row.blockName}/{row.unitName}/{row.floorName}/{row.roomName}</span></>,
169
     },
148
     },
149
+    // {
150
+    //   title: '期/区',
151
+    //   dataIndex: 'termName',
152
+    //   key: 'termName',
153
+    // },
154
+    // {
155
+    //   title: '楼栋',
156
+    //   dataIndex: 'blockName',
157
+    //   key: 'blockName',
158
+    // },
159
+    // {
160
+    //   title: '单元',
161
+    //   dataIndex: 'unitName',
162
+    //   key: 'unitName',
163
+    // },
164
+    // {
165
+    //   title: '层',
166
+    //   dataIndex: 'floorName',
167
+    //   key: 'floorName',
168
+    // },
169
+    // {
170
+    //   title: '房号',
171
+    //   dataIndex: 'roomName',
172
+    //   key: 'roomName',
173
+    // },
170
     {
174
     {
171
       title: '价格(万元)',
175
       title: '价格(万元)',
172
       dataIndex: 'price',
176
       dataIndex: 'price',
177
       dataIndex: 'apartmentName',
181
       dataIndex: 'apartmentName',
178
       key: 'apartmentName',
182
       key: 'apartmentName',
179
     },
183
     },
180
-    {
181
-      title: '预选基础热度',
182
-      dataIndex: 'heat',
183
-      key: 'heat',
184
-    },
185
-    {
186
-      title: '预选实际热度',
187
-      dataIndex: 'realHeat',
188
-      key: 'realHeat',
189
-      render:  (x, row) => <><span style={{color: 'blue',cursor: 'pointer'}} onClick={() => showEdi({type: "preselection",houseId: row.houseId})}>{row.realHeat}</span></>,
190
-    },
184
+    // {
185
+    //   title: '预选基础热度',
186
+    //   dataIndex: 'heat',
187
+    //   key: 'heat',
188
+    // },
189
+    // {
190
+    //   title: '预选实际热度',
191
+    //   dataIndex: 'realHeat',
192
+    //   key: 'realHeat',
193
+    //   render:  (x, row) => <><span style={{color: 'blue',cursor: 'pointer'}} onClick={() => showEdi({type: "preselection",houseId: row.houseId})}>{row.realHeat}</span></>,
194
+    // },
191
     {
195
     {
192
       title: '发布状态',
196
       title: '发布状态',
193
       dataIndex: 'status',
197
       dataIndex: 'status',

+ 2
- 2
src/pages/house/house/edit/components/houseAdd.jsx Näytä tiedosto

156
           ],
156
           ],
157
         })(<Input placeholder="填写房源总价"/>)}万元
157
         })(<Input placeholder="填写房源总价"/>)}万元
158
         </Form.Item>
158
         </Form.Item>
159
-        <Form.Item label="预选基础热度">
159
+        {/* <Form.Item label="预选基础热度">
160
         {getFieldDecorator('heat', {
160
         {getFieldDecorator('heat', {
161
           rules: [
161
           rules: [
162
             {
162
             {
166
             },
166
             },
167
           ],
167
           ],
168
         })(<Input placeholder="填写基础预选热度,建议为0"/>)}
168
         })(<Input placeholder="填写基础预选热度,建议为0"/>)}
169
-        </Form.Item>
169
+        </Form.Item> */}
170
         <Form.Item label="户型" help="户型不存在时,请到楼盘详情中查看是否存在户型,不存在时请新增户型。">
170
         <Form.Item label="户型" help="户型不存在时,请到楼盘详情中查看是否存在户型,不存在时请新增户型。">
171
         {getFieldDecorator('apartmentId')(<ApartmentSelect buildingId={props.buildingId} />)}
171
         {getFieldDecorator('apartmentId')(<ApartmentSelect buildingId={props.buildingId} />)}
172
         </Form.Item>
172
         </Form.Item>

+ 7
- 8
src/pages/house/preSelect/add/index.jsx Näytä tiedosto

5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import styles from '../../../style/GoodsList.less';
7
 import styles from '../../../style/GoodsList.less';
8
-import SelectCity from '../../../../components/SelectButton/CitySelect'
9
-import BuildSelect from '../../../../components/SelectButton/BuildSelect'
8
+import BuildSelect from '../../raise/edit/components/BuildSelect/BuildSelect'
10
 import ImageUpload from '../../../../components/XForm/ImageUpload'
9
 import ImageUpload from '../../../../components/XForm/ImageUpload'
11
 import apis from '../../../../services/apis';
10
 import apis from '../../../../services/apis';
12
 import request from '../../../../utils/request';
11
 import request from '../../../../utils/request';
75
   return (
74
   return (
76
     <>
75
     <>
77
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
76
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
78
-        <Form.Item label="销售批次">
79
-          {getFieldDecorator('salesBatchId', {
80
-            rules: [{ required: true, message: '请输入销售批次名' }],
81
-          })(<SalesBatch type='true'/>)}
82
-        </Form.Item>
83
         <Form.Item label="销售楼盘">
77
         <Form.Item label="销售楼盘">
84
           {getFieldDecorator('buildingId', {
78
           {getFieldDecorator('buildingId', {
85
             rules: [{ required: true, message: ' 请输入销售楼盘' }],
79
             rules: [{ required: true, message: ' 请输入销售楼盘' }],
86
-          })(<BuildSelect />)}
80
+          })(<BuildSelect type='false' salesBatchId={props.form.getFieldValue('salesBatchId')}/>)}
81
+        </Form.Item>
82
+        <Form.Item label="销售批次">
83
+          {getFieldDecorator('salesBatchId', {
84
+            rules: [{ required: true, message: '请输入销售批次名' }],
85
+          })(<SalesBatch type='true' buildingId={props.form.getFieldValue('buildingId')}/>)}
87
         </Form.Item>
86
         </Form.Item>
88
         <Form.Item label="预选开始时间">  
87
         <Form.Item label="预选开始时间">  
89
           {getFieldDecorator('preselectionStartTime', {
88
           {getFieldDecorator('preselectionStartTime', {

+ 3
- 2
src/pages/house/preSelect/edit/components/SalesBatch/SalesBatch.jsx Näytä tiedosto

23
   const [data, setData] = useState([])
23
   const [data, setData] = useState([])
24
   const [value, setValue] = useState([])
24
   const [value, setValue] = useState([])
25
   const disabledType = props.type;
25
   const disabledType = props.type;
26
+  const buildingId = props.buildingId
26
   useEffect(() => {
27
   useEffect(() => {
27
     getSalesBatchList();
28
     getSalesBatchList();
28
-  }, [props.value])
29
+  }, [props.buildingId])
29
 
30
 
30
 
31
 
31
   const getSalesBatchList = e => {
32
   const getSalesBatchList = e => {
32
-    request({ ...apis.house.salesBatchList, params: { pageNum: 1, pageSize: 999 } }).then(data => {
33
+    request({ ...apis.house.salesBatchList, params: { pageNum: 1, pageSize: 999, buildingId: buildingId } }).then(data => {
33
         setData(data)
34
         setData(data)
34
         checkValue(data)
35
         checkValue(data)
35
         // 默认选中第一个
36
         // 默认选中第一个

+ 5
- 4
src/pages/house/raise/add/index.jsx Näytä tiedosto

6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import styles from '../../../style/GoodsList.less';
7
 import styles from '../../../style/GoodsList.less';
8
 import SelectCity from '../../../../components/SelectButton/CitySelect'
8
 import SelectCity from '../../../../components/SelectButton/CitySelect'
9
-import BuildSelect from '../../../../components/SelectButton/BuildSelect'
9
+// import BuildSelect from '../../../../components/SelectButton/BuildSelect'
10
+import BuildSelect from '../edit/components/BuildSelect/BuildSelect';
10
 import ImageUpload from '../../../../components/XForm/ImageUpload'
11
 import ImageUpload from '../../../../components/XForm/ImageUpload'
11
 import apis from '../../../../services/apis';
12
 import apis from '../../../../services/apis';
12
 import request from '../../../../utils/request';
13
 import request from '../../../../utils/request';
114
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
115
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
115
         <Form.Item label="销售楼盘">
116
         <Form.Item label="销售楼盘">
116
           {getFieldDecorator('buildingId', {
117
           {getFieldDecorator('buildingId', {
117
-            rules: [{ required: true, message: ' 请输入销售楼盘' }],
118
-          })(<BuildSelect />)}
118
+            rules: [{ required: true, message: ' 请输入销售楼盘' }], 
119
+          })(<BuildSelect type='false' salesBatchId={props.form.getFieldValue('salesBatchId')}/>)}
119
         </Form.Item>
120
         </Form.Item>
120
         <Form.Item label="销售批次" help="销售批次请在房源管理中新增">
121
         <Form.Item label="销售批次" help="销售批次请在房源管理中新增">
121
           {getFieldDecorator('salesBatchId', {
122
           {getFieldDecorator('salesBatchId', {
122
             rules: [{ required: true, message: ' 请输入销售批次' }], onChange: onChangeValue
123
             rules: [{ required: true, message: ' 请输入销售批次' }], onChange: onChangeValue
123
-          })(<SalesBatch type='true' />)}
124
+          })(<SalesBatch type='true' buildingId={props.form.getFieldValue('buildingId')}/>)}
124
         </Form.Item>
125
         </Form.Item>
125
         <Form.Item label="认筹开始时间">
126
         <Form.Item label="认筹开始时间">
126
         {getFieldDecorator('raiseStartTime', {
127
         {getFieldDecorator('raiseStartTime', {

+ 16
- 4
src/pages/house/raise/edit/components/BuildSelect/BuildSelect.jsx Näytä tiedosto

22
 const BuildingSelect = props => {
22
 const BuildingSelect = props => {
23
   const [data, setData] = useState([])
23
   const [data, setData] = useState([])
24
   const [value, setValue] = useState([])
24
   const [value, setValue] = useState([])
25
+  const type = props.type
26
+  const salesBatchId = props.salesBatchId
27
+
25
   useEffect(() => {
28
   useEffect(() => {
26
     getBuildList();
29
     getBuildList();
27
-  }, [props.value])
30
+  }, [props.salesBatchId])
28
 
31
 
29
 
32
 
30
   const getBuildList = e => {
33
   const getBuildList = e => {
31
-    request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
34
+    if (salesBatchId && salesBatchId != 'undefine'){
35
+      request({ ...apis.house.buildingIdBySalesBatchId, urlData:{id: salesBatchId}, params: { pageNum: 1, pageSize: 999 } }).then(data => {
36
+        setData(data)
37
+        checkValue(data)
38
+        // 默认选中第一个
39
+      })
40
+    }
41
+    else{
42
+      request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
32
         setData(data)
43
         setData(data)
33
         checkValue(data)
44
         checkValue(data)
34
         // 默认选中第一个
45
         // 默认选中第一个
35
-    })
46
+      })
47
+    }
36
   }
48
   }
37
 
49
 
38
 
50
 
47
 
59
 
48
   return (
60
   return (
49
       <Select
61
       <Select
50
-      disabled
62
+      disabled={type == 'false'?false:true}
51
       showSearch
63
       showSearch
52
       value={props.value}
64
       value={props.value}
53
       style={{ width: '300px' }}
65
       style={{ width: '300px' }}

+ 2
- 1
src/pages/house/raise/edit/components/base.jsx Näytä tiedosto

76
           message.info("请填写线下缴费说明");
76
           message.info("请填写线下缴费说明");
77
           return;
77
           return;
78
         }
78
         }
79
-        if (values.payDescriptionOffline == '' || values.payDescriptionOffline == null || values.payDescriptionOnline == '' || values.payDescriptionOnline == null){
79
+        if ((values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)) ||
80
+            (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null))){
80
           message.info("请填写缴费说明");
81
           message.info("请填写缴费说明");
81
           return;
82
           return;
82
         }
83
         }

+ 5
- 0
src/services/apis.js Näytä tiedosto

1351
     method: 'POST',
1351
     method: 'POST',
1352
     action: 'admin.taRaise.post',
1352
     action: 'admin.taRaise.post',
1353
   },
1353
   },
1354
+  buildingIdBySalesBatchId: {
1355
+    url: `${prefix}/taSalesBatch/getBuildingById/:id`,
1356
+    method: 'GET',
1357
+    action: 'admin.taRaise.get',
1358
+  },
1354
  },
1359
  },
1355
  taliveActivity: {
1360
  taliveActivity: {
1356
   taLiveShare:{
1361
   taLiveShare:{