|
@@ -5,10 +5,14 @@ import { getChannelCustomerStatus, getCustomerDetail, getCustomerInfo } from '@/
|
5
|
5
|
import { ScrollView, Image } from '@tarojs/components'
|
6
|
6
|
import Modal from '@/components/Modal'
|
7
|
7
|
import { ROLE_CODE } from '@/constants/user'
|
|
8
|
+import { API_CUSTOMER_DETAILINFO } from '@/constants/api'
|
|
9
|
+import { fetch } from '@/utils/request'
|
8
|
10
|
import { formatDate } from '@/utils/chatDate'
|
|
11
|
+import icon24 from '@/assets/mine-icon24.png'
|
|
12
|
+import icon25 from '@/assets/mine-icon25.png'
|
9
|
13
|
import EditUserDetailBasicInfo from '../components/EditUserDetailBasicInfo'
|
10
|
14
|
import useFollow from './hooks/useFollow'
|
11
|
|
-import '@/assets/css/iconfont.css'
|
|
15
|
+
|
12
|
16
|
import './index.scss'
|
13
|
17
|
|
14
|
18
|
const addDays = (dt, days) => {
|
|
@@ -44,7 +48,7 @@ export default withLayout((props) => {
|
44
|
48
|
|
45
|
49
|
useEffect(() => {
|
46
|
50
|
if (id) {
|
47
|
|
- getCustomerDetail(id).then((x) => {
|
|
51
|
+ fetch({ url: `${API_CUSTOMER_DETAILINFO}/${id}` }).then((x) => {
|
48
|
52
|
setCustBaseInfo(x || {})
|
49
|
53
|
})
|
50
|
54
|
|
|
@@ -73,11 +77,11 @@ export default withLayout((props) => {
|
73
|
77
|
<view className='Icon'>
|
74
|
78
|
<Image mode='aspectFill' src={custBaseInfo.avatarurl || custBaseInfo.picture}></Image>
|
75
|
79
|
</view>
|
76
|
|
- <view className='flex-item'>
|
|
80
|
+ <view className='flex-item' onClick={() => setShowUserEditor(true)}>
|
77
|
81
|
<text>{custBaseInfo.name}</text>
|
78
|
82
|
<text>{custBaseInfo.phone}</text>
|
79
|
83
|
</view>
|
80
|
|
- <text className='iconfont icon-jiantouright' onClick={() => setShowUserEditor(true)}></text>
|
|
84
|
+ <text className='iconfont icon-jiantouright'></text>
|
81
|
85
|
</view>
|
82
|
86
|
<view className='Status'>
|
83
|
87
|
{/* <view className='flex-h'>
|
|
@@ -117,43 +121,46 @@ export default withLayout((props) => {
|
117
|
121
|
</view>
|
118
|
122
|
|
119
|
123
|
{/* 房源订单 */}
|
120
|
|
- <view className='Order'>
|
121
|
|
- <view className='Title flex-h'>
|
122
|
|
- <text>房源订单</text>
|
123
|
|
- </view>
|
124
|
|
- <view className='Content'>
|
125
|
|
- <view>
|
126
|
|
- <view className='flex-h'>
|
127
|
|
- <view className='flex-item'>
|
128
|
|
- <text>120万(户型名称)</text>
|
129
|
|
- </view>
|
130
|
|
- <Image mode='heightFix' src={require('../../../assets/mine-icon25.png')}></Image>
|
131
|
|
- <text className='active'>签约</text>
|
132
|
|
- <text className='iconfont icon-jiantouright'></text>
|
|
124
|
+ {
|
|
125
|
+ custBaseInfo.customerSignatory?.length > 0 && (
|
|
126
|
+ <view className='Order'>
|
|
127
|
+ <view className='Title flex-h'>
|
|
128
|
+ <text>房源订单</text>
|
133
|
129
|
</view>
|
134
|
|
- <view className='Info'>
|
135
|
|
- <text>建筑面积:117㎡</text>
|
136
|
|
- <text>总价:X/单价:XXX</text>
|
137
|
|
- <text>套内面积:X</text>
|
138
|
|
- </view>
|
139
|
|
- </view>
|
140
|
|
- <view>
|
141
|
|
- <view className='flex-h'>
|
142
|
|
- <view className='flex-item'>
|
143
|
|
- <text>120万(户型名称)</text>
|
144
|
|
- </view>
|
145
|
|
- <Image mode='heightFix' src={require('../../../assets/mine-icon24.png')}></Image>
|
146
|
|
- <text className='active'>到访</text>
|
147
|
|
- <text className='iconfont icon-jiantouright'></text>
|
148
|
|
- </view>
|
149
|
|
- <view className='Info'>
|
150
|
|
- <text>建筑面积:117㎡</text>
|
151
|
|
- <text>总价:X/单价:XXX</text>
|
152
|
|
- <text>套内面积:X</text>
|
|
130
|
+ <view className='Content'>
|
|
131
|
+ {
|
|
132
|
+ custBaseInfo.customerSignatory.map((item) => {
|
|
133
|
+ const apartment = item.buildingApartment || {}
|
|
134
|
+ const { apartmentName } = apartment
|
|
135
|
+ const nameShow = apartmentName ? `(${apartmentName})` : ''
|
|
136
|
+ const status = item.status === 5 ? '结佣' : '签约'
|
|
137
|
+ const icon = item.status === 5 ? icon24 : icon25
|
|
138
|
+ const buildingArea = item.buildingArea ? `${Number(item.buildingArea).toFixed(1)}㎡` : '暂无'
|
|
139
|
+ const insideArea = item.insideArea ? `${Number(item.insideArea).toFixed(1)}㎡` : '暂无'
|
|
140
|
+
|
|
141
|
+ return (
|
|
142
|
+ <view key={item.customerSignatoryId}>
|
|
143
|
+ <view className='flex-h'>
|
|
144
|
+ <view className='flex-item'>
|
|
145
|
+ <text>{`${item.price}${nameShow}`}</text>
|
|
146
|
+ </view>
|
|
147
|
+ <Image mode='heightFix' src={icon}></Image>
|
|
148
|
+ <text className='active'>{status}</text>
|
|
149
|
+ <text className='iconfont icon-jiantouright'></text>
|
|
150
|
+ </view>
|
|
151
|
+ <view className='Info'>
|
|
152
|
+ <text>{`建筑面积: ${buildingArea}`}</text>
|
|
153
|
+ <text></text>
|
|
154
|
+ <text>{`套内面积: ${insideArea}`}</text>
|
|
155
|
+ </view>
|
|
156
|
+ </view>
|
|
157
|
+ )
|
|
158
|
+ })
|
|
159
|
+ }
|
153
|
160
|
</view>
|
154
|
161
|
</view>
|
155
|
|
- </view>
|
156
|
|
- </view>
|
|
162
|
+ )
|
|
163
|
+ }
|
157
|
164
|
|
158
|
165
|
{/* 操作人员 */}
|
159
|
166
|
{/* <view className='OptUser'>
|