Commit 4e391114 authored by XieZhiXiong's avatar XieZhiXiong

chore: 跟进会员内、外部状态

parent 7f8cb300
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-08-31 17:52:14
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-30 13:34:05
* @LastEditTime: 2021-06-29 16:13:23
* @Description: 状态 tag
*/
import React from 'react';
......
......@@ -2,9 +2,10 @@
* @Author: XieZhiXiong
* @Date: 2021-05-18 17:36:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-19 15:40:57
* @LastEditTime: 2021-06-29 16:18:42
* @Description: 会员相关常量
*/
/* --------------------------------- 会员类型 -------------------------------- */
/**
* 企业会员
......@@ -32,6 +33,7 @@ export const MEMBER_TYPE = {
[MEMBER_TYPE_CHANNEL_INDIVIDUAL]: '渠道个人会员',
};
/* --------------------------------- 会员状态 -------------------------------- */
/**
* 正常的
......@@ -46,69 +48,179 @@ export const MEMBER_TYPE = {
[MEMBER_STATUS_FROZEN]: '冻结',
};
/* --------------------------------- 会员外部状态 -------------------------------- */
/**
* 待提交审核
*/
export const MEMBER_OUTER_STATUS_UNCOMMITTED = 0;
export const MEMBER_OUTER_TO_PLATFORM_VERIFY = 1;
/**
* 待审核
* 待平台审核
*/
export const MEMBER_OUTER_STATUS_UNREVIEWED = 1;
export const MEMBER_OUTER_STATUS_PLATFORM_VERIFYING = 2;
/**
* 审核不通过
* 平台审核通过
*/
export const MEMBER_OUTER_STATUS_FAILED = 2;
export const MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED = 3;
/**
* 审核通过
* 平台审核不通过
*/
export const MEMBER_OUTER_STATUS_SUCCESS = 3;
export const MEMBER_OUTER_STATUS_PLATFORM_VERIFY_NOT_PASSED = 4;
/**
* 会员外部状态对应中文
* 待审核会员入库
*/
export const MEMBER_OUTER_STATUS = {
[MEMBER_OUTER_STATUS_UNCOMMITTED]: '待提交',
[MEMBER_OUTER_STATUS_UNREVIEWED]: '待审核',
[MEMBER_OUTER_STATUS_FAILED]: '审核不通过',
[MEMBER_OUTER_STATUS_SUCCESS]: '审核通过',
};
export const MEMBER_OUTER_STATUS_DEPOSITING = 5;
/**
* 入库审核通过
*/
export const MEMBER_OUTER_STATUS_DEPOSITORY_PASSED = 6;
/**
* 入库审核不通过
*/
export const MEMBER_OUTER_STATUS_DEPOSITORY_NOT_PASSED = 7;
/**
* 待审核会员变更
*/
export const MEMBER_OUTER_STATUS_MODIFYING = 8;
/**
* 会员变更审核通过
*/
export const MEMBER_OUTER_STATUS_MODIFY_PASSED = 9;
/**
* 会员变更审核不通过
*/
export const MEMBER_OUTER_STATUS_MODIFY_NOT_PASSED = 10;
/* --------------------------------- 会员内部状态 -------------------------------- */
/* --------------------------------- 会员内部状态(非平台会员,即上级不是平台会员) -------------------------------- */
/**
* 申请注册(已注册)
* 待审核入库资料
*/
export const MEMBER_INNER_STATUS_REGISTERED = 0;
export const MEMBER_INNER_STATUS_TO_VERIFY_DEPOSITORY_DETAIL = 1;
/**
* 待提交审核
* 入库资料审核不通过
*/
export const MEMBER_INNER_STATUS_UNCOMMITTED = 1;
export const MEMBER_INNER_STATUS_DEPOSITORY_DETAIL_NOT_PASSED = 2;
/**
* 待一级审核
* 待审核入库资质
*/
export const MEMBER_INNER_STATUS_UNREVIEWED_1 = 2;
export const MEMBER_INNER_STATUS_TO_VERIFY_DEPOSITORY_QUALIFICATION = 3;
/**
* 待二级审核
* 入库资质审核不通过
*/
export const MEMBER_INNER_STATUS_UNREVIEWED_2 = 3;
export const MEMBER_INNER_STATUS_DEPOSITORY_QUALIFICATION_NOT_PASSED = 4;
/**
* 审核不通过
* 待入库考察
*/
export const MEMBER_INNER_STATUS_TO_INSPECT_DEPOSITORY = 5;
/**
* 入库考察不通过
*/
export const MEMBER_INNER_STATUS_DEPOSITORY_INSPECTION_NOT_PASSED = 6;
/**
* 待入库分类
*/
export const MEMBER_INNER_STATUS_TO_CLASSFIY_DEPOSITORY = 7;
/**
* 入库分类不通过
*/
export const MEMBER_INNER_STATUS_DEPOSITORY_CLASSIFICATION_NOT_PASSED = 8;
/**
* 待审核入库(一级)
*/
export const MEMBER_INNER_STATUS_FAILED = 4;
export const MEMBER_INNER_STATUS_TO_DEPOSIT_GRADE_ONE = 9;
/**
* 入库审核不通过(一级)
*/
export const MEMBER_INNER_STATUS_DEPOSITORY_GRADE_ONE_NOT_PASSED = 10;
/**
* 待审核入库(二级)
*/
export const MEMBER_INNER_STATUS_TO_DEPOSIT_GRADE_TWO = 11;
/**
* 待审核入库不通过(二级)
*/
export const MEMBER_INNER_STATUS_DEPOSITORY_GRADE_TWO_NOT_PASSED = 12;
/**
* 待确认入库
*/
export const MEMBER_INNER_STATUS_TO_COMFIRM_DEPOSITORY = 13;
/**
* 审核通过
*/
export const MEMBER_INNER_STATUS_SUCCESS = 5;
export const MEMBER_INNER_STATUS_VERIFY_PASSED = 14;
/**
* 审核不通过
*/
export const MEMBER_INNER_STATUS_VERIFY_NOT_PASSED = 15;
/**
* 会员内部状态对应中文
* 待审核会员变更(一级)
*/
export const MEMBER_INNER_STATUS = {
[MEMBER_INNER_STATUS_REGISTERED]: '申请注册',
[MEMBER_INNER_STATUS_UNCOMMITTED]: '待提交审核',
[MEMBER_INNER_STATUS_UNREVIEWED_1]: '待一级审核',
[MEMBER_INNER_STATUS_UNREVIEWED_2]: '待二级审核',
[MEMBER_INNER_STATUS_FAILED]: '审核不通过',
[MEMBER_INNER_STATUS_SUCCESS]: '审核通过',
};
export const MEMBER_INNER_STATUS_VERIFY_TO_MODIFY_GRADE_ONE = 16;
/**
* 会员变更审核不通过(一级)
*/
export const MEMBER_INNER_STATUS_MODIFY_GRADE_ONE_NOT_PASSED = 17;
/**
* 待审核会员变更(二级)
*/
export const MEMBER_INNER_STATUS_TO_MODIFY_GRADE_TWO = 18;
/**
* 会员变更审核不通过(二级)
*/
export const MEMBER_INNER_STATUS_MODIFY_GRADE_TWO_NOT_PASSED = 19;
/**
* 待确认会员变更
*/
export const MEMBER_INNER_STATUS_TO_COMFIRM_MODIFY = 20;
/**
* 会员变更审核通过
*/
export const MEMBER_INNER_STATUS_MODIFY_PASSED = 21;
/**
* 会员变更审核不通过
*/
export const MEMBER_INNER_STATUS_MODIFY_NOT_PASSED = 22;
/* --------------------------------- 会员内部状态(平台会员) -------------------------------- */
/**
* 待提交平台审核
*/
export const PLATFORM_MEMBER_INNER_STATUS_TO_BE_COMMIT = 1;
/**
* 提交审核不通过
*/
export const PLATFORM_MEMBER_INNER_STATUS_COMMIT_NOT_PASSED = 2;
/**
* 待平台审核(一级)
*/
export const PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP1 = 3;
/**
* 审核会员不通过(一级)
*/
export const PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP1_NOT_PASSED = 4;
/**
* 待平台审核(二级)
*/
export const PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP2 = 5;
/**
* 审核会员不通过(二级)
*/
export const PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP2_NOT_PASSED = 6;
/**
* 待确认会员
*/
export const PLATFORM_MEMBER_INNER_STATUS_TO_CONFIRM = 7;
/**
* 平台审核不通过
*/
export const PLATFORM_MEMBER_INNER_STATUS_VERIFY_NOT_PASSED = 8;
/**
* 平台审核通过
*/
export const PLATFORM_MEMBER_INNER_STATUS_VERIFY_PASSED = 9;
/* --------------------------------- 会员等级类型枚举 -------------------------------- */
/**
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-18 16:27:14
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-18 16:27:15
* @LastEditTime: 2021-06-29 15:37:48
* @Description: 会员基础信息
*/
import React from 'react';
......@@ -72,7 +72,7 @@ const MemberBasicInfo: React.FC<IProps> = (props: IProps) => {
const basicInfo = [
{
title: '会员ID',
value: dataSource.memberId || '',
value: dataSource.memberId !== undefined ? dataSource.memberId : '',
},
{
title: '会员类型',
......
......@@ -4,19 +4,51 @@ import {
MEMBER_STATUS_NORMAL,
MEMBER_STATUS_FROZEN,
MEMBER_INNER_STATUS_REGISTERED,
MEMBER_INNER_STATUS_UNCOMMITTED,
MEMBER_INNER_STATUS_UNREVIEWED_1,
MEMBER_INNER_STATUS_UNREVIEWED_2,
MEMBER_INNER_STATUS_FAILED,
MEMBER_INNER_STATUS_SUCCESS,
MEMBER_INNER_STATUS_TO_VERIFY_DEPOSITORY_DETAIL,
MEMBER_INNER_STATUS_DEPOSITORY_DETAIL_NOT_PASSED,
MEMBER_INNER_STATUS_TO_VERIFY_DEPOSITORY_QUALIFICATION,
MEMBER_INNER_STATUS_DEPOSITORY_QUALIFICATION_NOT_PASSED,
MEMBER_INNER_STATUS_TO_INSPECT_DEPOSITORY,
MEMBER_INNER_STATUS_DEPOSITORY_INSPECTION_NOT_PASSED,
MEMBER_INNER_STATUS_TO_CLASSFIY_DEPOSITORY,
MEMBER_INNER_STATUS_DEPOSITORY_CLASSIFICATION_NOT_PASSED,
MEMBER_INNER_STATUS_TO_DEPOSIT_GRADE_ONE,
MEMBER_INNER_STATUS_DEPOSITORY_GRADE_ONE_NOT_PASSED,
MEMBER_INNER_STATUS_TO_DEPOSIT_GRADE_TWO,
MEMBER_INNER_STATUS_DEPOSITORY_GRADE_TWO_NOT_PASSED,
MEMBER_INNER_STATUS_TO_COMFIRM_DEPOSITORY,
MEMBER_INNER_STATUS_VERIFY_PASSED,
MEMBER_INNER_STATUS_VERIFY_NOT_PASSED,
MEMBER_INNER_STATUS_VERIFY_TO_MODIFY_GRADE_ONE,
MEMBER_INNER_STATUS_MODIFY_GRADE_ONE_NOT_PASSED,
MEMBER_INNER_STATUS_TO_MODIFY_GRADE_TWO,
MEMBER_INNER_STATUS_MODIFY_GRADE_TWO_NOT_PASSED,
MEMBER_INNER_STATUS_TO_COMFIRM_MODIFY,
MEMBER_INNER_STATUS_MODIFY_PASSED,
MEMBER_INNER_STATUS_MODIFY_NOT_PASSED,
MEMBER_OUTER_STATUS_UNCOMMITTED,
MEMBER_OUTER_STATUS_UNREVIEWED,
MEMBER_OUTER_STATUS_FAILED,
MEMBER_OUTER_STATUS_SUCCESS,
PLATFORM_MEMBER_INNER_STATUS_COMMIT_NOT_PASSED,
PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP1,
PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP1_NOT_PASSED,
PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP2,
PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP2_NOT_PASSED,
PLATFORM_MEMBER_INNER_STATUS_TO_CONFIRM,
PLATFORM_MEMBER_INNER_STATUS_VERIFY_NOT_PASSED,
PLATFORM_MEMBER_INNER_STATUS_VERIFY_PASSED,
MEMBER_OUTER_TO_PLATFORM_VERIFY,
MEMBER_OUTER_STATUS_PLATFORM_VERIFYING,
MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED,
MEMBER_OUTER_STATUS_PLATFORM_VERIFY_NOT_PASSED,
MEMBER_OUTER_STATUS_DEPOSITING,
MEMBER_OUTER_STATUS_DEPOSITORY_PASSED,
MEMBER_OUTER_STATUS_DEPOSITORY_NOT_PASSED,
MEMBER_OUTER_STATUS_MODIFYING,
MEMBER_OUTER_STATUS_MODIFY_PASSED,
MEMBER_OUTER_STATUS_MODIFY_NOT_PASSED,
} from '@/constants/member';
import { EditableColumns } from '@/components/PolymericTable/interface';
import StatusTag from '@/components/StatusTag';
export const STATUS_COLOR_MAP = {
0: '#669EDE',
......@@ -36,40 +68,53 @@ export const MEMBER_STATUS_TAG_MAP = {
[MEMBER_STATUS_FROZEN]: 'default'
};
// 会员内部状态 StatusTag map
export const MEMBER_INNER_STATUS_TYPE = {
[MEMBER_INNER_STATUS_REGISTERED]: 'default',
[MEMBER_INNER_STATUS_UNCOMMITTED]: 'primary',
[MEMBER_INNER_STATUS_UNREVIEWED_1]: 'warning',
[MEMBER_INNER_STATUS_UNREVIEWED_2]: 'warning',
[MEMBER_INNER_STATUS_FAILED]: 'danger',
[MEMBER_INNER_STATUS_SUCCESS]: 'success',
};
// 会员外部状态 StatusTag map
export const MEMBER_OUTER_STATUS_TYPE = {
[MEMBER_OUTER_STATUS_UNCOMMITTED]: 'primary',
[MEMBER_OUTER_STATUS_UNREVIEWED]: 'warning',
[MEMBER_OUTER_STATUS_FAILED]: 'danger',
[MEMBER_OUTER_STATUS_SUCCESS]: 'success',
[MEMBER_OUTER_TO_PLATFORM_VERIFY]: 'default',
[MEMBER_OUTER_STATUS_PLATFORM_VERIFYING]: 'warning',
[MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED]: 'success',
[MEMBER_OUTER_STATUS_PLATFORM_VERIFY_NOT_PASSED]: 'danger',
[MEMBER_OUTER_STATUS_DEPOSITING]: 'warning',
[MEMBER_OUTER_STATUS_DEPOSITORY_PASSED]: 'success',
[MEMBER_OUTER_STATUS_DEPOSITORY_NOT_PASSED]: 'danger',
[MEMBER_OUTER_STATUS_MODIFYING]: 'warning',
[MEMBER_OUTER_STATUS_MODIFY_PASSED]: 'success',
[MEMBER_OUTER_STATUS_MODIFY_NOT_PASSED]: 'danger',
};
// 会员内部状态 Tag badge map
export const MEMBER_INNER_STATUS_BADGE_COLOR = {
[MEMBER_INNER_STATUS_REGISTERED]: '#606266',
[MEMBER_INNER_STATUS_UNCOMMITTED]: '#669EDE',
[MEMBER_INNER_STATUS_UNREVIEWED_1]: '#FFC400',
[MEMBER_INNER_STATUS_UNREVIEWED_2]: '#FFC400',
[MEMBER_INNER_STATUS_FAILED]: '#EF6260',
[MEMBER_INNER_STATUS_SUCCESS]: '#41CC9E',
};
[MEMBER_INNER_STATUS_TO_VERIFY_DEPOSITORY_DETAIL]: 'orange',
[MEMBER_INNER_STATUS_DEPOSITORY_DETAIL_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_TO_VERIFY_DEPOSITORY_QUALIFICATION]: 'orange',
[MEMBER_INNER_STATUS_DEPOSITORY_QUALIFICATION_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_TO_INSPECT_DEPOSITORY]: 'orange',
[MEMBER_INNER_STATUS_DEPOSITORY_INSPECTION_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_TO_CLASSFIY_DEPOSITORY]: 'orange',
[MEMBER_INNER_STATUS_DEPOSITORY_CLASSIFICATION_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_TO_DEPOSIT_GRADE_ONE]: 'orange',
[MEMBER_INNER_STATUS_DEPOSITORY_GRADE_ONE_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_TO_DEPOSIT_GRADE_TWO]: 'orange',
[MEMBER_INNER_STATUS_DEPOSITORY_GRADE_TWO_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_TO_COMFIRM_DEPOSITORY]: 'blue',
[MEMBER_INNER_STATUS_VERIFY_PASSED]: 'green',
[MEMBER_INNER_STATUS_VERIFY_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_VERIFY_TO_MODIFY_GRADE_ONE]: 'orange',
[MEMBER_INNER_STATUS_MODIFY_GRADE_ONE_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_TO_MODIFY_GRADE_TWO]: 'orange',
[MEMBER_INNER_STATUS_MODIFY_GRADE_TWO_NOT_PASSED]: 'red',
[MEMBER_INNER_STATUS_TO_COMFIRM_MODIFY]: 'blue',
[MEMBER_INNER_STATUS_MODIFY_PASSED]: 'green',
[MEMBER_INNER_STATUS_MODIFY_NOT_PASSED]: 'red',
// 会员外部状态 Tag badge map
export const MEMBER_OUTER_STATUS_BADGE_COLOR = {
[MEMBER_OUTER_STATUS_UNCOMMITTED]: '#FFC400',
[MEMBER_OUTER_STATUS_UNREVIEWED]: '#669EDE',
[MEMBER_OUTER_STATUS_FAILED]: '#EF6260',
[MEMBER_OUTER_STATUS_SUCCESS]: '#41CC9E',
[PLATFORM_MEMBER_INNER_STATUS_COMMIT_NOT_PASSED]: 'red',
[PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP1]: 'orange',
[PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP1_NOT_PASSED]: 'red',
[PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP2]: 'orange',
[PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP2_NOT_PASSED]: 'red',
[PLATFORM_MEMBER_INNER_STATUS_TO_CONFIRM]: 'blue',
[PLATFORM_MEMBER_INNER_STATUS_VERIFY_NOT_PASSED]: 'red',
[PLATFORM_MEMBER_INNER_STATUS_VERIFY_PASSED]: 'green',
};
export const MEMBER_OUTER_COLUMNS: EditableColumns[] = [
......@@ -89,7 +134,7 @@ export const MEMBER_OUTER_COLUMNS: EditableColumns[] = [
dataIndex: 'outerStatusName',
align: 'center',
render: (text, record) => (
<Badge color={MEMBER_OUTER_STATUS_BADGE_COLOR[record.outerStatus]} text={text} />
<StatusTag type={MEMBER_INNER_STATUS_BADGE_COLOR[record.outerStatus]} title={text} />
),
},
{
......
......@@ -25,8 +25,8 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import { getAuth } from '@/utils/auth';
import {
MEMBER_OUTER_STATUS_UNCOMMITTED,
MEMBER_OUTER_STATUS_FAILED,
MEMBER_OUTER_STATUS_TO_PLATFORM_VERIFY,
MEMBER_OUTER_STATUS_PLATFORM_VERIFY_NOT_PASSED,
} from '@/constants/member';
import StatusTag from '@/components/StatusTag';
import { importSchema, auditModalSchema } from './schema';
......
......@@ -17,11 +17,12 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import useSpliceArray from '@/hooks/useSpliceArray';
import { querySchema } from './schema';
import {
MEMBER_OUTER_STATUS_BADGE_COLOR,
MEMBER_OUTER_STATUS_TYPE,
} from '../constant';
import LevelBrand from '../../../components/LevelBrand';
import AddRoleDrawer from './components/AddRoleDrawer';
......@@ -102,7 +103,7 @@ const MemberQuery: React.FC<{}> = () => {
filters: [],
onFilter: (value, record) => record.outerStatus === value,
filterMultiple: false,
render: (text, record) => <Badge color={MEMBER_OUTER_STATUS_BADGE_COLOR[record.outerStatus] || '#606266'} text={text} />,
render: (text, record) => <StatusTag type={MEMBER_OUTER_STATUS_TYPE[record.outerStatus]} title={text} />,
},
{
title: '操作',
......
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