xujing 5 years ago
parent
commit
c0416cc707

+ 1
- 1
config/dev.js View File

15
     // WSS_HOST: '"ws://127.0.0.1:8080"',
15
     // WSS_HOST: '"ws://127.0.0.1:8080"',
16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18
-    Version: 'V3.5.11'
18
+    Version: 'V3.5.12'
19
   },
19
   },
20
   weapp: {},
20
   weapp: {},
21
   h5: {}
21
   h5: {}

+ 2
- 0
src/constants/api.js View File

59
 
59
 
60
 export const API_HOUSE_LIST = resolvePath('listHousingResources')
60
 export const API_HOUSE_LIST = resolvePath('listHousingResources')
61
 export const API_PRESELECTION_RECORD = resolvePath('listPreselectionRecord')
61
 export const API_PRESELECTION_RECORD = resolvePath('listPreselectionRecord')
62
+export const API_RATSE_RECORD = resolvePath('taRaiseRecord/list')
62
 export const API_HOUSE_DETAIL = resolvePath('getHousingDetailById')
63
 export const API_HOUSE_DETAIL = resolvePath('getHousingDetailById')
63
 export const API_ADD_PRESELECTION = resolvePath('taPreselectionRecord')
64
 export const API_ADD_PRESELECTION = resolvePath('taPreselectionRecord')
64
 export const API_CANCEL_PRESELECTION = resolvePath('taPreselectionRecordCancel')
65
 export const API_CANCEL_PRESELECTION = resolvePath('taPreselectionRecordCancel')
65
 export const API_APARTMENT_TYPE = resolvePath('listBuildApartmentBySalesBatchId')
66
 export const API_APARTMENT_TYPE = resolvePath('listBuildApartmentBySalesBatchId')
67
+export const API_SALESBATCH_LIST = resolvePath('taSalesBatch/choice')
66
 export const API_NOTICE_INFO = resolvePath('getNoticeInfo')
68
 export const API_NOTICE_INFO = resolvePath('getNoticeInfo')
67
 export const API_SALES_BATCH = resolvePath('taSalesBatch')
69
 export const API_SALES_BATCH = resolvePath('taSalesBatch')
68
 export const API_ADDLIVE_NUM = resolvePath('addVisitNum')
70
 export const API_ADDLIVE_NUM = resolvePath('addVisitNum')

+ 21
- 19
src/onlineSelling/components/HouseGrid/Room.js View File

6
 import chipsImg from '../../assets/chips.png'
6
 import chipsImg from '../../assets/chips.png'
7
 
7
 
