xujing 5 years ago
parent
commit
cc8a1e581b

+ 4
- 4
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    HOST: '"https://dev.pawoma.cn"',//测试
9
-    WSS_HOST: '"wss://dev.pawoma.cn"',
8
+    // HOST: '"https://dev.pawoma.cn"',//测试
9
+    // WSS_HOST: '"wss://dev.pawoma.cn"',
10
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
10
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
12
     // HOST: '"https://lt.pawoma.cn"',
12
     // HOST: '"https://lt.pawoma.cn"',
13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
14
-    // HOST: '"http://127.0.0.1:8080"',
15
-    // WSS_HOST: '"ws://127.0.0.1:8080"',
14
+    HOST: '"http://192.168.2.52:8080"',
15
+    WSS_HOST: '"ws://192.168.2.52: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.12'
18
     Version: 'V3.5.12'

+ 1
- 1
src/onlineSelling/components/ConsultantItem/index.js View File

26
               }
26
               }
27
               <View className="phone">{data.phone}</View>
27
               <View className="phone">{data.phone}</View>
28
             </View>
28
             </View>
29
-            {!type && <View className="home">主页</View>}
29
+            {!type && <View className="home" onClick={props.onHomepage}>主页</View>}
30
             {type == 'raiseProfile' && <View className="contact" onClick={props.contactClick}>联系我<Text className="right-icon"></Text></View>}
30
             {type == 'raiseProfile' && <View className="contact" onClick={props.contactClick}>联系我<Text className="right-icon"></Text></View>}
31
           </View >
31
           </View >
32
         )
32
         )

+ 6
- 3
src/onlineSelling/components/HouseCard/index.js View File

9
   const {
9
   const {
10
     buildingName,
10
     buildingName,
11
     termname,
11
     termname,
12
+    termName,
12
     blockName,
13
     blockName,
14
+    displayHousePrice,
13
     unitName,
15
     unitName,
14
     floorName,
16
     floorName,
15
     roomName,
17
     roomName,
21
     buildingImgList = [],
23
     buildingImgList = [],
22
   } = props.summary || {}
24
   } = props.summary || {}
23
 
25
 
24
-  const title = `${buildingName || ''} ${termname || ''} ${blockName || ''} ${unitName || ''} ${floorName || ''} ${roomName || ''}`
26
+  const title = `${buildingName || ''} ${termname || termName || ''} ${blockName || ''} ${unitName || ''} ${floorName || ''} ${roomName || ''}`
25
   const thumb = (buildingImgList || []).length
27
   const thumb = (buildingImgList || []).length
26
   const showDT = dayjs(createDate).format('YYYY/MM/DD')
28
   const showDT = dayjs(createDate).format('YYYY/MM/DD')
27
   const wanY = Number(price)
29
   const wanY = Number(price)
50
       <View className="body" onClick={toHouseDetail}>
52
       <View className="body" onClick={toHouseDetail}>
51
         <View className="badge">已预选</View>
53
         <View className="badge">已预选</View>
52
         <View className="title">{title}</View>
54
         <View className="title">{title}</View>
53
-        <View className="subtitle">
55
+        {displayHousePrice && <View className="subtitle">
54
           <Text>现价</Text>
56
           <Text>现价</Text>
55
           <Text className="red">{wanY + '万元' || '待定'}</Text>
57
           <Text className="red">{wanY + '万元' || '待定'}</Text>
56
-        </View>
58
+        </View>}
59
+
57
         <View className="meta">{showDT}预选</View>
60
         <View className="meta">{showDT}预选</View>
58
       </View>
61
       </View>
59
 
62
 

+ 6
- 3
src/onlineSelling/components/RaiseCard/index.js View File

16
     roomName,
16
     roomName,
17
     price,
17
     price,
18
     houseLockingStatus,
18
     houseLockingStatus,
19
+    displayHousePrice,
19
     apartmentName,
20
     apartmentName,
20
     mineLocked,
21
     mineLocked,
21
     createDate,
22
     createDate,
23
     insideArea,
24
     insideArea,
24
     payStatus,
25
     payStatus,
25
     houseId,
26
     houseId,
27
+    statusType = '',
26
     status,
28
     status,
27
     taHousingResourcesList = [],
29
     taHousingResourcesList = [],
28
     apartmentImgList = [],
30
     apartmentImgList = [],
57
     }
59
     }
58
   }
60
   }
