|
|
@@ -48,17 +48,96 @@ const ReminderList = props => {
|
|
|
dataIndex: 'serviceTime'
|
|
|
}
|
|
|
]
|
|
|
+ const customerColumns = [
|
|
|
+ {
|
|
|
+ title: '客户名称',
|
|
|
+ dataIndex: 'staffName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '地区',
|
|
|
+ dataIndex: 'districtName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '电话',
|
|
|
+ dataIndex: 'phone'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '手机',
|
|
|
+ dataIndex: 'telephone'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '重要联系人',
|
|
|
+ dataIndex: 'companyName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '联系人',
|
|
|
+ dataIndex: 'clientName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '上一次服务',
|
|
|
+ dataIndex: 'createTime'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '服务内容',
|
|
|
+ dataIndex: 'remarks'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '服务提醒',
|
|
|
+ dataIndex: 'updateTime'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ const businessColumns = [
|
|
|
+ {
|
|
|
+ title: '客户名称',
|
|
|
+ dataIndex: 'staffName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '地区',
|
|
|
+ dataIndex: 'districtName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '电话',
|
|
|
+ dataIndex: 'phone'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '手机',
|
|
|
+ dataIndex: 'telephone'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '重要联系人',
|
|
|
+ dataIndex: 'companyName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '联系人',
|
|
|
+ dataIndex: 'clientName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '上一次服务',
|
|
|
+ dataIndex: 'createTime'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '服务内容',
|
|
|
+ dataIndex: 'mark'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '服务提醒',
|
|
|
+ dataIndex: 'serviceTime'
|
|
|
+ }
|
|
|
+ ]
|
|
|
const dataMap = {
|
|
|
0: {
|
|
|
key: 'client',
|
|
|
columns: clientColumns
|
|
|
},
|
|
|
- 1: 'customer',
|
|
|
- 2: 'business'
|
|
|
+ 1: {
|
|
|
+ key: 'customer',
|
|
|
+ columns: customerColumns
|
|
|
+ },
|
|
|
+ 2: {
|
|
|
+ key: 'business',
|
|
|
+ columns: businessColumns
|
|
|
+ }
|
|
|
}
|
|
|
- // const columnsMap = {
|
|
|
- // 0: 'clientColumns'
|
|
|
- // }
|
|
|
const [dataSource, setDataSource] = useState(null)
|
|
|
const { run: tryGetList } = useRequest(params => queryReminderList(params), {
|
|
|
manual: true,
|
|
|
@@ -86,7 +165,7 @@ const ReminderList = props => {
|
|
|
<div className="mx-4">
|
|
|
<ProTable
|
|
|
size="small"
|
|
|
- rowKey={record => record.rank}
|
|
|
+ rowKey={record => record.id}
|
|
|
columns={dataMap[dataType].columns}
|
|
|
dataSource={dataSource}
|
|
|
search={false}
|