8
 export default function Room(props) {
8
 export default function Room(props) {
9
-  const { roomName, heat, realHeat, price, apartmentName, status, showAction, ownerd } = props.dataset || {}
9
+  const { roomName, heat, realHeat, status, raiseHeat, raiseRealHeat, showAction, ownerd, houseLockingStatus, mineLocked, minePreselection, mineRaise } = props.dataset || {}
10
   // const personNum = `(${realHeat + heat + 0}人)`
10
   // const personNum = `(${realHeat + heat + 0}人)`
11
+  const { currentHot = 0 } = props
11
   const personNum = realHeat + heat + 0
12
   const personNum = realHeat + heat + 0
13
+  const raisePersonNum = raiseHeat + raiseRealHeat + 0
12
 
14
 
13
   const handleClick = () => {
15
   const handleClick = () => {
14
     if (props.onClick) {
16
     if (props.onClick) {
25
   }
27
   }
26
 
28
 
27
   return (
29
   return (
28
-    <HotBlock number={heat + realHeat + 0}>
30
+    <HotBlock number={currentHot == '0' ? personNum : raisePersonNum}>
29
       {
31
       {
30
         status == '1' &&
32
         status == '1' &&
31
-          (<View className="room">
32
-            <View onClick={handleClick}>
33
-              <View className="roomname">{roomName || ''}</View>
34
-              <View className="yuxuan">{personNum}预选</View>
35
-              <View className="yuxuan">{personNum}认筹</View>
36
-              <Image src={preselectionImg} className="preselection-img"></Image>
37
-              <Image src={chipsImg} className="chips-img"></Image>
38
-              <Image src={lockImg} className="lock-img"></Image>
39
-            </View>
40
-            {
41
-              !showAction && (
42
-                <View className="action" onClick="handleActionClick">
43
-                  <View className={`at-icon at-icon-${actionIcon}`}></View>
44
-                </View>
45
-              )
46
-            }
47
-          </View>)
33
+        (<View className="room">
34
+          <View onClick={handleClick}>
35
+            <View className="roomname">{roomName || ''}</View>
36
+            <View className="yuxuan">{personNum}预选</View>
37
+            <View className="yuxuan">{raisePersonNum}认筹</View>
38
+            {minePreselection && <Image src={preselectionImg} className="preselection-img"></Image>}
39
+            {mineRaise && <Image src={chipsImg} className="chips-img"></Image>}
40
+            {houseLockingStatus == 'locked' && <Image src={lockImg} style={mineLocked ? 'position: absolute; right: 2px;bottom: 3px;' : ''} className="lock-img"></Image>}
41
+          </View>
42
+          {
43
+            !showAction && (
44
+              <View className="action" onClick="handleActionClick">
45
+                <View className={`at-icon at-icon-${actionIcon}`}></View>
46
+              </View>
47
+            )
48
+          }
49
+        </View>)
48
       }
50
       }
49
 
51
 
50
     </HotBlock>
52
     </HotBlock>

+ 1
- 0
src/onlineSelling/components/HouseGrid/room.scss View File

19
 
19
 
20
   .yuxuan {
20
   .yuxuan {
21
    color: #333;
21
    color: #333;
22
+   white-space: nowrap;
22
   }
23
   }
23
 
24
 
24
   .tip {
25
   .tip {

+ 6
- 8
src/onlineSelling/components/Picker/index.js View File

6
 import './index.scss'
6
 import './index.scss'
7
 
7
 
8
 export default function HouseCard(props) {
8
 export default function HouseCard(props) {
9
-  const { selector, title, currentValue,key } = props || {}
9
+  const { selector, title, currentValue, keyValue } = props || {}
10
 
10
 
11
 
11
 
12
 
12
 
16
         {title}
16
         {title}
17
       </View>
17
       </View>
18
       <View className="con-picker" >
18
       <View className="con-picker" >
19
-        <View>
20
-          <Picker mode='selector' range={selector} range-key={key} onChange={props.handleChange}>
21
-            <View className='picker'>
22
-              {currentValue}
23
-            </View>
24
-          </Picker>
25
-        </View>
19
+        <Picker mode='selector' range={selector} range-key={keyValue} onChange={props.handleChange}>
20
+          <View className='picker'>
21
+            {currentValue}
22
+          </View>
23
+        </Picker>
26
         <View className="choose">请选择</View>
24
         <View className="choose">请选择</View>
27
       </View>
25
       </View>
28
     </View>
26
     </View>

+ 11
- 2
src/onlineSelling/components/Picker/index.scss View File

4
   border-bottom: 1px solid #dcdcdc;
4
   border-bottom: 1px solid #dcdcdc;
5
   line-height: 98px;
5
   line-height: 98px;
6
   align-items: center;
6
   align-items: center;
7
+  position: relative;
7
   .title{
8
   .title{
8
     font-size: 33px;
9
     font-size: 33px;
9
     color: #333;
10
     color: #333;
18
     padding: 0 16px;
19
     padding: 0 16px;
19
     border-radius: 4px;
20
     border-radius: 4px;
20
     .picker{
21
     .picker{
21
-      width: 300px;
22
-      height:48px ;
22
+      width: 450px;
23
+      line-height:98px ;
24
+      height: 98px;
25
+      z-index: 1;
26
+      position: absolute;
27
+      top: 0;
28
+      font-size: 32px;
23
     }
29
     }
24
   }
30
   }
25
   .choose{
31
   .choose{
26
    font-size: 24px;
32
    font-size: 24px;
27
    color: #E4A938;
33
    color: #E4A938;
34
+   float: right;
35
+   position: absolute;
36
+   right: 40px;
28
 
37
 
29
   }
38
   }
30
 }
39
 }

+ 12
- 6
src/onlineSelling/pages/detail/index.js View File

10
 import Blank from '../../components/Blank'
10
 import Blank from '../../components/Blank'
11
 import * as noticeType from '@/constants/common.js'
11
 import * as noticeType from '@/constants/common.js'
12
 import Statement from '../../components/Statement'
12
 import Statement from '../../components/Statement'
13
+import { View } from '@tarojs/components';
13
 
14
 
14
 @connect(
15
 @connect(
15
   ({ user }) => ({ ...user })
16
   ({ user }) => ({ ...user })
208
               </View>
209
               </View>
209
               <Statement style="margin: 104rpx 0 30rpx 0" />
210
               <Statement style="margin: 104rpx 0 30rpx 0" />
210
               <View style="padding: 0 30rpx;">
211
               <View style="padding: 0 30rpx;">
211
-                {!houseDetail.isPreselect ?
212
-                  <View className="choose-btn" onClick={() => this.open()}>
213
-                    预选此房源
212
+                {
213
+                  houseDetail.raiseBtn && <View>
214
+                    {!houseDetail.isPreselect ?
215
+                      <View className="choose-btn" onClick={() => this.open()}>
216
+                        预选此房源
214
                   </View> : <View className="choose-btn" onClick={() => this.open()}>
217
                   </View> : <View className="choose-btn" onClick={() => this.open()}>
215
-                    取消预选
218
+                        取消预选
219
+                  </View>
220
+                    }
216
                   </View>
221
                   </View>
217
                 }
222
                 }
218
-                <View className="raise-btn" onClick={() => this.toRaiseMoney()}>
223
+
224
+                {houseDetail.preselectionBtn && <View className="raise-btn" onClick={() => this.toRaiseMoney()}>
219
                   认筹此房源
225
                   认筹此房源
220
-              </View>
226
+              </View>}
221
               </View>
227
               </View>
222
             </View>
228
             </View>
223
           </ScrollView>
229
           </ScrollView>

+ 4
- 4
src/onlineSelling/pages/houseList/index.js View File

394
   }
394
   }
395
 
395
 
396
   renderHouses() {
396
   renderHouses() {
397
-    const { houseList } = this.state
397
+    const { houseList,currentHot } = this.state
398
 
398
 
399
     return (
399
     return (
400
       <ScrollView className="container" scrollY scrollWithAnimation>
400
       <ScrollView className="container" scrollY scrollWithAnimation>
401
         {
401
         {
402
           houseList.map((item) => {
402
           houseList.map((item) => {
403
-            return <HouseGrid key={item.unitId} dataset={item} onRoomClick={this.handleRoomClick} />
403
+            return <HouseGrid key={item.unitId} currentHot={currentHot} dataset={item} onRoomClick={this.handleRoomClick} />
404
           })
404
           })
405
         }
405
         }
406
       </ScrollView>
406
       </ScrollView>
594
     this.goto(`/pages/project/detail/index?id=${buildingId}`)
594
     this.goto(`/pages/project/detail/index?id=${buildingId}`)
595
   }
595
   }
596
   handleScreen(value) {
596
   handleScreen(value) {
597
-  
597
+    console.log(value,"valueffffffffffffffffffffffffffff")
598
     this.setState({
598
     this.setState({
599
       currentHot: value,
599
       currentHot: value,
600
     })
600
     })
624
 
624
 
625
     const showCircleBtn = posterData && posterData.qrcode
625
     const showCircleBtn = posterData && posterData.qrcode
626
     console.log('==============>', posterData, showPoster, posterConfig)
626
     console.log('==============>', posterData, showPoster, posterConfig)
627
+
627
     const screenList = [{ title: '预选热度图', value: 0 }, { title: '认筹热度图', value: 1 }]
628
     const screenList = [{ title: '预选热度图', value: 0 }, { title: '认筹热度图', value: 1 }]
628
     return (
629
     return (
629
       <Block>
630
       <Block>
663
                   circleBtn={showCircleBtn}
664
                   circleBtn={showCircleBtn}
664
                   onShareFrineds={this.handleShareFrineds}
665
                   onShareFrineds={this.handleShareFrineds}
665
                   onSharingCircleOfFriends={() => this.togglePosterStatus(true)}
666
                   onSharingCircleOfFriends={() => this.togglePosterStatus(true)}
666
-                // onSharingCircleOfFriends={this.handleSharingCircleOfFriends}
667
                 />
667
                 />
668
               </ActSheet>
668
               </ActSheet>
669
             </Block>
669
             </Block>

+ 190
- 85
src/onlineSelling/pages/records/index.js View File

2
 import { View, ScrollView, Block } from '@tarojs/components'
2
 import { View, ScrollView, Block } from '@tarojs/components'
3
 import HouseCard from '../../components/HouseCard'
3
 import HouseCard from '../../components/HouseCard'
4
 import RaiseCard from '../../components/RaiseCard'
4
 import RaiseCard from '../../components/RaiseCard'
5
-import { queryPreselectionRecord } from '@/services/project'
5
+import { getItemList } from '@/services/item'
6
+import { queryPreselectionRecord, queryRaiseRecord, querySalesList } from '@/services/project'
6
 import { connect } from '@tarojs/redux'
7
 import { connect } from '@tarojs/redux'
7
 import ready from '@/utils/ready'
8
 import ready from '@/utils/ready'
8
 import Blank from '../../components/Blank'
9
 import Blank from '../../components/Blank'
12
 import './index.scss'
13
 import './index.scss'
13
 
14
 
14
 @connect(
15
 @connect(
15
-  ({ user }) => ({ ...user })
16
+  ({ user, city }) => ({ ...user, ...city })
16
 )
17
 )
17
 
18
 
18
 export default class Records extends Component {
19
 export default class Records extends Component {
21
   }
22
   }
22
 
23
 
23
   state = {
24
   state = {
24
-    recordList: [],
25
+
25
     current: 0,
26
     current: 0,
27
+    recordList: [],
26
     noRecord: false,
28
     noRecord: false,
27
-    building: '',
29
+    raiseList: [],
30
+    noRaiseRecord: false,
31
+    screenVisible: false,
32
+    buildingList: [],
33
+    buildingValue: '',
34
+    buildingId: '',
35
+
36
+    salesList: [],
28
     saleBatch: '',
37
     saleBatch: '',
29
-    status: '',
38
+    salesBatchId: '',
39
+
40
+    lockStatus: [{ value: '不限', code: '' }, { value: '未锁定', code: 'unlocked' }, { value: '已锁定', code: 'locked' }],
41
+    lockStatusValue: '',
42
+    houseLockingStatus: '',
43
+
44
+    lockCustomer: [{ value: '不限', code: '' }, { value: '我自己', code: 'mine' }, { value: '其他人', code: 'other' }],
45
+    lockCustomerValue: '',
46
+    customerLocked: '',
30
   }
47
   }
31
   componentDidShow() {
48
   componentDidShow() {
32
     ready.queue(() => {
49
     ready.queue(() => {
34
       const { userInfo: { person: { personId } } } = this.props
51
       const { userInfo: { person: { personId } } } = this.props
35
       const params = {
52
       const params = {
36
         personId,
53
         personId,
37
-        pageNum: 1,
54
+        pageNumber: 1,
38
         pageSize: 999,
55
         pageSize: 999,
39
       }
56
       }
40
-      queryPreselectionRecord(params).then(res => {
41
-        const list = res.records
57
+      this.getPreselection(params)
58
+      this.getRaise(params)
59
+      querySalesList().then(res => {
60
+        res.unshift({ salesBatchName: '请选择', salesBatchId: '' })
61
+        this.setState({
62
+          salesList: res || [],
63
+
64
+        })
65
+      })
66
+      this.loadBuildingList()
67
+    })
68
+  }
69
+  getPreselection(params) {
70
+    queryPreselectionRecord(params).then(res => {
71
+      const list = res.records
72
+      this.setState({
73
+        recordList: list.filter(item => item.status == '1') || [],
74
+
75
+      }, () => {
42
         this.setState({
76
         this.setState({
43
-          recordList: list.filter(item => item.status == '1') || [],
77
+          noRecord: this.state.recordList.length > 0 ? false : true
78
+        })
79
+      })
80
+    })
81
+  }
82
+  getRaise(params) {
83
+    queryRaiseRecord(params).then(res => {
84
+      this.setState({
85
+        raiseList: res.records || [],
44
 
86
 
45
-        }, () => {
46
-          this.setState({
47
-            noRecord: this.state.recordList.length > 0 ? false : true
48
-          })
87
+      }, () => {
88
+        this.setState({
89
+          noRaiseRecord: this.state.raiseList.length > 0 ? false : true
49
         })
90
         })
50
       })
91
       })
51
     })
92
     })
52
   }
93
   }
53
-  // toHouseDetail(item) {
54
-  //   if (item.housingStatus == '0' || item.saleBatchStatus == '0') {
55
-  //     Taro.showToast({ title: '当前销售批次或该房源已被取消发布', icon: 'none', duration: 2000 })
56
-  //   } else {
57
-  //     Taro.navigateTo({
58
-  //       url: `/onlineSelling/pages/detail/index?id=${item.houseId}`
59
-  //     })
60
-  //   }
61
-  // }
94
+  loadBuildingList() {
95
+    const params = {
96
+      pageNumber: 1,
97
+      pageSize: 50,
98
+      cityId: this.props.curCity.id || ''
99
+    }
100
+    getItemList(params).then(res => {
101
+      res.records.unshift({ buildingName: '请选择', buildingId: '' })
102
+      this.setState({
103
+        buildingList: res.records,
104
+      })
105
+    })
106
+
107
+  }
108
+
62
   CheckboxChange = (e) => {
109
   CheckboxChange = (e) => {
63
     e.stopPropagation()
110
     e.stopPropagation()
64
     console.log('checkbox发生change事件,携带value值为:', e)
111
     console.log('checkbox发生change事件,携带value值为:', e)
73
             {
120
             {
74
               noRecord ? <Blank style="margin:14vh 0 32vh 0" tips="暂无预选记录" /> :
121
               noRecord ? <Blank style="margin:14vh 0 32vh 0" tips="暂无预选记录" /> :
75
                 <View>
122
                 <View>
76
-                {
77
-                  recordList.map((item) => {
78
-                    return (
79
-                      <Label class="checkbox" >
80
-                        <Checkbox value={item.houseId} checked={item.checked} >
81
-                          <View className="carditem" key={item.preselectionRecordId} >
82
-
83
-                            <HouseCard summary={item} />
84
-                          </View>
85
-                        </Checkbox>
86
-                      </Label>
87
-                    )
88
-                  })
89
-                }
123
+                  {
124
+                    recordList.map((item) => {
125
+                      return (
126
+                        <Label class="checkbox" >
127
+                          <Checkbox value={item.houseId} checked={item.checked} >
128
+                            <View className="carditem" key={item.preselectionRecordId} >
129
+
130
+                              <HouseCard summary={item} />
131
+                            </View>
132
+                          </Checkbox>
133
+                        </Label>
134
+                      )
135
+                    })
136
+                  }
90
                 </View>
137
                 </View>
91
             }
138
             }
92
           </CheckboxGroup>
139
           </CheckboxGroup>
99
     )
146
     )
100
   }
147
   }
101
   renderRaise() {
148
   renderRaise() {
102
-    const { recordList, noRecord } = this.state
149
+    const { raiseList, noRaiseRecord } = this.state
103
     return (
150
     return (
104
       <Block>
151
       <Block>
105
 
152
 
106
         {
153
         {
107
-          noRecord ? <Blank style="margin:14vh 0 32vh 0" tips="暂无认筹记录" /> :
154
+          noRaiseRecord ? <Blank style="margin:14vh 0 32vh 0" tips="暂无认筹记录" /> :
108
             <ScrollView scrollY>
155
             <ScrollView scrollY>
109
               {
156
               {
110
-                recordList.map(item => (
157
+                raiseList.map(item => (
111
                   <View key={item.preselectionRecordId} >
158
                   <View key={item.preselectionRecordId} >
112
                     <RaiseCard summary={item} />
159
                     <RaiseCard summary={item} />
113
                   </View>
160
                   </View>
122
       </Block>
169
       </Block>
123
     )
170
     )
124
   }
171
   }
125
-  onSexChange = e => {
126
-    let building = e.detail.value == '0' ? '1' : e.detail.value == '1' ? '2' : ''
172
+
173
+
174
+  handleBuildingChange = e => {
175
+    const { buildingList } = this.state
127
     this.setState({
176
     this.setState({
128
-      building,
177
+      buildingValue: buildingList[e.detail.value].buildingName,
178
+      buildingId: buildingList[e.detail.value].buildingId,
129
     })
179
     })
130
   }
180
   }
131
   handleSaleBatchChange = e => {
181
   handleSaleBatchChange = e => {
132
-    const selector = [{ buildingTypeName: '楼盘1' }, { buildingTypeName: '楼盘2' }, { buildingTypeName: '楼盘3' }, { buildingTypeName: '楼盘4' }]
182
+    const { salesList } = this.state
133
     this.setState({
183
     this.setState({
134
-      saleBatch: selector[e.detail.value].buildingTypeName
184
+      saleBatch: salesList[e.detail.value].salesBatchName,
185
+      salesBatchId: salesList[e.detail.value].salesBatchId,
186
+
135
     })
187
     })
136
   }
188
   }
137
-  handleStatusChange = e => {
189
+  handleApartmentChange = e => {
138
 
190
 
139
-    let status = e.detail.value == '0' ? '1' : e.detail.value == '1' ? '2' : ''
140
     this.setState({
191
     this.setState({
141
-      status,
192
+      status: selector[e.detail.value].buildingTypeName
142
     })
193
     })
143
   }
194
   }
144
-  renderRaiseScreen() {
145
-    const { building, saleBatch, status } = this.state
146
-    const sexSelector = ['男', '女']
147
-    const selector = [{ buildingTypeName: '楼盘1' }, { buildingTypeName: '楼盘2' }, { buildingTypeName: '楼盘3' }, { buildingTypeName: '楼盘4' }]
148
-    return (
149
-
150
-      <View className="base-con">
151
-        <PickerComponent title="选择楼盘" selector={sexSelector} currentValue={building == '1' ? '男' : building == '2' ? '女' : ' '} handleChange={this.onSexChange} />
152
-        <PickerComponent title="选择销售批次" selector={selector} key={"buildingTypeName"} currentValue={saleBatch || ' '} handleChange={this.handleSaleBatchChange} />
153
-        <PickerComponent title="锁定状态" selector={selector} key={"buildingTypeName"} currentValue={status || ' '} handleChange={this.handleStatusChange} />
154
-        <View className="bottom-btn">
155
-          <View className="save" onClick={this.baseSaveBtn}>
156
-            筛选
157
-            </View>
158
-          <View className="cancel" onClick={this.baseCancelBtn}>
159
-            不限
160
-          </View>
161
-        </View>
162
-      </View>
163
-    )
195
+  handleLockStatusChange = e => {
196
+    const { lockStatus } = this.state
197
+    this.setState({
198
+      lockStatusValue: lockStatus[e.detail.value].value,
199
+      houseLockingStatus: lockStatus[e.detail.value].code,
200
+    })
201
+  }
202
+  handleCustomerChange = e => {
203
+    const { lockCustomer } = this.state
204
+    this.setState({
205
+      lockCustomerValue: lockCustomer[e.detail.value].value,
206
+      customerLocked: lockCustomer[e.detail.value].code,
207
+    })
164
   }
208
   }
165
 
209
 
166
-  handleSaleBatchChange = e => {
167
-    const selector = [{ buildingTypeName: '楼盘1' }, { buildingTypeName: '楼盘2' }, { buildingTypeName: '楼盘3' }, { buildingTypeName: '楼盘4' }]
210
+
211
+  unlimitedBtn() {
212
+
168
     this.setState({
213
     this.setState({
169
-      saleBatch: selector[e.detail.value].buildingTypeName
214
+      screenVisible: false,
215
+      buildingValue: '',
216
+      buildingId: '',
217
+      saleBatch: '',
218
+      salesBatchId: '',
219
+      lockStatusValue: '',
220
+      houseLockingStatus: '',
221
+      lockCustomerValue: '',
222
+      customerLocked: '',
170
     })
223
     })
224
+    const { userInfo: { person: { personId } } } = this.props
225
+    const params = {
226
+      personId,
227
+      pageNumber: 1,
228
+      pageSize: 999,
229
+    }
230
+    this.getPreselection(params)
231
+    this.getRaise(params)
171
   }
232
   }
172
-  handleApartmentChange = e => {
173
-    const selector = [{ buildingTypeName: '楼盘1' }, { buildingTypeName: '楼盘2' }, { buildingTypeName: '楼盘3' }, { buildingTypeName: '楼盘4' }]
233
+  ScreenBtn() {
174
     this.setState({
234
     this.setState({
175
-      status: selector[e.detail.value].buildingTypeName
235
+      screenVisible: false
176
     })
236
     })
237
+    const { userInfo: { person: { personId } } } = this.props
238
+    const { buildingId, salesBatchId, houseLockingStatus, customerLocked } = this.state
239
+
240
+    if (this.state.current == '0') {
241
+
242
+      const params = {
243
+        personId,
244
+        pageNumber: 1,
245
+        pageSize: 999,
246
+        buildingId,
247
+        salesBatchId,
248
+        houseLockingStatus,
249
+        customerLocked
250
+      }
251
+      this.getPreselection(params)
252
+    } else {
253
+
254
+      const params = {
255
+        personId,
256
+        pageNumber: 1,
257
+        pageSize: 999,
258
+        buildingId,
259
+        salesBatchId,
260
+        houseLockingStatus,
261
+
262
+      }
263
+      this.getRaise(params)
264
+    }
265
+
266
+
177
   }
267
   }
178
 
268
 
179
   renderPreselectScreen() {
269
   renderPreselectScreen() {
180
-    const { building, saleBatch, status } = this.state
270
+    const { current, buildingValue, buildingList, saleBatch, salesList, lockCustomerValue, lockCustomer, lockStatusValue, lockStatus } = this.state
181
 
271
 
182
     const selector = [{ buildingTypeName: '楼盘1' }, { buildingTypeName: '楼盘2' }, { buildingTypeName: '楼盘3' }, { buildingTypeName: '楼盘4' }]
272
     const selector = [{ buildingTypeName: '楼盘1' }, { buildingTypeName: '楼盘2' }, { buildingTypeName: '楼盘3' }, { buildingTypeName: '楼盘4' }]
273
+
183
     return (
274
     return (
184
 
275
 
185
       <View className="base-con">
276
       <View className="base-con">
186
-        <PickerComponent title="选择楼盘" selector={selector} currentValue={status || ''} handleChange={this.handleApartmentChange} />
187
-        <PickerComponent title="选择销售批次" selector={selector} currentValue={status || ''} handleChange={this.handleApartmentChange} />
188
-        <PickerComponent title="选择户型" selector={selector} currentValue={status || ''} handleChange={this.handleApartmentChange} />
277
+        <PickerComponent title="选择楼盘" selector={buildingList} keyValue={"buildingName"} currentValue={buildingValue || ''} handleChange={this.handleBuildingChange} />
278
+        <PickerComponent title="选择销售批次" selector={salesList} keyValue={"salesBatchName"} currentValue={saleBatch || ''} handleChange={this.handleSaleBatchChange} />
279
+        <PickerComponent title="锁定状态" selector={lockStatus} keyValue={"value"} currentValue={lockStatusValue || ''} handleChange={this.handleLockStatusChange} />
280
+        {current == '0' && <PickerComponent title="锁定客户" keyValue={"value"} selector={lockCustomer} currentValue={lockCustomerValue || ''} handleChange={this.handleCustomerChange} />}
189
 
281
 
190
         <View className="bottom-btn">
282
         <View className="bottom-btn">
191
-          <View className="save" onClick={this.baseSaveBtn}>
283
+          <View className="save" onClick={this.ScreenBtn}>
192
             筛选
284
             筛选
193
             </View>
285
             </View>
194
-          <View className="cancel" onClick={this.baseCancelBtn}>
286
+          <View className="cancel" onClick={this.unlimitedBtn}>
195
             不限
287
             不限
196
           </View>
288
           </View>
197
         </View>
289
         </View>
202
 
294
 
203
   handleScreenClick() {
295
   handleScreenClick() {
204
 
296
 
297
+
298
+    this.setState({
299
+      screenVisible: true
300
+    })
301
+
205
   }
302
   }
206
   handleCondition(value) {
303
   handleCondition(value) {
207
     this.setState({
304
     this.setState({
208
-      current: value
305
+      current: value,
306
+      buildingValue: '',
307
+      buildingId: '',
308
+      saleBatch: '',
309
+      salesBatchId: '',
310
+      lockStatusValue: '',
311
+      houseLockingStatus: '',
312
+      lockCustomerValue: '',
313
+      customerLocked: '',
314
+
315
+
209
     })
316
     })
210
   }
317
   }
211
   renderBar() {
318
   renderBar() {
233
   }
340
   }
234
   render() {
341
   render() {
235
 
342
 
236
-
343
+    const { screenVisible } = this.state
237
     return (
344
     return (
238
       <View className="records" >
345
       <View className="records" >
239
-        {this.renderBar()}
240
-        {/* {this.renderRaiseScreen()} */}
241
-        {/* {this.renderPreselectScreen()} */}
242
-
346
+        {!screenVisible && this.renderBar()}
347
+        {screenVisible && this.renderPreselectScreen()}
243
 
348
 
244
       </View >
349
       </View >
245
     )
350
     )

+ 12
- 0
src/services/project.js View File

2
 import {
2
 import {
3
   API_HOUSE_LIST,
3
   API_HOUSE_LIST,
4
   API_PRESELECTION_RECORD,
4
   API_PRESELECTION_RECORD,
5
+  API_SALESBATCH_LIST,
6
+  API_RATSE_RECORD,
5
   API_HOUSE_DETAIL,
7
   API_HOUSE_DETAIL,
6
   API_ADD_PRESELECTION,
8
   API_ADD_PRESELECTION,
7
   API_CANCEL_PRESELECTION,
9
   API_CANCEL_PRESELECTION,
49
  * @param {*} payload
51
  * @param {*} payload
50
  */
52
  */
51
 export const queryPreselectionRecord = payload => fetch({ url: API_PRESELECTION_RECORD, payload })
53
 export const queryPreselectionRecord = payload => fetch({ url: API_PRESELECTION_RECORD, payload })
54
+/**
55
+ * 获取认筹记录
56
+ * @param {*} payload
57
+ */
58
+export const queryRaiseRecord = payload => fetch({ url: API_RATSE_RECORD, payload })
59
+/**
60
+ * 获取销售批次列表
61
+ * @param {*} payload
62
+ */
63
+export const querySalesList = payload => fetch({ url: API_SALESBATCH_LIST, payload })
52
 /**
64
 /**
53
  * 获取某销售批次下所有房源户型
65
  * 获取某销售批次下所有房源户型
54
  * @param {*} payload
66
  * @param {*} payload