59
   return (
61
   return (
62
+
60
     <Block>
63
     <Block>
61
-      {status != -1 &&
64
+      {status == -1 && statusType == "raise" ? '' :
62
         <View className="housecard" style={props.style} >
65
         <View className="housecard" style={props.style} >
63
           <View className="head" onClick={() => (props.handleCard && props.handleCard())}>
66
           <View className="head" onClick={() => (props.handleCard && props.handleCard())}>
64
             {thumb && <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" />
67
             {thumb && <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" />
75
               {!props.type && <View style={status == '0' ? 'color:#999' : ''} className={payStatus == 'paid' ? 'raised badge' : payStatus == 'unpaid' ? 'unraise badge' : 'badge'}>{payStatus == 'paid' ? '已缴费' : payStatus == 'unpaid' ? '未缴费' : '已退费'}</View>}
78
               {!props.type && <View style={status == '0' ? 'color:#999' : ''} className={payStatus == 'paid' ? 'raised badge' : payStatus == 'unpaid' ? 'unraise badge' : 'badge'}>{payStatus == 'paid' ? '已缴费' : payStatus == 'unpaid' ? '未缴费' : '已退费'}</View>}
76
               {(props.type == 'raiseProfile' || props.type == 'houseResource') && <View style="color:#FF3C3C" className='badge'>{mineLocked ? '已锁给我' : ' '}</View>}
79
               {(props.type == 'raiseProfile' || props.type == 'houseResource') && <View style="color:#FF3C3C" className='badge'>{mineLocked ? '已锁给我' : ' '}</View>}
77
               {(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>}
80
               {(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>}
78
-              {props.type == 'raiseMoney' && taRaise.displayHousePrice && <View className="red-price">现价{Number(price) + 0}万</View>}
81
+              {props.type == 'raiseMoney' && (taRaise.displayHousePrice || displayHousePrice) && <View className="red-price">现价{wanY}万</View>}
79
               {props.type == 'houseResource' && <View style="color:#BB9C79;font-size:28rpx;margin:-40rpx 0 12rpx 0">{houseLockingStatus == 'locked' ? '已锁定' : '未锁定'}</View>}
82
               {props.type == 'houseResource' && <View style="color:#BB9C79;font-size:28rpx;margin:-40rpx 0 12rpx 0">{houseLockingStatus == 'locked' ? '已锁定' : '未锁定'}</View>}
80
               <View className={props.type == 'raiseMoney' && !props.disableCancel ? 'title max' : 'title'} style={status == '0' ? 'color:#999' : ''}>{title}</View>
83
               <View className={props.type == 'raiseMoney' && !props.disableCancel ? 'title max' : 'title'} style={status == '0' ? 'color:#999' : ''}>{title}</View>
81
               {!props.type && <View className="meta">{showDT}</View>}
84
               {!props.type && <View className="meta">{showDT}</View>}
82
-              {props.type == 'raiseProfile' && taRaise.displayHousePrice && <View className="price">现价<Text className="red">{Number(price) + 0}</Text>万</View>}
85
+              {props.type == 'raiseProfile' && (taRaise.displayHousePrice || displayHousePrice) && <View className="price">现价<Text className="red">{wanY}</Text>万</View>}
83
               {status == '0' && <View style="color:#999;font-size:30rpx">已作废</View>}
86
               {status == '0' && <View style="color:#999;font-size:30rpx">已作废</View>}
84
               {(props.type == 'raiseProfile' || props.type == 'raiseMoney') &&
87
               {(props.type == 'raiseProfile' || props.type == 'raiseMoney') &&
85
                 <Block>
88
                 <Block>

+ 3
- 3
src/onlineSelling/pages/addHouse/index.js View File

7
 import { connect } from '@tarojs/redux'
7
 import { connect } from '@tarojs/redux'
8
 import * as houseActions from '@/actions/house'
8
 import * as houseActions from '@/actions/house'
9
 
9
 
10
-function noop(){}
10
+function noop() { }
11
 
11
 
12
 @connect(
12
 @connect(
13
   ({ user, house }) => ({ ...user, house }),
13
   ({ user, house }) => ({ ...user, house }),
14
-  {...houseActions}
14
+  { ...houseActions }
15
 )
15
 )
16
 export default class extends Component {
16
 export default class extends Component {
17
   config = {
17
   config = {
73
   renderHouses() {
73
   renderHouses() {
74
     const { chooseList } = this.state
74
     const { chooseList } = this.state
75
     const { house } = this.props
75
     const { house } = this.props
76
-    
76
+
77
     // 从预选记录中过滤出来, 状态正常且未锁定的房源
77
     // 从预选记录中过滤出来, 状态正常且未锁定的房源
78
     const houseList = (house.mySelectHouses || []).map(x => x.housingInfo).filter(x => x.status == 1 && x.houseLockingStatus != 'locked')
78
     const houseList = (house.mySelectHouses || []).map(x => x.housingInfo).filter(x => x.status == 1 && x.houseLockingStatus != 'locked')
79
 
79
 

+ 18
- 12
src/onlineSelling/pages/chooseConsultant/index.js View File

7
 import * as houseActions from '@/actions/house'
7
 import * as houseActions from '@/actions/house'
8
 import Blank from '../../components/Blank'
8
 import Blank from '../../components/Blank'
9
 
9
 
10
-@connect(({ house }) => ({ house }), {...houseActions})
10
+@connect(({ house }) => ({ house }), { ...houseActions })
11
 export default class ConsultantList extends Component {
11
 export default class ConsultantList extends Component {
12
   config = {
12
   config = {
13
     navigationBarTitleText: '选择置业顾问'
13
     navigationBarTitleText: '选择置业顾问'
14
   }
14
   }
15
 
15
 
16
-  componentDidMount () {
16
+  componentDidMount() {
17
     const { buildingId } = this.$router.params
17
     const { buildingId } = this.$router.params
18
     const { house } = this.props
18
     const { house } = this.props
19
 
19
 
20
     // if (!house.consultantList || !house.consultantList.length) {
20
     // if (!house.consultantList || !house.consultantList.length) {
21
-      this.props.dispatchGetConsultants({
22
-        buildingId,
23
-        pageSize: 999,
24
-        pageNumber: 1,
25
-      })
21
+    this.props.dispatchGetConsultants({
22
+      buildingId,
23
+      pageSize: 999,
24
+      pageNumber: 1,
25
+    })
26
     // }
26
     // }
27
   }
27
   }
28
 
28
 
32
 
32
 
33
     Taro.navigateBack({ delta: 1 })
33
     Taro.navigateBack({ delta: 1 })
34
   }
34
   }
35
- 
35
+  toConsultantDetail(item) {
36
+    Taro.navigateTo({
37
+      url: `/pages/card/index?id=${item.id}`
38
+    })
39
+  }
36
   render() {
40
   render() {
37
     const { house } = this.props
41
     const { house } = this.props
38
 
42
 
40
       <View className="consultantList">
44
       <View className="consultantList">
41
         {
45
         {
42
           (!house.consultantList || !house.consultantList.length) &&
46
           (!house.consultantList || !house.consultantList.length) &&
43
-          (<Blank tips="暂无数据"/>)
47
+          (<Blank tips="暂无数据" />)
44
         }
48
         }
45
 
49
 
46
         {
50
         {
47
-          house.consultantList.map((item,index) => (
51
+          house.consultantList.map((item, index) => (
48
             <ConsultantItem
52
             <ConsultantItem
49
               data={item}
53
               data={item}
50
-              key={index+'card'}
51
-              onClick={this.handleItemClick}>
54
+              key={index + 'card'}
55
+              onClick={this.handleItemClick}
56
+              onHomepage={() => this.toConsultantDetail(item)}
57
+            >
52
             </ConsultantItem>
58
             </ConsultantItem>
53
           ))
59
           ))
54
         }
60
         }

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

155
 
155
 
156
   // 查看大图
156
   // 查看大图
157
   onPreview = (item, e) => {
157
   onPreview = (item, e) => {
158
-  
158
+
159
     var previewArr = [];
159
     var previewArr = [];
160
     for (var i = 0; i < item.length; i++) {
160
     for (var i = 0; i < item.length; i++) {
161
       previewArr.push(item[i].url);
161
       previewArr.push(item[i].url);
162
     }
162
     }
163
-   
163
+
164
     Taro.previewImage({
164
     Taro.previewImage({
165
       current: previewArr,
165
       current: previewArr,
166
       urls: previewArr
166
       urls: previewArr
214
                 <View className="name">{houseDetail.apartmentName || ' '}</View>
214
                 <View className="name">{houseDetail.apartmentName || ' '}</View>
215
                 <View className="btn" onClick={() => this.handleChat(houseDetail.buildingId)}>询问优惠</View>
215
                 <View className="btn" onClick={() => this.handleChat(houseDetail.buildingId)}>询问优惠</View>
216
                 {
216
                 {
217
-                  taRaise.displayHousePrice && <View className="price"> 现价:{houseDetail.price}万</View>
217
+                  (taRaise.displayHousePrice || houseDetail.displayHousePrice) && <View className="price"> 现价:{houseDetail.price}万</View>
218
                 }
218
                 }
219
 
219
 
220
                 {houseDetail.apartmentName &&
220
                 {houseDetail.apartmentName &&

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

11
 import NextStep from './NextStep'
11
 import NextStep from './NextStep'
12
 import { fetch, apis } from '@/utils/request'
12
 import { fetch, apis } from '@/utils/request'
13
 import Captcha from './Captcha'
13
 import Captcha from './Captcha'
14
-import { raiseOrder, cancelOrder, queryPreselectionRecord } from '@/services/project'
14
+import { raiseOrder, cancelOrder, queryPreselectionRecord, raiseOffline } from '@/services/project'
15
 import { getCodeMessage, checkCaptcha } from '@/services/getCode'
15
 import { getCodeMessage, checkCaptcha } from '@/services/getCode'
16
 import { checkIDCard, isEmpty } from '@/utils/tools'
16
 import { checkIDCard, isEmpty } from '@/utils/tools'
17
 import ContactConsultant from '../../components/ContactConsultant'
17
 import ContactConsultant from '../../components/ContactConsultant'
223
     const { house: { raiseCart } } = this.props
223
     const { house: { raiseCart } } = this.props
224
     const { raiseProfile = {} } = this.state
224
     const { raiseProfile = {} } = this.state
225
     const disabled = raiseProfile.houseLockingType === 'auto'
225
     const disabled = raiseProfile.houseLockingType === 'auto'
226
-
227
     return (
226
     return (
228
       <ScrollView scrollY className="container">
227
       <ScrollView scrollY className="container">
229
         {
228
         {
597
     }
596
     }
598
 
597
 
599
     if (payType === 'offLine') {
598
     if (payType === 'offLine') {
600
-      return Promise.resolve()
599
+      const paramsId = this.$router.params.raiseRecordId || record.raiseRecordId
600
+      return new Promise((resolve, reject) => {
601
+        raiseOffline(paramsId).then(res => {
602
+          resolve()
603
+        }).catch(err => {
604
+          reject()
605
+        })
606
+      })
601
     }
607
     }
602
 
608
 
603
     const params = {
609
     const params = {
620
             resolve()
626
             resolve()
621
           },
627
           },
622
           fail(err) {
628
           fail(err) {
623
-            console.log(err, "errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr")
624
 
629
 
625
             cancelOrder(params).then(res => { })
630
             cancelOrder(params).then(res => { })
626
 
631
 

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

52
 
52
 
53
   // 查看所有认筹房源
53
   // 查看所有认筹房源
54
   viewAllHouses = () => {
54
   viewAllHouses = () => {
55
-    const { id} = this.$router.params
55
+    const { id } = this.$router.params
56
     Taro.navigateTo({
56
     Taro.navigateTo({
57
       url: `/onlineSelling/pages/raiseProfile/houseResource?raiseRecordId=${id}`
57
       url: `/onlineSelling/pages/raiseProfile/houseResource?raiseRecordId=${id}`
58
     })
58
     })
60
 
60
 
61
   renderHead() {
61
   renderHead() {
62
     const { houseList } = this.state
62
     const { houseList } = this.state
63
+    console.log(houseList,"houseListhouseListhouseListhouseListhouseList")
63
     return (
64
     return (
64
       <Block>
65
       <Block>
65
         <View className="head flexSpace">
66
         <View className="head flexSpace">
202
     // 缴费信息
203
     // 缴费信息
203
     const payInfo = [
204
     const payInfo = [
204
       { head: '缴费方式', body: `${raiseDeatil.payType == 'onLine' ? '线上缴费' : '线下缴费'}` },
205
       { head: '缴费方式', body: `${raiseDeatil.payType == 'onLine' ? '线上缴费' : '线下缴费'}` },
205
-      { head: '实际支付费用', body: this.regFenToYuan(orderDetail.totalFee) + '元' },
206
+      { head: '实际支付费用', body: raiseDeatil.payType == 'onLine' ? this.regFenToYuan(orderDetail.totalFee) + '元' : this.regFenToYuan(raiseOrder.raisePrice) },
206
       { head: '缴费成功时间', body: dayjs(orderDetail.payTime).format('YYYY/MM/DD HH:mm:ss') },
207
       { head: '缴费成功时间', body: dayjs(orderDetail.payTime).format('YYYY/MM/DD HH:mm:ss') },
207
     ]
208
     ]
208
 
209
 
220
     const otherInfo = [
221
     const otherInfo = [
221
       { head: '其他信息', body: '供核对数据使用' },
222
       { head: '其他信息', body: '供核对数据使用' },
222
       { head: '认筹单编号', body: raiseDeatil.raiseRecordId || '', action: true },
223
       { head: '认筹单编号', body: raiseDeatil.raiseRecordId || '', action: true },
223
-      { head: '缴费单编号', body: orderDetail.tradeNo || '', action: true, hide: (raiseDeatil.payStatus != 'refunded' && raiseDeatil.payStatus != 'paid') },
224
-      { head: '退费单编号', body: refundOrder.refundNo || '', action: true, hide: raiseDeatil.payStatus != 'refunded' },
224
+      { head: '缴费单编号', body: raiseDeatil.orderId || '', action: true, hide: (raiseDeatil.payStatus != 'refunded' && raiseDeatil.payStatus != 'paid') || raiseDeatil.payType != 'onLine' },
225
+      { head: '退费单编号', body: refundOrder.orderId || '', action: true, hide: raiseDeatil.payStatus != 'refunded' },
225
     ]
226
     ]
226
 
227
 
227
 
228
 

+ 1
- 3
src/onlineSelling/pages/records/index.js View File

230
                 {
230
                 {
231
                   raiseList.map(item => (
231
                   raiseList.map(item => (
232
                     <View key={item.raiseRecordId} >
232
                     <View key={item.raiseRecordId} >
233
-                      <RaiseCard handleCard={() => this.toRaiseProfile(item.raiseRecordId)} summary={item} />
233
+                      <RaiseCard handleCard={() => this.toRaiseProfile(item.raiseRecordId)} summary={item} statusType="raise" />
234
                     </View>
234
                     </View>
235
                   )
235
                   )
236
                   )
236
                   )
261
 
261
 
262
     }, () => {
262
     }, () => {
263
       if (this.state.salesBatchId) {
263
       if (this.state.salesBatchId) {
264
-        console.log('hhhhhhhhhhhhhh')
265
         this.loadAparamentType(this.state.salesBatchId)
264
         this.loadAparamentType(this.state.salesBatchId)
266
       } else {
265
       } else {
267
-        console.log('hjjjjjjjjjjjhhhh')
268
         this.setState({
266
         this.setState({
269
           apartmentList: [{ apartmentName: '请选择', apartmentId: '' }]
267
           apartmentList: [{ apartmentName: '请选择', apartmentId: '' }]
270
         })
268
         })

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

33
  * @param {*} id
33
  * @param {*} id
34
  */
34
  */
35
 export const queryRaiseDetail = id => fetch({ url: `${API_RATSE_DETAIL}/${id}` })
35
 export const queryRaiseDetail = id => fetch({ url: `${API_RATSE_DETAIL}/${id}` })
36
+/**
37
+ * 认筹单线下缴费
38
+ * @param {*} id
39
+ */
40
+export const raiseOffline = id => fetch({ url: `${API_RATSE_DETAIL}/${id}`, method: 'PUT' })
36
 /**
41
 /**
37
  * 获取房源列表滚动提示
42
  * 获取房源列表滚动提示
38
  * @param {*} id
43
  * @param {*} id

+ 1
- 2
src/useless/pages/agent/recommend/index.js View File

102
       this.setState({
102
       this.setState({
103
         recordId: res.recordId
103
         recordId: res.recordId
104
       })
104
       })
105
-      console.log('新增客户')
106
     })
105
     })
107
   }
106
   }
108
   componentWillUnmount() {
107
   componentWillUnmount() {
499
     const visable = (!phone && !tel)
498
     const visable = (!phone && !tel)
500
 
499
 
501
     return (
500
     return (
502
-      <View style="width:100%;height:100%">
501
+      <View style="width:100%;height:100vh">
503
         {visable ? this.renderLogin() : this.renderDetail()}
502
         {visable ? this.renderLogin() : this.renderDetail()}
504
       </View>
503
       </View>
505
     );
504
     );