周立森 5 anni fa
parent
commit
41c1de175d
72 ha cambiato i file con 827 aggiunte e 269 eliminazioni
  1. 6
    4
      config/prod.js
  2. BIN
      src/assets/icons/amap/active_nums/number1.png
  3. BIN
      src/assets/icons/amap/active_nums/number10.png
  4. BIN
      src/assets/icons/amap/active_nums/number11.png
  5. BIN
      src/assets/icons/amap/active_nums/number12.png
  6. BIN
      src/assets/icons/amap/active_nums/number13.png
  7. BIN
      src/assets/icons/amap/active_nums/number14.png
  8. BIN
      src/assets/icons/amap/active_nums/number15.png
  9. BIN
      src/assets/icons/amap/active_nums/number16.png
  10. BIN
      src/assets/icons/amap/active_nums/number17.png
  11. BIN
      src/assets/icons/amap/active_nums/number18.png
  12. BIN
      src/assets/icons/amap/active_nums/number19.png
  13. BIN
      src/assets/icons/amap/active_nums/number2.png
  14. BIN
      src/assets/icons/amap/active_nums/number20.png
  15. BIN
      src/assets/icons/amap/active_nums/number21.png
  16. BIN
      src/assets/icons/amap/active_nums/number22.png
  17. BIN
      src/assets/icons/amap/active_nums/number23.png
  18. BIN
      src/assets/icons/amap/active_nums/number24.png
  19. BIN
      src/assets/icons/amap/active_nums/number25.png
  20. BIN
      src/assets/icons/amap/active_nums/number3.png
  21. BIN
      src/assets/icons/amap/active_nums/number4.png
  22. BIN
      src/assets/icons/amap/active_nums/number5.png
  23. BIN
      src/assets/icons/amap/active_nums/number6.png
  24. BIN
      src/assets/icons/amap/active_nums/number7.png
  25. BIN
      src/assets/icons/amap/active_nums/number8.png
  26. BIN
      src/assets/icons/amap/active_nums/number9.png
  27. BIN
      src/assets/icons/amap/nums/number1.png
  28. BIN
      src/assets/icons/amap/nums/number10.png
  29. BIN
      src/assets/icons/amap/nums/number11.png
  30. BIN
      src/assets/icons/amap/nums/number12.png
  31. BIN
      src/assets/icons/amap/nums/number13.png
  32. BIN
      src/assets/icons/amap/nums/number14.png
  33. BIN
      src/assets/icons/amap/nums/number15.png
  34. BIN
      src/assets/icons/amap/nums/number16.png
  35. BIN
      src/assets/icons/amap/nums/number17.png
  36. BIN
      src/assets/icons/amap/nums/number18.png
  37. BIN
      src/assets/icons/amap/nums/number19.png
  38. BIN
      src/assets/icons/amap/nums/number2.png
  39. BIN
      src/assets/icons/amap/nums/number20.png
  40. BIN
      src/assets/icons/amap/nums/number21.png
  41. BIN
      src/assets/icons/amap/nums/number22.png
  42. BIN
      src/assets/icons/amap/nums/number23.png
  43. BIN
      src/assets/icons/amap/nums/number24.png
  44. BIN
      src/assets/icons/amap/nums/number25.png
  45. BIN
      src/assets/icons/amap/nums/number3.png
  46. BIN
      src/assets/icons/amap/nums/number4.png
  47. BIN
      src/assets/icons/amap/nums/number5.png
  48. BIN
      src/assets/icons/amap/nums/number6.png
  49. BIN
      src/assets/icons/amap/nums/number7.png
  50. BIN
      src/assets/icons/amap/nums/number8.png
  51. BIN
      src/assets/icons/amap/nums/number9.png
  52. BIN
      src/assets/icons/amap/position.png
  53. 7
    26
      src/components/amap/PoiAround.js
  54. 105
    0
      src/components/amap/icons.js
  55. 8
    0
      src/constants/api.js
  56. 0
    1
      src/lib/amap-wx.js
  57. 5
    5
      src/pages/person/customerAnalysis/analysis.js
  58. 89
    36
      src/pages/person/customerAnalysis/followUpCustomer/index.js
  59. 21
    2
      src/pages/person/customerAnalysis/index.js
  60. 153
    7
      src/pages/person/customerAnalysis/index.scss
  61. 1
    2
      src/pages/person/customerAnalysis/item/index.js
  62. 2
    2
      src/pages/person/customerAnalysis/item/index.scss
  63. 227
    24
      src/pages/person/customerAnalysis/myCustomer.js
  64. 29
    11
      src/pages/person/customerAnalysis/transactionCustomer/index.js
  65. 1
    1
      src/pages/person/menus.js
  66. 6
    1
      src/pages/project/detail/Around/Pannel.js
  67. 11
    1
      src/pages/project/detail/Around/style.scss
  68. 14
    37
      src/pages/project/detail/index.js
  69. 81
    6
      src/pages/project/index.js
  70. 16
    4
      src/pages/shop/index.js
  71. 45
    0
      src/services/person.js
  72. 0
    99
      src/utils/amap.js

+ 6
- 4
config/prod.js Vedi File

@@ -3,10 +3,12 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"http://192.168.0.72:8080"',
7
-    WSS_HOST: '"ws://192.168.0.72:8080"',
8
-    // HOST: '"https://lt.pawoma.cn"',
9
-    // WSS_HOST: '"wss://lt.pawoma.cn"',
6
+    // HOST: '"http://192.168.0.218:8080"',
7
+    // WSS_HOST: '"ws://192.168.0.218:8080"',
8
+    // HOST:  '"https://dev.jinchengjiaye.com"',
9
+    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
+    HOST: '"https://lt.pawoma.cn"',
11
+    WSS_HOST: '"wss://lt.pawoma.cn"',
10 12
   },
11 13
   weapp: {},
12 14
   h5: {}

BIN
src/assets/icons/amap/active_nums/number1.png Vedi File


BIN
src/assets/icons/amap/active_nums/number10.png Vedi File


BIN
src/assets/icons/amap/active_nums/number11.png Vedi File


BIN
src/assets/icons/amap/active_nums/number12.png Vedi File


BIN
src/assets/icons/amap/active_nums/number13.png Vedi File


BIN
src/assets/icons/amap/active_nums/number14.png Vedi File


BIN
src/assets/icons/amap/active_nums/number15.png Vedi File


BIN
src/assets/icons/amap/active_nums/number16.png Vedi File


BIN
src/assets/icons/amap/active_nums/number17.png Vedi File


BIN
src/assets/icons/amap/active_nums/number18.png Vedi File


BIN
src/assets/icons/amap/active_nums/number19.png Vedi File


BIN
src/assets/icons/amap/active_nums/number2.png Vedi File


BIN
src/assets/icons/amap/active_nums/number20.png Vedi File


BIN
src/assets/icons/amap/active_nums/number21.png Vedi File


BIN
src/assets/icons/amap/active_nums/number22.png Vedi File


BIN
src/assets/icons/amap/active_nums/number23.png Vedi File


BIN
src/assets/icons/amap/active_nums/number24.png Vedi File


BIN
src/assets/icons/amap/active_nums/number25.png Vedi File


BIN
src/assets/icons/amap/active_nums/number3.png Vedi File


BIN
src/assets/icons/amap/active_nums/number4.png Vedi File


BIN
src/assets/icons/amap/active_nums/number5.png Vedi File


BIN
src/assets/icons/amap/active_nums/number6.png Vedi File


BIN
src/assets/icons/amap/active_nums/number7.png Vedi File


BIN
src/assets/icons/amap/active_nums/number8.png Vedi File


BIN
src/assets/icons/amap/active_nums/number9.png Vedi File


BIN
src/assets/icons/amap/nums/number1.png Vedi File


BIN
src/assets/icons/amap/nums/number10.png Vedi File


BIN
src/assets/icons/amap/nums/number11.png Vedi File


BIN
src/assets/icons/amap/nums/number12.png Vedi File


BIN
src/assets/icons/amap/nums/number13.png Vedi File


BIN
src/assets/icons/amap/nums/number14.png Vedi File


BIN
src/assets/icons/amap/nums/number15.png Vedi File


BIN
src/assets/icons/amap/nums/number16.png Vedi File


BIN
src/assets/icons/amap/nums/number17.png Vedi File


BIN
src/assets/icons/amap/nums/number18.png Vedi File


BIN
src/assets/icons/amap/nums/number19.png Vedi File


BIN
src/assets/icons/amap/nums/number2.png Vedi File


