提交 dd92eb99 作者: ZhangLingKun

Merge branch 'develop'

流水线 #8533 已通过 于阶段
in 1 分 13 秒
......@@ -14,4 +14,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: caf3a70df639e8e40961ed202c1d0706c79aef82
newTag: d0ff64db0f4fdd8845395b252a0b8de5c3b46312
......@@ -287,3 +287,24 @@ export type listAppUserCountType = InterFunction<
unAuditedSum: number;
}
>;
// 合伙人列表
export type getListPartnerType = InterListFunction<
{
id?: number;
phoneNumber?: string;
status?: number;
userAddress?: string;
userName?: string;
},
{
userAddress: string;
userName: string;
phoneNumber: string;
id: number;
createTime: string;
updateTime: null;
status: number;
userAccountId: number;
intention: null;
}
>;
......@@ -11,6 +11,7 @@ import {
deleteApplyTag,
editUserApplyTag,
editUserApplyTagDetails,
getListPartnerType,
listAppUserCountType,
listAppUserType,
listAuthPageType,
......@@ -71,4 +72,8 @@ export class CustomManageAPI {
// 商家列表-数据统计
static getListAppUserCount: listAppUserCountType = () =>
axios.get('/userapp/cooperation/getAuditSum');
// 合伙人列表
static getListPartner: getListPartnerType = (data) =>
axios.post('/userapp/Partner/listPartner', data);
}
......@@ -57,7 +57,22 @@ interface propsType {
onRef?: any;
}
const SearchBox: React.FC<propsType> = (props) => {
const SearchBox: React.FC<propsType> = (
props = {
search: [],
searchData: null,
preFixBtn: null,
sufFixBtn: null,
child: null,
children: null,
isExport: false,
exportEvent: null,
baseRef: null,
otherChild: null,
isReset: true,
isSearch: true,
},
) => {
// 组件的默认值
SearchBox.defaultProps = {
search: [],
......
import React, { useEffect, useState } from 'react';
import SearchBox from '~/components/search-box';
import { InterListType, InterReqListType } from '~/api/interface';
import { getListPartnerType } from '~/api/interface/customManageType';
import { CustomManageAPI } from '~/api';
import { Table } from 'antd';
import { ColumnsType } from 'antd/es/table';
// 表格数据类型
type TableType = InterListType<getListPartnerType>;
// 请求类型
type ReqType = InterReqListType<getListPartnerType>;
// 搜索表单的数据
let query: ReqType = {};
const CustomApplyPage: React.FC = () => {
// 表格分页配置
const [pagination, setPagination] = useState({
total: 0,
pageSize: 10,
current: 1,
totalPage: 0,
});
// 表格数据
const [tableData, setTableData] = useState<TableType>([]);
// 加载列表
const getTableList = async (value = {}) => {
// 只需要修改这个地方的接口即可
const res = await CustomManageAPI.getListPartner({
pageNo: pagination.current,
pageSize: pagination.pageSize,
...value,
...query,
});
if (res && res.code === '200') {
const { list, pageNo, totalCount, pageSize, totalPage } = res.result; // 解构
setPagination({
total: totalCount,
current: pageNo,
pageSize,
totalPage,
});
setTableData(list);
}
};
// 翻页
const paginationChange = (pageNo: number, pageSize: number) => {
getTableList({ pageNo, pageSize }).then();
};
// 表单提交
const onFinish = (data: ReqType) => {
pagination.current = 1;
query = data;
getTableList(data).then();
};
// componentDidMount
useEffect(() => {
query = {};
(async () => {
await getTableList();
})();
}, []);
// 表格结构
const columns: ColumnsType<TableType[0]> = [
{
title: '合伙人姓名',
dataIndex: 'userName',
align: 'center',
},
{
title: '合伙人电话',
dataIndex: 'phoneNumber',
align: 'center',
},
{
title: '申请城市',
dataIndex: 'userAddress',
align: 'center',
},
{
title: '申请意向',
dataIndex: 'intention',
align: 'center',
ellipsis: true,
width: 200,
render: (text) => text || '无',
},
{
title: '申请时间',
dataIndex: 'createTime',
align: 'center',
},
];
return (
<>
<SearchBox
search={[
{
label: '合伙人姓名',
name: 'userName',
type: 'input',
placeholder: '请输入合伙人姓名',
},
{
label: '合伙人电话',
name: 'phoneNumber',
type: 'input',
maxlength: 11,
placeholder: '请输入合伙人电话',
},
]}
isSearch={true}
isReset={true}
searchData={onFinish}
/>
<Table
size='small'
dataSource={tableData}
columns={columns}
rowKey='id'
bordered={true}
// scroll={{ x: 1200 }}
pagination={{
total: pagination.total,
pageSize: pagination.pageSize,
current: pagination.current,
showSizeChanger: true,
showQuickJumper: true,
onChange: (page: number, pageSize: number) => paginationChange(page, pageSize),
showTotal: (total, range) => `当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`,
}}
// rowSelection={{ selectedRowKeys, onChange: onSelectChange }}
/>
</>
);
};
export default CustomApplyPage;
......@@ -172,6 +172,7 @@ import FlyerTeamView from '~/pages/flyerManage/flyerTeam';
import CompanyMemberView from '~/pages/systemManage/companyManage/companyMember';
import CourseCategoryView from '~/pages/pilotTraining/courseCategory';
import NoticeManageView from '~/pages/resourceManage/noticeManage';
import CustomApplyPage from '~/pages/customManage/customApply';
const AddressManageView = React.lazy(() => import('~/pages/systemManage/addressManage'));
// const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表
......@@ -277,11 +278,11 @@ export const routerList: Array<RouteObjectType> = [
element: withLoadingComponent(<CustomVerificationDetailView />),
errorElement: <ErrorPage />,
meta: {
id: 250,
id: 221,
title: '实名认证详情',
hidden: true,
icon: <SolutionOutlined />,
pid: 260,
pid: 220,
},
},
{
......@@ -352,6 +353,16 @@ export const routerList: Array<RouteObjectType> = [
icon: <AuditOutlined />,
},
},
{
path: '/customManage/customApply',
element: withLoadingComponent(<CustomApplyPage />),
errorElement: <ErrorPage />,
meta: {
id: 250,
title: '城市合伙人',
icon: <AuditOutlined />,
},
},
// {
// path: '/customManage/customMoney',
// element: withLoadingComponent(<CustomMoneyView />),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论