预约名单
parent
0408fe50d0
commit
6ba53e1a20
@ -0,0 +1,87 @@
|
|||||||
|
import React, { useRef } from 'react';
|
||||||
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { handlePageQuery } from '@/utils/utils';
|
||||||
|
import { applyInnovativeServicePageUsingPost } from '@/services/pop-b2b2c/pbcInnovativeServiceController';
|
||||||
|
import { useParams } from '@umijs/max';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询表格
|
||||||
|
* @param param0
|
||||||
|
*/
|
||||||
|
const fetchData = async (params: API.PageVO) => {
|
||||||
|
const msg = await applyInnovativeServicePageUsingPost(params);
|
||||||
|
return {
|
||||||
|
data: msg.data?.records,
|
||||||
|
total: msg.data?.total,
|
||||||
|
success: msg.retcode,
|
||||||
|
} as any;
|
||||||
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||||
|
const TableList: React.FC<{}> = () => {
|
||||||
|
const actionRef = useRef<ActionType>();
|
||||||
|
const params = useParams();
|
||||||
|
|
||||||
|
const columns: ProColumns<API.PbcInnovativeServiceApply>[] = [
|
||||||
|
{
|
||||||
|
title: '创新标题',
|
||||||
|
dataIndex: 'pbcInnovativeServiceTitle',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '预约人',
|
||||||
|
dataIndex: 'pbcUserName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '预约手机号',
|
||||||
|
dataIndex: 'pbcMobile',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '预约人公司',
|
||||||
|
dataIndex: 'pbcCompany',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
dataIndex: 'pbcRemark',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<PageContainer
|
||||||
|
header={{
|
||||||
|
title: '',
|
||||||
|
breadcrumb: {},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProTable<API.PbcInnovativeServiceApply>
|
||||||
|
columns={columns}
|
||||||
|
actionRef={actionRef}
|
||||||
|
request={(param: any) => {
|
||||||
|
const queryParam = handlePageQuery(param);
|
||||||
|
return fetchData(queryParam);
|
||||||
|
}}
|
||||||
|
rowKey="pbcId"
|
||||||
|
size="small"
|
||||||
|
bordered
|
||||||
|
search={{
|
||||||
|
labelWidth: 'auto',
|
||||||
|
span: 6
|
||||||
|
}}
|
||||||
|
params={{ pbcInnovativeServiceId: params.id }}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 20,
|
||||||
|
showSizeChanger: true,
|
||||||
|
}}
|
||||||
|
scroll={{
|
||||||
|
y: 'calc(100vh - 320px)',
|
||||||
|
}}
|
||||||
|
dateFormatter="string"
|
||||||
|
options={false}
|
||||||
|
toolBarRender={() => []}
|
||||||
|
/>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TableList;
|
Loading…
Reference in New Issue