Commit 64da5a5b authored by XieZhiXiong's avatar XieZhiXiong

完善对接

parent ccfb84de
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_OUTER_STATUS_UNCOMMITTED,
MEMBER_OUTER_STATUS_UNREVIEWED,
MEMBER_OUTER_STATUS_FAILED,
MEMBER_OUTER_STATUS_SUCCESS,
} from '@/constants';
export const STATUS_COLOR_MAP = {
0: '#669EDE',
1: '#41CC9E',
2: '#EF6260',
};
export const STATUS_COLOR_TXT = {
0: '待审核',
1: '审核通过',
2: '冻结',
};
// 会员状态 StatusTag map
export const CREDIT_STATUS_TAG_MAP = {
[MEMBER_STATUS_NORMAL]: 'success',
[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',
};
// 会员内部状态 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',
};
// 会员外部状态 Tag badge map
export const MEMBER_OUTER_STATUS_BADGE_COLOR = {
[MEMBER_OUTER_STATUS_UNCOMMITTED]: '#669EDE',
[MEMBER_OUTER_STATUS_UNREVIEWED]: '#FFC400',
[MEMBER_OUTER_STATUS_FAILED]: '#EF6260',
[MEMBER_OUTER_STATUS_SUCCESS]: '#41CC9E',
};
\ No newline at end of file
...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils'; ...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema'; import { listSearchSchema } from '../schema';
import { import {
CREDIT_OUTER_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP, CREDIT_INNER_STATUS_BADGE_MAP,
...@@ -41,7 +41,7 @@ const QuotaPr1: React.FC = () => { ...@@ -41,7 +41,7 @@ const QuotaPr1: React.FC = () => {
> >
{text} {text}
</EyePreview> </EyePreview>
<StatusTag type="primary" title="暂无" /> <StatusTag type="primary" title={record.applyTypeName} />
<div> <div>
<ClockCircleOutlined /> {record.applyTime} <ClockCircleOutlined /> {record.applyTime}
</div> </div>
...@@ -152,6 +152,27 @@ const QuotaPr1: React.FC = () => { ...@@ -152,6 +152,27 @@ const QuotaPr1: React.FC = () => {
} }
return {}; return {};
}; };
// 初始化高级筛选会员选项
const fetchSearchMemberItems = async () => {
const res = await PublicApi.getMemberManagePageitems();
if (res.code === 1000) {
const { data = {} }: any = res;
const {
memberTypes = [],
roles = [],
levels = [],
} = data;
return {
memberTypeName: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
memberRoleName: roles.map(item => ({ label: item.roleName, value: item.roleId })),
memberLevelName: levels.map(item => ({ label: item.levelTag, value: item.level })),
};
}
return {};
};
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
...@@ -171,13 +192,17 @@ const QuotaPr1: React.FC = () => { ...@@ -171,13 +192,17 @@ const QuotaPr1: React.FC = () => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'applyNo', 'memberName',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
useAsyncInitSelect( useAsyncInitSelect(
['applyType'], ['applyType'],
fetchSearchItems, fetchSearchItems,
); );
useAsyncInitSelect(
['memberLevelName', 'memberTypeName', 'memberRoleName'],
fetchSearchMemberItems,
);
}} }}
schema={listSearchSchema} schema={listSearchSchema}
/> />
......
...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils'; ...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema'; import { listSearchSchema } from '../schema';
import { import {
CREDIT_OUTER_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP, CREDIT_INNER_STATUS_BADGE_MAP,
...@@ -41,7 +41,7 @@ const QuotaPr1: React.FC = () => { ...@@ -41,7 +41,7 @@ const QuotaPr1: React.FC = () => {
> >
{text} {text}
</EyePreview> </EyePreview>
<StatusTag type="primary" title="暂无" /> <StatusTag type="primary" title={record.applyTypeName} />
<div> <div>
<ClockCircleOutlined /> {record.applyTime} <ClockCircleOutlined /> {record.applyTime}
</div> </div>
...@@ -153,6 +153,27 @@ const QuotaPr1: React.FC = () => { ...@@ -153,6 +153,27 @@ const QuotaPr1: React.FC = () => {
return {}; return {};
}; };
// 初始化高级筛选会员选项
const fetchSearchMemberItems = async () => {
const res = await PublicApi.getMemberManagePageitems();
if (res.code === 1000) {
const { data = {} }: any = res;
const {
memberTypes = [],
roles = [],
levels = [],
} = data;
return {
memberTypeName: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
memberRoleName: roles.map(item => ({ label: item.roleName, value: item.roleId })),
memberLevelName: levels.map(item => ({ label: item.levelTag, value: item.level })),
};
}
return {};
};
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
...@@ -171,13 +192,17 @@ const QuotaPr1: React.FC = () => { ...@@ -171,13 +192,17 @@ const QuotaPr1: React.FC = () => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'applyNo', 'memberName',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
useAsyncInitSelect( useAsyncInitSelect(
['applyType'], ['applyType'],
fetchSearchItems, fetchSearchItems,
); );
useAsyncInitSelect(
['memberLevelName', 'memberTypeName', 'memberRoleName'],
fetchSearchMemberItems,
);
}} }}
schema={listSearchSchema} schema={listSearchSchema}
/> />
......
...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils'; ...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema'; import { listSearchSchema } from '../schema';
import { import {
CREDIT_OUTER_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP, CREDIT_INNER_STATUS_BADGE_MAP,
...@@ -41,7 +41,7 @@ const QuotaPr3: React.FC = () => { ...@@ -41,7 +41,7 @@ const QuotaPr3: React.FC = () => {
> >
{text} {text}
</EyePreview> </EyePreview>
<StatusTag type="primary" title="暂无" /> <StatusTag type="primary" title={record.applyTypeName} />
<div> <div>
<ClockCircleOutlined /> {record.applyTime} <ClockCircleOutlined /> {record.applyTime}
</div> </div>
...@@ -153,6 +153,27 @@ const QuotaPr3: React.FC = () => { ...@@ -153,6 +153,27 @@ const QuotaPr3: React.FC = () => {
return {}; return {};
}; };
// 初始化高级筛选会员选项
const fetchSearchMemberItems = async () => {
const res = await PublicApi.getMemberManagePageitems();
if (res.code === 1000) {
const { data = {} }: any = res;
const {
memberTypes = [],
roles = [],
levels = [],
} = data;
return {
memberTypeName: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
memberRoleName: roles.map(item => ({ label: item.roleName, value: item.roleId })),
memberLevelName: levels.map(item => ({ label: item.levelTag, value: item.level })),
};
}
return {};
};
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
...@@ -171,13 +192,17 @@ const QuotaPr3: React.FC = () => { ...@@ -171,13 +192,17 @@ const QuotaPr3: React.FC = () => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'applyNo', 'memberName',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
useAsyncInitSelect( useAsyncInitSelect(
['applyType'], ['applyType'],
fetchSearchItems, fetchSearchItems,
); );
useAsyncInitSelect(
['memberLevelName', 'memberTypeName', 'memberRoleName'],
fetchSearchMemberItems,
);
}} }}
schema={listSearchSchema} schema={listSearchSchema}
/> />
......
...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils'; ...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema'; import { listSearchSchema } from '../schema';
import { import {
CREDIT_OUTER_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP, CREDIT_INNER_STATUS_BADGE_MAP,
...@@ -41,7 +41,7 @@ const QuotaPrConfirm: React.FC = () => { ...@@ -41,7 +41,7 @@ const QuotaPrConfirm: React.FC = () => {
> >
{text} {text}
</EyePreview> </EyePreview>
<StatusTag type="primary" title="暂无" /> <StatusTag type="primary" title={record.applyTypeName} />
<div> <div>
<ClockCircleOutlined /> {record.applyTime} <ClockCircleOutlined /> {record.applyTime}
</div> </div>
...@@ -153,6 +153,27 @@ const QuotaPrConfirm: React.FC = () => { ...@@ -153,6 +153,27 @@ const QuotaPrConfirm: React.FC = () => {
return {}; return {};
}; };
// 初始化高级筛选会员选项
const fetchSearchMemberItems = async () => {
const res = await PublicApi.getMemberManagePageitems();
if (res.code === 1000) {
const { data = {} }: any = res;
const {
memberTypes = [],
roles = [],
levels = [],
} = data;
return {
memberTypeName: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
memberRoleName: roles.map(item => ({ label: item.roleName, value: item.roleId })),
memberLevelName: levels.map(item => ({ label: item.levelTag, value: item.level })),
};
}
return {};
};
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
...@@ -171,13 +192,17 @@ const QuotaPrConfirm: React.FC = () => { ...@@ -171,13 +192,17 @@ const QuotaPrConfirm: React.FC = () => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'applyNo', 'memberName',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
useAsyncInitSelect( useAsyncInitSelect(
['applyType'], ['applyType'],
fetchSearchItems, fetchSearchItems,
); );
useAsyncInitSelect(
['memberLevelName', 'memberTypeName', 'memberRoleName'],
fetchSearchMemberItems,
);
}} }}
schema={listSearchSchema} schema={listSearchSchema}
/> />
......
...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils'; ...@@ -17,7 +17,7 @@ import { coverColFiltersItem } from '@/utils';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema'; import { listSearchSchema } from '../schema';
import { import {
CREDIT_OUTER_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP, CREDIT_INNER_STATUS_BADGE_MAP,
...@@ -41,7 +41,7 @@ const QuotaPrSubmit: React.FC = () => { ...@@ -41,7 +41,7 @@ const QuotaPrSubmit: React.FC = () => {
> >
{text} {text}
</EyePreview> </EyePreview>
<StatusTag type="primary" title="暂无" /> <StatusTag type="primary" title={record.applyTypeName} />
<div> <div>
<ClockCircleOutlined /> {record.applyTime} <ClockCircleOutlined /> {record.applyTime}
</div> </div>
...@@ -153,6 +153,27 @@ const QuotaPrSubmit: React.FC = () => { ...@@ -153,6 +153,27 @@ const QuotaPrSubmit: React.FC = () => {
return {}; return {};
}; };
// 初始化高级筛选会员选项
const fetchSearchMemberItems = async () => {
const res = await PublicApi.getMemberManagePageitems();
if (res.code === 1000) {
const { data = {} }: any = res;
const {
memberTypes = [],
roles = [],
levels = [],
} = data;
return {
memberTypeName: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
memberRoleName: roles.map(item => ({ label: item.roleName, value: item.roleId })),
memberLevelName: levels.map(item => ({ label: item.levelTag, value: item.level })),
};
}
return {};
};
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
...@@ -171,13 +192,17 @@ const QuotaPrSubmit: React.FC = () => { ...@@ -171,13 +192,17 @@ const QuotaPrSubmit: React.FC = () => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'applyNo', 'memberName',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
useAsyncInitSelect( useAsyncInitSelect(
['applyType'], ['applyType'],
fetchSearchItems, fetchSearchItems,
); );
useAsyncInitSelect(
['memberLevelName', 'memberTypeName', 'memberRoleName'],
fetchSearchMemberItems,
);
}} }}
schema={listSearchSchema} schema={listSearchSchema}
/> />
......
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-29 16:18:29
* @Description:
*/
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
export const listSearchSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
memberName: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入 会员名称 进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
},
properties: {
applyNo: {
type: 'string',
'x-component-props': {
placeholder: '申请单号',
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
applyType: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '单据类型(全部)',
allowClear: true,
},
},
memberLevelName: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
},
},
memberTypeName: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员类型(全部)',
allowClear: true,
},
},
memberRoleName: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ 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