Commit 0957b219 authored by XieZhiXiong's avatar XieZhiXiong

feat: 对接 确认会员入库 相关

parent 036dd3fe
......@@ -13,7 +13,7 @@ import {
} from 'antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetMemberAbilityMaintenanceDetailBasicResponse } from '@/services/MemberApi';
import { GetMemberDepositConfirmDetailResponse } from '@/services/MemberV2Api';
import {
MEMBER_TYPE_CHANNEL_CORPORATE,
MEMBER_TYPE_CHANNEL_INDIVIDUAL,
......@@ -37,16 +37,15 @@ import PicWrap from '../components/PicWrap';
const MemberPrVerifyComingConfirmDetail: React.FC<{}> = () => {
const { id, validateId } = usePageStatus();
const [memberInfo, setMemberInfo] = useState<GetMemberAbilityMaintenanceDetailBasicResponse>(null);
const [memberInfo, setMemberInfo] = useState<GetMemberDepositConfirmDetailResponse>(null);
const [infoLoading, setInfoLoaading] = useState(false);
const getBasicInfo = () => {
if (!id || !validateId) {
if (!validateId) {
return;
}
setInfoLoaading(true);
PublicApi.getMemberAbilityMaintenanceDetailBasic({
memberId: id,
PublicApi.getMemberDepositConfirmDetail({
validateId,
}).then(res => {
if (res.code === 1000) {
......@@ -80,8 +79,8 @@ const MemberPrVerifyComingConfirmDetail: React.FC<{}> = () => {
: null
),
...(
memberInfo && memberInfo.groups
? memberInfo.groups.map((item, index) => ({
memberInfo && memberInfo.registerDetails
? memberInfo.registerDetails.map((item, index) => ({
key: `group${index}`,
name: item.groupName,
}))
......@@ -146,7 +145,7 @@ const MemberPrVerifyComingConfirmDetail: React.FC<{}> = () => {
outerStatusName: memberInfo?.outerStatusName,
levelTag: memberInfo?.levelTag,
email: memberInfo?.email,
createTime: memberInfo?.createTime,
createTime: memberInfo?.registerTime,
}}
id="basicInfo"
/>
......@@ -174,14 +173,14 @@ const MemberPrVerifyComingConfirmDetail: React.FC<{}> = () => {
{/* 其他注册信息 */}
{
memberInfo && memberInfo.groups
? memberInfo.groups.map((item, index) => (
memberInfo && memberInfo.registerDetails
? memberInfo.registerDetails.map((item, index) => (
<Col span={24} key={`group${index}`}>
<CustomizeColumn
title={item.groupName}
data={(
item.elements.map((ele) => ({
title: ele.fieldCNName,
title: ele.fieldLocalName,
value: (
ele.fieldType !== 'upload'
? ele.fieldValue
......@@ -203,6 +202,7 @@ const MemberPrVerifyComingConfirmDetail: React.FC<{}> = () => {
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails}
id="incomingInfo"
/>
</Col>
......@@ -210,6 +210,7 @@ const MemberPrVerifyComingConfirmDetail: React.FC<{}> = () => {
{/* 考察信息 */}
<Col span={24}>
<MemberInvestigateInfo
dataSource={memberInfo?.inspection}
id="investigateInfo"
/>
</Col>
......@@ -217,6 +218,7 @@ const MemberPrVerifyComingConfirmDetail: React.FC<{}> = () => {
{/* 分类信息 */}
<Col span={24}>
<MemberDocCategory
dataSource={memberInfo?.classfication}
id="ClassifyInfo"
/>
</Col>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 18:01:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 18:05:45
* @LastEditTime: 2021-06-03 20:40:42
* @Description: 待确认入库
*/
import React, { useState, useRef } from 'react';
......@@ -32,7 +32,7 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
const [selectedList, setSelectList] = useState<any>([]);
const handleJumpAudit = record => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyComingConfirm/verify?id=${record.memberId}&validateId=${record.validateId}`);
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyComingConfirm/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyComingConfirm/detail').concat([
......@@ -72,7 +72,7 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
payload.endDate = moment(+endDate).format('YYYY-MM-DD');
}
const res = await PublicApi.getMemberAbilityMaintenancePage(payload);
const res = await PublicApi.getMemberDepositConfirmPage(payload);
if (res.code === 1000) {
return res.data;
......@@ -90,9 +90,9 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
icon: <QuestionCircleOutlined />,
content: '确定要审核通过选中的会员吗?',
onOk() {
const members = selectedList.map(item => ({ memberId: item.memberId, validateId: item.validateId }));
const members = selectedList.map(item => item.validateId);
return new Promise<void>((resolve, reject) => {
PublicApi.postMemberAbilityValidateCommitBatch(members)
PublicApi.postMemberDepositConfirmBatch(members)
.then(res => {
if (res.code === 1000) {
ref.current.reload();
......@@ -111,7 +111,7 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await PublicApi.getMemberAbilityValidateCommitPageitems();
const res = await PublicApi.getMemberDepositPageConditions();
if (res.code === 1000) {
const { data = {} }: any = res;
......@@ -145,7 +145,7 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
return {};
};
const controllerBtns = (
const ControllerBtns = () => (
<Space>
<Button onClick={handleBatch}>
批量审核通过
......@@ -155,6 +155,9 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
return (
<Card>
<Button onClick={handleBatch}>
批量审核通过
</Button>
<StandardTable
tableProps={{
rowKey: 'validateId',
......@@ -167,8 +170,8 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
components={{
ControllerBtns,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 18:02:54
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-26 10:09:05
* @LastEditTime: 2021-06-03 18:02:19
* @Description: 确认入库
*/
import React, { useState, useEffect } from 'react';
......@@ -15,9 +15,10 @@ import {
import {
CheckCircleOutlined,
} from '@ant-design/icons';
import { history } from 'umi';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetMemberAbilityMaintenanceDetailBasicResponse } from '@/services/MemberApi';
import { GetMemberDepositConfirmDetailResponse } from '@/services/MemberV2Api';
import {
MEMBER_TYPE_CHANNEL_CORPORATE,
MEMBER_TYPE_CHANNEL_INDIVIDUAL,
......@@ -38,21 +39,21 @@ import MemberDocIncomingInfo from '../components/MemberDocIncomingInfo';
import MemberInvestigateInfo from '../components/MemberInvestigateInfo';
import MemberDocCategory from '../components/MemberDocCategory';
import PicWrap from '../components/PicWrap';
import VerifyModal from '../components/VerifyModal';
import VerifyModal, { ValueType as VerifyData } from '../components/VerifyModal';
const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
const { id, validateId } = usePageStatus();
const [memberInfo, setMemberInfo] = useState<GetMemberAbilityMaintenanceDetailBasicResponse>(null);
const [memberInfo, setMemberInfo] = useState<GetMemberDepositConfirmDetailResponse>(null);
const [infoLoading, setInfoLoaading] = useState(false);
const [visibleVerifyModal, setVisibleVerifyModal] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const getBasicInfo = () => {
if (!id || !validateId) {
if (!validateId) {
return;
}
setInfoLoaading(true);
PublicApi.getMemberAbilityMaintenanceDetailBasic({
memberId: id,
PublicApi.getMemberDepositConfirmDetail({
validateId,
}).then(res => {
if (res.code === 1000) {
......@@ -71,8 +72,25 @@ const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
setVisibleVerifyModal(!!flag);
};
const handleSubmit = () => {
console.log('表单提交')
const handleSubmit = (value: VerifyData) => {
setSubmitLoading(true);
PublicApi.postMemberDepositConfirm({
validateId,
...value,
}, {
timeout: 0,
}).then(res => {
if (res.code !== 1000) {
return;
}
handleVisibleVerifyModal(false);
setTimeout(() => {
history.goBack();
}, 800);
}).finally(() => {
setSubmitLoading(false);
});
};
const anchorsArr = [
......@@ -94,8 +112,8 @@ const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
: null
),
...(
memberInfo && memberInfo.groups
? memberInfo.groups.map((item, index) => ({
memberInfo && memberInfo.registerDetails
? memberInfo.registerDetails.map((item, index) => ({
key: `group${index}`,
name: item.groupName,
}))
......@@ -169,7 +187,7 @@ const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
outerStatusName: memberInfo?.outerStatusName,
levelTag: memberInfo?.levelTag,
email: memberInfo?.email,
createTime: memberInfo?.createTime,
createTime: memberInfo?.registerTime,
}}
id="basicInfo"
/>
......@@ -197,14 +215,14 @@ const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
{/* 其他注册信息 */}
{
memberInfo && memberInfo.groups
? memberInfo.groups.map((item, index) => (
memberInfo && memberInfo.registerDetails
? memberInfo.registerDetails.map((item, index) => (
<Col span={24} key={`group${index}`}>
<CustomizeColumn
title={item.groupName}
data={(
item.elements.map((ele) => ({
title: ele.fieldCNName,
title: ele.fieldLocalName,
value: (
ele.fieldType !== 'upload'
? ele.fieldValue
......@@ -226,6 +244,7 @@ const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
{/* 入库信息 */}
<Col span={24}>
<MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails}
id="incomingInfo"
/>
</Col>
......@@ -233,6 +252,7 @@ const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
{/* 考察信息 */}
<Col span={24}>
<MemberInvestigateInfo
dataSource={memberInfo?.inspection}
id="investigateInfo"
/>
</Col>
......@@ -240,6 +260,7 @@ const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
{/* 分类信息 */}
<Col span={24}>
<MemberDocCategory
dataSource={memberInfo?.classfication}
id="ClassifyInfo"
/>
</Col>
......@@ -261,10 +282,11 @@ const MemberPrVerifyComingConfirmVerify: React.FC<{}> = () => {
<VerifyModal
visible={visibleVerifyModal}
onClose={() => handleVisibleVerifyModal(false)}
submitLoading={submitLoading}
onSubmit={handleSubmit}
/>
</Spin>
);
};
export default MemberPrVerifyComingConfirmVerify;
export default MemberPrVerifyComingConfirmVerify;
\ No newline at end of file
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