Commit 1affcf72 authored by XieZhiXiong's avatar XieZhiXiong

chore: 调整路由

parent 303c57c0
......@@ -448,9 +448,17 @@ const MemberRoute: RouterChild = {
noMargin: true,
component: '@/pages/member/memberQuery/applyMember',
},
// 会员信息变更
// 会员信息-变更(入库信息)
{
path: '/memberCenter/memberAbility/profile/query/modify',
path: '/memberCenter/memberAbility/profile/query/changeDeposit',
name: 'changeMember',
hideInMenu: true,
noMargin: true,
component: '@/pages/member/memberQuery/applyMember',
},
// 会员信息-修改(入库信息)
{
path: '/memberCenter/memberAbility/profile/query/modifyDeposit',
name: 'modifyMember',
hideInMenu: true,
noMargin: true,
......
......@@ -139,7 +139,8 @@ export default {
'menu.memberAbility.memberProfile.memberQueryDetail.changedInfo': '变更信息',
'menu.memberAbility.memberProfile.memberUpdate': '修改注册信息',
'menu.memberAbility.memberProfile.addSubRole': '新建会员角色',
'menu.memberAbility.memberProfile.modifyMember': '变更会员信息',
'menu.memberAbility.memberProfile.changeMember': '变更会员信息',
'menu.memberAbility.memberProfile.modifyMember': '修改会员信息',
'menu.memberAbility.memberProfile.applyMember': '申请会员',
'menu.memberAbility.memberRuleConfiguration': '会员规则配置',
'menu.memberAbility.memberRuleConfiguration.memberLevel': '会员等级',
......
......@@ -2,10 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 16:52:48
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-03 14:50:48
* @LastEditTime: 2021-07-05 10:40:46
* @Description: 申请会员
*/
import React, { useState, useEffect, useRef } from 'react';
import { RouteComponentProps } from 'react-router-dom';
import { history, Prompt } from 'umi';
import { Button, Spin, Space, message } from 'antd';
import { Checkbox, DatePicker, Radio } from '@formily/antd-components';
......@@ -87,7 +88,8 @@ const {
const onStepNext$ = createEffectHook('onStepNext');
const onStepPrevious$ = createEffectHook('onStepPrevious');
const MemberQueryApplyMember: React.FC = () => {
const MemberQueryApplyMember: React.FC<RouteComponentProps> = (props: any) => {
const { route } = props;
const { upperMemberId, upperRoleId, validateId } = usePageStatus();
const [ticktack, setTicktack] = useState(countDownLen);
const [currenStep, setCurrenStep] = useState(!validateId ? 0 : 1);
......@@ -209,8 +211,8 @@ const MemberQueryApplyMember: React.FC = () => {
return;
}
PublicApi.postMemberAbilityInfoApply({
upperMemberId,
upperRoleId,
upperMemberId: upperMemberId as number,
upperRoleId: upperRoleId as number,
depositDetails: step3,
...commonPayload,
}).then(res => {
......@@ -225,7 +227,7 @@ const MemberQueryApplyMember: React.FC = () => {
});
} else {
PublicApi.postMemberAbilityInfoDepositDetailUpdate({
validateId,
validateId: validateId as number,
detail: step3,
...commonPayload,
}).then(res => {
......@@ -249,7 +251,7 @@ const MemberQueryApplyMember: React.FC = () => {
}}
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
title={`${!validateId ? '申请' : '变更'}会员`}
title={`${!validateId ? '申请' : route.name === 'changeMember' ? '变更' : '修改'}会员`}
extra={(
<Space>
{currenStep === 0 && !validateId ? (
......@@ -355,7 +357,7 @@ const MemberQueryApplyMember: React.FC = () => {
expressionScope={{
currenStep,
ComingAgreement: <ComingAgreement richText={agreement} />,
RegisterInfo: <RegisterInfo upperMemberId={upperMemberId} upperRoleId={upperRoleId} />,
RegisterInfo: <RegisterInfo upperMemberId={upperMemberId as number} upperRoleId={upperRoleId as number} />,
SubmitSuccess: <SubmitSuccess />,
}}
effects={($, actions) => {
......@@ -378,7 +380,7 @@ const MemberQueryApplyMember: React.FC = () => {
useBusinessEffects($, actions, 'step4.qualities');
}}
schema={schema(depositInfo, validateId)}
schema={schema(depositInfo, validateId as number)}
/>
</MellowCard>
</PageHeaderWrapper>
......
......@@ -15,10 +15,12 @@ import { createFormActions } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { MEMBER_LEVEL_TYPE_PLATFORM } from '@/constants/member';
import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import { GetMemberAbilityInfoPageResponseDetail } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import { querySchema } from './schema';
import {
......@@ -38,9 +40,14 @@ const MemberQuery: React.FC<{}> = () => {
return res.data;
};
// 跳转修改会员信息页面
const handleJumpModify = record => {
history.push(`/memberCenter/memberAbility/profile/query/modify?validateId=${record.validateId}`);
// 跳转变更会员入库信息
const handleJumpChangeDeposit = record => {
history.push(`/memberCenter/memberAbility/profile/query/changeDeposit?validateId=${record.validateId}`);
};
// 跳转修改会员入库信息
const handleJumpModifyDeposit = record => {
history.push(`/memberCenter/memberAbility/profile/query/modifyDeposit?validateId=${record.validateId}`);
};
// 跳转修改注册信息页面
......@@ -48,7 +55,7 @@ const MemberQuery: React.FC<{}> = () => {
history.push(`/memberCenter/memberAbility/profile/query/update?validateId=${record.validateId}`);
};
const defaultColumns: ColumnType<any>[] = [
const defaultColumns: ColumnType<GetMemberAbilityInfoPageResponseDetail>[] = [
{
title: '会员归属',
dataIndex: 'name',
......@@ -116,15 +123,16 @@ const MemberQuery: React.FC<{}> = () => {
record.showModify && (
<Button
type="link"
onClick={() => handleJumpModify(record)}
onClick={() => handleJumpChangeDeposit(record)}
>
变更
</Button>
)
}
{/* 商户会员、渠道会员 且外部审核状态为不通过才可以 再次申请 */}
{/* 上级是平台会员,且外部审核状态为不通过才可以 修改注册资料 */}
{
record.showUpdate && (
record.levelTypeEnum === MEMBER_LEVEL_TYPE_PLATFORM && record.showUpdate && (
<Button
type="link"
onClick={() => handleJumpUpdate(record)}
......@@ -133,6 +141,24 @@ const MemberQuery: React.FC<{}> = () => {
</Button>
)
}
{/* 上级是非平台会员,且外部审核状态为不通过才可以 修改入库资料 */}
{
record.levelTypeEnum !== MEMBER_LEVEL_TYPE_PLATFORM && record.showUpdate && (
<Button
type="link"
onClick={() => handleJumpModifyDeposit(record)}
>
修改
</Button>
)
}
<Button
type="link"
onClick={() => handleJumpModifyDeposit(record)}
>
修改
</Button>
</>
),
},
......
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