1002884655 3 vuotta sitten
vanhempi
commit
c0899ad939

+ 36
- 3
src/pages/index/mortgageCalculation/components/ShangYe/index.jsx Näytä tiedosto

4
 
4
 
5
 export default function ShangYe () {
5
 export default function ShangYe () {
6
 
6
 
7
+  // 商贷年限
7
   const [Years, setYears] = useState([])
8
   const [Years, setYears] = useState([])
8
-  const [CurrentYearsName, setCurrentYearsName] = useState('30年')
9
-  const [CurrentYearsId, setCurrentYearsId] = useState(30)
9
+  const [CurrentYears, setCurrentYears] = useState({})
10
+  
11
+  // 利率方式
12
+  const [InterestTypes] = useState([
13
+    { name: '按LPR', id: 1 },
14
+    { name: '按旧版基准利率', id: 2 }
15
+  ])
16
+  const [CurrentInterestTypes, setCurrentInterestTypes] = useState(InterestTypes[0])
17
+
18
+  let BusinessInterestTypes1 = [ // 按照LPR
19
+    {name: '', id: 1}
20
+  ]
21
+  const BusinessInterestTypes2 = [ // 按照旧版基准利率
22
+  ]
23
+  const [BusinessInterestTypes] = useState(BusinessInterestTypes1)
24
+  const [CurrentBusinessInterest, setCurrentBusinessInterest] = useState(BusinessInterestTypes[0])
10
 
25
 
11
   useEffect(() => {
26
   useEffect(() => {
12
     if (!Years.length) {
27
     if (!Years.length) {
15
         Arr.push({ name: `${n}年`, id: n })
30
         Arr.push({ name: `${n}年`, id: n })
16
       }
31
       }
17
       setYears(Arr)
32
       setYears(Arr)
33
+    } else {
34
+      setCurrentYears(Years[0])
18
     }
35
     }
19
   }, [Years])
36
   }, [Years])
20
 
37
 
39
       <view className='flex-h'>
56
       <view className='flex-h'>
40
         <text>商贷年限</text>
57
         <text>商贷年限</text>
41
         <view className='flex-item'>
58
         <view className='flex-item'>
42
-          <picker value={0} range-key='name' range={Years}>{CurrentYearsName}</picker>
59
+          <picker value={0} range-key='name' range={Years}>{CurrentYears.name}</picker>
60
+        </view>
61
+        <text className='iconfont icon-jiantouright'></text>
62
+      </view>
63
+
64
+      <view className='flex-h'>
65
+        <text>利率方式</text>
66
+        <view className='flex-item'>
67
+          <picker value={0} range-key='name' range={InterestTypes}>{CurrentInterestTypes.name}</picker>
68
+        </view>
69
+        <text className='iconfont icon-jiantouright'></text>
70
+      </view>
71
+
72
+      <view className='flex-h'>
73
+        <text>商贷利率</text>
74
+        <view className='flex-item'>
75
+          <picker value={0} range-key='name' range={BusinessInterestTypes}>{CurrentBusinessInterest.name}</picker>
43
         </view>
76
         </view>
44
         <text className='iconfont icon-jiantouright'></text>
77
         <text className='iconfont icon-jiantouright'></text>
45
       </view>
78
       </view>

+ 1
- 1
src/pages/index/mortgageCalculation/index.jsx Näytä tiedosto

1
 import { useState, useEffect } from 'react'
1
 import { useState, useEffect } from 'react'
2
 import withLayout from '@/layout'
2
 import withLayout from '@/layout'
3
 import { ScrollView } from '@tarojs/components'
3
 import { ScrollView } from '@tarojs/components'
4
-import ShangYe from './components/ShangYe/index'
5
 import '@/assets/css/iconfont.css'
4
 import '@/assets/css/iconfont.css'
5
+import ShangYe from './components/ShangYe/index'
6
 import './index.scss'
6
 import './index.scss'
7
 
7
 
