浏览代码

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

xujing 5 年前
父节点
当前提交
7a9a53648f

+ 4
- 4
config/dev.js 查看文件

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://127.0.0.1:8080"',
15
+    WSS_HOST: '"ws://127.0.0.1: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
config/prod.js 查看文件

11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.12'
14
+    Version: 'V3.5.13'
15
   },
15
   },
16
   weapp: {},
16
   weapp: {},
17
   h5: {}
17
   h5: {}

+ 7
- 3
src/onlineSelling/components/RaiseCard/index.js 查看文件

7
 import './index.scss'
7
 import './index.scss'
8
 
8
 
9
 export default function RaiseCard(props) {
9
 export default function RaiseCard(props) {
10
-  const {
10
+  let {
11
     buildingName,
11
     buildingName,
12
     termName,
12
     termName,
13
     blockName,
13
     blockName,
27
     taRaise = {},
27
     taRaise = {},
28
     buildingImgList = [],
28
     buildingImgList = [],
29
   } = props.summary || {}
29
   } = props.summary || {}
30
-  const defHouse = taHousingResourcesList[0] || {}
31
 
30
 
31
+  if (!taRaise) {
32
+    taRaise = {}
33
+  }
34
+
35
+  const defHouse = taHousingResourcesList[0] || {}
32
   const title = `${buildingName || defHouse.buildingName || ''} ${termName || defHouse.termName || ''} ${blockName || defHouse.blockName || ''} ${unitName || defHouse.unitName || ''} ${roomName || defHouse.roomName || ' '}`
36
   const title = `${buildingName || defHouse.buildingName || ''} ${termName || defHouse.termName || ''} ${blockName || defHouse.blockName || ''} ${unitName || defHouse.unitName || ''} ${roomName || defHouse.roomName || ' '}`
33
   const thumb = (buildingImgList || []).length
37
   const thumb = (buildingImgList || []).length
34
   const thumb2 = (apartmentImgList || []).length
38
   const thumb2 = (apartmentImgList || []).length
39
   const copyData = (e) => {
43
   const copyData = (e) => {
40
     e.stopPropagation()
44
     e.stopPropagation()
41
     Taro.setClipboardData({
45
     Taro.setClipboardData({
42
-      data: houseId,
46
+      data: `${houseId}`,
43
       onSuccess: (() => { }),
47
       onSuccess: (() => { }),
44
     })
48
     })
45
   }
49
   }

+ 2
- 2
src/onlineSelling/pages/detail/index.js 查看文件

216
               <Statement style="margin: 104rpx 0 30rpx 0" />
216
               <Statement style="margin: 104rpx 0 30rpx 0" />
217
               <View style="padding: 0 30rpx;">
217
               <View style="padding: 0 30rpx;">
218
                 {
218
                 {
219
-                  houseDetail.raiseBtn && <View>
219
+                  houseDetail.preselectionBtn && <View>
220
                     {!houseDetail.isPreselect ?
220
                     {!houseDetail.isPreselect ?
221
                       <View className="choose-btn" onClick={() => this.open()}>
221
                       <View className="choose-btn" onClick={() => this.open()}>
222
                         预选此房源
222
                         预选此房源
227
                   </View>
227
                   </View>
228
                 }
228
                 }
229
 
229
 
230
-                {houseDetail.preselectionBtn && <View className="raise-btn" onClick={() => this.toRaiseMoney()}>
230
+                {houseDetail.raiseBtn && <View className="raise-btn" onClick={() => this.toRaiseMoney()}>
231
                   认筹此房源
231
                   认筹此房源
232
               </View>}
232
               </View>}
233
               </View>
233
               </View>

+ 32
- 7
src/onlineSelling/pages/houseCart/index.js 查看文件

9
 import ready from '@/utils/ready'
9
 import ready from '@/utils/ready'
10
 import { connect } from '@tarojs/redux'
10
 import { connect } from '@tarojs/redux'
11
 import * as houseActions from '@/actions/house'
11
 import * as houseActions from '@/actions/house'
12
+import { fetch, apis } from '@/utils/request'
13
+
14
+const getRaiseProfile = ({ salesBatchId, raiseRecordId, personId }) => {
15
+  const queryString = [
16
+    `${raiseRecordId ? 'raiseRecordId=' + raiseRecordId : ''}`,
17
+    `${salesBatchId ? 'salesBatchId=' + salesBatchId : ''}`,
18
+    `${personId ? 'personId=' + personId : ''}`,
19
+  ].filter(Boolean).join('&')
20
+
21
+  return fetch({ url: `${apis.API_RAISE_PROFILE}?${queryString}` })
22
+}
12
 
23
 
13
 @connect(
24
 @connect(
14
   ({ user, house }) => ({ ...user, house }),
25
   ({ user, house }) => ({ ...user, house }),
24
     dataType: 1, // maybe need change  1 预选, 2 认筹
35
     dataType: 1, // maybe need change  1 预选, 2 认筹
25
     houseList: [],
36
     houseList: [],
26
     chooseList: [], // 已经选择的房源列表
37
     chooseList: [], // 已经选择的房源列表
27
-    collapsed: true, // 已选列表默认关闭, true 关闭, false 开启 
38
+    collapsed: true,      // 已选列表默认关闭, true 关闭, false 开启
39
+    multiSelect: true,  // 是否多选, 自动锁房是单选
28
   }
40
   }
29
 
41
 
30
   componentWillMount () {
42
   componentWillMount () {
31
     ready.queue(() => {
43
     ready.queue(() => {
32
       const { userInfo, house } = this.props
44
       const { userInfo, house } = this.props
33
-      const { id: salesBatchId } = this.$router.params
45
+      const { id: salesBatchId, multi } = this.$router.params
34
 
46
 
35
       const params = {
47
       const params = {
36
         salesBatchId,
48
         salesBatchId,
37
         pageNum: 1,
49
         pageNum: 1,
38
         pageSize: 9999,
50
         pageSize: 9999,
39
       }
51
       }
52
+
40
       queryHouseList(params).then(res => {
53
       queryHouseList(params).then(res => {
41
         this.setState({
54
         this.setState({
42
           houseList: this.groupHouseList(res) || [],
55
           houseList: this.groupHouseList(res) || [],
44
         })
57
         })
45
       })
58
       })
46
 
59
 
60
+      // 获取认筹信息
61
+      // getRaiseProfile(salesBatchId, undefined, userInfo.person.personId)
62
+
47
       if (house.raiseCart && house.raiseCart.length) {
63
       if (house.raiseCart && house.raiseCart.length) {
48
         this.setState({ chooseList: house.raiseCart })
64
         this.setState({ chooseList: house.raiseCart })
49
       }
65
       }
66
+
67
+      this.setState({ multiSelect: multi !== 'false' })
50
     })
68
     })
51
   }
69
   }
52
   
70
   
119
       return;
137
       return;
120
     }
138
     }
121
 
139
 
122
-    const { chooseList } = this.state
140
+    const { chooseList, multiSelect } = this.state
123
     const checked = (chooseList || []).filter(x => x.houseId == room.houseId)[0]
141
     const checked = (chooseList || []).filter(x => x.houseId == room.houseId)[0]
124
 
142
 
125
     if (checked) {
143
     if (checked) {
126
       this.setState({ chooseList: chooseList.filter(x => x.houseId != room.houseId) })
144
       this.setState({ chooseList: chooseList.filter(x => x.houseId != room.houseId) })
127
     } else {
145
     } else {
128
-      this.setState({ chooseList: chooseList.concat(room) })
129
-    }    
146
+      if (multiSelect) {
147
+        this.setState({ chooseList: chooseList.concat(room) })
148
+      } else {
149
+        this.setState({ chooseList: [room] })
150
+      }
151
+    }
130
   }
152
   }