BIN
src/assets/icons/amap/nums/number20.png Vedi File


BIN
src/assets/icons/amap/nums/number21.png Vedi File


BIN
src/assets/icons/amap/nums/number22.png Vedi File


BIN
src/assets/icons/amap/nums/number23.png Vedi File


BIN
src/assets/icons/amap/nums/number24.png Vedi File


BIN
src/assets/icons/amap/nums/number25.png Vedi File


BIN
src/assets/icons/amap/nums/number3.png Vedi File


BIN
src/assets/icons/amap/nums/number4.png Vedi File


BIN
src/assets/icons/amap/nums/number5.png Vedi File


BIN
src/assets/icons/amap/nums/number6.png Vedi File


BIN
src/assets/icons/amap/nums/number7.png Vedi File


BIN
src/assets/icons/amap/nums/number8.png Vedi File


BIN
src/assets/icons/amap/nums/number9.png Vedi File


BIN
src/assets/icons/amap/position.png Vedi File


+ 7
- 26
src/components/amap/PoiAround.js Vedi File

@@ -1,7 +1,6 @@
1 1
 import Taro, { Component } from '@tarojs/taro'
2 2
 import { Map } from '@tarojs/components'
3
-
4
-const makerIcon = require('@assets/icons/blank.png')
3
+import icons from './icons'
5 4
 
