瀏覽代碼

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into dev

张延森 5 年之前
父節點
當前提交
d756d187bb

+ 2
- 0
src/constants/api.js 查看文件

@@ -62,6 +62,8 @@ export const API_PRESELECTION_RECORD = resolvePath('listPreselectionRecord')
62 62
 export const API_RAISE_PROFILE = resolvePath('taRaise')
63 63
 export const API_SAVE_RAISE_RECORD = resolvePath('taRaiseRecord')
64 64
 export const API_RATSE_RECORD = resolvePath('taRaiseRecord/list')
65
+export const API_RATSE_DETAIL = resolvePath('taRaiseRecord')
66
+export const API_RATSE_ORDER = resolvePath('unifiedOrder')
65 67
 export const API_HOUSE_DETAIL = resolvePath('getHousingDetailById')
66 68
 export const API_ADD_PRESELECTION = resolvePath('taPreselectionRecord')
67 69
 export const API_CANCEL_PRESELECTION = resolvePath('taPreselectionRecordCancel')

+ 5
- 12
src/onlineSelling/components/RaiseCard/index.js 查看文件

@@ -23,6 +23,7 @@ export default function HouseCard(props) {
23 23
     status = 1,
24 24
     area1,
25 25
     area2,
26
+    payStatus,
26 27
     code,
27 28
     buildingImgList = [],
28 29
   } = props.summary || {}
