|
@@ -1,6 +1,7 @@
|
1
|
1
|
import Taro, { Component } from '@tarojs/taro'
|
2
|
2
|
import { View, ScrollView, Block } from '@tarojs/components'
|
3
|
3
|
import HouseCard from '../../components/HouseCard'
|
|
4
|
+import RaiseCard from '../../components/RaiseCard'
|
4
|
5
|
import { queryPreselectionRecord } from '@/services/project'
|
5
|
6
|
import { connect } from '@tarojs/redux'
|
6
|
7
|
import ready from '@/utils/ready'
|
|
@@ -20,6 +21,10 @@ export default class Records extends Component {
|
20
|
21
|
state = {
|
21
|
22
|
recordList: [],
|
22
|
23
|
current: 0,
|
|
24
|
+ noRecord: false,
|
|
25
|
+ building: '',
|
|
26
|
+ saleBatch: '',
|
|
27
|
+ status: '',
|
23
|
28
|
}
|
24
|
29
|
componentDidShow() {
|
25
|
30
|
ready.queue(() => {
|
|
@@ -33,7 +38,12 @@ export default class Records extends Component {
|
33
|
38
|
queryPreselectionRecord(params).then(res => {
|
34
|
39
|
const list = res.records
|
35
|
40
|
this.setState({
|
36
|
|
- recordList: list.filter(item => item.status == '1') || []
|
|
41
|
+ recordList: list.filter(item => item.status == '1') || [],
|
|
42
|
+
|
|
43
|
+ }, () => {
|
|
44
|
+ this.setState({
|
|
45
|
+ noRecord: this.state.recordList.length > 0 ? false : true
|
|
46
|
+ })
|
37
|
47
|
})
|
38
|
48
|
})
|
39
|
49
|
})
|
|
@@ -53,22 +63,22 @@ export default class Records extends Component {
|
53
|
63
|
}
|
54
|
64
|
|
55
|
65
|
renderPreselection() {
|
56
|
|
- const { recordList } = this.state
|
|
66
|
+ const { recordList, noRecord } = this.state
|
57
|
67
|
return (
|
58
|
68
|
<Block>
|
59
|
69
|
<CheckboxGroup onChange={this.CheckboxChange}>
|
60
|
70
|
{
|
61
|
|
- !recordList.length ? <Blank tips="暂无预选记录" /> :
|
|
71
|
+ noRecord ? <Blank style="margin:14vh 0 32vh 0" tips="暂无预选记录" /> :
|
62
|
72
|
<ScrollView scrollY>
|
63
|
73
|
{
|
64
|
74
|
recordList.map((item) => {
|
65
|
75
|
return (
|
66
|
76
|
<Label class="checkbox" >
|
67
|
77
|
<Checkbox value={item.houseId} checked={item.checked} >
|
68
|
|
- {item.status == '1' && <View className="carditem" key={item.preselectionRecordId} >
|
|
78
|
+ <View className="carditem" key={item.preselectionRecordId} >
|
69
|
79
|
|
70
|
80
|
<HouseCard summary={item} />
|
71
|
|
- </View>}
|
|
81
|
+ </View>
|
72
|
82
|
</Checkbox>
|
73
|
83
|
</Label>
|
74
|
84
|
)
|
|
@@ -79,6 +89,7 @@ export default class Records extends Component {
|
79
|
89
|
}
|
80
|
90
|
</CheckboxGroup>
|
81
|
91
|
<View className="bottom-con">
|
|
92
|
+ <View className="raise-btn">认筹房源</View>
|
82
|
93
|
<View className="statement"> !免责声明:</View>
|
83
|
94
|
<View className="statement">房源信息、选房协议等来源于开发商,具体销售数据可能会有延迟,最终以开发商官网公告为准,请在执行具体操作前和置业顾问沟通确认,并谨慎核查。</View>
|
84
|
95
|
|
|
@@ -86,7 +97,123 @@ export default class Records extends Component {
|
86
|
97
|
</Block>
|
87
|
98
|
)
|
88
|
99
|
}
|
89
|
|
- handleExplainClick() {
|
|
100
|
+ renderRaise() {
|
|
101
|
+ const { recordList, noRecord } = this.state
|
|
102
|
+ return (
|
|
103
|
+ <Block>
|
|
104
|
+
|
|
105
|
+ {
|
|
106
|
+ noRecord ? <Blank style="margin:14vh 0 32vh 0" tips="暂无认筹记录" /> :
|
|
107
|
+ <ScrollView scrollY>
|
|
108
|
+ {
|
|
109
|
+ recordList.map(item => (
|
|
110
|
+ <View key={item.preselectionRecordId} >
|
|
111
|
+ <RaiseCard summary={item} />
|
|
112
|
+ </View>
|
|
113
|
+ )
|
|
114
|
+ )
|
|
115
|
+ }
|
|
116
|
+ </ScrollView >
|
|
117
|
+ }
|
|
118
|
+
|
|
119
|
+ <View className="bottom-con">
|
|
120
|
+ <View className="statement">!免责声明:</View>
|
|
121
|
+ <View className="statement">房源信息、选房协议等来源于开发商,具体销售数据可能会有延迟,最终以开发商官网公告为准,请在执行具体操作前和置业顾问沟通确认,并谨慎核查。</View>
|
|
122
|
+
|
|
123
|
+ </View>
|
|
124
|
+ </Block>
|
|
125
|
+ )
|
|
126
|
+ }
|
|
127
|
+ onSexChange = e => {
|
|
128
|
+
|
|
129
|
+ let sex = e.detail.value == '0' ? '1' : e.detail.value == '1' ? '2' : ''
|
|
130
|
+ this.setState({
|
|
131
|
+ baseInfo: {
|
|
132
|
+ ...this.state.baseInfo,
|
|
133
|
+ sex,
|
|
134
|
+ }
|
|
135
|
+ })
|
|
136
|
+ }
|
|
137
|
+ handleSaleBatchChange = e => {
|
|
138
|
+
|
|
139
|
+ let saleBatch = e.detail.value == '0' ? '1' : e.detail.value == '1' ? '2' : ''
|
|
140
|
+ this.setState({
|
|
141
|
+ saleBatch
|
|
142
|
+ })
|
|
143
|
+ }
|
|
144
|
+ handleStatusChange = e => {
|
|
145
|
+
|
|
146
|
+ let sex = e.detail.value == '0' ? '1' : e.detail.value == '1' ? '2' : ''
|
|
147
|
+ this.setState({
|
|
148
|
+ status,
|
|
149
|
+ })
|
|
150
|
+ }
|
|
151
|
+ renderRaiseScreen() {
|
|
152
|
+ const { building, saleBatch, status } = this.state
|
|
153
|
+ const sexSelector = ['男', '女']
|
|
154
|
+ const selector = [{buildingTypeName:'楼盘1'}, {buildingTypeName:'楼盘2'},{buildingTypeName:'楼盘3'},{buildingTypeName:'楼盘4'},],
|
|
155
|
+ return (
|
|
156
|
+ <Block>
|
|
157
|
+ <View className="base-con">
|
|
158
|
+ <View className="con-item">
|
|
159
|
+ <View style="font-size:14px;color:#666">
|
|
160
|
+ 选择楼盘:
|
|
161
|
+ </View>
|
|
162
|
+ <View className="con-picker" >
|
|
163
|
+ <View>
|
|
164
|
+ <Picker mode='selector' range={sexSelector} onChange={this.onSexChange}>
|
|
165
|
+ <View className='picker'>
|
|
166
|
+ {building == '1' ? '男' : building == '2' ? '女' : ' '}
|
|
167
|
+ </View>
|
|
168
|
+ </Picker>
|
|
169
|
+ </View>
|
|
170
|
+ <View className="right-icon"></View>
|
|
171
|
+ </View>
|
|
172
|
+ </View>
|
|
173
|
+ <View className="con-item">
|
|
174
|
+ <View style="font-size:14px;color:#666">
|
|
175
|
+ 选择销售批次:
|
|
176
|
+ </View>
|
|
177
|
+ <View className="con-picker" >
|
|
178
|
+ <View>
|
|
179
|
+ <Picker mode='selector' range={selector} range-key="buildingTypeName" onChange={this.handleSaleBatchChange}>
|
|
180
|
+ <View className='picker'>
|
|
181
|
+ {saleBatch || ' '}
|
|
182
|
+ </View>
|
|
183
|
+ </Picker>
|
|
184
|
+ </View>
|
|
185
|
+ <View className="right-icon"></View>
|
|
186
|
+ </View>
|
|
187
|
+ </View>
|
|
188
|
+ <View className="con-item">
|
|
189
|
+ <View style="font-size:14px;color:#666">
|
|
190
|
+ 锁定状态:
|
|
191
|
+ </View>
|
|
192
|
+ <View className="con-picker" >
|
|
193
|
+ <View>
|
|
194
|
+ <Picker mode='selector' range={selector} range-key="buildingTypeName" onChange={this.handleStatusChange}>
|
|
195
|
+ <View className='picker'>
|
|
196
|
+ {status || ' '}
|
|
197
|
+ </View>
|
|
198
|
+ </Picker>
|
|
199
|
+ </View>
|
|
200
|
+ <View className="right-icon"></View>
|
|
201
|
+ </View>
|
|
202
|
+ </View>
|
|
203
|
+ <View className="bottom-btn">
|
|
204
|
+ <View className="save" onClick={this.baseSaveBtn}>
|
|
205
|
+ 保存
|
|
206
|
+ </View>
|
|
207
|
+ <View className="cancel" onClick={this.baseCancelBtn}>
|
|
208
|
+ 取消
|
|
209
|
+ </View>
|
|
210
|
+ </View>
|
|
211
|
+ </View>
|
|
212
|
+
|
|
213
|
+ </Block>
|
|
214
|
+ )
|
|
215
|
+ }
|
|
216
|
+ handleScreenClick() {
|
90
|
217
|
|
91
|
218
|
}
|
92
|
219
|
handleCondition(value) {
|
|
@@ -108,12 +235,12 @@ export default class Records extends Component {
|
108
|
235
|
</View>
|
109
|
236
|
))}
|
110
|
237
|
</View>
|
111
|
|
- <View onClick={this.handleExplainClick}>
|
|
238
|
+ <View onClick={this.handleScreenClick}>
|
112
|
239
|
<Image style="width:50rpx;height:50rpx" src={transferImage(require('../../assets/screen.png'))}></Image>
|
113
|
240
|
</View>
|
114
|
241
|
</View>
|
115
|
242
|
{current == 0 && this.renderPreselection()}
|
116
|
|
- {/* {current == 1 && this.renderPrice()} */}
|
|
243
|
+ {current == 1 && this.renderRaise()}
|
117
|
244
|
</Block>
|
118
|
245
|
)
|
119
|
246
|
}
|
|
@@ -122,7 +249,8 @@ export default class Records extends Component {
|
122
|
249
|
|
123
|
250
|
return (
|
124
|
251
|
<View className="records" >
|
125
|
|
- {this.renderBar()}
|
|
252
|
+ {/* {this.renderBar()} */}
|
|
253
|
+ {this.renderRaiseScreen()}
|
126
|
254
|
|
127
|
255
|
|
128
|
256
|
</View >
|