Commit 6eb9e48b authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复会员等级不展示的问题、添加内部状态检索

parent 99418193
......@@ -35,6 +35,7 @@ import {
MEMBER_ROLE_TYPE_SERVICE_PROVIDER,
} from '@/constants';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
import { importSchema, auditModalSchema } from './schema';
import { coverColFiltersItem } from '../utils';
import { MEMBER_OUTER_STATUS_TYPE, MEMBER_STATUS_TAG_MAP } from '../constant';
......@@ -107,11 +108,16 @@ const MemberMaintain: React.FC<[]> = () => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/import/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/import/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
......@@ -77,8 +77,7 @@ const MemberMaintain: React.FC<[]> = () => {
{text}
</EyePreview>
<div>
{/* <LevelBrand level={1} /> */}
{record.levelTag}
<LevelBrand level={record.level} />
</div>
</>
),
......
......@@ -20,6 +20,7 @@ import {
} from '../constant';
import { coverColFiltersItem } from '../utils';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
const { confirm } = Modal;
......@@ -45,11 +46,16 @@ const MemberPr1: React.FC<{}> = props => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPr1/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPr1/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
......@@ -20,6 +20,7 @@ import {
} from '../constant';
import { coverColFiltersItem } from '../utils';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
const { confirm } = Modal;
......@@ -45,11 +46,16 @@ const MemberPr2: React.FC<{}> = props => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPr2/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPr2/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
......@@ -13,7 +13,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import { MEMBER_INNER_STATUS_FAILED } from '@/constants';
import { auditSchema } from '../schema/auditSchema';
import { auditSchema } from './schema';
import {
MEMBER_STATUS_TAG_MAP,
MEMBER_INNER_STATUS_BADGE_COLOR,
......@@ -21,6 +21,7 @@ import {
} from '../constant';
import { coverColFiltersItem } from '../utils';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
const { confirm } = Modal;
......@@ -46,11 +47,16 @@ const MemberPrConfirm: React.FC<{}> = props => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPrConfirm/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPrConfirm/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......@@ -100,6 +106,8 @@ const MemberPrConfirm: React.FC<{}> = props => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={MEMBER_INNER_STATUS_BADGE_COLOR[record.innerStatus]} text={text} />,
},
{
......@@ -192,6 +200,7 @@ const MemberPrConfirm: React.FC<{}> = props => {
roles = [],
levels = [],
sources = [],
innerStatus = [],
} = data;
const newColumns = columns.slice();
......@@ -202,6 +211,11 @@ const MemberPrConfirm: React.FC<{}> = props => {
'statusName',
status.map(item => ({ text: item.text, value: item.id })).filter(item => item.value !== 0),
);
coverColFiltersItem(
newColumns,
'innerStatusName',
innerStatus.map(item => ({ text: item.text, value: item.id })).filter(item => item.value !== 0),
);
setColumns(newColumns);
......@@ -211,6 +225,7 @@ const MemberPrConfirm: React.FC<{}> = props => {
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
level: levels.map(item => ({ label: item.levelTag, value: item.level })),
source: sources.map(item => ({ label: item.text, value: item.id })),
innerStatus: innerStatus.map(item => ({ label: item.text, value: item.id })).filter(item => item.value !== 0),
};
}
return {};
......@@ -249,7 +264,7 @@ const MemberPrConfirm: React.FC<{}> = props => {
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'status', 'level', 'roleId', 'level', 'source'],
['memberTypeId', 'status', 'level', 'roleId', 'level', 'source', 'innerStatus'],
fetchSearchItems,
);
}}
......
/*
* @Author: XieZhiXiong
* @Date: 2021-01-08 16:27:19
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-08 16:35:11
* @Description:
*/
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
export const auditSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
colStyle: {
marginLeft: 20,
},
},
properties: {
memberTypeId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员类型(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
status: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
roleId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
level: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
source: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '申请来源(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
'[startDate, endDate]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '时间范围(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
......@@ -20,6 +20,7 @@ import {
} from '../constant';
import { coverColFiltersItem } from '../utils';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
const { confirm } = Modal;
......@@ -45,11 +46,16 @@ const MemberPrSubmit: React.FC<{}> = props => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPrSubmit/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPrSubmit/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
......@@ -85,11 +85,16 @@ const MemberQuery: React.FC<{}> = () => {
dataIndex: 'name',
align: 'center',
render: (text, record) => (
<EyePreview
url={`/memberCenter/memberAbility/query/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/query/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
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