131
 
153
 
132
   // 确认选择
154
   // 确认选择
150
 
172
 
151
   // 取消选择
173
   // 取消选择
152
   subChooseList = (house) => {
174
   subChooseList = (house) => {
175
+    const name = [house.termName, house.blockName, house.unitName, house.floorName, house.roomName].join('')
176
+    const { chooseList } = this.state
177
+
153
     Taro.showModal({
178
     Taro.showModal({
154
       title: '取消选择',
179
       title: '取消选择',
155
-      content: `确认取消 ${house.name} ?`,
180
+      content: `确认取消 ${name} ?`,
156
       success: (res) => {
181
       success: (res) => {
157
         if (res.confirm) {
182
         if (res.confirm) {
158
-          // TODO: 取消房源选择
183
+          this.setState({ chooseList: chooseList.filter(x => x.houseId != house.houseId) })
159
         }
184
         }
160
       }
185
       }
161
     })
186
     })

+ 10
- 5
src/onlineSelling/pages/raiseMoney/index.js 查看文件

159
 
159
 
160
   gotoHouseSelect = (pageType) => {
160
   gotoHouseSelect = (pageType) => {
161
     const { raiseProfile } = this.state
161
     const { raiseProfile } = this.state
162
+    const isMulti = raiseProfile.houseLockingType != 'auto'
162
 
163
 
163
     const url = pageType == 'all' ?
164
     const url = pageType == 'all' ?
164
-      `/onlineSelling/pages/houseCart/index?id=${raiseProfile.salesBatchId}` :
165
+      `/onlineSelling/pages/houseCart/index?id=${raiseProfile.salesBatchId}&multi={isMulti}` :
165
       `/onlineSelling/pages/addHouse/index?id=${raiseProfile.salesBatchId}`
166
       `/onlineSelling/pages/addHouse/index?id=${raiseProfile.salesBatchId}`
166
 
167
 
167
     Taro.navigateTo({ url })
168
     Taro.navigateTo({ url })
214
           !disabled &&
215
           !disabled &&
215
           (
216
           (
216
             <Block>
217
             <Block>
217
-              <View className="addhouse">从 <Text style="color:#F3B82E" onClick={this.gotoHouseSelect.bind(this, 'all')}>房源列表</Text> 中添加其他房源</View>
218
+              {
219
+                !raiseProfile.needPreselection &&
220
+                (<View className="addhouse">从 <Text style="color:#F3B82E" onClick={this.gotoHouseSelect.bind(this, 'all')}>房源列表</Text> 中添加其他房源</View>)
221
+              }              
218
               <View className="addhouse">从 <Text style="color:#BB9C79" onClick={this.gotoHouseSelect.bind(this, 'select')}>预选记录</Text> 中添加其他房源</View>
222
               <View className="addhouse">从 <Text style="color:#BB9C79" onClick={this.gotoHouseSelect.bind(this, 'select')}>预选记录</Text> 中添加其他房源</View>
219
             </Block>
223
             </Block>
220
           )
224
           )
522
         userId: consultant.userId,
526
         userId: consultant.userId,
523
         userName: consultant.name,
527
         userName: consultant.name,
524
       }, raiseProfile).then((res) => {
528
       }, raiseProfile).then((res) => {
529
+        this.setState({ record: res })
525
         resolve(res)
530
         resolve(res)
526
       })
531
       })
