master
parent
ffb3a7ce7b
commit
01d37732d2
@ -0,0 +1,116 @@
|
|||||||
|
import {
|
||||||
|
pbcUsersPageUsingPost,
|
||||||
|
} from '@/services/pop-b2b2c/pbcUsersController';
|
||||||
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
|
import { Link, useAccess } from '@umijs/max';
|
||||||
|
import React, { useRef } from 'react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询表格
|
||||||
|
* @param param0
|
||||||
|
*/
|
||||||
|
const fetchData = async (params: API.PageVO) => {
|
||||||
|
const msg = await pbcUsersPageUsingPost(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 access: any = useAccess();
|
||||||
|
|
||||||
|
const columns: ProColumns<API.PbcBusiness>[] = [
|
||||||
|
{
|
||||||
|
title: '浏览次数',
|
||||||
|
dataIndex: 'pbcBusinessName',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户编号',
|
||||||
|
dataIndex: 'pbcBusinessCode',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户名称',
|
||||||
|
dataIndex: 'pbcBusinessName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '联系人',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'pbcBusinessContact',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户手机号',
|
||||||
|
width: 110,
|
||||||
|
dataIndex: 'pbcBusinessContactMobile',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '主营品类',
|
||||||
|
dataIndex: 'pbcBusinessMainCategory',
|
||||||
|
ellipsis: true,
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '注册日期',
|
||||||
|
dataIndex: 'pbcCreateAt',
|
||||||
|
width: 150,
|
||||||
|
valueType: 'dateTimeRange',
|
||||||
|
render: (text, record) => record.pbcCreateAt,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户等级',
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'pbcBusinessLevel',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 140,
|
||||||
|
valueType: 'option',
|
||||||
|
render: (text, record) => (
|
||||||
|
<Link to={`/business/detail/${record.pbcId}?isEdit=0`}>详情</Link>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<PageContainer
|
||||||
|
header={{
|
||||||
|
title: '',
|
||||||
|
breadcrumb: {},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProTable<API.PbcBusiness>
|
||||||
|
columns={columns}
|
||||||
|
actionRef={actionRef}
|
||||||
|
request={fetchData}
|
||||||
|
rowKey="pbcId"
|
||||||
|
size="small"
|
||||||
|
bordered
|
||||||
|
search={{
|
||||||
|
labelWidth: 'auto',
|
||||||
|
span: 6,
|
||||||
|
}}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 20,
|
||||||
|
showSizeChanger: true,
|
||||||
|
}}
|
||||||
|
scroll={{
|
||||||
|
y: 'calc(100vh - 320px)',
|
||||||
|
}}
|
||||||
|
dateFormatter="string"
|
||||||
|
options={false}
|
||||||
|
toolBarRender={() => []}
|
||||||
|
/>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TableList;
|
@ -0,0 +1,86 @@
|
|||||||
|
import Constants from '@/constants';
|
||||||
|
import {
|
||||||
|
pbcUsersPageUsingPost,
|
||||||
|
} from '@/services/pop-b2b2c/pbcUsersController';
|
||||||
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
|
import React, { useRef } from 'react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询表格
|
||||||
|
* @param param0
|
||||||
|
*/
|
||||||
|
const fetchData = async (params: API.PageVO) => {
|
||||||
|
const msg = await pbcUsersPageUsingPost(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 columns: ProColumns<API.PbcBusiness>[] = [
|
||||||
|
{
|
||||||
|
title: '商户编号',
|
||||||
|
dataIndex: 'pbcBusinessCode',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户名称',
|
||||||
|
dataIndex: 'pbcBusinessName',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '渠道',
|
||||||
|
dataIndex: 'pbcVisitSourceEnum',
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: Constants.pbcVisitSourceEnum
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '访问时间',
|
||||||
|
dataIndex: 'pbcCreateAt',
|
||||||
|
width: 150,
|
||||||
|
hideInTable: true,
|
||||||
|
valueType: 'dateTimeRange',
|
||||||
|
render: (text, record) => record.pbcCreateAt,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<PageContainer
|
||||||
|
header={{
|
||||||
|
title: '',
|
||||||
|
breadcrumb: {},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProTable<API.PbcBusiness>
|
||||||
|
columns={columns}
|
||||||
|
actionRef={actionRef}
|
||||||
|
request={fetchData}
|
||||||
|
rowKey="pbcId"
|
||||||
|
size="small"
|
||||||
|
bordered
|
||||||
|
search={{
|
||||||
|
labelWidth: 'auto',
|
||||||
|
span: 6,
|
||||||
|
}}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 20,
|
||||||
|
showSizeChanger: true,
|
||||||
|
}}
|
||||||
|
scroll={{
|
||||||
|
y: 'calc(100vh - 320px)',
|
||||||
|
}}
|
||||||
|
dateFormatter="string"
|
||||||
|
options={false}
|
||||||
|
toolBarRender={() => []}
|
||||||
|
/>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TableList;
|
||||||
|
|
@ -0,0 +1,100 @@
|
|||||||
|
import Constants from '@/constants';
|
||||||
|
import {
|
||||||
|
pbcUsersPageUsingPost,
|
||||||
|
} from '@/services/pop-b2b2c/pbcUsersController';
|
||||||
|
import { handlePageQuery } from '@/utils/utils';
|
||||||
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
|
import React, { useRef } from 'react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询表格
|
||||||
|
* @param param0
|
||||||
|
*/
|
||||||
|
const fetchData = async (params: API.PageVO) => {
|
||||||
|
const msg = await pbcUsersPageUsingPost(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 columns: ProColumns<API.PbcUsers>[] = [
|
||||||
|
{
|
||||||
|
title: '人员名称',
|
||||||
|
dataIndex: 'pbcUserNickName',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'pbcUserMobile',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '新老客',
|
||||||
|
dataIndex: 'pbcVipGradeName',
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: Constants.pbcMembersType
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '扫码时间',
|
||||||
|
dataIndex: 'pbcCreateAt',
|
||||||
|
valueType: 'dateTimeRange',
|
||||||
|
render: (text, record) => record.pbcCreateAt
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<PageContainer
|
||||||
|
header={{
|
||||||
|
title: '',
|
||||||
|
breadcrumb: {},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProTable<API.PbcUsers>
|
||||||
|
columns={columns}
|
||||||
|
actionRef={actionRef}
|
||||||
|
request={(param: any) => {
|
||||||
|
console.log(param)
|
||||||
|
let hasUserType = false
|
||||||
|
if (param.pbcUserType) {
|
||||||
|
param.pbcUserType = parseInt(param.pbcUserType)
|
||||||
|
hasUserType = true
|
||||||
|
}
|
||||||
|
const queryParam = handlePageQuery(param);
|
||||||
|
if (!hasUserType && queryParam.filters) {
|
||||||
|
queryParam.filters.push({
|
||||||
|
key: 'pbcUserType'.replace(/([A-Z])/g, '_$1').toLowerCase(),
|
||||||
|
value: 1,
|
||||||
|
action: '<=',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return fetchData(queryParam);
|
||||||
|
}}
|
||||||
|
rowKey="pbcId"
|
||||||
|
size="small"
|
||||||
|
bordered
|
||||||
|
search={{
|
||||||
|
labelWidth: 'auto',
|
||||||
|
span: 6,
|
||||||
|
}}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 20,
|
||||||
|
showSizeChanger: true,
|
||||||
|
}}
|
||||||
|
scroll={{
|
||||||
|
y: 'calc(100vh - 320px)',
|
||||||
|
}}
|
||||||
|
dateFormatter="string"
|
||||||
|
options={false}
|
||||||
|
toolBarRender={() => []}
|
||||||
|
/>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TableList;
|
@ -0,0 +1,111 @@
|
|||||||
|
import Constants from '@/constants';
|
||||||
|
import {
|
||||||
|
pbcUsersPageUsingPost,
|
||||||
|
} from '@/services/pop-b2b2c/pbcUsersController';
|
||||||
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
|
import { Link, useAccess } from '@umijs/max';
|
||||||
|
import React, { useRef } from 'react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询表格
|
||||||
|
* @param param0
|
||||||
|
*/
|
||||||
|
const fetchData = async (params: API.PageVO) => {
|
||||||
|
const msg = await pbcUsersPageUsingPost(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 access: any = useAccess();
|
||||||
|
|
||||||
|
const columns: ProColumns<API.PbcBusiness>[] = [
|
||||||
|
{
|
||||||
|
title: '商户编号',
|
||||||
|
dataIndex: 'pbcBusinessCode',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户名称',
|
||||||
|
dataIndex: 'pbcBusinessName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '联系人',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'pbcBusinessContact',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户手机号',
|
||||||
|
width: 110,
|
||||||
|
dataIndex: 'pbcBusinessContactMobile',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户类别',
|
||||||
|
dataIndex: 'pbcBusinessType',
|
||||||
|
width: 80,
|
||||||
|
valueType: 'select',
|
||||||
|
search: false,
|
||||||
|
valueEnum: Constants.pbcBusinessType,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '主营品类',
|
||||||
|
dataIndex: 'pbcBusinessMainCategory',
|
||||||
|
ellipsis: true,
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '注册日期',
|
||||||
|
dataIndex: 'pbcCreateAt',
|
||||||
|
width: 150,
|
||||||
|
valueType: 'dateTimeRange',
|
||||||
|
render: (text, record) => record.pbcCreateAt,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户等级',
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'pbcBusinessLevel',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<PageContainer
|
||||||
|
header={{
|
||||||
|
title: '',
|
||||||
|
breadcrumb: {},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProTable<API.PbcBusiness>
|
||||||
|
columns={columns}
|
||||||
|
actionRef={actionRef}
|
||||||
|
request={fetchData}
|
||||||
|
rowKey="pbcId"
|
||||||
|
size="small"
|
||||||
|
bordered
|
||||||
|
search={{
|
||||||
|
labelWidth: 'auto',
|
||||||
|
span: 6,
|
||||||
|
}}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 20,
|
||||||
|
showSizeChanger: true,
|
||||||
|
}}
|
||||||
|
scroll={{
|
||||||
|
y: 'calc(100vh - 320px)',
|
||||||
|
}}
|
||||||
|
dateFormatter="string"
|
||||||
|
options={false}
|
||||||
|
toolBarRender={() => []}
|
||||||
|
/>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TableList;
|
@ -0,0 +1,114 @@
|
|||||||
|
import Constants from '@/constants';
|
||||||
|
import { listAdminTreeUsingGet } from '@/services/pop-b2b2c/pbcCategoryController';
|
||||||
|
import {
|
||||||
|
pbcUsersPageUsingPost,
|
||||||
|
} from '@/services/pop-b2b2c/pbcUsersController';
|
||||||
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
|
import React, { useRef } from 'react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询表格
|
||||||
|
* @param param0
|
||||||
|
*/
|
||||||
|
const fetchData = async (params: API.PageVO) => {
|
||||||
|
const msg = await pbcUsersPageUsingPost(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 columns: ProColumns<API.PbcProduct>[] = [
|
||||||
|
{
|
||||||
|
title: '商品类目',
|
||||||
|
dataIndex: 'pbcProductCategoryId',
|
||||||
|
hideInTable: true,
|
||||||
|
valueType: 'cascader',
|
||||||
|
fieldProps: {
|
||||||
|
fieldNames: { label: 'pbcCategoryName', value: 'pbcId', children: 'children' },
|
||||||
|
},
|
||||||
|
request: async () => {
|
||||||
|
const msg = await listAdminTreeUsingGet({ type: 2 });
|
||||||
|
if (msg.retcode && msg.data) {
|
||||||
|
return msg.data;
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品大类',
|
||||||
|
dataIndex: 'pbcProductTopCategoryName',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品中类',
|
||||||
|
dataIndex: 'pbcProductParentCategoryName',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品小类',
|
||||||
|
dataIndex: 'pbcProductCategoryName',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品名称',
|
||||||
|
dataIndex: 'pbcProductTitle',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '价格',
|
||||||
|
dataIndex: 'pbcProductPrice',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '所属商户',
|
||||||
|
dataIndex: 'pbcBusinessName',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'pbcState',
|
||||||
|
valueType: 'select',
|
||||||
|
search: false,
|
||||||
|
valueEnum: Constants.pbcProductState,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<PageContainer
|
||||||
|
header={{
|
||||||
|
title: '',
|
||||||
|
breadcrumb: {},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProTable<API.PbcBusiness>
|
||||||
|
columns={columns}
|
||||||
|
actionRef={actionRef}
|
||||||
|
request={fetchData}
|
||||||
|
rowKey="pbcId"
|
||||||
|
size="small"
|
||||||
|
bordered
|
||||||
|
search={{
|
||||||
|
labelWidth: 'auto',
|
||||||
|
span: 6,
|
||||||
|
}}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 20,
|
||||||
|
showSizeChanger: true,
|
||||||
|
}}
|
||||||
|
scroll={{
|
||||||
|
y: 'calc(100vh - 320px)',
|
||||||
|
}}
|
||||||
|
dateFormatter="string"
|
||||||
|
options={false}
|
||||||
|
toolBarRender={() => []}
|
||||||
|
/>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TableList;
|
@ -0,0 +1,114 @@
|
|||||||
|
import { queryAllRoleUsingPost } from '@/services/pop-b2b2c/pbcRoleController';
|
||||||
|
import {
|
||||||
|
pbcUsersPageUsingPost,
|
||||||
|
} from '@/services/pop-b2b2c/pbcUsersController';
|
||||||
|
import { handlePageQuery } from '@/utils/utils';
|
||||||
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
|
import React, { useRef } from 'react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询表格
|
||||||
|
* @param param0
|
||||||
|
*/
|
||||||
|
const fetchData = async (params: API.PageVO) => {
|
||||||
|
const msg = await pbcUsersPageUsingPost(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 columns: ProColumns<API.PbcUsers>[] = [
|
||||||
|
{
|
||||||
|
title: '人员姓名',
|
||||||
|
dataIndex: 'pbcUserNickName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'pbcUserMobile',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '角色',
|
||||||
|
dataIndex: 'pbcUserRole',
|
||||||
|
valueType: 'select',
|
||||||
|
request: async () => {
|
||||||
|
const msg = await queryAllRoleUsingPost();
|
||||||
|
if (msg.retcode && msg.data) {
|
||||||
|
return msg.data.map((e) => {
|
||||||
|
return {
|
||||||
|
label: e.roleName,
|
||||||
|
value: e.pbcId,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '注册商家数',
|
||||||
|
dataIndex: 'pbcUserMobile',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '上传商品数',
|
||||||
|
dataIndex: 'pbcUserMobile',
|
||||||
|
search: false
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<PageContainer
|
||||||
|
header={{
|
||||||
|
title: '',
|
||||||
|
breadcrumb: {},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProTable<API.PbcUsers>
|
||||||
|
columns={columns}
|
||||||
|
actionRef={actionRef}
|
||||||
|
request={(param: any) => {
|
||||||
|
console.log(param)
|
||||||
|
let hasUserType = false
|
||||||
|
if (param.pbcUserType) {
|
||||||
|
param.pbcUserType = parseInt(param.pbcUserType)
|
||||||
|
hasUserType = true
|
||||||
|
}
|
||||||
|
const queryParam = handlePageQuery(param);
|
||||||
|
if (!hasUserType && queryParam.filters) {
|
||||||
|
queryParam.filters.push({
|
||||||
|
key: 'pbcUserType'.replace(/([A-Z])/g, '_$1').toLowerCase(),
|
||||||
|
value: 1,
|
||||||
|
action: '<=',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return fetchData(queryParam);
|
||||||
|
}}
|
||||||
|
rowKey="pbcId"
|
||||||
|
size="small"
|
||||||
|
bordered
|
||||||
|
search={{
|
||||||
|
labelWidth: 'auto',
|
||||||
|
span: 6,
|
||||||
|
}}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 20,
|
||||||
|
showSizeChanger: true,
|
||||||
|
}}
|
||||||
|
scroll={{
|
||||||
|
y: 'calc(100vh - 320px)',
|
||||||
|
}}
|
||||||
|
dateFormatter="string"
|
||||||
|
options={false}
|
||||||
|
toolBarRender={() => []}
|
||||||
|
/>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TableList;
|
Loading…
Reference in New Issue