6 5
 export default class PoiAround extends Component {
7 6
 
@@ -19,34 +18,16 @@ export default class PoiAround extends Component {
19 18
   render() {
20 19
     const { current } = this.state
21 20
     const markers =  (this.props.markers || []).map((marker, index) => {
21
+      const icon = icons[index].normal
22
+      const activeIcon = icons[index].active
22 23
 
23 24
       return {
24 25
         id: marker.id,
25 26
         latitude: marker.latitude,
26 27
         longitude: marker.longitude,
27
-        iconPath: makerIcon,
28
-        width: 30,
29
-        height: 30,
30
-        alpha: 0.7,
31
-        // title: index + 1,
32
-        // label: {
33
-        //   content: index + 1,
34
-        //   // borderRadius: 1000,
35
-        //   color: '#fff',
36
-        //   bgColor: '#f00',
37
-        //   textAlign: 'center',
38
-        // },
39
-        callout: {
40
-          content: index + 1 > 9 ? `${index + 1}` : `0${index + 1}`,
41
-          borderRadius: 30,
42
-          borderWidth: 2,
43
-          borderColor: '#BB9C79',
44
-          padding: 5,
45
-          color: current === marker.id ? '#fff' : '#BB9C79',
46
-          bgColor: current === marker.id ? '#BB9C79' : '#fff',
47
-          textAlign: 'center',
48
-          display: 'ALWAYS',
49
-        },
28
+        iconPath: current === marker.id ? activeIcon : icon,
29
+        width: 56,
30
+        height: 56,
50 31
       }
51 32
     })
52 33
 
@@ -57,7 +38,7 @@ export default class PoiAround extends Component {
57 38
         markers={markers}
58 39
         longitude={this.props.longitude}
59 40
         latitude={this.props.latitude}
60
-        onCalloutTap={this.handleTap}
41
+        onMarkerTap={this.handleTap}
61 42
         style={this.props.style}
62 43
       />
63 44
     )

+ 105
- 0
src/components/amap/icons.js Vedi File

@@ -0,0 +1,105 @@
1
+
2
+const icons = [
3
+  {
4
+    normal: require('@assets/icons/amap/nums/number1.png'),
5
+    active: require('@assets/icons/amap/active_nums/number1.png'),
6
+  },
7
+  {
8
+    normal: require('@assets/icons/amap/nums/number2.png'),
9
+    active: require('@assets/icons/amap/active_nums/number2.png'),
10
+  },
11
+  {
12
+    normal: require('@assets/icons/amap/nums/number3.png'),
13
+    active: require('@assets/icons/amap/active_nums/number3.png'),
14
+  },
15
+  {
16
+    normal: require('@assets/icons/amap/nums/number4.png'),
17
+    active: require('@assets/icons/amap/active_nums/number4.png'),
18
+  },
19
+  {
20
+    normal: require('@assets/icons/amap/nums/number5.png'),
21
+    active: require('@assets/icons/amap/active_nums/number5.png'),
22
+  },
23
+  {
24
+    normal: require('@assets/icons/amap/nums/number6.png'),
25
+    active: require('@assets/icons/amap/active_nums/number6.png'),
26
+  },
27
+  {
28
+    normal: require('@assets/icons/amap/nums/number7.png'),
29
+    active: require('@assets/icons/amap/active_nums/number7.png'),
30
+  },
31
+  {
32
+    normal: require('@assets/icons/amap/nums/number8.png'),
33
+    active: require('@assets/icons/amap/active_nums/number8.png'),
34
+  },
35
+  {
36
+    normal: require('@assets/icons/amap/nums/number9.png'),
37
+    active: require('@assets/icons/amap/active_nums/number9.png'),
38
+  },
39
+  {
40
+    normal: require('@assets/icons/amap/nums/number10.png'),
41
+    active: require('@assets/icons/amap/active_nums/number10.png'),
42
+  },
43
+  {
44
+    normal: require('@assets/icons/amap/nums/number11.png'),
45
+    active: require('@assets/icons/amap/active_nums/number11.png'),
46
+  },
47
+  {
48
+    normal: require('@assets/icons/amap/nums/number12.png'),
49
+    active: require('@assets/icons/amap/active_nums/number12.png'),
50
+  },
51
+  {
52
+    normal: require('@assets/icons/amap/nums/number13.png'),
53
+    active: require('@assets/icons/amap/active_nums/number13.png'),
54
+  },
55
+  {
56
+    normal: require('@assets/icons/amap/nums/number14.png'),
57
+    active: require('@assets/icons/amap/active_nums/number14.png'),
58
+  },
59
+  {
60
+    normal: require('@assets/icons/amap/nums/number15.png'),
61
+    active: require('@assets/icons/amap/active_nums/number15.png'),
62
+  },
63
+  {
64
+    normal: require('@assets/icons/amap/nums/number16.png'),
65
+    active: require('@assets/icons/amap/active_nums/number16.png'),
66
+  },
67
+  {
68
+    normal: require('@assets/icons/amap/nums/number17.png'),
69
+    active: require('@assets/icons/amap/active_nums/number17.png'),
70
+  },
71
+  {
72
+    normal: require('@assets/icons/amap/nums/number18.png'),
73
+    active: require('@assets/icons/amap/active_nums/number18.png'),
74
+  },
75
+  {
76
+    normal: require('@assets/icons/amap/nums/number19.png'),
77
+    active: require('@assets/icons/amap/active_nums/number19.png'),
78
+  },
79
+  {
80
+    normal: require('@assets/icons/amap/nums/number20.png'),
81
+    active: require('@assets/icons/amap/active_nums/number20.png'),
82
+  },
83
+  {
84
+    normal: require('@assets/icons/amap/nums/number21.png'),
85
+    active: require('@assets/icons/amap/active_nums/number21.png'),
86
+  },
87
+  {
88
+    normal: require('@assets/icons/amap/nums/number22.png'),
89
+    active: require('@assets/icons/amap/active_nums/number22.png'),
90
+  },
91
+  {
92
+    normal: require('@assets/icons/amap/nums/number23.png'),
93
+    active: require('@assets/icons/amap/active_nums/number23.png'),
94
+  },
95
+  {
96
+    normal: require('@assets/icons/amap/nums/number24.png'),
97
+    active: require('@assets/icons/amap/active_nums/number24.png'),
98
+  },
99
+  {
100
+    normal: require('@assets/icons/amap/nums/number25.png'),
101
+    active: require('@assets/icons/amap/active_nums/number25.png'),
102
+  },
103
+]
104
+
105
+export default icons;

+ 8
- 0
src/constants/api.js Vedi File

@@ -166,3 +166,11 @@ export const API_CHECKIN_ACTIVE = resolvePath('buildingDynamicCheckin')
166 166
 export const API_GROUP_DETAIL = resolvePath('taShareActivity')
167 167
 export const API_GROUP_CREATE = resolvePath('taShareRecord')
168 168
 export const API_GROUP_JOIN = resolvePath('taShareChildRecord')
169
+
170
+//person
171
+export const API_MY_CUSTOMER = resolvePath('inventory/customer/statistics')
172
+export const API_CUSTOMER_LIST = resolvePath('inventory/customer/statistics')
173
+export const API_CUSTOMER_DETAIL = resolvePath('inventory/customer')
174
+export const API_VISIT_RECORD = resolvePath('taPersonVisitRecord')
175
+export const API_ACTIVITY_LIST_CUSTOMER = resolvePath('customer/activity/list')
176
+export const API_FOLLOW_LIST = resolvePath('taCustomerFollowUpRecord')

+ 0
- 1
src/lib/amap-wx.js
File diff suppressed because it is too large
Vedi File


+ 5
- 5
src/pages/person/customerAnalysis/analysis.js Vedi File

@@ -1,8 +1,8 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import Authorize from '@components/authorize'
3 3
 import { View } from "@tarojs/components";
4
-import MoveChart from '../../components/MoveChart'
5
-import LineChart from '../../components/LineChart'
4
+// import MoveChart from '../../More/More'
5
+// import LineChart from '../../components/LineChart'
6 6
 import './index.scss'
7 7
 import { AtTabs, AtTabsPane, AtProgress } from 'taro-ui'
8 8
 import "taro-ui/dist/style/components/tabs.scss"
@@ -44,10 +44,11 @@ export default class analysis extends Taro.Component {
44 44
         <AtTabs className="tab-bar" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
45 45
           <AtTabsPane current={this.state.current} index={0} >
46 46
             <View>
47
-              <View className="sex-box">
47
+              {/* <MoveChart/> */}
48
+              {/* <View className="sex-box">
48 49
                 <View className="sex">性别</View>
49 50
                 <AtProgress percent={25} strokeWidth={6} color='#FF4949' />
50
-              </View>
51
+              </View> */}
51 52
             </View>
52 53
           </AtTabsPane>
53 54
           <AtTabsPane current={this.state.current} index={1}>
@@ -57,7 +58,6 @@ export default class analysis extends Taro.Component {
57 58
             <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页三的内容</View>
58 59
           </AtTabsPane>
59 60
         </AtTabs>
60
-
61 61
       </View>
62 62
     )
63 63
   }

+ 89
- 36
src/pages/person/customerAnalysis/followUpCustomer/index.js Vedi File

@@ -4,6 +4,7 @@ import './index.scss'
4 4
 import { savePoint, updatePoint } from '@services/common'
5 5
 import { connect } from '@tarojs/redux'
6 6
 import { View, Text, Picker } from '@tarojs/components';
7
+import { queryCustomerList } from '@services/person'
7 8
 const iconImg = require('@assets/person/icon.png')
8 9
 
9 10
 @connect(({ user, city }) => ({ user, city }))
@@ -13,36 +14,82 @@ export default class transactionCustomer extends Taro.Component {
13 14
     navigationBarTitleText: '跟进客户'
14 15
   }
15 16
 
17
+
16 18
   state = {
17
-    list: [
18
-      { name: '刘丽丽', phone: '15852364821', sex: '1' },
19
-      { name: '邓亚平', phone: '13160056061', sex: '2' },
20
-    ],
21 19
     recordId: undefined, // 埋点ID
20
+    customerList: [],
22 21
     inputValue: '',
23 22
     screenVisible: false,
24
-    statusList: ['全部状态', '认筹', '到访', '签约'],
23
+    statusList: ['全部状态', '报备', '到访', '认筹'],
25 24
     statusIndex: -1,
26
-    visitDate: '',
27
-    visitDate2: '',
28
-    reportDate: '',
29
-    reportDate2: '',
25
+    startArrivalDate: '',
26
+    endArrivalDate: '',
27
+    startReportDate : '',
28
+    endReportDate: '',
30 29
   }
31 30
 
32 31
   componentWillUnmount() {
33 32
     const { recordId } = this.state
34 33
     recordId && updatePoint(recordId)
35 34
   }
35
+  componentDidShow() {
36
+    Taro.showLoading()
37
+    this.loadList()
38
+
39
+  }
40
+  loadList() {
41
+    const payload = {
42
+      type: 'follow',
43
+      pageNumber: 0,
44
+      pageSize: 9999
45
+    }
46
+    queryCustomerList(payload.type, payload).then(res => {
47
+
48
+      this.setState({
49
+        customerList: res.records || []
50
+      })
51
+      Taro.hideLoading()
52
+    })
53
+  }
54
+
55
+
36 56
   changeInput = e => {
37 57
     this.setState({
38 58
       inputValue: e.detail.value
39 59
     })
40 60
   }
41 61
   searchBtn() {
42
-    const palyload = {
43
-      inputValue: this.state.inputValue
62
+    // const playload = {
63
+    //   inputValue: this.state.inputValue
64
+    // }
65
+    this.filterCustomerList();
66
+   
67
+  }
68
+  filterCustomerList(){
69
+
70
+    const payload = {
71
+      type: 'follow',
72
+      pageNumber: 0,
73
+      pageSize: 9999,
74
+      status:this.state.statusIndex!=0?this.state.statusIndex:'',
75
+      startArrivalDate:this.state.startArrivalDate,
76
+      endArrivalDate: this.state.endArrivalDate,
77
+      startReportDate : this.state.startReportDate,
78
+      endReportDate: this.state.endReportDate,
44 79
     }
45
-    console.log(this.state.inputValue, "inputValue")
80
+    queryCustomerList(payload.type, payload).then(res => {
81
+
82
+      this.setState({
83
+        customerList: res.records || []
84
+      })
85
+      Taro.hideLoading()
86
+    })
87
+  }
88
+  saveBtn() {
89
+    this.filterCustomerList();
90
+    this.setState({
91
+      screenVisible: false,
92
+    })
46 93
   }
47 94
   screenShow() {
48 95
     this.setState({
@@ -57,41 +104,42 @@ export default class transactionCustomer extends Taro.Component {
57 104
   }
58 105
   onVisitDateChange = e => {
59 106
     this.setState({
60
-      visitDate: e.detail.value
107
+      startArrivalDate: e.detail.value
61 108
     })
62 109
   }
63 110
   onVisitDateChange2 = e => {
64 111
     this.setState({
65
-      visitDate2: e.detail.value
112
+      endArrivalDate: e.detail.value
66 113
     })
67 114
   }
68 115
   onReportDateChange = e => {
69 116
     this.setState({
70
-      reportDate: e.detail.value
117
+      startReportDate : e.detail.value
71 118
     })
72 119
   }
73 120
   onReportDateChange2 = e => {
74 121
     this.setState({
75
-      reportDate2: e.detail.value
76
-    })
77
-  }
78
-  saveBtn() {
79
-    this.setState({
80
-      screenVisible: false,
122
+      endReportDate: e.detail.value
81 123
     })
82 124
   }
125
+ 
83 126
   cancelBtn() {
84 127
     this.setState({
85 128
       screenVisible: false,
129
+      statusIndex: -1,
130
+      startArrivalDate: '',
131
+      endArrivalDate: '',
132
+      startReportDate : '',
133
+      endReportDate: '',
86 134
     })
87 135
   }
88
-  toMyCustomer() {
136
+  toMyCustomer(customerId) {
89 137
     Taro.navigateTo({
90
-      url: `/pages/person/customerAnalysis/myCustomer`
138
+      url: `/pages/person/customerAnalysis/myCustomer?customerId=`+customerId
91 139
     })
92 140
   }
93 141
   renderScreenBox() {
94
-    const { statusList, statusIndex, visitDate, visitDate2, reportDate, reportDate2 } = this.state
142
+    const { statusList, statusIndex, startArrivalDate, endArrivalDate, startReportDate , endReportDate } = this.state
95 143
     return (
96 144
       <View className="mask">
97 145
         <View className="content">
@@ -107,13 +155,13 @@ export default class transactionCustomer extends Taro.Component {
107 155
             到访时间:
108 156
               <Picker mode='date' onChange={this.onVisitDateChange}>
109 157
               <View className='picker'>
110
-                {visitDate}
111
-                {!visitDate && <Text className="placeholder">起始时间</Text>}
158
+                {startArrivalDate}
159
+                {!startArrivalDate && <Text className="placeholder">起始时间</Text>}
112 160
               </View>
113 161
             </Picker>-<Picker mode='date' onChange={this.onVisitDateChange2}>
114 162
               <View className='picker'>
115
-                {visitDate2}
116
-                {!visitDate2 && <Text className="placeholder">结束时间</Text>}
163
+                {endArrivalDate}
164
+                {!endArrivalDate && <Text className="placeholder">结束时间</Text>}
117 165
               </View>
118 166
             </Picker>
119 167
           </View>
@@ -121,13 +169,13 @@ export default class transactionCustomer extends Taro.Component {
121 169
             报备时间:
122 170
               <Picker mode='date' onChange={this.onReportDateChange}>
123 171
               <View className='picker'>
124
-                {reportDate}
125
-                {!reportDate && <Text className="placeholder">起始时间</Text>}
172
+                {startReportDate }
173
+                {!startReportDate  && <Text className="placeholder">起始时间</Text>}
126 174
               </View>
127 175
             </Picker>-<Picker mode='date' onChange={this.onReportDateChange2}>
128 176
               <View className='picker'>
129
-                {reportDate2}
130
-                {!reportDate2 && <Text className="placeholder">结束时间</Text>}
177
+                {endReportDate}
178
+                {!endReportDate && <Text className="placeholder">结束时间</Text>}
131 179
               </View>
132 180
             </Picker>
133 181
           </View>
@@ -147,7 +195,7 @@ export default class transactionCustomer extends Taro.Component {
147 195
   }
148 196
 
149 197
   render() {
150
-    const { list, screenVisible } = this.state
198
+    const { customerList, screenVisible } = this.state
151 199
 
152 200
     return (
153 201
       <View>
@@ -161,9 +209,14 @@ export default class transactionCustomer extends Taro.Component {
161 209
         </View>
162 210
         <View style="padding:10px">
163 211
           {
164
-            list.map((item, index) => (
165
-              <View class="item" key={index + 'list'} onClick={this.toMyCustomer}>
166
-                <Image src={require('@assets/default-avatar.png')} className='img'></Image>
212
+            !customerList.length &&
213
+            <View style="margin:50px auto;text-align:center;font-size:14px;color:#888">暂无跟进客户~</View>
214
+          }
215
+          {
216
+            customerList.length &&
217
+            customerList.map((item, index) => (
218
+              <View class="item" key={index + 'customerList'} onClick={this.toMyCustomer.bind(this,item.customerId)}>
219
+                <Image src={item.picture || require('@assets/default-avatar.png')} className='img'></Image>
167 220
                 <View className="name">
168 221
                   {item.name}
169 222
                   {

+ 21
- 2
src/pages/person/customerAnalysis/index.js Vedi File

@@ -4,6 +4,7 @@ import './index.scss'
4 4
 import { AtTabs, AtTabsPane } from 'taro-ui'
5 5
 import "taro-ui/dist/style/components/tabs.scss"
6 6
 import { savePoint, updatePoint } from '@services/common'
7
+import { queryMyCustomer } from '@services/person'
7 8
 import { connect } from '@tarojs/redux'
8 9
 import Analysis from './analysis'
9 10
 
@@ -17,12 +18,29 @@ export default class customer extends Taro.Component {
17 18
   state = {
18 19
     current: 0,
19 20
     recordId: undefined, // 埋点ID
21
+    customerNum: {},
20 22
   }
21 23
 
22 24
   componentWillUnmount() {
23 25
     const { recordId } = this.state
24 26
     recordId && updatePoint(recordId)
25 27
   }
28
+  componentDidShow() {
29
+    Taro.showLoading()
30
+    this.loadInfo()
31
+
32
+  }
33
+
34
+  loadInfo() {
35
+    queryMyCustomer().then(res => {
36
+
37
+      this.setState({
38
+        customerNum: res || {}
39
+      })
40
+      Taro.hideLoading()
41
+    })
42
+  }
43
+
26 44
 
27 45
   handleClick(value) {
28 46
     this.setState({
@@ -42,6 +60,7 @@ export default class customer extends Taro.Component {
42 60
 
43 61
   render() {
44 62
     const tabList = [{ title: '客户分析' }, { title: '我的客户' }]
63
+    const { customerNum } = this.state
45 64
     return (
46 65
       <AtTabs className="tab-box" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
47 66
         <AtTabsPane current={this.state.current} index={0} >
@@ -54,12 +73,12 @@ export default class customer extends Taro.Component {
54 73
             <View className="my-customer" onClick={this.toFollowUpCustomer} style="border-right:1px solid rgba(0,0,0,0.12)">
55 74
               <Image mode="widthFix" src={require('@assets/person/genjin.png')} className='img'></Image>
56 75
               <View className="name">跟进客户</View>
57
-              <View className="num">33人</View>
76
+              <View className="num">{customerNum.followSum || 0}人</View>
58 77
             </View>
59 78
             <View className="my-customer" onClick={this.toTransactionCustomer}>
60 79
               <Image mode="widthFix" src={require('@assets/person/chengjiao.png')} className='img'></Image>
61 80
               <View className="name">成交客户</View>
62
-              <View className="name">33人</View>
81
+              <View className="name">{customerNum.clinchSum || 0}人</View>
63 82
             </View>
64 83
           </View>
65 84
         </AtTabsPane>

+ 153
- 7
src/pages/person/customerAnalysis/index.scss Vedi File

@@ -6,6 +6,8 @@
6 6
   height:100vh;
7 7
 }
8 8
 
9
+
10
+
9 11
 .tab-box{
10 12
   .at-tabs__header{
11 13
     width: 86%;
@@ -17,19 +19,24 @@
17 19
   .at-tabs__item{
18 20
     width:50%;
19 21
     flex: none;
20
-    color: #666;
22
+    color: $primary-color;
21 23
     font-size: 28px;
22 24
   }
25
+  .at-tabs__item:nth-child(2n+1){
26
+    border-radius: 44px 0 0 44px;
27
+  }
28
+  .at-tabs__item:nth-child(2n+2){
29
+    border-radius:0 44px 44px 0;
30
+  }
23 31
   .at-tabs__item--active{
24 32
     color: $primary-color;
25 33
     background-color: #f4f4f4;
26
-    border-radius: 0 44px 44px 0;
27 34
   }
28 35
   .at-tabs__item-underline{
29
-    height: 0px;
36
+    height: 0;
30 37
   }
31 38
   .at-tabs__underline{
32
-    height: 0px!important;
39
+    height: 0!important;
33 40
   }
34 41
   .my-customer{
35 42
     flex: 0 0 50%;
@@ -49,7 +56,7 @@
49 56
 
50 57
   }
51 58
   .tab-bar{
52
-    margin-top: 50px;
59
+    margin-top: 30px;
53 60
     .at-tabs__header{
54 61
       width: 80%;
55 62
       background-color: none;
@@ -70,12 +77,11 @@
70 77
       background-color: #fff;
71 78
     }
72 79
     .at-tabs__item-underline{
73
-      height: 2px;
80
+      height: 4px;
74 81
       background-color: $primary-color;
75 82
       width: 60%;
76 83
       margin-left: 20%;
77 84
     }
78
-  
79 85
   }
80 86
 }
81 87
 
@@ -111,6 +117,9 @@
111 117
     position: absolute;
112 118
     top:76px;
113 119
     left:320px;
120
+    display: flex;
121
+    align-items: center;
122
+    max-width: 200px;
114 123
   }
115 124
   .user__left__phone{
116 125
     font-size:32px;
@@ -221,3 +230,140 @@
221 230
     // }
222 231
     
223 232
   }
233
+  .mask {
234
+    position: fixed;
235
+    width: 100vw;
236
+    height: 100vh;
237
+    left: 0;
238
+    top: 0;
239
+    z-index: 9999;
240
+    background:rgba(0,0,0,0.22);
241
+    .base-con{
242
+      width: 94%;
243
+      height:610px;
244
+      position: absolute;
245
+      left: 3%;
246
+      top: 50%;
247
+      background-color: #fff;
248
+      padding: 40px;
249
+      margin-top: -305px;
250
+      border-radius:12px;
251
+      .con-item{
252
+        display: flex;
253
+        justify-content: space-between;
254
+        margin-bottom: 20px;
255
+      }
256
+      .textarea {
257
+        border: 2px solid #e3e3e3;
258
+        padding: 20px;
259
+        border-radius: 12px;
260
+        width:416px;
261
+        height:160px;
262
+        font-size: 26px;
263
+      }
264
+      .input {
265
+        border: 2px solid #e3e3e3;
266
+        padding: 0 20px;
267
+        border-radius: 4px;
268
+        width:416px;
269
+        height:40px;
270
+        line-height: 40px;
271
+        font-size: 26px;
272
+      }
273
+      .con-picker{
274
+        display: flex;
275
+        align-items: center;
276
+        justify-content: space-between;
277
+        width:456px;
278
+      }
279
+      .right-icon{
280
+        width:20px;
281
+        height:20px;
282
+        border-top: 2px solid #999;
283
+        border-right: 2px solid #999;
284
+        transform:rotate(45deg);
285
+      }
286
+      .bottom-btn{
287
+        margin: 30px auto 0 auto;
288
+        width: 90%;
289
+        height: 80px;
290
+        display: flex;
291
+        align-items: center;
292
+        justify-content: space-between;
293
+        font-size: 30px;
294
+      
295
+        .save{
296
+          background-color: $primary-color;
297
+          color:#fff;
298
+          height: 76px;
299
+          line-height: 76px;
300
+          text-align: center;
301
+          width:240px;
302
+          border-radius:12px;
303
+          border:2px solid $primary-color;
304
+        }
305
+        .cancel{
306
+          color: $primary-color;
307
+          text-align: center;
308
+          height: 76px;
309
+          line-height: 76px;
310
+          width:240px;
311
+          border-radius:12px;
312
+          border:2px solid $primary-color;
313
+        }
314
+      }
315
+
316
+    }
317
+    .content {
318
+      width: 94%;
319
+      height:518px;
320
+      position: absolute;
321
+      left: 3%;
322
+      top: 50%;
323
+      background-color: #fff;
324
+      padding: 40px;
325
+      margin-top: -259px;
326
+      border-radius:12px;
327
+      .textarea {
328
+        border: 2px solid #e3e3e3;
329
+        padding: 20px;
330
+        border-radius: 12px;
331
+        width:416px;
332
+        height:258px;
333
+        font-size: 26px;
334
+      }
335
+      .bottom-btn{
336
+        margin: 70px auto 0 auto;
337
+        width: 90%;
338
+        height: 80px;
339
+        display: flex;
340
+        align-items: center;
341
+        justify-content: space-between;
342
+        font-size: 30px;
343
+      
344
+        .save{
345
+          background-color: $primary-color;
346
+          color:#fff;
347
+          height: 76px;
348
+          line-height: 76px;
349
+          text-align: center;
350
+          width:240px;
351
+          border-radius:12px;
352
+          border:2px solid $primary-color;
353
+        }
354
+        .cancel{
355
+          color: $primary-color;
356
+          text-align: center;
357
+          height: 76px;
358
+          line-height: 76px;
359
+          width:240px;
360
+          border-radius:12px;
361
+          border:2px solid $primary-color;
362
+        }
363
+      }
364
+      
365
+    }
366
+  
367
+  
368
+   
369
+  }

+ 1
- 2
src/pages/person/customerAnalysis/item/index.js Vedi File

@@ -27,10 +27,9 @@ export default class Item extends Component {
27 27
           <View className="left">
28 28
             <View className="title">{data.title}</View>
29 29
             {data.startDate &&
30
-              <View className={data.activityStatus == 0 ? "status signed " : data.activityStatus == 1 ? "status nostart" : data.activityStatus == 2 ? "status fail" : "status"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已结束" : "已参与"}</View>
30
+              <View className={data.jionStatus == '已签到' ? "status signed " : data.jionStatus == '成功已核销' ? "status primary" : data.jionStatus == '失败' ? "status fail" : "status"}>{data.jionStatus || ''}</View>
31 31
             }
32 32
           </View>
33
-
34 33
           {data.startDate &&
35 34
             <View className="time">参与时间:{`${dayjs(data.startDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
36 35
           }

+ 2
- 2
src/pages/person/customerAnalysis/item/index.scss Vedi File

@@ -46,7 +46,7 @@
46 46
     .title {
47 47
       font-size: 28px;
48 48
       color: #333;
49
-      width: 500px;
49
+      width: 460px;
50 50
       @include text-ellipsis;
51 51
     }
52 52
     .time {
@@ -69,7 +69,7 @@
69 69
     .signed{
70 70
       color: #F6B61D;
71 71
     }
72
-		.nostart {
72
+		.primary {
73 73
       color:$primary-color;
74 74
     }
75 75
     .fail{

+ 227
- 24
src/pages/person/customerAnalysis/myCustomer.js Vedi File

@@ -2,10 +2,12 @@ import Taro, { Component } from '@tarojs/taro';
2 2
 import { AtTabs, AtTabsPane } from 'taro-ui'
3 3
 import "taro-ui/dist/style/components/tabs.scss"
4 4
 import { savePoint, updatePoint } from '@services/common'
5
+import { getCustomerDetail, getVisitRecord, getActivityList, getFollowRecord } from '@services/person'
5 6
 import { connect } from '@tarojs/redux'
6 7
 import './index.scss'
7 8
 import ActivityItem from './item'
8
-import { getActNewList } from '@services/activity'
9
+import dayjs from 'dayjs'
10
+const iconImg = require('@assets/person/icon.png')
9 11
 
10 12
 @connect(({ user, city }) => ({ user, city }))
11 13
 export default class myCustomer extends Taro.Component {
@@ -17,15 +19,64 @@ export default class myCustomer extends Taro.Component {
17 19
   state = {
18 20
     current: 0,
19 21
     recordId: undefined, // 埋点ID
20
-    list: []
22
+    activityList: [],
23
+    followVisible: false,
24
+    baseVisible: false,
25
+    message: '', //跟进内容
26
+    desc: '', //客户描述
27
+    selectorChecked: '',
28
+    selector: ['美国', '中国', '巴西', '日本'],
29
+    customerDetail: {},
30
+    followRecord: []
31
+
21 32
   }
22 33
 
23 34
   componentWillUnmount() {
35
+
24 36
     const { recordId } = this.state
25 37
     recordId && updatePoint(recordId)
26 38
   }
27 39
 
28 40
   handleClick(value) {
41
+    if (value == 1) {
42
+      const { customerId } = this.$router.params
43
+      const payload = {
44
+        pageNumber: '0',
45
+        pageSize: '10',
46
+        customerId,
47
+      }
48
+      getVisitRecord(payload).then(res => {
49
+        // this.setState({
50
+        //   customerDetail: res || {}
51
+        // })
52
+      })
53
+    } else if (value == 2) {
54
+      const { customerId } = this.$router.params
55
+      const payload = {
56
+        pageNumber: '0',
57
+        pageSize: '10',
58
+        customerId,
59
+      }
60
+      getActivityList(payload).then(res => {
61
+        this.setState({
62
+          activityList: res.records || []
63
+        })
64
+      })
65
+    } else if (value == 3) {
66
+      const { customerId } = this.$router.params
67
+      const payload = {
68
+        pageNumber: '0',
69
+        pageSize: '10',
70
+        customerId,
71
+      }
72
+      getFollowRecord(payload).then(res => {
73
+        console.log(res.records,"res")
74
+        this.setState({
75
+          followRecord: res.records 
76
+        }, console.log(this.state.followRecord, "followRecord")
77
+        )
78
+      })
79
+    }
29 80
     this.setState({
30 81
       current: value
31 82
     }, )
@@ -36,13 +87,20 @@ export default class myCustomer extends Taro.Component {
36 87
     this.loadList()
37 88
   }
38 89
   loadList() {
39
-    getActNewList().then(res => {
90
+    const { customerId } = this.$router.params
91
+    getCustomerDetail(customerId).then(res => {
40 92
       this.setState({
41
-        list: res.records || []
93
+        customerDetail: res || {}
42 94
       })
43 95
     })
44 96
   }
45 97
   handleItemClick(item) {
98
+    // if (item.status == 0) {
99
+    //   Taro.showToast({
100
+    //     title: '当前活动已失效',
101
+    //     icon: 'none'
102
+    //   })
103
+    // } else {
46 104
     switch (item.type) {
47 105
       case 'help':
48 106
         Taro.navigateTo({
@@ -60,30 +118,172 @@ export default class myCustomer extends Taro.Component {
60 118
         })
61 119
         return
62 120
     }
121
+    // }
122
+  }
123
+  addFollow() {
124
+    this.setState({
125
+      followVisible: true,
126
+    })
127
+  }
128
+  saveBtn() {
129
+    this.setState({
130
+      followVisible: false,
131
+    })
132
+  }
133
+  cancelBtn() {
134
+    this.setState({
135
+      followVisible: false,
136
+    })
137
+  }
138
+  onTextareaChange(e) {
139
+    this.setState({
140
+      message: e.target.value
141
+    })
142
+  }
143
+  renderFollowBox() {
144
+    const { message } = this.state
145
+    return (
146
+      <View className="mask">
147
+        <View className="content">
148
+          <View style="display:flex;justify-content: space-between;">
149
+            <View style="font-size:14px;color:#666">
150
+              跟进内容:
151
+            </View>
152
+            <Textarea
153
+              className="textarea"
154
+              value={message}
155
+              onInput={this.onTextareaChange}
156
+              maxLength={150}
157
+              placeholder='不超过150字'
158
+            />
159
+          </View>
160
+          <View className="bottom-btn">
161
+            <View className="save" onClick={this.saveBtn}>
162
+              保存
163
+            </View>
164
+            <View className="cancel" onClick={this.cancelBtn}>
165
+              取消
166
+          </View>
167
+          </View>
168
+        </View>
169
+      </View>
170
+    )
171
+  }
172
+  perfectInformation() {
173
+    this.setState({
174
+      baseVisible: true,
175
+    })
63 176
   }
177
+  baseSaveBtn() {
178
+    this.setState({
179
+      baseVisible: false,
180
+    })
181
+  }
182
+  baseCancelBtn() {
183
+    this.setState({
184
+      baseVisible: false,
185
+    })
186
+  }
187
+  onBaseTextareaChange(e) {
188
+    this.setState({
189
+      desc: e.target.value
190
+    })
191
+  }
192
+  onChange = e => {
193
+    this.setState({
194
+      selectorChecked: this.state.selector[e.detail.value]
195
+    })
196
+  }
197
+  renderBaseBox() {
198
+    const { desc, selector, selectorChecked } = this.state
199
+    return (
200
+      <View className="mask">
201
+        <View className="base-con">
202
+          <View className="con-item">
203
+            <View style="font-size:14px;color:#666">
204
+              物业类型:
205
+            </View>
206
+            <Input className="input" value={desc} onInput={this.onBaseTextareaChange} placeholder='' />
207
+          </View>
208
+          <View className="con-item">
209
+            <View style="font-size:14px;color:#666">
210
+              项目类型:
211
+            </View>
212
+            <View className="con-picker" >
213
+              <View>
214
+                <Picker mode='selector' range={selector} onChange={this.onChange}>
215
+                  <View className='picker'>
216
+                    当前选择:{selectorChecked}
217
+                  </View>
218
+                </Picker>
219
+              </View>
220
+              <View className="right-icon"></View>
221
+            </View>
222
+          </View>
223
+          <View className="con-item">
224
+            <View style="font-size:14px;color:#666">
225
+              价格区间:
226
+            </View>
227
+            <Input className="input" value={desc} onInput={this.onBaseTextareaChange} placeholder='' />
228
+          </View>
229
+          <View style="display:flex;justify-content: space-between;">
230
+            <View style="font-size:14px;color:#666">
231
+              客户描述:
232
+            </View>
233
+            <Textarea
234
+              className="textarea"
235
+              value={desc}
236
+              onInput={this.onBaseTextareaChange}
237
+              maxLength={150}
238
+              placeholder='不超过150字'
239
+            />
240
+          </View>
241
+          <View className="bottom-btn">
242
+            <View className="save" onClick={this.baseSaveBtn}>
243
+              保存
244
+            </View>
245
+            <View className="cancel" onClick={this.baseCancelBtn}>
246
+              取消
247
+          </View>
248
+          </View>
249
+        </View>
250
+      </View>
251
+    )
252
+  }
253
+
64 254
 
65 255
   render() {
66 256
 
67 257
     const tabList = [{ title: '基本信息' }, { title: '访问记录' }, { title: '活动信息' }, { title: '跟进记录' }]
68
-    const { list } = this.state
258
+    const { customerDetail, activityList, followRecord, followVisible, baseVisible } = this.state
69 259
     return (
70 260
       <View>
261
+        {followVisible && this.renderFollowBox()}
262
+        {baseVisible && this.renderBaseBox()}
71 263
         <View className="user_con">
72 264
           <Image className="bg" src={require('@assets/shop/background.jpg')} ></Image>
73
-          <Image className="user__left__headimg" src={require('@assets/default-avatar.png')} />
74
-          <View className='user__left__name'>客户姓名</View>
75
-          <View className='user__left__phone'>175 1562 8701</View>
265
+          <Image className="user__left__headimg" src={customerDetail.picture || require('@assets/default-avatar.png')} />
266
+          <View className='user__left__name'>
267
+            {customerDetail.name}
268
+            {
269
+              customerDetail.sex == '1' && <View style={`margin-left:10px;background-image: url(${iconImg});background-size: 100%;background-position: 0px -20px;width: 18px;height: 18px;`}></View>
270
+            }
271
+            {
272
+              customerDetail.sex == '2' && <View style={`margin-left:10px;background-image: url(${iconImg});background-size: 100%;background-position: 0px 0px;width: 18px;height: 18px;`}></View>
273
+            }
274
+          </View>
275
+          <View className='user__left__phone'>{customerDetail.phone}</View>
76 276
         </View>
77 277
         <AtTabs className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
78 278
           <AtTabsPane current={this.state.current} index={0} >
79 279
             <View className="tab-pane1 pane">
80
-              <View className="status">到访</View>
81
-              <View className="base-item">意向项目:<View className="con">银城悦见山</View></View>
82
-              <View className="base-item">物业类型:<View className="con">自住</View></View>
83
-              <View className="base-item">项目类型:<View className="con">高层</View></View>
84
-              <View className="base-item">价格区间:<View className="con">{desc || '暂无'}</View></View>
85
-              <View className="base-item">客户描述:<View className="con">{desc || '暂无'}</View></View>
86
-              <View className="btn">完善信息</View>
280
+              <View className="status">{customerDetail.status == 1 ? '报备' : customerDetail.status == 2 ? '到访' : customerDetail.status == 3 ? '认筹' : '签约'}</View>
281
+              <View className="base-item">意向项目:<View className="con">{customerDetail.intention || '暂无'}</View></View>
282
+              <View className="base-item">物业类型:<View className="con">{customerDetail.realtyManageType || '暂无'}</View></View>
283
+              <View className="base-item">项目类型:<View className="con">{customerDetail.demandType || '暂无'}</View></View>
284
+              <View className="base-item">价格区间:<View className="con">{customerDetail.priceRange || '暂无'}</View></View>
285
+              <View className="base-item">客户描述:<View className="con">{customerDetail.describe || '暂无'}</View></View>
286
+              <View className="btn" onClick={this.perfectInformation}>完善信息</View>
87 287
             </View>
88 288
           </AtTabsPane>
89 289
           <AtTabsPane current={this.state.current} index={1}>
@@ -96,13 +296,12 @@ export default class myCustomer extends Taro.Component {
96 296
               <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
97 297
               <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
98 298
               <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
99
-
100 299
             </View>
101 300
           </AtTabsPane>
102 301
           <AtTabsPane current={this.state.current} index={2}>
103 302
             <View className="tab-pane3 pane">
104
-              {list.length > 0 &&
105
-                list.map(item => (
303
+              {activityList.length > 0 &&
304
+                activityList.map(item => (
106 305
                   <ActivityItem
107 306
                     data={item}
108 307
                     key={item.id}
@@ -113,13 +312,17 @@ export default class myCustomer extends Taro.Component {
113 312
             </View>
114 313
           </AtTabsPane>
115 314
           <AtTabsPane current={this.state.current} index={3}>
116
-            <View  style="padding:10px 20px 120px 20px">
117
-              <View style=" display: flex;justify-content: space-between;align-items: center;color: #333;font-size: 16px;">
118
-                <View style=" display: flex;align-items: center;"><View style="width:8px;height:8px;margin-right:10px;display:inline-block;background:rgba(246,182,29,1);border-radius: 50%;"></View>编辑客户信息</View>
119
-                <View classNam="time" style=" font-size: 13px;color: #999;">2019年11月11日 12:24:59</View>
120
-              </View>
121
-              <View className="btn">添加跟进</View>
315
+            <View style="padding:10px 20px 120px 20px">
316
+              {/* {followRecord.map(item => {
317
+                <View style=" display: flex;justify-content: space-between;align-items: center;color: #333;font-size: 16px;"> */}
318
+                  {/* <View style=" display: flex;align-items: center;"><View style="width:8px;height:8px;margin-right:10px;display:inline-block;background:rgba(246,182,29,1);border-radius: 50%;"></View>{item.recordType}</View>
319
+                    <View classNam="time" style=" font-size: 13px;color: #999;">{dayjs(item.createDate).format('YYYY-MM-DD') || ''}</View> */}
320
+                {/* </View>
321
+              })
322
+              } */}
323
+              <View className="btn" onClick={this.addFollow}>添加跟进</View>
122 324
             </View>
325
+
123 326
           </AtTabsPane>
124 327
         </AtTabs>
125 328
       </View>

+ 29
- 11
src/pages/person/customerAnalysis/transactionCustomer/index.js Vedi File

@@ -3,7 +3,7 @@ import Authorize from '@components/authorize'
3 3
 import './index.scss'
4 4
 import { savePoint, updatePoint } from '@services/common'
5 5
 import { connect } from '@tarojs/redux'
6
-// import { getThumbnail } from '@utils/tools'
6
+import { queryCustomerList } from '@services/person'
7 7
 const iconImg = require('@assets/person/icon.png')
8 8
 
9 9
 
@@ -15,29 +15,47 @@ export default class transactionCustomer extends Taro.Component {
15 15
   }
16 16
 
17 17
   state = {
18
-    list: [
19
-      { name: '刘丽丽', phone: '15852364821', sex: '1' },
20
-      { name: '邓亚平', phone: '13160056061', sex: '2' },
21
-    ],
22 18
     recordId: undefined, // 埋点ID
19
+    customerList: [],
23 20
   }
24 21
 
25 22
   componentWillUnmount() {
26 23
     const { recordId } = this.state
27 24
     recordId && updatePoint(recordId)
28 25
   }
26
+  componentDidShow() {
27
+    Taro.showLoading()
28
+    this.loadList()
29
+
30
+  }
31
+  loadList() {
32
+    const payload = {
33
+      type: 'clinch',
34
+      pageNumber: 0,
35
+      pageSize: 9999
36
+    }
37
+    queryCustomerList(payload.type, payload).then(res => {
38
+      this.setState({
39
+        customerList: res.records || []
40
+      })
41
+      Taro.hideLoading()
42
+    })
43
+  }
29 44
 
30 45
   render() {
31
-    const { list } = this.state
46
+    const { customerList } = this.state
32 47
 
33 48
     return (
34 49
       <View style="padding:10px">
35 50
         {
36
-
37
-          list.map(item => (
51
+          !customerList.length &&
52
+          <View style="margin:50px auto;text-align:center;font-size:14px;color:#888">暂无跟进客户~</View>
53
+        }
54
+        {
55
+          customerList.length &&
56
+          customerList.map(item => (
38 57
             <View class="item">
39
-
40
-              <Image src={require('@assets/default-avatar.png')} className='img'></Image>
58
+              <Image src={item.picture || require('@assets/default-avatar.png')} className='img'></Image>
41 59
               <View className="name">
42 60
                 {item.name}
43 61
                 {
@@ -48,7 +66,7 @@ export default class transactionCustomer extends Taro.Component {
48 66
                 }
49 67
               </View>
50 68
               <View className="phone">{item.phone} </View>
51
-              <View  style={`background-image: url(${iconImg});background-size: 100%;background-position: 0px -44px;width: 22px;height: 22px;`}></View>
69
+              <View style={`background-image: url(${iconImg});background-size: 100%;background-position: 0px -44px;width: 22px;height: 22px;`}></View>
52 70
             </View>
53 71
           ))
54 72
         }

+ 1
- 1
src/pages/person/menus.js Vedi File

@@ -44,7 +44,7 @@ const menus = [
44 44
       url: '/pages/person/customerAnalysis/index',
45 45
       icon: icons.homepage,
46 46
       extends: undefined,
47
-      userTypes: [CONSULTANT],
47
+      userTypes: [CUSTOMER, CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
48 48
     },
49 49
     // {
50 50
     //   name: '成为经纪人',

+ 6
- 1
src/pages/project/detail/Around/Pannel.js Vedi File

@@ -2,6 +2,8 @@ import Taro from '@tarojs/taro'
2 2
 import { View } from '@tarojs/components'
3 3
 import './style.scss'
4 4
 
5
+const posIcon = require('@assets/icons/amap/position.png')
6
+
5 7
 export default function Pannel(props) {
6 8
   const { data = [], manualData = [] } = props.dataset || {}
7 9
   const activeKey = props.active
@@ -17,7 +19,10 @@ export default function Pannel(props) {
17 19
           return (
18 20
             <View className={`around-cell ${active ? 'active' : ''}`} key={`auto-${id}`}>
19 21
               <View className="around-cell__body">{`${index + 1}、${name}`}</View>
20
-              <View className="around-cell__action">{dist}</View>
22
+              <View className="around-cell__action">
23
+                <Image className="icon" src={posIcon} />
24
+                {dist}
25
+              </View>
21 26
             </View>
22 27
           )
23 28
         })

+ 11
- 1
src/pages/project/detail/Around/style.scss Vedi File

@@ -91,7 +91,17 @@
91 91
 
92 92
   &__action {
93 93
     flex: none;
94
-    width: 200px;
94
+    width: 160px;
95
+    font-size: 30px;
96
+    line-height: 42px;
97
+    vertical-align: middle;
98
+
99
+    .icon {
100
+      width: 26px;
101
+      height: 26px;
102
+      display: inline-block;
103
+      margin: 0 10px;
104
+    }
95 105
   }
96 106
 }
97 107
 

+ 14
- 37
src/pages/project/detail/index.js
File diff suppressed because it is too large
Vedi File


+ 81
- 6
src/pages/project/index.js Vedi File

@@ -94,8 +94,8 @@ export default class Index extends Component {
94 94
           // debugger
95 95
           let city = res.result.address_component.city
96 96
 
97
-          // console.log('-----city-->', city)
98
-          
97
+          console.log('-----city-->', city)
98
+
99 99
           let curCity = cityList.filter(item => {
100 100
             return item.name == city
101 101
           })
@@ -146,7 +146,7 @@ export default class Index extends Component {
146 146
       status: 1,
147 147
       zipcode: "320100"
148 148
     }
149
-    
149
+
150 150
     const GuiYang = {
151 151
       citycode: "0851",
152 152
       id: 520100,
@@ -161,6 +161,49 @@ export default class Index extends Component {
161 161
       status: 1,
162 162
       zipcode: "520100"
163 163
     }
164
+    const LiuZhou = {
165
+      citycode: "0772",
166
+      id: 450200,
167
+      initial: "L",
168
+      lat: "24.314617",
169
+      leveltype: 2,
170
+      lng: "109.411703",
171
+      name: "柳州市",
172
+      parentid: 450000,
173
+      pinyin: "Liuzhou",
174
+      shortname: "柳州",
175
+      status: "1",
176
+      zipcode: "545001",
177
+    }
178
+    const KunMing = {
179
+      citycode: "0871",
180
+      id: 530100,
181
+      initial: "K",
182
+      lat: "25.040609",
183
+      leveltype: 2,
184
+      lng: "102.712251",
185
+      name: "昆明市",
186
+      parentid: 530000,
187
+      pinyin: "Kunming",
188
+      shortname: "昆明",
189
+      status: "1",
190
+      zipcode: "650500",
191
+    }
192
+    const HuZhou = {
193
+      citycode: "0572",
194
+      id: 330500,
195
+      initial: "H",
196
+      lat: "30.867198",
197
+      leveltype: 2,
198
+      lng: "120.102398",
199
+      name: "湖州市",
200
+      parentid: 330000,
201
+      pinyin: "Huzhou",
202
+      shortname: "湖州",
203
+      status: "1",
204
+      zipcode: "313000",
205
+    }
206
+
164 207
 
165 208
     const appId = accountInfo.miniProgram.appId;
166 209
     let params;
@@ -170,11 +213,43 @@ export default class Index extends Component {
170 213
       case 'wxd6f47a9bb3052175':
171 214
         params = NanJing;
172 215
         break;
173
-
174 216
       // 橙蕉
175 217
       case 'wxe3b1e683853800b5':
176 218
         params = GuiYang;
177 219
         break;
220
+      // 香颂
221
+      case 'wx09cd665abf378db7':
222
+        params = LiuZhou;
223
+        break;
224
+      // 诚通公园里
225
+      case 'wx7c72475f7f354d17':
226
+        params = HuZhou;
227
+        break;
228
+      // 北京城建
229
+      case 'wx766cfc5d8429c927':
230
+        params = NanJing;
231
+        break;
232
+      // 云南昊居
233
+      case 'wx03aca9d7d9b0b7f1':
234
+        params = KunMing;
235
+        break;
236
+      // 奥园金基
237
+      case 'wx7183d7d918a426d3':
238
+        params = NanJing;
239
+        break;
240
+      // 南京楼市
241
+      case 'wxb2175cd2ead31a60':
242
+        params = NanJing;
243
+        break;
244
+      // 融创
245
+      case 'wxe9e01aa4a3568f52':
246
+        params = NanJing;
247
+        break;
248
+      // 尾房宝
249
+      case 'wx755faa4b3ec76cd3':
250
+        params = NanJing;
251
+        break;
252
+
178 253
       default:
179 254
         params = payload;
180 255
         break;
@@ -460,9 +535,9 @@ export default class Index extends Component {
460 535
       })
461 536
     } else {
462 537
       Taro.navigateTo({
463
-        url: `/pages/agent/recommend/index?type=index&cityId=` +this.props.curCity.id
538
+        url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
464 539
       })
465
-      console.log(this.props.curCity.id,"this.props.curCity.id")
540
+      console.log(this.props.curCity.id, "this.props.curCity.id")
466 541
     }
467 542
   }
468 543
   toMapHouse() {

+ 16
- 4
src/pages/shop/index.js Vedi File

@@ -262,6 +262,7 @@ export default class Shop extends Component {
262 262
           <View className="list__wrap">
263 263
             <View className="hot_title">热门商品</View>
264 264
             {
265
+              goodsList.length &&
265 266
               goodsList.map(item => (
266 267
                 
267 268
                 <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
@@ -279,6 +280,12 @@ export default class Shop extends Component {
279 280
                 </View>
280 281
               ))
281 282
             }
283
+            {
284
+              goodsList.length < 1 &&
285
+              <View style="font-size:14px;color:#888;margin:40px auto;text-align: center;">
286
+                暂无商品~
287
+              </View>
288
+            }
282 289
           </View>
283 290
         }
284 291
         {
@@ -289,7 +296,7 @@ export default class Shop extends Component {
289 296
               {goodsBuilding.map((l_item, index) => (
290 297
                 <AtTabsPane current={current} key={`pane-${index}`} index={index} >
291 298
                   <View>
292
-                    {
299
+                    {goodsList.length &&
293 300
                       goodsList.map(item => (
294 301
                         <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
295 302
                           <Image className="item__img" mode="aspectFill" src={item.imgUrl} />
@@ -306,7 +313,12 @@ export default class Shop extends Component {
306 313
                         </View>
307 314
                       ))
308 315
                     }
309
-
316
+                    {
317
+                      goodsList.length < 1 &&
318
+                      <View style="font-size:14px;color:#888;margin:40px auto;text-align: center;">
319
+                        暂无商品~
320
+                      </View>
321
+                    }
310 322
                   </View>
311 323
                 </AtTabsPane>
312 324
               ))
@@ -321,7 +333,7 @@ export default class Shop extends Component {
321 333
   }
322 334
 
323 335
   renderDetail() {
324
-    const { user,points } = this.state
336
+    const { user, points } = this.state
325 337
     const { userInfo: { person }, curCity } = this.props
326 338
     const { bannerList = [] } = this.state
327 339
     return (
@@ -370,7 +382,7 @@ export default class Shop extends Component {
370 382
 
371 383
 
372 384
           {bannerList.length > 0 &&
373
-            <Banner list={bannerList}  onClick={this.handleBannerClick} indicatorDots={false}></Banner>
385
+            <Banner list={bannerList} onClick={this.handleBannerClick} indicatorDots={false}></Banner>
374 386
           }
375 387
 
376 388
 

+ 45
- 0
src/services/person.js Vedi File

@@ -0,0 +1,45 @@
1
+import { fetch } from '@utils/request'
2
+import {
3
+  API_MY_CUSTOMER,
4
+  API_CUSTOMER_LIST,
5
+  API_CUSTOMER_DETAIL,
6
+  API_VISIT_RECORD,
7
+  API_ACTIVITY_LIST_CUSTOMER,
8
+  API_FOLLOW_LIST
9
+} from '@constants/api'
10
+
11
+
12
+/**
13
+ * 获取我的客户数据
14
+ * @param {*} payload
15
+ */
16
+export const queryMyCustomer = payload => fetch({ url: API_MY_CUSTOMER, payload })
17
+
18
+/**
19
+ * 获取客户列表
20
+ * @param {*} type  
21
+ */
22
+export const  queryCustomerList = (type, payload) => fetch({ url: `${API_CUSTOMER_LIST}/${type}`, payload })
23
+/**
24
+ * 获取客户列表
25
+ * @param {*} customerId  
26
+ */
27
+export const  getCustomerDetail = (customerId, payload) => fetch({ url: `${API_CUSTOMER_DETAIL}/${customerId}`, payload })
28
+/**
29
+ * 获取访问记录
30
+ * @param {*} payload  
31
+ */
32
+export const  getVisitRecord = ( payload) => fetch({ url: API_VISIT_RECORD, payload })
33
+/**
34
+ * 获取活动信息
35
+ * @param {*} payload  
36
+ */
37
+export const  getActivityList = ( payload) => fetch({ url: API_ACTIVITY_LIST_CUSTOMER, payload })
38
+/**
39
+ * 获取跟进记录
40
+ * @param {*} payload  
41
+ */
42
+export const  getFollowRecord = ( payload) => fetch({ url: API_FOLLOW_LIST, payload })
43
+
44
+
45
+

+ 0
- 99
src/utils/amap.js Vedi File

@@ -1,99 +0,0 @@
1
-/**
2
- * 高德地图
3
- * 
4
- * POI 类型下载 https://lbs.amap.com/api/webservice/guide/api/search/#around
5
- * 
6
- */
7
-const amapLib = require('../lib/amap-wx');
8
-const myAmapKey = '766411323b66f7e876f428d8a23aa83c'
9
-const amap = new amapLib.AMapWX({ key: myAmapKey })
10
-
11
-// key 值会被拿到 building 表中 组合为字段名
12
-const POI_TYPES = [
13
-  {
14
-    key: 'Transport',
15
-    label: '交通',
16
-    types: ['150100', '150200', '150300', '150400', '150500', '150600'],
17
-  },
18
-  {
19
-    key: 'Mall',
20
-    label: '商业',
21
-    types: ['060100', '060200', '060300', '060400', '060500', '060600',
22
-            '060700', '060800', '060900', '061000', '061100', '061200',
23
-            '061300', '061400', '080100', '080200', '080300', '080400',
24
-            '080500', '080600'],
25
-  },
26
-  {
27
-    key: 'Edu',
28
-    label: '学校',
29
-    types: ['141200'],
30
-  },
31
-  {
32
-    key: 'Hospital',
33
-    label: '医院',
34
-    types: ['090100', '090200', '090300', '090400', '090500', '090600', '090700'],
35
-  },
36
-  {
37
-    key: 'Bank',
38
-    label: '银行',
39
-    types: ['160100'],
40
-  },
41
-  {
42
-    key: 'Restaurant',
43
-    label: '餐饮',
44
-    types: ['050100', '050200', '050300', '050400', '050500', '050600',
45
-            '050700', '050800', '050900'],
46
-  },
47
-]
48
-
49
-const getPrefix = str => str.substr(0, 4)
50
-
51
-export function getPoiAround(params) {
52
-  const {
53
-    lng,
54
-    lat
55
-  } = params || {}
56
-
57
-  return new Promise((resolve, reject) => {
58
-    const querytypes = POI_TYPES.reduce((acc, item) => ([ ...acc, ...item.types ]), []).join('|')
59
-    const location = `${lng},${lat}`
60
-    const iconPath = undefined
61
-    const iconPathSelected = undefined
62
-    const resultList = []
63
-
64
-    // 成功回调
65
-    // https://lbs.amap.com/api/webservice/guide/api/search/#around
66
-    const successCall = poiType => res => {
67
-      resultList.push({
68
-        key: poiType.key,
69
-        label: poiType.label,
70
-        poisData: res.poisData,
71
-        markers: res.markers
72
-      })
73
-
74
-      if (resultList.length === POI_TYPES.length) {
75
-        resolve(resultList)
76
-      }
77
-    }
78
-
79
-    // 失败回调
80
-    // https://lbs.amap.com/api/webservice/guide/tools/info/
81
-    const failCall = poiType => info => {
82
-      console.error(poiType, info)
83
-      reject(info)
84
-    }
85
-
86
-    POI_TYPES.forEach((pt) => {
87
-      const querytypes = pt.types.join('|')
88
-
89
-      amap.getPoiAround({
90
-        querytypes,
91
-        location,
92
-        iconPath,
93
-        iconPathSelected,
94
-        success: successCall(pt),
95
-        fail: failCall(pt),
96
-      })
97
-    })
98
-  })
99
-}