|
|
|
|
1
|
import React, { useState, useEffect } from 'react'
|
1
|
import React, { useState, useEffect } from 'react'
|
2
|
import { Select, Spin, Table, Button, Form, Input, Divider, Modal,Popconfirm } from 'antd'
|
2
|
import { Select, Spin, Table, Button, Form, Input, Divider, Modal,Popconfirm } from 'antd'
|
3
|
import NavLink from 'umi/navlink'
|
3
|
import NavLink from 'umi/navlink'
|
|
|
4
|
+import moment from 'moment'
|
4
|
import { fetch, apis, fetchList } from '@/utils/request'
|
5
|
import { fetch, apis, fetchList } from '@/utils/request'
|
5
|
import { exportExcel } from '@/utils/utils'
|
6
|
import { exportExcel } from '@/utils/utils'
|
6
|
import IntegralRecord from '../customerlist/components/integralRecord'
|
7
|
import IntegralRecord from '../customerlist/components/integralRecord'
|
|
|
|
|
110
|
key="avatarurl"
|
111
|
key="avatarurl"
|
111
|
render={t => <img src={t} alt="" style={{width: '64px', height: '64px'}} />}
|
112
|
render={t => <img src={t} alt="" style={{width: '64px', height: '64px'}} />}
|
112
|
/>
|
113
|
/>
|
113
|
- <Table.Column title="姓名" dataIndex="nickname" key="nickname" />
|
|
|
114
|
- <Table.Column title="电话" dataIndex="phone" key="phone" render={t => t ? t.replace(/(\d{3})\d*(\d{4})/,'$1****$2') : ''} />
|
|
|
|
|
114
|
+ <Table.Column title="姓名" dataIndex="nickname" key="nickname" render={(t,row) => row.name || t} />
|
|
|
115
|
+ <Table.Column title="电话" dataIndex="phone" key="phone" render={(t, row) => {
|
|
|
116
|
+ const phone = row.tel || t || ''
|
|
|
117
|
+ return phone.replace(/(\d{3})\d*(\d{4})/,'$1****$2')
|
|
|
118
|
+ }} />
|
|
|
119
|
+ <Table.Column title="性别" dataIndex="gender" key="gender" render={(t,row) => {
|
|
|
120
|
+ const sex = row.sex || t
|
|
|
121
|
+ if (!sex) return ''
|
|
|
122
|
+
|
|
|
123
|
+ return sex == 1 ? '男' : '女'
|
|
|
124
|
+ }} />
|
115
|
<Table.Column title="推荐人" dataIndex="sharePersonName" key="sharePersonName" />
|
125
|
<Table.Column title="推荐人" dataIndex="sharePersonName" key="sharePersonName" />
|
116
|
- <Table.Column title="总积分" dataIndex="points" key="points" />
|
|
|
117
|
- <Table.Column title="创建时间" dataIndex="createDate" key="createDate" />
|
|
|
118
|
- <Table.Column
|
|
|
|
|
126
|
+ {/* <Table.Column title="总积分" dataIndex="points" key="points" /> */}
|
|
|
127
|
+ <Table.Column title="创建时间" dataIndex="createDate" key="createDate" render={t => moment(t).format('YYYY-MM-DD HH:mm')} />
|
|
|
128
|
+ {/* <Table.Column
|
119
|
title="操作"
|
129
|
title="操作"
|
120
|
key="action"
|
130
|
key="action"
|
121
|
render={(_, row) => {
|
131
|
render={(_, row) => {
|
|
|
|
|
125
|
</>
|
135
|
</>
|
126
|
)
|
136
|
)
|
127
|
}}
|
137
|
}}
|
128
|
- />
|
|
|
|
|
138
|
+ /> */}
|
129
|
</Table>
|
139
|
</Table>
|
130
|
<IntegralRecord visibleData={showPoints} onCancel={() => setShowPoints({visible: false, customerId: ''})} />
|
140
|
<IntegralRecord visibleData={showPoints} onCancel={() => setShowPoints({visible: false, customerId: ''})} />
|
131
|
</div>
|
141
|
</div>
|