1002884655 před 3 roky
rodič
revize
c0899ad939

+ 36
- 3
src/pages/index/mortgageCalculation/components/ShangYe/index.jsx Zobrazit soubor

@@ -4,9 +4,24 @@ import './index.scss'
4 4
 
5 5
 export default function ShangYe () {
6 6
 
7
+  // 商贷年限
7 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 26
   useEffect(() => {
12 27
     if (!Years.length) {
@@ -15,6 +30,8 @@ export default function ShangYe () {
15 30
         Arr.push({ name: `${n}年`, id: n })
16 31
       }
17 32
       setYears(Arr)
33
+    } else {
34
+      setCurrentYears(Years[0])
18 35
     }
19 36
   }, [Years])
20 37
 
@@ -39,7 +56,23 @@ export default function ShangYe () {
39 56
       <view className='flex-h'>
40 57
         <text>商贷年限</text>
41 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 76
         </view>
44 77
         <text className='iconfont icon-jiantouright'></text>
45 78
       </view>

+ 1
- 1
src/pages/index/mortgageCalculation/index.jsx Zobrazit soubor

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

+ 1
- 1
src/pages/mine/components/UserDetailFollowRecord/index.jsx Zobrazit soubor

@@ -65,7 +65,7 @@ export default function UserDetailFollowRecord (props) {
65 65
               PageList.map((item, index) => (
66 66
                 <view className='flex-h' key={`Item-${index}`}>
67 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 69
                   </view>
70 70
                   <view className='Line'>
71 71
                     <view></view>

+ 17
- 4
src/pages/mine/customerDetail/index.jsx Zobrazit soubor

@@ -4,7 +4,7 @@ import withLayout from '@/layout'
4 4
 import '@/assets/css/iconfont.css'
5 5
 import { Image, Textarea } from '@tarojs/components'
6 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 8
 import { getCustomerDetail, addFollowRecord } from '@/services/person'
9 9
 import { getImgURL } from '@/utils/image'
10 10
 import { BIZ_STATUS } from '@/constants/user'
@@ -15,7 +15,7 @@ import UserDetailActivityInfo from '../components/UserDetailActivityInfo/index'
15 15
 import UserDetailFollowRecord from '../components/UserDetailFollowRecord/index'
16 16
 
17 17
 export default withLayout((props) => {
18
-  const { router, person } = props
18
+  const { router } = props
19 19
   const { id : CustomerId,  } = router.params
20 20
 
21 21
   const [custBaseInfo, setCustBaseInfo] = useState({})
@@ -60,7 +60,7 @@ export default withLayout((props) => {
60 60
       customerSex: CustomerInfo.sex,
61 61
       customerId: CustomerId,
62 62
     }
63
-    addFollowRecord(payload).then((res) => {
63
+    addFollowRecord(payload).then(() => {
64 64
       Taro.showToast({
65 65
         title: '添加跟进成功',
66 66
         icon: 'none'
@@ -91,6 +91,19 @@ export default withLayout((props) => {
91 91
     }
92 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 108
   return (
96 109
     <view className='Page customerDetail flex-v'>
@@ -110,7 +123,7 @@ export default withLayout((props) => {
110 123
                   </view>
111 124
                   <text>{custBaseInfo.phone}</text>
112 125
                 </view>
113
-                <text className='iconfont icon-liaotian'></text>
126
+                <text className='iconfont icon-liaotian' onClick={ToChat}></text>
114 127
                 <text className='iconfont icon-dianhua' onClick={() => { Taro.makePhoneCall({ phoneNumber: custBaseInfo.phone }) }}></text>
115 128
               </view>
116 129
             </view>