@@ -32,15 +33,7 @@ export default function HouseCard(props) {
32 33
   const showDT = dayjs(createDate).format('YYYY/MM/DD')
33 34
   const wanY = Number(price)
34 35
 
35
-  const toHouseDetail = () => {
36
-    if (housingStatus == '0' || saleBatchStatus == '0') {
37
-      Taro.showToast({ title: '当前销售批次或该房源已被取消发布', icon: 'none', duration: 2000 })
38
-    } else {
39
-      Taro.navigateTo({
40
-        url: `/onlineSelling/pages/detail/index?id=${houseId}`
41
-      })
42
-    }
43
-  }
36
+
44 37
   const copyData = (e) => {
45 38
     e.stopPropagation()
46 39
     Taro.setClipboardData({
@@ -55,8 +48,8 @@ export default function HouseCard(props) {
55 48
     }
56 49
   }
57 50
   return (
58
-    <View className="housecard" style={props.style}>
59
-      <View className="head" onClick={toHouseDetail}>
51
+    <View className="housecard" style={props.style} onClick={props.handleCard}>
52
+      <View className="head">
60 53
         {thumb ? <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" /> :
61 54
           <Text style="font-size:26rpx;color:#666">暂无户型图</Text>
62 55
         }
@@ -64,7 +57,7 @@ export default function HouseCard(props) {
64 57
       <View className="body">
65 58
         {props.type == 'raiseMoney' && <Image src={closeImg} onClick={handleCancel} className="close-img"></Image>}
66 59
         <View onClick={toHouseDetail}>
67
-          {!props.type && <View className={status == '1' ? 'raised badge' : status == '2' ? 'unraise badge' : 'badge'}>{status == '1' ? '已缴费' : '未缴费'}</View>}
60
+          {!props.type && <View className={payStatus == 'paid' ? 'raised badge' : payStatus == 'unpaid' ? 'unraise badge' : 'badge'}>{payStatus == 'paid' ? '已缴费' : payStatus == 'unpaid' ? '未缴费' : '已退费'}</View>}
68 61
           {(props.type == 'raiseProfile' || props.type == 'houseResource') && <View style="color:#FF3C3C" className={status == '1' ? 'raised badge' : status == '2' ? 'unraise badge' : 'badge'}>{status == '1' ? '已锁给我' : '未缴费'}</View>}
69 62
           {props.type == 'raiseProfile' || props.type == 'raiseMoney' && <View style={props.type == 'raiseMoney' ? 'color:#BB9C79;font-size:30rpx' : 'color:#BB9C79;font-size:30rpx;margin-top:-20rpx'}>{apartmentName || ''}</View>}
70 63
           {props.type == 'raiseMoney' && <View className="red-price">现价{Number(price) + 0}万</View>}

+ 61
- 11
src/onlineSelling/pages/raiseMoney/index.js 查看文件

@@ -10,6 +10,7 @@ import * as houseActions from '@/actions/house'
10 10
 import NextStep from './NextStep'
11 11
 import { fetch, apis } from '@/utils/request'
12 12
 import Captcha from './Captcha'
13
+import { raiseOrder } from '@/services/project'
13 14
 
14 15
 const getRaiseProfile = ({raiseId, salesBatchId, personId}) => {
15 16
   const queryString = [
@@ -70,6 +71,10 @@ export default class raiseMoney extends Component {
70 71
         })
71 72
         return;
72 73
       }
74
+      
75
+      if (this.$router.params.type == 'pay') {
76
+        this.setState({ current: 3 })
77
+      }
73 78
     })
74 79
   }
75 80
 
@@ -133,7 +138,7 @@ export default class raiseMoney extends Component {
133 138
       <ScrollView scrollY className="container">
134 139
         {
135 140
           raiseCart.map(item => (
136
-              <View key={item.preselectionRecordId} >
141
+              <View key={item.houseId} >
137 142
                 <RaiseCard type="raiseMoney" summary={item} onCancel={this.handleCancel}/>
138 143
               </View>
139 144
             )
@@ -188,7 +193,7 @@ export default class raiseMoney extends Component {
188 193
 
189 194
   tochooseConsultant() {
190 195
     Taro.navigateTo({
191
-      url: 'onlineSelling/pages/chooseConsultant/index'
196
+      url: '/onlineSelling/pages/chooseConsultant/index'
192 197
     })
193 198
   }
194 199
   renderProfile() {
@@ -248,7 +253,7 @@ export default class raiseMoney extends Component {
248 253
       <ScrollView scrollY className="container2" style="padding:0 30rpx">
249 254
         <View className="profile-flex">
250 255
           <View className="title">认筹金额</View>
251
-          <View className="price">30000 元</View>
256
+          <View className="price">1 元</View>
252 257
         </View>
253 258
         <View className="center-title">线上选房协议</View>
254 259
       </ScrollView >
@@ -266,20 +271,65 @@ export default class raiseMoney extends Component {
266 271
       })
267 272
     })
268 273
   }
274
+
275
+  makePay = () => {
276
+    const params = {
277
+      targetId: this.$router.params.id,
278
+      targetType: 'house'
279
+    }
280
+    
281
+    return new Promise((resolve, reject) => {
282
+      raiseOrder(params).then(res => {
283
+        Taro.requestPayment({
284
+          timeStamp: res.timeStamp,
285
+          nonceStr: res.noncestr,
286
+          package: `prepay_id=${res.prepayid}`,
287
+          signType: 'MD5',
288
+          paySign: res.sign,
269 289
   
290
+          success(res) {
291
+            // TODO 缴费成功
292
+
293
+            // 调用远程接口
294
+
295
+
296
+            // 最后
297
+            resolve()
298
+          },
299
+          fail(res) {
300
+            // TODO 缴费失败
301
+
302
+            // 然后
303
+            reject()
304
+          }
305
+        })
306
+      })
307
+    })
308
+
309
+  }
310
+
270 311
   nextStep(current) {
312
+    switch (current) {
313
+      // 认筹确认
314
+      case 2:
315
+        this.makeRaiseRecord().then(() => {
316
+          this.setState({
317
+            current: current + 1
318
+          })
319
+        })
320
+        return;
271 321
 
272
-    // 确定认筹
273
-    if (current === 2) {
274
-      this.makeRaiseRecord().then(() => {
322
+      // 缴费
323
+      case 3:
324
+        this.makePay()
325
+        return;
326
+
327
+      //
328
+      default:
275 329
         this.setState({
276 330
           current: current + 1
277 331
         })
278
-      })
279
-    } else {
280
-      this.setState({
281
-        current: current + 1
282
-      })
332
+
283 333
     }
284 334
   }
285 335
 

+ 20
- 16
src/onlineSelling/pages/raiseProfile/Cell.js 查看文件

@@ -1,4 +1,4 @@
1
-import { View } from '@tarojs/components'
1
+import { View, Block } from '@tarojs/components'
2 2
 import './index.scss'
3 3
 import NamedIcon from '../../components/NamedIcon'
4 4
 
@@ -7,24 +7,28 @@ export default function (props) {
7 7
   console.log('------->', props)
8 8
 
9 9
   return (
10
-    <View className={`raiseCell ${disable}`}>
11
-      <View className="row">
12
-        <View className="head">{props.head}</View>
13
-        <View className="body">{props.body}</View>
14
-        <View className="action" onClick={props.onActionClick}>
10
+    <Block>
11
+      {
12
+        !props.hide && <View className={`raiseCell ${disable}`}>
13
+          <View className="row">
14
+            <View className="head">{props.head}</View>
15
+            <View className="body">{props.body}</View>
16
+            <View className="action" onClick={props.onActionClick}>
17
+              {
18
+                props.action && (<NamedIcon name="copy" size={34} />)
19
+              }
20
+            </View>
21
+          </View>
15 22
           {
16
-            props.action && (<NamedIcon name="copy" size={34} />)
23
+            props.desc &&
24
+            (
25
+              <View className="row desc">
26
+                <View className="desc">{props.desc}</View>
27
+              </View>
28
+            )
17 29
           }
18 30
         </View>
19
-      </View>
20
-      {
21
-        props.desc &&
22
-        (
23
-          <View className="row desc">
24
-            <View className="desc">{props.desc}</View>
25
-          </View>
26
-        )
27 31
       }
28
-    </View>
32
+    </Block>
29 33
   )
30 34
 }

+ 1
- 0
src/onlineSelling/pages/raiseProfile/CellBlock.js 查看文件

@@ -22,6 +22,7 @@ export default function(props) {
22 22
               head={item.head}
23 23
               body={item.body}
24 24
               action={item.action}
25
+              hide={item.hide}
25 26
               desc={item.desc}
26 27
               onActionClick={handleActionClick.bind(this, item)}
27 28
               />

+ 1
- 1
src/onlineSelling/pages/raiseProfile/houseResource.js 查看文件

@@ -55,7 +55,7 @@ export default class HouseResource extends Component {
55 55
       <View style="padding-top:30rpx">
56 56
         {
57 57
           list.map(item => (
58
-            <View key={item.preselectionRecordId} >
58
+            <View key={item.raiseRecordId} >
59 59
               <RaiseCard type="houseResource" summary={item} />
60 60
             </View>
61 61
           )

+ 55
- 54
src/onlineSelling/pages/raiseProfile/index.js 查看文件

@@ -7,6 +7,8 @@ import ContactConsultant from '../../components/ContactConsultant'
7 7
 import ConsultantItem from '../../components/ConsultantItem/index'
8 8
 import NamedIcon from '../../components/NamedIcon'
9 9
 import RaiseCard from '../../components/RaiseCard'
10
+import { queryRaiseDetail } from '@/services/project'
11
+
10 12
 
11 13
 import './index.scss'
12 14
 import consultant from 'dist/components/consultant'
@@ -17,10 +19,23 @@ export default class extends Component {
17 19
   }
18 20
 
19 21
   state = {
20
-    buildingId: '9f021a59b2a714822894c23ccca8c2db', // must change this
22
+    buildingId: '',
23
+    raiseDeatil: {},
24
+    houseList: [],
25
+    raiseOrder: {}
21 26
   }
22 27
 
23
-  componentWillMount() { }
28
+  componentWillMount() {
29
+    const { raiseRecordId } = this.$router.params
30
+    queryRaiseDetail(raiseRecordId).then(res => {
31
+      this.setState({
32
+        buildingId: res.taRaiseRecord.buildingId,
33
+        raiseDeatil: res.taRaiseRecord || {},
34
+        houseList: res.houseList || [],
35
+        raiseOrder: res.taRaise || {},
36
+      })
37
+    })
38
+  }
24 39
 
25 40
   // 复制数据
26 41
   copyData(data) {
@@ -30,10 +45,7 @@ export default class extends Component {
30 45
     })
31 46
   }
32 47
 
33
-  // 跳转去交费
34
-  toPay = () => {
35 48
 
36
-  }
37 49
 
38 50
   // 查看所有认筹房源
39 51
   viewAllHouses = () => {
@@ -43,34 +55,7 @@ export default class extends Component {
43 55
   }
44 56
 
45 57
   renderHead() {
46
-    const item = {
47
-      apartmentId: null,
48
-      apartmentName: 'A户型',
49
-      avatarurl: null,
50
-      blockName: "1栋",
51
-      buildingId: "9f021a59b2a714822894c23ccca8c2db",
52
-      buildingImgList: null,
53
-      buildingName: "万科安平园舍",
54
-      createDate: "2020-02-27T16:31:56",
55
-      floorName: "1楼",
56
-      houseId: "820",
57
-      housingStatus: "1",
58
-      name: null,
59
-      nameOrnick: null,
60
-      orgId: 84,
61
-      personId: "899b8930e85125471f0981eec4a0de3c",
62
-      phone: null,
63
-      preselectionRecordId: 205,
64
-      price: "111.00000000",
65
-      roomName: "1户",
66
-      saleBatchStatus: "1",
67
-      status: 1,
68
-      termname: "1期",
69
-      unitName: "2单元",
70
-      area1: '290',
71
-      area2: '270',
72
-
73
-    }
58
+    const { houseList } = this.state
74 59
     return (
75 60
       <Block>
76 61
         <View className="head flexSpace">
@@ -78,13 +63,14 @@ export default class extends Component {
78 63
             <View className="title">认筹房源</View>
79 64
           </View>
80 65
           <View className="flexSpace-fixed">
81
-            <View className="gray" onClick={this.viewAllHouses}>
82
-              <Text>查看全部(4)</Text>
66
+            {houseList.length > 1 && <View className="gray" onClick={this.viewAllHouses}>
67
+              <Text>查看全部({houseList.length})</Text>
83 68
               <Text className='at-icon at-icon-chevron-right'></Text>
84
-            </View>
69
+            </View>}
70
+
85 71
           </View>
86 72
         </View>
87
-        <RaiseCard summary={item} type="raiseProfile" style="height:280rpx" />
73
+        <RaiseCard summary={houseList[0]} type="raiseProfile" style="height:280rpx" />
88 74
       </Block>
89 75
     )
90 76
   }
@@ -107,9 +93,16 @@ export default class extends Component {
107 93
       </Block>
108 94
     )
109 95
   }
110
-
96
+  // 跳转去交费
97
+  toPay = () => {
98
+    const { raiseDeatil: { raiseRecordId } } = this.state
99
+    Taro.navigateTo({
100
+      url: `/onlineSelling/pages/raiseMoney/index?type=pay&id=${raiseRecordId}`
101
+    })
102
+  }
111 103
   // 未交费提示
112 104
   renderUnpayNotice() {
105
+    const { raiseOrder } = this.state
113 106
     return (
114 107
       <Block>
115 108
         <View className="unpayNotice flexSpace" onClick={this.toPay}>
@@ -119,7 +112,7 @@ export default class extends Component {
119 112
           </View>
120 113
           <View className="flexSpace-fixed">
121 114
             <Text className="a-line">认筹金额</Text>
122
-            <Text className="a-line price">30000元</Text>
115
+            <Text className="a-line price">{raiseOrder.raisePrice}元</Text>
123 116
           </View>
124 117
         </View>
125 118
         <View className="hr"></View>
@@ -128,18 +121,18 @@ export default class extends Component {
128 121
   }
129 122
 
130 123
   render() {
131
-    const { buildingId } = this.state;
124
+    const { buildingId, raiseDeatil } = this.state;
132 125
 
133 126
     // 认筹信息
134 127
     const raiseInfo = [
135
-      { head: '认筹人', body: '姓名' },
136
-      { head: '身份证号', body: '412702199709215528' },
137
-      { head: '手机号', body: '17716241245' },
128
+      { head: '认筹人', body: `${raiseDeatil.name || ''}`, },
129
+      { head: '身份证号', body: `${raiseDeatil.idcard || ''}` },
130
+      { head: '手机号', body: `${raiseDeatil.tel || ''}` },
138 131
     ]
139 132
 
140 133
     // 缴费信息
141 134
     const payInfo = [
142
-      { head: '缴费方式', body: '线上缴费/线下缴费' },
135
+      { head: '缴费方式', body: `${raiseDeatil.payType == 'onLine' ? '线上缴费' : '线下缴费'}` },
143 136
       { head: '实际支付费用', body: '234元' },
144 137
       { head: '缴费成功时间', body: dayjs('2020-2-28 17:12:48').format('YYYY/MM/DD HH:mm:ss') },
145 138
     ]
@@ -157,9 +150,9 @@ export default class extends Component {
157 150
     // 其他信息
158 151
     const otherInfo = [
159 152
       { head: '其他信息', body: '供核对数据使用' },
160
-      { head: '认筹单编号', body: '234567890-09876545678', action: true },
161
-      { head: '缴费单编号', body: '234567890-09876543456', action: true },
162
-      { head: '退费单编号', body: '234567890-09876543423', action: true },
153
+      { head: '认筹单编号', body: `${raiseDeatil.raiseRecordId}`, action: true },
154
+      { head: '缴费单编号', body: '234567890-09876543456', action: true, hide: `${raiseDeatil.payStatus == 'paid' ? false : true}` },
155
+      { head: '退费单编号', body: '234567890-09876543423', action: true, hide: `${raiseDeatil.payStatus == 'refunded' ? false : true}` },
163 156
     ]
164 157
     const consultantInfo = {
165 158
       name: '哈哈哈1',
@@ -171,9 +164,9 @@ export default class extends Component {
171 164
       <View className="raiseProfilePage">
172 165
         <View className="main">
173 166
           {this.renderHead()}
174
-          <View className="tip">注意:请在一个工作日内,到售楼处或项目现场办理认购手续。逾期未办理视为放弃购买。</View>
175
-          {this.renderCancelReason()}
176
-          {this.renderUnpayNotice()}
167
+          <View className="tip">{raiseDeatil.payDescription || ''}</View>
168
+          {raiseDeatil.status == '0' && this.renderCancelReason()}
169
+          {raiseDeatil.payStatus == 'unpaid' && this.renderUnpayNotice()}
177 170
           <View>
178 171
             <CellBlock dataset={raiseInfo} />
179 172
             <ConsultantItem
@@ -183,10 +176,18 @@ export default class extends Component {
183 176
               onClick={this.handleItemClick}>
184 177
             </ConsultantItem>
185 178
             <View className="hr" />
186
-            <CellBlock dataset={payInfo} />
187
-            <View className="hr" />
188
-            <CellBlock dataset={refundInfo} />
189
-            <View className="hr" />
179
+            {raiseDeatil.payStatus == 'paid' &&
180
+              <Block>
181
+                <CellBlock dataset={payInfo} />
182
+                <View className="hr" />
183
+              </Block>}
184
+
185
+            {/* unpaid未缴费paid已缴费refunded已退费 */}
186
+            {raiseDeatil.payStatus == 'refunded' &&
187
+              <Block>
188
+                <CellBlock dataset={refundInfo} />
189
+                <View className="hr" />
190
+              </Block>}
190 191
             <CellBlock dataset={otherInfo} disable onActionClick={dt => this.copyData(dt.body)} />
191 192
           </View>
192 193
           <View></View>

+ 44
- 7
src/onlineSelling/pages/records/index.js 查看文件

@@ -3,7 +3,7 @@ import { View, ScrollView, Block } from '@tarojs/components'
3 3
 import HouseCard from '../../components/HouseCard'
4 4
 import RaiseCard from '../../components/RaiseCard'
5 5
 import { getItemList } from '@/services/item'
6
-import { queryPreselectionRecord, queryRaiseRecord, querySalesList } from '@/services/project'
6
+import { queryPreselectionRecord, queryRaiseRecord, querySalesList, queryApartmentType } from '@/services/project'
7 7
 import { connect } from '@tarojs/redux'
8 8
 import ready from '@/utils/ready'
9 9
 import Blank from '../../components/Blank'
@@ -37,6 +37,10 @@ export default class Records extends Component {
37 37
     saleBatch: '',
38 38
     salesBatchId: '',
39 39
 
40
+    apartmentList: [],
41
+    apartmentValue: '',
42
+    apartmentId: '',
43
+
40 44
     lockStatus: [{ value: '不限', code: '' }, { value: '未锁定', code: 'unlocked' }, { value: '已锁定', code: 'locked' }],
41 45
     lockStatusValue: '',
42 46
     houseLockingStatus: '',
@@ -145,6 +149,11 @@ export default class Records extends Component {
145 149
       </Block>
146 150
     )
147 151
   }
152
+  toRaiseProfile(id) {
153
+    Taro.navigateTo({
154
+      url: `/onlineSelling/pages/raiseProfile/index?raiseRecordId=${id}`
155
+    })
156
+  }
148 157
   renderRaise() {
149 158
     const { raiseList, noRaiseRecord } = this.state
150 159
     return (
@@ -155,15 +164,15 @@ export default class Records extends Component {
155 164
             <ScrollView scrollY>
156 165
               {
157 166
                 raiseList.map(item => (
158
-                  <View key={item.preselectionRecordId} >
159
-                    <RaiseCard summary={item} />
167
+                  <View key={item.raiseRecordId} >
168
+                    <RaiseCard handleCard={this.toRaiseProfile(item.raiseRecordId)} summary={item} />
160 169
                   </View>
161 170
                 )
162 171
                 )
163 172
               }
164 173
             </ScrollView >
165 174
         }
166
-        <Statement />
175
+        <Statement styel="margin-top:80rpx" />
167 176
 
168 177
 
169 178
       </Block>
@@ -184,13 +193,35 @@ export default class Records extends Component {
184 193
       saleBatch: salesList[e.detail.value].salesBatchName,
185 194
       salesBatchId: salesList[e.detail.value].salesBatchId,
186 195
 
196
+    }, () => {
197
+      if (this.state.salesBatchId) {
198
+        console.log('hhhhhhhhhhhhhh')
199
+        this.loadAparamentType(this.state.salesBatchId)
200
+      } else {
201
+        console.log('hjjjjjjjjjjjhhhh')
202
+        this.setState({
203
+          apartmentList: [{ apartmentName: '请选择', apartmentId: '' }]
204
+        })
205
+      }
206
+    })
207
+  }
208
+  loadAparamentType(salesBatchId) {
209
+    queryApartmentType({ salesBatchId: salesBatchId }).then(res => {
210
+      res.unshift({ apartmentName: '请选择', apartmentId: '' })
211
+      this.setState({
212
+        apartmentList: res || []
213
+      })
187 214
     })
188 215
   }
189 216
   handleApartmentChange = e => {
190 217
 
218
+    const { apartmentList } = this.state
219
+
191 220
     this.setState({
192
-      status: selector[e.detail.value].buildingTypeName
221
+      apartmentValue: apartmentList[e.detail.value].apartmentName,
222
+      apartmentId: apartmentList[e.detail.value].apartmentId,
193 223
     })
224
+
194 225
   }
195 226
   handleLockStatusChange = e => {
196 227
     const { lockStatus } = this.state
@@ -216,6 +247,8 @@ export default class Records extends Component {
216 247
       buildingId: '',
217 248
       saleBatch: '',
218 249
       salesBatchId: '',
250
+      apartmentValue: '',
251
+      apartmentId: '',
219 252
       lockStatusValue: '',
220 253
       houseLockingStatus: '',
221 254
       lockCustomerValue: '',
@@ -235,7 +268,7 @@ export default class Records extends Component {
235 268
       screenVisible: false
236 269
     })
237 270
     const { userInfo: { person: { personId } } } = this.props
238
-    const { buildingId, salesBatchId, houseLockingStatus, customerLocked } = this.state
271
+    const { buildingId, salesBatchId, houseLockingStatus, apartmentId, customerLocked } = this.state
239 272
 
240 273
     if (this.state.current == '0') {
241 274
 
@@ -245,6 +278,7 @@ export default class Records extends Component {
245 278
         pageSize: 999,
246 279
         buildingId,
247 280
         salesBatchId,
281
+        apartmentId,
248 282
         houseLockingStatus,
249 283
         customerLocked
250 284
       }
@@ -267,7 +301,7 @@ export default class Records extends Component {
267 301
   }
268 302
 
269 303
   renderPreselectScreen() {
270
-    const { current, buildingValue, buildingList, saleBatch, salesList, lockCustomerValue, lockCustomer, lockStatusValue, lockStatus } = this.state
304
+    const { current, buildingValue, buildingList, saleBatch, salesList, apartmentList, apartmentValue, lockCustomerValue, lockCustomer, lockStatusValue, lockStatus } = this.state
271 305
 
272 306
     const selector = [{ buildingTypeName: '楼盘1' }, { buildingTypeName: '楼盘2' }, { buildingTypeName: '楼盘3' }, { buildingTypeName: '楼盘4' }]
273 307
 
@@ -276,6 +310,7 @@ export default class Records extends Component {
276 310
       <View className="base-con">
277 311
         <PickerComponent title="选择楼盘" selector={buildingList} keyValue={"buildingName"} currentValue={buildingValue || ''} handleChange={this.handleBuildingChange} />
278 312
         <PickerComponent title="选择销售批次" selector={salesList} keyValue={"salesBatchName"} currentValue={saleBatch || ''} handleChange={this.handleSaleBatchChange} />
313
+        {current == '0' && <PickerComponent title="选择户型" selector={apartmentList} keyValue={"apartmentName"} currentValue={apartmentValue || ''} handleChange={this.handleApartmentChange} />}
279 314
         <PickerComponent title="锁定状态" selector={lockStatus} keyValue={"value"} currentValue={lockStatusValue || ''} handleChange={this.handleLockStatusChange} />
280 315
         {current == '0' && <PickerComponent title="锁定客户" keyValue={"value"} selector={lockCustomer} currentValue={lockCustomerValue || ''} handleChange={this.handleCustomerChange} />}
281 316
 
@@ -307,6 +342,8 @@ export default class Records extends Component {
307 342
       buildingId: '',
308 343
       saleBatch: '',
309 344
       salesBatchId: '',
345
+      apartmentValue: '',
346
+      apartmentId: '',
310 347
       lockStatusValue: '',
311 348
       houseLockingStatus: '',
312 349
       lockCustomerValue: '',

+ 18
- 5
src/services/project.js 查看文件

@@ -9,7 +9,10 @@ import {
9 9
   API_CANCEL_PRESELECTION,
10 10
   API_APARTMENT_TYPE,
11 11
   API_NOTICE_INFO,
12
-  API_SALES_BATCH
12
+  API_SALES_BATCH,
13
+  API_RATSE_DETAIL,
14
+  API_RATSE_ORDER
15
+
13 16
 } from '@/constants/api'
14 17
 
15 18
 
@@ -23,12 +26,17 @@ export const queryHouseList = payload => fetch({ url: API_HOUSE_LIST, payload })
23 26
  * 获取房源分享信息
24 27
  * @param {*} id
25 28
  */
26
-export const querySalesInfo = id => fetch({ url: `${API_SALES_BATCH}/${id}`})
29
+export const querySalesInfo = id => fetch({ url: `${API_SALES_BATCH}/${id}` })
30
+/**
31
+ * 获取认筹单详情
32
+ * @param {*} id
33
+ */
34
+export const queryRaiseDetail = id => fetch({ url: `${API_RATSE_DETAIL}/${id}` })
27 35
 /**
28 36
  * 获取房源列表滚动提示
29 37
  * @param {*} id
30 38
  */
31
-export const queryNoticeInfo = id => fetch({ url: `${API_NOTICE_INFO}/${id}`})
39
+export const queryNoticeInfo = id => fetch({ url: `${API_NOTICE_INFO}/${id}` })
32 40
 
33 41
 /**
34 42
  * 预选房源
@@ -39,7 +47,7 @@ export const addPreselection = payload => fetch({ url: API_ADD_PRESELECTION, pay
39 47
  * 取消预选房源
40 48
  * @param {*} payload
41 49
  */
42
-export const cancelPreselection = payload => fetch({ url: `${API_CANCEL_PRESELECTION}?${'houseId='+payload.houseId}&${'personId='+payload.personId}`, method: 'DELETE' })
50
+export const cancelPreselection = payload => fetch({ url: `${API_CANCEL_PRESELECTION}?${'houseId=' + payload.houseId}&${'personId=' + payload.personId}`, method: 'DELETE' })
43 51
 /**
44 52
  * 获取房源详情
45 53
  * @param {*} payload
@@ -65,7 +73,12 @@ export const querySalesList = payload => fetch({ url: API_SALESBATCH_LIST, paylo
65 73
  * 获取某销售批次下所有房源户型
66 74
  * @param {*} payload
67 75
  */
68
-export const queryApartmentType= payload => fetch({ url: API_APARTMENT_TYPE, payload })
76
+export const queryApartmentType = payload => fetch({ url: API_APARTMENT_TYPE, payload })
77
+/**
78
+ *认筹下单接口
79
+ * @param {*} payload
80
+ */
81
+export const raiseOrder = payload => fetch({ url: API_RATSE_ORDER, payload, method: 'POST' })
69 82
 
70 83
 
71 84