xujing 5 yıl önce
ebeveyn
işleme
bd25a3c734

+ 21
- 9
src/onlineSelling/components/RaiseCard/index.js Dosyayı Görüntüle

@@ -1,4 +1,4 @@
1
-import { View, Image, Text } from "@tarojs/components";
1
+import { View, Image, Text, Block } from "@tarojs/components";
2 2
 import { transferImage } from '@/utils/tools'
3 3
 import dayjs from 'dayjs'
4 4
 import copyImg from '../../assets/copy.png'
@@ -21,7 +21,7 @@ export default function RaiseCard(props) {
21 21
     buildingArea,
22 22
     insideArea,
23 23
     payStatus,
24
-    code,
24
+    houseId,
25 25
     buildingImgList = [],
26 26
   } = props.summary || {}
27 27
 
@@ -34,7 +34,7 @@ export default function RaiseCard(props) {
34 34
   const copyData = (e) => {
35 35
     e.stopPropagation()
36 36
     Taro.setClipboardData({
37
-      data: code,
37
+      data: houseId,
38 38
       onSuccess: (() => { }),
39 39
     })
40 40
   }
@@ -55,17 +55,29 @@ export default function RaiseCard(props) {
55 55
         {props.type == 'raiseMoney' && <Image src={closeImg} onClick={handleCancel} className="close-img"></Image>}
56 56
         <View onClick={props.handleCard}>
57 57
           {!props.type && <View className={payStatus == 'paid' ? 'raised badge' : payStatus == 'unpaid' ? 'unraise badge' : 'badge'}>{payStatus == 'paid' ? '已缴费' : payStatus == 'unpaid' ? '未缴费' : '已退费'}</View>}
58
-          {(props.type == 'raiseProfile' || props.type == 'houseResource') && houseLockingStatus == 'locked' && <View style="color:#FF3C3C" className='raised badge'>{mineLocked ? '已锁给我' : ''}</View>}
59
-          {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>}
58
+          {(props.type == 'raiseProfile' || props.type == 'houseResource') && <View style="color:#FF3C3C" className='badge'>{mineLocked ? '已锁给我' : ' '}</View>}
59
+          {(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>}
60 60
           {props.type == 'raiseMoney' && <View className="red-price">现价{Number(price) + 0}万</View>}
61
-          {props.type == 'houseResource' && <View style="color:#BB9C79;font-size:28rpx;margin:-40rpx 0 26rpx 0">{houseLockingStatus == 'locked' ? '已锁定' : '未锁定'}</View>}
61
+          {props.type == 'houseResource' && <View style="color:#BB9C79;font-size:28rpx;margin:-40rpx 0 12rpx 0">{houseLockingStatus == 'locked' ? '已锁定' : '未锁定'}</View>}
62 62
           <View className="title">{title}</View>
63 63
           {!props.type && <View className="meta">{showDT}</View>}
64 64
           {props.type == 'raiseProfile' && <View className="price">现价<Text className="red">{Number(price) + 0}</Text>万</View>}
65
-          {props.type == 'raiseProfile' || props.type == 'raiseMoney' && buildingArea && <View className="area">建筑面积约<Text className="red">{buildingArea}m²</Text></View>}
66
-          {props.type == 'raiseProfile' || props.type == 'raiseMoney' && insideArea && <View className="area">使用面积约<Text className="red">{insideArea}m²</Text></View>}
65
+          {(props.type == 'raiseProfile' || props.type == 'raiseMoney') &&
66
+            <Block>
67
+              {buildingArea ? <View className="area">建筑面积约 <Text className="red">{buildingArea}m²</Text>
68
+              </View> : <View className="area">建筑面积待定
69
+            </View>}
70
+            </Block>
71
+          }
72
+          {(props.type == 'raiseProfile' || props.type == 'raiseMoney') &&
73
+            <Block>
74
+              {insideArea ? <View className="area">使用面积约 <Text className="red">{insideArea}m²</Text>
75
+              </View> : <View className="area">使用面积待定
76
+            </View>}
77
+            </Block>
78
+          }
67 79
         </View>
68
-        {props.type == 'houseResource' && <View className="house-code" style="margin-top:26rpx">房源编号:{code}
80
+        {props.type == 'houseResource' && <View className="house-code" style="margin-top:14rpx">房源编号:{houseId}
69 81
           <Image src={copyImg} className="copy-img" onClick={copyData}></Image>
70 82
         </View>}
71 83
       </View>

+ 15
- 43
src/onlineSelling/pages/raiseProfile/houseResource.js Dosyayı Görüntüle

@@ -2,59 +2,31 @@ import Taro, { Component } from '@tarojs/taro'
2 2
 import { View } from '@tarojs/components'
3 3
 import './index.scss'
4 4
 import RaiseCard from '../../components/RaiseCard'
5
+import { queryRaiseDetail } from '@/services/project'
5 6
 
6 7
 export default class HouseResource extends Component {
7 8
   config = {
8 9
     navigationBarTitleText: '房源清单'
9 10
   }
11
+  state = {
12
+    houseList: [],
13
+  }
10 14
 
11
-  render() {
12
-    const list = [
13
-      {
14
-        apartmentName: 'A户型',
15
-        blockName: "1栋",
16
-        buildingId: "9f021a59b2a714822894c23ccca8c2db",
17
-        buildingImgList: null,
18
-        buildingName: "万科安平园舍",
19
-        createDate: "2020-02-27T16:31:56",
20
-        floorName: "1楼",
21
-        houseId: "820",
22
-        preselectionRecordId: 205,
23
-        price: "111.00000000",
24
-        roomName: "1户",
25
-        saleBatchStatus: "1",
26
-        status: 1,
27
-        termname: "1期",
28
-        unitName: "2单元",
29
-        area1: '290',
30
-        area2: '270',
31
-        code: '2-09876545456'
32
-      }, {
33
-        apartmentName: 'B户型',
34
-        blockName: "1栋",
35
-        buildingId: "9f021a59b2a714822894c23ccca8c2db",
36
-        buildingImgList: null,
37
-        buildingName: "凤翔新城",
38
-        createDate: "2020-02-27T16:31:56",
39
-        floorName: "1楼",
40
-        houseId: "820",
41
-        preselectionRecordId: 206,
42
-        price: "111.00000000",
43
-        roomName: "1户",
44
-        saleBatchStatus: "1",
45
-        status: 1,
46
-        termname: "1期",
47
-        unitName: "2单元",
48
-        area1: '290',
49
-        area2: '270',
50
-        code: '2-09876545333'
51
-      },
52
-    ]
15
+  componentWillMount() {
16
+    const { raiseRecordId } = this.$router.params
17
+    queryRaiseDetail(raiseRecordId).then(res => {
18
+      this.setState({
19
+        houseList: res.houseList || [],
53 20
 
21
+      })
22
+    })
23
+  }
24
+  render() {
25
+    const { houseList } = this.state
54 26
     return (
55 27
       <View style="padding-top:30rpx">
56 28
         {
57
-          list.map(item => (
29
+          houseList.map(item => (
58 30
             <View key={item.raiseRecordId} >
59 31
               <RaiseCard type="houseResource" summary={item} />
60 32
             </View>

+ 5
- 4
src/onlineSelling/pages/raiseProfile/index.js Dosyayı Görüntüle

@@ -54,8 +54,9 @@ export default class Raise extends Component {
54 54
 
55 55
   // 查看所有认筹房源
56 56
   viewAllHouses = () => {
57
+    const { raiseRecordId } = this.$router.params
57 58
     Taro.navigateTo({
58
-      url: '/onlineSelling/pages/raiseProfile/houseResource'
59
+      url: `/onlineSelling/pages/raiseProfile/houseResource?raiseRecordId=${raiseRecordId}`
59 60
     })
60 61
   }
61 62
 
@@ -68,7 +69,7 @@ export default class Raise extends Component {
68 69
             <View className="title">认筹房源</View>
69 70
           </View>
70 71
           <View className="flexSpace-fixed">
71
-            {houseList.length > 1 && <View className="gray" onClick={this.viewAllHouses}>
72
+            {houseList.length > 0 && <View className="gray" onClick={this.viewAllHouses}>
72 73
               <Text>查看全部({houseList.length})</Text>
73 74
               <Text className='at-icon at-icon-chevron-right'></Text>
74 75
             </View>}
@@ -182,7 +183,7 @@ export default class Raise extends Component {
182 183
     // 缴费信息
183 184
     const payInfo = [
184 185
       { head: '缴费方式', body: `${raiseDeatil.payType == 'onLine' ? '线上缴费' : '线下缴费'}` },
185
-      { head: '实际支付费用', body: this.regFenToYuan(orderDetail.totalFee) },
186
+      { head: '实际支付费用', body: this.regFenToYuan(orderDetail.totalFee)+'元' },
186 187
       { head: '缴费成功时间', body: dayjs(orderDetail.payTime).format('YYYY/MM/DD HH:mm:ss') },
187 188
     ]
188 189
 
@@ -191,7 +192,7 @@ export default class Raise extends Component {
191 192
       { head: '退费状态', body: refundOrder.payStatus == 'refunded' ? '退费完成' : '退费中' },
192 193
       { head: '退费结果', body: refundOrder.payStatus == 'refunded' ? '成功' : '失败' },
193 194
       { head: '退费发起时间', body: dayjs(refundOrder.createDate).format('YYYY/MM/DD HH:mm:ss') },
194
-      { head: '实退费用', body: this.regFenToYuan(refundOrder.totalFee) },
195
+      { head: '实退费用', body: this.regFenToYuan(refundOrder.totalFee)+'元' },
195 196
       { head: '退费到账时间', body: dayjs(refundOrder.payTime).format('YYYY/MM/DD HH:mm:ss') },
196 197
       { head: '退费原因', desc: raiseDeatil.refundReason },
197 198
     ]

+ 2
- 6
src/onlineSelling/pages/screenHouse/index.js Dosyayı Görüntüle

@@ -18,11 +18,7 @@ export default class Index extends Component {
18 18
     priceCurrent: 0,
19 19
     startPrice: '100',
20 20
     endPrice: null,
21
-    apartmentList: [
22
-      // { apartmentName: 'A 户型', buildingArea: '149', area2: '131' },
23
-      // { apartmentName: 'B 户型', buildingArea: '95', area2: '84.7' },
24
-      // { apartmentName: 'C 户型', buildingArea: '95', area2: '84.7' },
25
-    ]
21
+    apartmentList: []
26 22
   }
27 23
 
28 24
   componentWillMount() {
@@ -118,7 +114,7 @@ export default class Index extends Component {
118 114
               <View className='construction__area'>
119 115
                 <Text>{apartmentItem.buildingArea ? '建筑面积约' + apartmentItem.buildingArea + 'm²' : '建筑面积待定'}</Text>
120 116
                 {
121
-                  apartmentItem.area2 ? <Text>使用面积约{apartmentItem.area2}m²</Text> : <Text>使用面积待定</Text>
117
+                  apartmentItem.insideArea ? <Text>使用面积约{apartmentItem.insideArea}m²</Text> : <Text>使用面积待定</Text>
122 118
                 }
123 119
               </View>
124 120
             </View>