527
     })
532
     })
576
   toRaiseProfile(id) {
581
   toRaiseProfile(id) {
577
 
582
 
578
     Taro.navigateTo({
583
     Taro.navigateTo({
579
-      url: `/onlineSelling/pages/raiseProfile/index?raiseRecordId=${id}`
584
+      url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
580
     })
585
     })
581
   }
586
   }
582
   renderResult() {
587
   renderResult() {
583
-    const { raiseProfile = {}, failInfo } = this.state
588
+    const { raiseProfile = {}, record = {}, failInfo } = this.state
584
     const isOk = !failInfo
589
     const isOk = !failInfo
585
     const showIcon = isOk ? require('../../assets/success2.png') : require('../../assets/fail2.png')
590
     const showIcon = isOk ? require('../../assets/success2.png') : require('../../assets/fail2.png')
586
     const showTitle = isOk ? '提交成功' : failInfo.title
591
     const showTitle = isOk ? '提交成功' : failInfo.title
607
 
612
 
608
         <ContactConsultant buildingId={raiseProfile.buildingId} style=" position: absolute;bottom: 11vh;" />
613
         <ContactConsultant buildingId={raiseProfile.buildingId} style=" position: absolute;bottom: 11vh;" />
609
 
614
 
610
-        <View className="look-btn" onClick={() => this.toRaiseProfile(raiseProfile.raiseId)}>查看认筹单</View>
615
+        <View className="look-btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>查看认筹单</View>
611
       </View>
616
       </View>
612
 
617
 
613
     );
618
     );

+ 3
- 5
src/onlineSelling/pages/raiseProfile/index.js 查看文件

29
   }
29
   }
30
 
30
 
31
   componentWillMount() {
31
   componentWillMount() {
32
-    const { raiseRecordId } = this.$router.params
32
+    const { id: raiseRecordId } = this.$router.params
33
     queryRaiseDetail(raiseRecordId).then(res => {
33
     queryRaiseDetail(raiseRecordId).then(res => {
34
       this.setState({
34
       this.setState({
35
         buildingId: res.taRaiseRecord.buildingId,
35
         buildingId: res.taRaiseRecord.buildingId,
45
   // 复制数据
45
   // 复制数据
46
   copyData(data) {
46
   copyData(data) {
47
     Taro.setClipboardData({
47
     Taro.setClipboardData({
48
-      data,
48
+      data: `${data}`,
49
       onSuccess: (() => { }),
49
       onSuccess: (() => { }),
50
     })
50
     })
51
   }
51
   }
52
 
52
 
53
-
54
-
55
   // 查看所有认筹房源
53
   // 查看所有认筹房源
56
   viewAllHouses = () => {
54
   viewAllHouses = () => {
57
     const { raiseRecordId } = this.$router.params
55
     const { raiseRecordId } = this.$router.params
235
           {raiseDeatil.status == '0' && this.renderCancelReason()}
233
           {raiseDeatil.status == '0' && this.renderCancelReason()}
236
           {raiseDeatil.payStatus == 'unpaid' && this.renderUnpayNotice()}
234
           {raiseDeatil.payStatus == 'unpaid' && this.renderUnpayNotice()}
237
           <View className="raise-flex">
235
           <View className="raise-flex">
238
-            <View className="date">认筹提交时间  {dayjs(raiseOrder.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
236
+            <View className="date">认筹提交时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
239
             <View className="agreement" onClick={() => this.toAgreement(raiseOrder.payProtocol, raiseOrder.buildingId)}>线上选房协议<Text className="right-icon"></Text></View>
237
             <View className="agreement" onClick={() => this.toAgreement(raiseOrder.payProtocol, raiseOrder.buildingId)}>线上选房协议<Text className="right-icon"></Text></View>
240
           </View>
238
           </View>
241
           <View>
239
           <View>

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

198
       },
198
       },
199
       complete() {
199
       complete() {
200
         Taro.navigateTo({
200
         Taro.navigateTo({
201
-          url: `/onlineSelling/pages/raiseProfile/index?raiseRecordId=${id}`
201
+          url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
202
         })
202
         })
203
       }
203
       }
204
     })
204
     })