Commit 0f8ead1f authored by XieZhiXiong's avatar XieZhiXiong

feat: 对接 会员档案信息 相关

parent bbfc5065
......@@ -98,6 +98,20 @@ const MemberRoute: RouterChild = {
component: '@/pages/member/memberMaintain/detailed/sincerityInfo',
hideInMenu: true,
},
// 会员信息-详情-档案信息
{
path: '/memberCenter/memberAbility/manage/maintain/detail/archiveInfo',
name: 'archiveInfo',
component: '@/pages/member/memberMaintain/detailed/archiveInfo',
hideInMenu: true,
},
// 会员信息-详情-变更信息
{
path: '/memberCenter/memberAbility/manage/maintain/detail/changedInfo',
name: 'changedInfo',
component: '@/pages/member/memberMaintain/detailed/changedInfo',
hideInMenu: true,
},
],
},
// 会员信息-冻结
......@@ -402,6 +416,20 @@ const MemberRoute: RouterChild = {
component: '@/pages/member/memberQuery/detailed/sincerityInfo',
hideInMenu: true,
},
// 会员信息查询-详情-档案信息
{
path: '/memberCenter/memberAbility/profile/query/detail/archiveInfo',
name: 'archiveInfo',
component: '@/pages/member/memberQuery/detailed/archiveInfo',
hideInMenu: true,
},
// 会员信息查询-详情-变更信息
{
path: '/memberCenter/memberAbility/profile/query/detail/changedInfo',
name: 'changedInfo',
component: '@/pages/member/memberQuery/detailed/changedInfo',
hideInMenu: true,
},
],
},
// 新增会员角色
......
......@@ -123,6 +123,8 @@ export default {
'menu.memberAbility.memberManage.maintainDetail.levelInfo': '会员等级信息',
'menu.memberAbility.memberManage.maintainDetail.equityInfo': '权益信息',
'menu.memberAbility.memberManage.maintainDetail.sincerityInfo': '诚信信息',
'menu.memberAbility.memberManage.maintainDetail.archiveInfo': '档案信息',
'menu.memberAbility.memberManage.maintainDetail.changedInfo': '变更信息',
'menu.memberAbility.memberManage.maintainFreeze': '会员冻结',
'menu.memberAbility.memberManage.maintainUnfreeze': '会员解除',
'menu.memberAbility.memberManage.maintainEliminate': '解除关系',
......@@ -133,6 +135,8 @@ export default {
'menu.memberAbility.memberProfile.memberQueryDetail.levelInfo': '会员等级信息',
'menu.memberAbility.memberProfile.memberQueryDetail.equityInfo': '权益信息',
'menu.memberAbility.memberProfile.memberQueryDetail.sincerityInfo': '诚信信息',
'menu.memberAbility.memberProfile.memberQueryDetail.archiveInfo': '档案信息',
'menu.memberAbility.memberProfile.memberQueryDetail.changedInfo': '变更信息',
'menu.memberAbility.memberProfile.memberUpdate': '修改注册信息',
'menu.memberAbility.memberProfile.addSubRole': '新建会员角色',
'menu.memberAbility.memberProfile.modifyMember': '变更会员信息',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 16:10:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-21 17:52:37
* @LastEditTime: 2021-06-11 15:56:24
* @Description: 会员分类信息
*/
import React from 'react';
......@@ -105,7 +105,6 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
),
columnProps: {
span: 3,
style: { paddingBottom: 0 },
},
},
];
......@@ -113,9 +112,6 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
<CustomizeColumn
title="分类信息"
data={data}
bodyStyle={{
paddingBottom: 0,
}}
{...rest}
/>
);
......
......@@ -2,71 +2,127 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 17:53:43
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-21 18:07:16
* @LastEditTime: 2021-06-11 16:27:07
* @Description: 会员考察信息
*/
import React from 'react';
import React, { useEffect, useState } from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface';
interface IProps extends MellowCardProps {}
const PAGE_SIZE = 5;
const mockData = [
{
id: 1,
index: 1,
inspectionTheme: '温州龙昌皮业有限公司入库考察',
type: '入库考察',
createTime: '2020-12-08',
score: 80,
},
{
id: 2,
index: 2,
inspectionTheme: '温州龙昌皮业有限公司入库考察',
type: '入库考察',
createTime: '2020-12-08',
score: 70,
},
{
id: 3,
index: 4,
inspectionTheme: '温州龙昌皮业有限公司入库考察',
type: '入库考察',
createTime: '2020-12-08',
score: 80,
},
];
export type ListItemType = {
/**
* 主键id
*/
id: number
/**
* 考察主题
*/
subject: string
/**
* 考察类型枚举1-入库考察2-整改考察3-计划考察4-其他考察
*/
inspectType: number
/**
* 考察类型名称
*/
inspectTypeName: string
/**
* 考察日期,格式为yyyy-MM-dd
*/
inspectTime: string
/**
* 考察评分
*/
score: string
}
export type ParamsType = {
current: string,
pageSize: string,
}
export type ReponseType = {
totalCount: number,
data: ListItemType[],
}
interface IProps extends MellowCardProps {
/**
* 获取列表数据方法
*/
fetchList: (params: ParamsType) => Promise<ReponseType>,
}
const MemberDocInspection: React.FC<IProps> = (props: IProps) => {
const {
fetchList,
...rest
} = props;
const [page, setPage] = useState(1);
const [size, setSize] = useState(PAGE_SIZE);
const [loading, setLoading] = useState(false);
const [list, setList] = useState<ReponseType>({
totalCount: 0,
data: [],
});
const columns: EditableColumns[] = [
{
title: '序号',
dataIndex: 'index',
dataIndex: 'id',
},
{
title: '考察主题',
dataIndex: 'inspectionTheme',
dataIndex: 'subject',
ellipsis: true,
},
{
title: '考察类型',
dataIndex: 'type',
dataIndex: 'inspectTypeName',
},
{
title: '考察日期',
dataIndex: 'createTime',
dataIndex: 'inspectTime',
},
{
title: '考察评分',
dataIndex: 'score',
},
];
const getList = (params?: ParamsType) => {
if (fetchList) {
setLoading(true);
const nextPage = params?.current || page;
const nextSize = params?.pageSize || size;
fetchList({
current: `${nextPage}`,
pageSize: `${nextSize}`,
}).then((res) => {
if (res.data) {
setList(res);
}
}).finally(() => {
setLoading(false);
});
}
};
useEffect(() => {
getList();
}, []);
const handlePaginationChange = (page: number, size: number) => {
setPage(page);
setSize(size);
getList({
current: `${page}`,
pageSize: `${size}`,
});
};
return (
<MellowCard
......@@ -74,10 +130,15 @@ const MemberDocInspection: React.FC<IProps> = (props: IProps) => {
{...rest}
>
<PolymericTable
dataSource={mockData}
dataSource={list.data}
columns={columns}
loading={false}
pagination={null}
loading={loading}
pagination={{
current: page,
pageSize: size,
total: list.totalCount,
}}
onPaginationChange={handlePaginationChange}
/>
</MellowCard>
);
......
......@@ -2,71 +2,133 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 18:01:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-21 18:01:48
* @LastEditTime: 2021-06-11 16:38:20
* @Description: 会员考评信息
*/
import React from 'react';
import React, { useEffect, useState } from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface';
interface IProps extends MellowCardProps {}
const PAGE_SIZE = 5;
const mockData = [
{
id: 1,
index: 1,
inspectionTheme: '温州龙昌皮业有限公司入库考察',
type: '入库考察',
createTime: '2020-12-08',
score: 80,
},
{
id: 2,
index: 2,
inspectionTheme: '温州龙昌皮业有限公司入库考察',
type: '入库考察',
createTime: '2020-12-08',
score: 70,
},
{
id: 3,
index: 4,
inspectionTheme: '温州龙昌皮业有限公司入库考察',
type: '入库考察',
createTime: '2020-12-08',
score: 80,
},
];
export type ListItemType = {
/**
* 主键id
*/
id: number
/**
* 考评主题
*/
subject: string
/**
* 下级会员名称
*/
name: string
/**
* 考评时间开始,格式为yyyy-MM-dd
*/
appraisalDayStart: string
/**
* 考评时间结束,格式为yyyy-MM-dd
*/
appraisalDayEnd: string
/**
* 考评完成时间,格式为yyyy-MM-dd
*/
completeDay: string
/**
* 总得分
*/
totalScore: string
}
export type ParamsType = {
current: string,
pageSize: string,
}
export type ReponseType = {
totalCount: number,
data: ListItemType[],
}
interface IProps extends MellowCardProps {
/**
* 获取列表数据方法
*/
fetchList: (params: ParamsType) => Promise<ReponseType>,
}
const MemberDocScoredInfo: React.FC<IProps> = (props: IProps) => {
const {
fetchList,
...rest
} = props;
const [page, setPage] = useState(1);
const [size, setSize] = useState(PAGE_SIZE);
const [loading, setLoading] = useState(false);
const [list, setList] = useState<ReponseType>({
totalCount: 0,
data: [],
});
const columns: EditableColumns[] = [
{
title: '序号',
dataIndex: 'index',
dataIndex: 'id',
},
{
title: '考评主题',
dataIndex: 'inspectionTheme',
dataIndex: 'subject',
ellipsis: true,
render: (text, record) => `${text}-${record.name}`,
},
{
title: '考评范围',
dataIndex: 'type',
dataIndex: 'appraisalDayStart',
render: (text, record) => `${text}-${record.appraisalDayEnd}`,
},
{
title: '考评完成时间',
dataIndex: 'createTime',
dataIndex: 'completeDay',
},
{
title: '考评最终分',
dataIndex: 'score',
dataIndex: 'totalScore',
},
];
const getList = (params?: ParamsType) => {
if (fetchList) {
setLoading(true);
const nextPage = params?.current || page;
const nextSize = params?.pageSize || size;
fetchList({
current: `${nextPage}`,
pageSize: `${nextSize}`,
}).then((res) => {
if (res.data) {
setList(res);
}
}).finally(() => {
setLoading(false);
});
}
};
useEffect(() => {
getList();
}, []);
const handlePaginationChange = (page: number, size: number) => {
setPage(page);
setSize(size);
getList({
current: `${page}`,
pageSize: `${size}`,
});
};
return (
<MellowCard
......@@ -74,10 +136,15 @@ const MemberDocScoredInfo: React.FC<IProps> = (props: IProps) => {
{...rest}
>
<PolymericTable
dataSource={mockData}
dataSource={list.data}
columns={columns}
loading={false}
pagination={null}
loading={loading}
pagination={{
current: page,
pageSize: size,
total: list.totalCount,
}}
onPaginationChange={handlePaginationChange}
/>
</MellowCard>
);
......
/*
* @Author: XieZhiXiong
* @Date: 2021-06-11 16:40:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-11 16:43:17
* @Description: Card 列表组件
*/
import React, { useEffect, useState } from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface';
const PAGE_SIZE = 5;
export type ParamsType = {
current: string,
pageSize: string,
}
export type ReponseType<T> = {
totalCount: number,
data: T[],
}
interface IProps<T> extends MellowCardProps {
/**
* Card 标题
*/
title: string,
/**
* Table 列
*/
columns: EditableColumns<T>[],
/**
* 获取列表数据方法
*/
fetchList: (params: ParamsType) => Promise<ReponseType<T>>,
}
const MemberDocTableList = <T,>(props: IProps<T>) => {
const {
title,
columns,
fetchList,
...rest
} = props;
const [page, setPage] = useState(1);
const [size, setSize] = useState(PAGE_SIZE);
const [loading, setLoading] = useState(false);
const [list, setList] = useState<ReponseType<T>>({
totalCount: 0,
data: [],
});
const getList = (params?: ParamsType) => {
if (fetchList) {
setLoading(true);
const nextPage = params?.current || page;
const nextSize = params?.pageSize || size;
fetchList({
current: `${nextPage}`,
pageSize: `${nextSize}`,
}).then((res) => {
if (res.data) {
setList(res);
}
}).finally(() => {
setLoading(false);
});
}
};
useEffect(() => {
getList();
}, []);
const handlePaginationChange = (page: number, size: number) => {
setPage(page);
setSize(size);
getList({
current: `${page}`,
pageSize: `${size}`,
});
};
return (
<MellowCard
title={title}
{...rest}
>
<PolymericTable
dataSource={list.data}
columns={columns}
loading={loading}
pagination={{
current: page,
pageSize: size,
total: list.totalCount,
}}
onPaginationChange={handlePaginationChange}
/>
</MellowCard>
);
};
export default MemberDocTableList;
\ No newline at end of file
......@@ -2,51 +2,309 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 16:45:32
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-21 18:11:51
* @LastEditTime: 2021-06-11 17:20:51
* @Description: 会员档案信息
*/
import React from 'react';
import { Row, Col } from 'antd';
import React, { useEffect, useState } from 'react';
import { Row, Col, Spin } from 'antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetMemberAbilityMaintenanceDetailRecordResponse } from '@/services/MemberV2Api';
import { EditableColumns } from '@/components/PolymericTable/interface';
import MemberDocCategory from '../../components/MemberDocCategory';
import MemberDocIncomingInfo from '../../components/MemberDocIncomingInfo';
import MemberDocQualification from '../../components/MemberDocQualification';
import MemberDocInspection from '../../components/MemberDocInspection';
import MemberDocScoredInfo from '../../components/MemberDocScoredInfo';
import MemberDocRectificationInfo from '../../components/MemberDocRectificationInfo';
import MemberDocTableList, { ParamsType, ReponseType } from '../../components/MemberDocTableList';
export type InspectListItemType = {
/**
* 主键id
*/
id: number
/**
* 考察主题
*/
subject: string
/**
* 考察类型枚举1-入库考察2-整改考察3-计划考察4-其他考察
*/
inspectType: number
/**
* 考察类型名称
*/
inspectTypeName: string
/**
* 考察日期,格式为yyyy-MM-dd
*/
inspectTime: string
/**
* 考察评分
*/
score: string
}
export type AppraisalListItemType = {
/**
* 主键id
*/
id: number
/**
* 考评主题
*/
subject: string
/**
* 下级会员名称
*/
name: string
/**
* 考评时间开始,格式为yyyy-MM-dd
*/
appraisalDayStart: string
/**
* 考评时间结束,格式为yyyy-MM-dd
*/
appraisalDayEnd: string
/**
* 考评完成时间,格式为yyyy-MM-dd
*/
completeDay: string
/**
* 总得分
*/
totalScore: string
}
export type RectifyListItemType = {
/**
* 主键id
*/
id: number
/**
* 整改主题
*/
subject: string
/**
* 整改期限开始,格式为yyyy-MM-dd
*/
rectifyTimeStart: string
/**
* 整改期限结束,格式为yyyy-MM-dd
*/
rectifyTimeEnd: string
/**
* 整改结果
*/
result: string
}
const MemberArchiveInfo = () => {
const { validateId } = usePageStatus();
const [archiveInfo, setArchiveInfo] = useState<GetMemberAbilityMaintenanceDetailRecordResponse>();
const [loading, setLoading] = useState(false);
const getArchiveInfo = () => {
setLoading(true);
PublicApi.getMemberAbilityMaintenanceDetailRecord({
validateId,
}).then((res) => {
if (res.code === 1000) {
setArchiveInfo(res.data);
}
}).finally(() => {
setLoading(false);
});
};
const inspectionColumns: EditableColumns<InspectListItemType>[] = [
{
title: '序号',
dataIndex: 'id',
},
{
title: '考察主题',
dataIndex: 'subject',
ellipsis: true,
},
{
title: '考察类型',
dataIndex: 'inspectTypeName',
},
{
title: '考察日期',
dataIndex: 'inspectTime',
},
{
title: '考察评分',
dataIndex: 'score',
},
];
const getInspectList = (params: ParamsType): Promise<ReponseType<InspectListItemType>> => {
return new Promise((resolve, reject) => {
PublicApi.getMemberAbilityMaintenanceDetailInspectPage({
validateId,
...params,
})
.then((res) => {
if (res.code === 1000) {
resolve(res.data);
}
reject(res);
})
.catch((err) => {
reject(err);
});
});
};
const AppraisalColumns: EditableColumns<AppraisalListItemType>[] = [
{
title: '序号',
dataIndex: 'id',
},
{
title: '考评主题',
dataIndex: 'subject',
ellipsis: true,
render: (text, record) => `${text}-${record.name}`,
},
{
title: '考评范围',
dataIndex: 'appraisalDayStart',
render: (text, record) => `${text}-${record.appraisalDayEnd}`,
},
{
title: '考评完成时间',
dataIndex: 'completeDay',
},
{
title: '考评最终分',
dataIndex: 'totalScore',
},
]
const getAppraisalList = (params: ParamsType): Promise<ReponseType<AppraisalListItemType>> => {
return new Promise((resolve, reject) => {
PublicApi.getMemberAbilityMaintenanceDatailAppraisalPage({
validateId,
...params,
})
.then((res) => {
if (res.code === 1000) {
resolve(res.data);
}
reject(res);
})
.catch((err) => {
reject(err);
});
});
};
const RectifyColumns: EditableColumns<RectifyListItemType>[] = [
{
title: '序号',
dataIndex: 'id',
},
{
title: '整改主题',
dataIndex: 'subject',
ellipsis: true,
},
{
title: '整改开始日期',
dataIndex: 'rectifyTimeStart',
},
{
title: '整改截止日期',
dataIndex: 'rectifyTimeEnd',
},
{
title: '整改结果',
dataIndex: 'result',
},
]
const getRectifyList = (params: ParamsType): Promise<ReponseType<RectifyListItemType>> => {
return new Promise((resolve, reject) => {
PublicApi.getMemberAbilityMaintenanceDetailRectifyPage({
validateId,
...params,
})
.then((res) => {
if (res.code === 1000) {
resolve(res.data);
}
reject(res);
})
.catch((err) => {
reject(err);
});
});
};
useEffect(() => {
getArchiveInfo();
}, []);
return (
<Row gutter={[16, 16]}>
{/* 分类信息 */}
<Col span={24}>
<MemberDocCategory />
</Col>
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo />
</Col>
{/* 资质证明 */}
<Col span={24}>
<MemberDocQualification />
</Col>
{/* 考察信息 */}
<Col span={24}>
<MemberDocInspection />
</Col>
{/* 考评信息 */}
<Col span={24}>
<MemberDocScoredInfo />
</Col>
{/* 整改信息 */}
<Col span={24}>
<MemberDocRectificationInfo />
</Col>
</Row>
<Spin spinning={loading}>
<Row gutter={[16, 16]}>
{/* 分类信息 */}
<Col span={24}>
<MemberDocCategory
dataSource={archiveInfo?.classfication}
id="categoryInfo"
/>
</Col>
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo
dataSource={archiveInfo?.depositDetails}
id="depositDetails"
/>
</Col>
{/* 资质证明 */}
<Col span={24}>
<MemberDocQualification
dataSource={archiveInfo?.qualities}
id="qualitiesInfo"
/>
</Col>
{/* 考察信息 */}
<Col span={24}>
<MemberDocTableList<InspectListItemType>
title="考察信息"
columns={inspectionColumns}
fetchList={getInspectList}
id="inspectInfo"
/>
</Col>
{/* 考评信息 */}
<Col span={24}>
<MemberDocTableList<AppraisalListItemType>
title="考评信息"
columns={AppraisalColumns}
fetchList={getAppraisalList}
id="appraisalInfo"
/>
</Col>
{/* 整改信息 */}
<Col span={24}>
<MemberDocTableList<RectifyListItemType>
title="整改信息"
columns={RectifyColumns}
fetchList={getRectifyList}
id="rectifyInfo"
/>
</Col>
</Row>
</Spin>
);
};
......
......@@ -14,7 +14,7 @@ const MemberChangedInfo = () => {
<Row gutter={[16, 16]}>
{/* 分类信息 */}
<Col span={24}>
<ChangedInfo />
<ChangedInfo id="changedInfo" />
</Col>
</Row>
);
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-24 10:12:09
* @LastEditTime: 2021-06-11 15:28:49
* @Description:
*/
import React, { useState, useEffect } from 'react';
......@@ -48,12 +48,11 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
const [infoLoading, setInfoLoading] = useState(false);
const getBasicInfo = () => {
if (!id || !validateId) {
if (!validateId) {
return;
}
setInfoLoading(true);
PublicApi.getMemberAbilityMaintenanceDetailBasic({
memberId: id,
validateId,
}).then(res => {
if (res.code !== 1000) {
......@@ -90,6 +89,12 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
case 'sincerityInfo':
history.push(`${url}/sincerityInfo?id=${id}&validateId=${validateId}`);
break;
case 'archiveInfo':
history.push(`${url}/archiveInfo?id=${id}&validateId=${validateId}`);
break;
case 'changedInfo':
history.push(`${url}/changedInfo?id=${id}&validateId=${validateId}`);
break;
default:
break;
}
......@@ -190,6 +195,42 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
},
];
break;
case 'archiveInfo':
ret = [
{
key: 'categoryInfo',
name: '分类信息',
},
{
key: 'depositDetails',
name: '入库信息',
},
{
key: 'qualitiesInfo',
name: '资质证明',
},
{
key: 'inspectInfo',
name: '考察信息',
},
{
key: 'appraisalInfo',
name: '考评信息',
},
{
key: 'rectifyInfo',
name: '整改信息',
},
];
break;
case 'changedInfo':
ret = [
{
key: 'changedInfo',
name: '变更信息',
},
];
break;
default:
break;
}
......@@ -214,11 +255,11 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
extra={(
<Bookmark value={getBookmarkKey()} onChange={handleBookmarkChange}>
<Bookmark.Item value="basicInfo" title="基本信息" icon={<UnorderedListOutlined />} />
<Bookmark.Item value="2" title="档案信息" icon={<FolderOutlined />} />
<Bookmark.Item value="archiveInfo" title="档案信息" icon={<FolderOutlined />} />
<Bookmark.Item value="levelInfo" title="等级信息" icon={<BarChartOutlined />} />
<Bookmark.Item value="equityInfo" title="权益信息" icon={<InsuranceOutlined />} />
<Bookmark.Item value="sincerityInfo" title="信用信息" icon={<BulbOutlined />} />
<Bookmark.Item value="3" title="变更信息" icon={<EditOutlined />} />
<Bookmark.Item value="changedInfo" title="变更信息" icon={<EditOutlined />} />
</Bookmark>
)}
>
......
......@@ -2,51 +2,290 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 16:45:32
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-21 18:11:51
* @LastEditTime: 2021-06-11 17:36:40
* @Description: 会员档案信息
*/
import React from 'react';
import { Row, Col } from 'antd';
import MemberDocCategory from '../../components/MemberDocCategory';
import React, { useEffect, useState } from 'react';
import { Row, Col, Spin } from 'antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetMemberAbilityInfoDetailArchivesResponse } from '@/services/MemberV2Api';
import { EditableColumns } from '@/components/PolymericTable/interface';
import MemberDocIncomingInfo from '../../components/MemberDocIncomingInfo';
import MemberDocQualification from '../../components/MemberDocQualification';
import MemberDocInspection from '../../components/MemberDocInspection';
import MemberDocScoredInfo from '../../components/MemberDocScoredInfo';
import MemberDocRectificationInfo from '../../components/MemberDocRectificationInfo';
import MemberDocTableList, { ParamsType, ReponseType } from '../../components/MemberDocTableList';
export type InspectListItemType = {
/**
* 主键id
*/
id: number
/**
* 考察主题
*/
subject: string
/**
* 考察类型枚举1-入库考察2-整改考察3-计划考察4-其他考察
*/
inspectType: number
/**
* 考察类型名称
*/
inspectTypeName: string
/**
* 考察日期,格式为yyyy-MM-dd
*/
inspectTime: string
/**
* 考察评分
*/
score: string
}
export type AppraisalListItemType = {
/**
* 主键id
*/
id: number
/**
* 考评主题
*/
subject: string
/**
* 下级会员名称
*/
name: string
/**
* 考评时间开始,格式为yyyy-MM-dd
*/
appraisalDayStart: string
/**
* 考评时间结束,格式为yyyy-MM-dd
*/
appraisalDayEnd: string
/**
* 考评完成时间,格式为yyyy-MM-dd
*/
completeDay: string
/**
* 总得分
*/
totalScore: string
}
export type RectifyListItemType = {
/**
* 主键id
*/
id: number
/**
* 整改主题
*/
subject: string
/**
* 整改期限开始,格式为yyyy-MM-dd
*/
rectifyTimeStart: string
/**
* 整改期限结束,格式为yyyy-MM-dd
*/
rectifyTimeEnd: string
/**
* 整改结果
*/
result: string
}
const MemberArchiveInfo = () => {
const { validateId } = usePageStatus();
const [archiveInfo, setArchiveInfo] = useState<GetMemberAbilityInfoDetailArchivesResponse>();
const [loading, setLoading] = useState(false);
const getArchiveInfo = () => {
setLoading(true);
PublicApi.getMemberAbilityInfoDetailArchives({
validateId,
}).then((res) => {
if (res.code === 1000) {
setArchiveInfo(res.data);
}
}).finally(() => {
setLoading(false);
});
};
const inspectionColumns: EditableColumns<InspectListItemType>[] = [
{
title: '序号',
dataIndex: 'id',
},
{
title: '考察主题',
dataIndex: 'subject',
ellipsis: true,
},
{
title: '考察类型',
dataIndex: 'inspectTypeName',
},
{
title: '考察日期',
dataIndex: 'inspectTime',
},
{
title: '考察评分',
dataIndex: 'score',
},
];
const getInspectList = (params: ParamsType): Promise<ReponseType<InspectListItemType>> => {
return new Promise((resolve, reject) => {
PublicApi.getMemberAbilityMaintenanceDetailInspectPage({
validateId,
...params,
})
.then((res) => {
if (res.code === 1000) {
resolve(res.data);
}
reject(res);
})
.catch((err) => {
reject(err);
});
});
};
const AppraisalColumns: EditableColumns<AppraisalListItemType>[] = [
{
title: '序号',
dataIndex: 'id',
},
{
title: '考评主题',
dataIndex: 'subject',
ellipsis: true,
render: (text, record) => `${text}-${record.name}`,
},
{
title: '考评范围',
dataIndex: 'appraisalDayStart',
render: (text, record) => `${text}-${record.appraisalDayEnd}`,
},
{
title: '考评完成时间',
dataIndex: 'completeDay',
},
{
title: '考评最终分',
dataIndex: 'totalScore',
},
]
const getAppraisalList = (params: ParamsType): Promise<ReponseType<AppraisalListItemType>> => {
return new Promise((resolve, reject) => {
PublicApi.getMemberAbilityInfoDatailAppraisalPage({
validateId,
...params,
})
.then((res) => {
if (res.code === 1000) {
resolve(res.data);
}
reject(res);
})
.catch((err) => {
reject(err);
});
});
};
const RectifyColumns: EditableColumns<RectifyListItemType>[] = [
{
title: '序号',
dataIndex: 'id',
},
{
title: '整改主题',
dataIndex: 'subject',
ellipsis: true,
},
{
title: '整改开始日期',
dataIndex: 'rectifyTimeStart',
},
{
title: '整改截止日期',
dataIndex: 'rectifyTimeEnd',
},
{
title: '整改结果',
dataIndex: 'result',
},
]
const getRectifyList = (params: ParamsType): Promise<ReponseType<RectifyListItemType>> => {
return new Promise((resolve, reject) => {
PublicApi.getMemberAbilityInfoDetailRectifyPage({
validateId,
...params,
})
.then((res) => {
if (res.code === 1000) {
resolve(res.data);
}
reject(res);
})
.catch((err) => {
reject(err);
});
});
};
useEffect(() => {
getArchiveInfo();
}, []);
return (
<Row gutter={[16, 16]}>
{/* 分类信息 */}
<Col span={24}>
<MemberDocCategory />
</Col>
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo />
</Col>
{/* 资质证明 */}
<Col span={24}>
<MemberDocQualification />
</Col>
{/* 考察信息 */}
<Col span={24}>
<MemberDocInspection />
</Col>
{/* 考评信息 */}
<Col span={24}>
<MemberDocScoredInfo />
</Col>
{/* 整改信息 */}
<Col span={24}>
<MemberDocRectificationInfo />
</Col>
</Row>
<Spin spinning={loading}>
<Row gutter={[16, 16]}>
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo
dataSource={archiveInfo?.depositDetails}
id="depositDetails"
/>
</Col>
{/* 资质证明 */}
<Col span={24}>
<MemberDocQualification
dataSource={archiveInfo?.qualities}
id="qualitiesInfo"
/>
</Col>
{/* 考评信息 */}
<Col span={24}>
<MemberDocTableList<AppraisalListItemType>
title="考评信息"
columns={AppraisalColumns}
fetchList={getAppraisalList}
id="appraisalInfo"
/>
</Col>
{/* 整改信息 */}
<Col span={24}>
<MemberDocTableList<RectifyListItemType>
title="整改信息"
columns={RectifyColumns}
fetchList={getRectifyList}
id="rectifyInfo"
/>
</Col>
</Row>
</Spin>
);
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 18:18:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-21 18:20:06
* @LastEditTime: 2021-06-11 17:42:14
* @Description: 会员变更信息详情
*/
import React from 'react';
......@@ -14,7 +14,7 @@ const MemberChangedInfo = () => {
<Row gutter={[16, 16]}>
{/* 分类信息 */}
<Col span={24}>
<ChangedInfo />
<ChangedInfo id="changedInfo" />
</Col>
</Row>
);
......
......@@ -69,16 +69,22 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
const url = match.url === '/' ? '' : match.url;
switch (val) {
case 'basicInfo':
history.push(`${url}/basicInfo?&validateId=${validateId}`);
history.push(`${url}/basicInfo?validateId=${validateId}`);
break;
case 'levelInfo':
history.push(`${url}/levelInfo?&validateId=${validateId}`);
history.push(`${url}/levelInfo?validateId=${validateId}`);
break;
case 'equityInfo':
history.push(`${url}/equityInfo?&validateId=${validateId}`);
history.push(`${url}/equityInfo?validateId=${validateId}`);
break;
case 'sincerityInfo':
history.push(`${url}/sincerityInfo?&validateId=${validateId}`);
history.push(`${url}/sincerityInfo?validateId=${validateId}`);
break;
case 'archiveInfo':
history.push(`${url}/archiveInfo?validateId=${validateId}`);
break;
case 'changedInfo':
history.push(`${url}/changedInfo?validateId=${validateId}`);
break;
default:
break;
......@@ -180,6 +186,42 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
},
];
break;
case 'archiveInfo':
ret = [
{
key: 'categoryInfo',
name: '分类信息',
},
{
key: 'depositDetails',
name: '入库信息',
},
{
key: 'qualitiesInfo',
name: '资质证明',
},
{
key: 'inspectInfo',
name: '考察信息',
},
{
key: 'appraisalInfo',
name: '考评信息',
},
{
key: 'rectifyInfo',
name: '整改信息',
},
];
break;
case 'changedInfo':
ret = [
{
key: 'changedInfo',
name: '变更信息',
},
];
break;
default:
break;
}
......@@ -204,11 +246,11 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
extra={(
<Bookmark value={getBookmarkKey()} onChange={handleBookmarkChange}>
<Bookmark.Item value="basicInfo" title="基本信息" icon={<UnorderedListOutlined />} />
<Bookmark.Item value="2" title="档案信息" icon={<FolderOutlined />} />
<Bookmark.Item value="archiveInfo" title="档案信息" icon={<FolderOutlined />} />
<Bookmark.Item value="levelInfo" title="等级信息" icon={<BarChartOutlined />} />
<Bookmark.Item value="equityInfo" title="权益信息" icon={<InsuranceOutlined />} />
<Bookmark.Item value="sincerityInfo" title="信用信息" icon={<BulbOutlined />} />
<Bookmark.Item value="3" title="变更信息" icon={<EditOutlined />} />
<Bookmark.Item value="changedInfo" title="变更信息" icon={<EditOutlined />} />
</Bookmark>
)}
>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment