xujing 5 lat temu
rodzic
commit
b950e16ffa

+ 1
- 2
src/onlineSelling/components/Blank/index.js Wyświetl plik

@@ -4,9 +4,8 @@ import './index.scss'
4 4
 
5 5
 export default function Blank(props) {
6 6
   return (
7
-    <View className="blank">
7
+    <View className="blank" style={props.style}>
8 8
       <Image className="nodata-img" src={require('../../assets/norecord.png')}></Image>
9
-      {/* <View className="nodata"></View> */}
10 9
       {
11 10
         props.tips && <View className="tips">{props.tips}</View>
12 11
       }

+ 53
- 0
src/onlineSelling/components/RaiseCard/index.js Wyświetl plik

@@ -0,0 +1,53 @@
1
+import { View, Image, Text } from "@tarojs/components";
2
+import { transferImage } from '@/utils/tools'
3
+import dayjs from 'dayjs'
4
+import emptyImg from '@/assets/empty.png'
5
+
6
+import './index.scss'
7
+
8
+export default function HouseCard(props) {
9
+  const {
10
+    buildingName,
11
+    termname,
12
+    blockName,
13
+    unitName,
14
+    roomName,
15
+    price,
16
+    housingStatus,
17
+    saleBatchStatus,
18
+    houseId,
19
+    createDate,
20
+    status = 1,
21
+    buildingImgList = [],
22
+  } = props.summary || {}
23
+
24
+  const title = `${buildingName} ${termname || ''} ${blockName} ${unitName} ${roomName}`
25
+  const thumb = (buildingImgList || []).length
26
+  const showDT = dayjs(createDate).format('YYYY/MM/DD')
27
+  const wanY = Number(price)
28
+
29
+  const toHouseDetail = () => {
30
+    if (housingStatus == '0' || saleBatchStatus == '0') {
31
+      Taro.showToast({ title: '当前销售批次或该房源已被取消发布', icon: 'none', duration: 2000 })
32
+    } else {
33
+      Taro.navigateTo({
34
+        url: `/onlineSelling/pages/detail/index?id=${houseId}`
35
+      })
36
+    }
37
+  }
38
+  return (
39
+    <View className="housecard">
40
+      <View className="head" onClick={toHouseDetail}>
41
+        {thumb ? <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" /> :
42
+          <Text style="font-size:26rpx;color:#666">暂无户型图</Text>
43
+        }
44
+      </View>
45
+      <View className="body" onClick={toHouseDetail}>
46
+        <View className={status == '1' ? 'raised badge' : status == '2' ? 'unraise badge' : 'badge'}>{status == '1' ? '已缴费' : '未缴费'}</View>
47
+        <View className="title">{title}</View>
48
+        <View className="meta">{showDT}</View>
49
+      </View>
50
+
51
+    </View>
52
+  )
53
+}

+ 59
- 0
src/onlineSelling/components/RaiseCard/index.scss Wyświetl plik

@@ -0,0 +1,59 @@
1
+.housecard {
2
+  width: 690px;
3
+  height: 250px;
4
+  background:#fff;
5
+  display: flex;
6
+  font-weight: 400;
7
+  margin: 0 30px 30px 30px;
8
+  box-shadow:0px 4px 15px 1px rgba(0, 0, 0, 0.12);
9
+  border-radius:8px;
10
+  .head {
11
+    width: 250px;
12
+    flex: none;
13
+    border-right: 2px solid rgba(0, 0, 0, 0.04);
14
+    padding: 20px;
15
+    display: flex;
16
+    align-items: center;
17
+    justify-content: center;
18
+
19
+    .thumb {
20
+      width: 100%;
21
+      height: 100%;
22
+    }
23
+  }
24
+
25
+  .body {
26
+    width: 440px;
27
+    flex: none;
28
+    position: relative;
29
+    line-height: 40px;
30
+    padding: 16px;
31
+
32
+    .badge {
33
+      font-size: 30px;
34
+      color: #999;
35
+      text-align: right;
36
+      margin-right: 12px;
37
+    }
38
+    .unraise{
39
+      color: #FE1C1C
40
+    }
41
+    .raised{
42
+     color: #3DE344; 
43
+    }
44
+    .title {
45
+      font-size: 26px;
46
+      font-weight: bold;
47
+      color:#333;
48
+      line-height: 1.8;
49
+    }
50
+
51
+    .meta {
52
+      font-size: 24px;
53
+      color:#999;
54
+      text-align: right;
55
+    }
56
+
57
+  }
58
+
59
+}

+ 137
- 9
src/onlineSelling/pages/records/index.js Wyświetl plik

@@ -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 >

+ 148
- 3
src/onlineSelling/pages/records/index.scss Wyświetl plik

@@ -45,9 +45,154 @@
45 45
   .bottom-con{
46 46
     padding: 0 30px;
47 47
     margin-top: 20vh;
48
+    .raise-btn{
49
+      width: 690px;
50
+      height:94px;
51
+      line-height: 94px;
52
+      background:rgba(187,156,121,1);
53
+      border-radius:10px;
54
+      color: #fff;
55
+      font-size: 36px;
56
+      text-align: center;
57
+      margin-bottom: 20px;
58
+
59
+    }
60
+    .statement{
61
+      font-size: 24px;
62
+      color: #999;
63
+      line-height: 1.6;
64
+    }
65
+  }
66
+  .base-con{
67
+    width: 94%;
68
+    height:740px;
69
+    position: absolute;
70
+    left: 3%;
71
+    top: 50%;
72
+    background-color: #fff;
73
+    padding: 40px;
74
+    margin-top: -370px;
75
+    border-radius:12px;
76
+    .con-item{
77
+      display: flex;
78
+      justify-content: space-between;
79
+      margin-bottom: 20px;
80
+    }
81
+    .textarea {
82
+      border: 2px solid #e3e3e3;
83
+      padding: 20px;
84
+      border-radius: 12px;
85
+      width:416px;
86
+      height:160px;
87
+      font-size: 26px;
88
+    }
89
+    .input {
90
+      border: 2px solid #e3e3e3;
91
+      padding: 0 20px;
92
+      border-radius: 4px;
93
+      width:416px;
94
+      height:40px;
95
+      line-height: 40px;
96
+      font-size: 26px;
97
+    }
98
+    .con-picker{
99
+      display: flex;
100
+      align-items: center;
101
+      justify-content: space-between;
102
+      width:456px;
103
+      height:48px ;
104
+      line-height: 48px;
105
+      padding: 0 16px;
106
+      background-color: #f4f4f4;
107
+      .picker{
108
+        width: 400px;
109
+      }
110
+    }
111
+    .right-icon{
112
+      width:18px;
113
+      height:18px;
114
+      border-top: 2px solid #999;
115
+      border-right: 2px solid #999;
116
+      transform:rotate(45deg);
117
+      float: right;
118
+    }
119
+    .bottom-btn{
120
+      margin: 30px auto 0 auto;
121
+      width: 90%;
122
+      height: 80px;
123
+      display: flex;
124
+      align-items: center;
125
+      justify-content: space-between;
126
+      font-size: 30px;
127
+    
128
+      .save{
129
+        background-color: $primary-color;
130
+        color:#fff;
131
+        height: 76px;
132
+        line-height: 76px;
133
+        text-align: center;
134
+        width:240px;
135
+        border-radius:12px;
136
+        border:2px solid $primary-color;
137
+      }
138
+      .cancel{
139
+        color: $primary-color;
140
+        text-align: center;
141
+        height: 76px;
142
+        line-height: 76px;
143
+        width:240px;
144
+        border-radius:12px;
145
+        border:2px solid $primary-color;
146
+      }
147
+    }
148
+
48 149
   }
49
-  .statement{
50
-    font-size: 24px;
51
-    color: #999;
150
+  .content {
151
+    width: 94%;
152
+    height:518px;
153
+    position: absolute;
154
+    left: 3%;
155
+    top: 50%;
156
+    background-color: #fff;
157
+    padding: 40px;
158
+    margin-top: -259px;
159
+    border-radius:12px;
160
+    .textarea {
161
+      border: 2px solid #e3e3e3;
162
+      padding: 20px;
163
+      border-radius: 12px;
164
+      width:416px;
165
+      height:258px;
166
+      font-size: 26px;
167
+    }
168
+    .bottom-btn{
169
+      margin: 70px auto 0 auto;
170
+      width: 90%;
171
+      height: 80px;
172
+      display: flex;
173
+      align-items: center;
174
+      justify-content: space-between;
175
+      font-size: 30px;
176
+    
177
+      .save{
178
+        background-color: $primary-color;
179
+        color:#fff;
180
+        height: 76px;
181
+        line-height: 76px;
182
+        text-align: center;
183
+        width:240px;
184
+        border-radius:12px;
185
+        border:2px solid $primary-color;
186
+      }
187
+      .cancel{
188
+        color: $primary-color;
189
+        text-align: center;
190
+        height: 76px;
191
+        line-height: 76px;
192
+        width:240px;
193
+        border-radius:12px;
194
+        border:2px solid $primary-color;
195
+      }
196
+    } 
52 197
   }
53 198
 }