8
 export default withLayout(() => {
8
 export default withLayout(() => {

+ 1
- 1
src/pages/mine/components/UserDetailFollowRecord/index.jsx Näytä tiedosto

65
               PageList.map((item, index) => (
65
               PageList.map((item, index) => (
66
                 <view className='flex-h' key={`Item-${index}`}>
66
                 <view className='flex-h' key={`Item-${index}`}>
67
                   <view className='flex-item'>
67
                   <view className='flex-item'>
68
-                    <text>{formatDate(item.createDate, 'YYYY年MM月DD日 HH:mm:ss')}</text>
68
+                    <text>{formatDate(item.createDate, 'yyyy年MM月dd日 hh:mm:ss')}</text>
69
                   </view>
69
                   </view>
70
                   <view className='Line'>
70
                   <view className='Line'>
71
                     <view></view>
71
                     <view></view>

+ 17
- 4
src/pages/mine/customerDetail/index.jsx Näytä tiedosto

4
 import '@/assets/css/iconfont.css'
4
 import '@/assets/css/iconfont.css'
5
 import { Image, Textarea } from '@tarojs/components'
5
 import { Image, Textarea } from '@tarojs/components'
6
 import { fetch } from '@/utils/request'
6
 import { fetch } from '@/utils/request'
7
-import { API_GET_CUSTOMER_INFO, API_FOLLOW_LIST } from '@/constants/api'
7
+import { API_GET_CUSTOMER_INFO } from '@/constants/api'
8
 import { getCustomerDetail, addFollowRecord } from '@/services/person'
8
 import { getCustomerDetail, addFollowRecord } from '@/services/person'
9
 import { getImgURL } from '@/utils/image'
9
 import { getImgURL } from '@/utils/image'
10
 import { BIZ_STATUS } from '@/constants/user'
10
 import { BIZ_STATUS } from '@/constants/user'
15
 import UserDetailFollowRecord from '../components/UserDetailFollowRecord/index'
15
 import UserDetailFollowRecord from '../components/UserDetailFollowRecord/index'
16
 
16
 
17
 export default withLayout((props) => {
17
 export default withLayout((props) => {
18
-  const { router, person } = props
18
+  const { router } = props
19
   const { id : CustomerId,  } = router.params
19
   const { id : CustomerId,  } = router.params
20
 
20
 
21
   const [custBaseInfo, setCustBaseInfo] = useState({})
21
   const [custBaseInfo, setCustBaseInfo] = useState({})
60
       customerSex: CustomerInfo.sex,
60
       customerSex: CustomerInfo.sex,
61
       customerId: CustomerId,
61
       customerId: CustomerId,
62
     }
62
     }
63
-    addFollowRecord(payload).then((res) => {
63
+    addFollowRecord(payload).then(() => {
64
       Taro.showToast({
64
       Taro.showToast({
65
         title: '添加跟进成功',
65
         title: '添加跟进成功',
66
         icon: 'none'
66
         icon: 'none'
91
     }
91
     }
92
   }, [CustomerId])
92
   }, [CustomerId])
93
 
93
 
94
+  const ToChat = () => {
95
+    if(CustomerInfo.personId) {
96
+      Taro.navigateTo({
97
+        url: `/pages/chat/chatDetail/index?friend=${CustomerInfo.personId}`
98
+      })
99
+    } else {
100
+      Taro.showToast({
101
+        title: '当前人员未登录本小程序',
102
+        icon: 'none'
103
+      })
104
+    }
105
+  }
106
+
94
 
107
 
95
   return (
108
   return (
96
     <view className='Page customerDetail flex-v'>
109
     <view className='Page customerDetail flex-v'>
110
                   </view>
123
                   </view>
111
                   <text>{custBaseInfo.phone}</text>
124
                   <text>{custBaseInfo.phone}</text>
112
                 </view>
125
                 </view>
113
-                <text className='iconfont icon-liaotian'></text>
126
+                <text className='iconfont icon-liaotian' onClick={ToChat}></text>
114
                 <text className='iconfont icon-dianhua' onClick={() => { Taro.makePhoneCall({ phoneNumber: custBaseInfo.phone }) }}></text>
127
                 <text className='iconfont icon-dianhua' onClick={() => { Taro.makePhoneCall({ phoneNumber: custBaseInfo.phone }) }}></text>
115
               </view>
128
               </view>
116
             </view>
129
             </view>