Commit d1e33fd3 authored by XieZhiXiong's avatar XieZhiXiong

提取公共schema

parent 5d40a09e
......@@ -77,7 +77,8 @@ const MemberMaintain: React.FC<[]> = () => {
{text}
</EyePreview>
<div>
<LevelBrand level={1} />
{/* <LevelBrand level={1} /> */}
{record.levelTag}
</div>
</>
),
......
......@@ -17,7 +17,7 @@ import { GetMemberAbilityValidateStep1DetailResponse } from '@/services/MemberAp
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
import { MEMBER_INNER_STATUS_BADGE_COLOR, MEMBER_STATUS_TAG_MAP, MEMBER_OUTER_STATUS_TYPE } from '../constant';
import { auditModalSchema } from './schema';
import { auditModalSchema } from '../schema/auditSchema';
import HeadInfo from '../components/HeadInfo';
import AuditProcess from '../components/AuditProcess';
import BasicInfo from '../components/BasicInfo';
......@@ -30,7 +30,7 @@ interface AreaItem {
children: AreaItem[];
};
interface MemberInfo extends GetMemberAbilityValidateStep1DetailResponse {
channelTypeName?: string;
channelTypeName: string;
areasInfo?: string[];
};
......
......@@ -12,7 +12,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import { auditSchema } from './schema';
import { auditSchema } from '../schema/auditSchema';
import {
MEMBER_STATUS_TAG_MAP,
MEMBER_INNER_STATUS_BADGE_COLOR,
......
......@@ -17,7 +17,7 @@ import { GetMemberAbilityValidateStep1DetailResponse } from '@/services/MemberAp
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
import { MEMBER_INNER_STATUS_BADGE_COLOR, MEMBER_STATUS_TAG_MAP, MEMBER_OUTER_STATUS_TYPE } from '../constant';
import { auditModalSchema } from './schema';
import { auditModalSchema } from '../schema/auditSchema';
import HeadInfo from '../components/HeadInfo';
import AuditProcess from '../components/AuditProcess';
import BasicInfo from '../components/BasicInfo';
......@@ -30,7 +30,7 @@ interface AreaItem {
children: AreaItem[];
};
interface MemberInfo extends GetMemberAbilityValidateStep1DetailResponse {
channelTypeName?: string;
channelTypeName: string;
areasInfo?: string[];
};
......
......@@ -12,7 +12,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import { auditSchema } from './schema';
import { auditSchema } from '../schema/auditSchema';
import {
MEMBER_STATUS_TAG_MAP,
MEMBER_INNER_STATUS_BADGE_COLOR,
......
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: '搜索',
},
},
},
},
[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,
},
},
status: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员状态(全部)',
allowClear: true,
},
},
roleId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
},
},
level: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
},
},
source: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '申请来源(全部)',
allowClear: true,
},
},
'[startDate, endDate]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '时间范围(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
export const auditModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelAlign: 'top',
},
properties: {
agree: {
type: 'string',
default: 1,
enum: [
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 },
],
'x-component': 'radio',
'x-component-props': {},
},
reason: {
type: 'string',
title: '审核不通过原因',
required: true,
'x-component': 'textarea',
'x-component-props': {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
rows: 5,
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 120,
}
],
},
},
},
},
};
......@@ -18,7 +18,7 @@ import { createAsyncFormActions, FormEffectHooks, FormPath } from '@formily/antd
import NiceForm from '@/components/NiceForm';
import { MEMBER_INNER_STATUS_SUCCESS } from '@/constants';
import { MEMBER_INNER_STATUS_BADGE_COLOR, MEMBER_STATUS_TAG_MAP, MEMBER_OUTER_STATUS_TYPE } from '../constant';
import { auditModalSchema } from './schema';
import { auditModalSchema } from '../schema/auditSchema';
import HeadInfo from '../components/HeadInfo';
import AuditProcess from '../components/AuditProcess';
import BasicInfo from '../components/BasicInfo';
......
......@@ -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_SUCCESS } from '@/constants';
import { auditSchema } from './schema';
import { auditSchema } from '../schema/auditSchema';
import {
MEMBER_STATUS_TAG_MAP,
MEMBER_INNER_STATUS_BADGE_COLOR,
......
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: '搜索',
},
},
},
},
[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,
},
},
status: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员状态(全部)',
allowClear: true,
},
},
roleId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
},
},
level: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
},
},
source: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '申请来源(全部)',
allowClear: true,
},
},
'[startDate, endDate]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '时间范围(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
export const auditModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelAlign: 'top',
},
properties: {
agree: {
type: 'string',
default: 1,
enum: [
{
label: '审核通过',
value: 1,
disabled: false,
},
{
label: '审核不通过',
value: 0,
},
],
'x-component': 'radio',
'x-component-props': {},
},
reason: {
type: 'string',
title: '审核不通过原因',
required: true,
'x-component': 'textarea',
'x-component-props': {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
rows: 5,
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 120,
}
],
},
},
},
},
};
......@@ -21,7 +21,8 @@ import {
MEMBER_TYPE_CHANNEL_INDIVIDUAL,
} from '@/constants';
import { MEMBER_INNER_STATUS_BADGE_COLOR, MEMBER_STATUS_TAG_MAP, MEMBER_OUTER_STATUS_TYPE } from '../constant';
import { channelSchema, auditModalSchema } from './schema';
import { channelSchema } from './schema';
import { auditModalSchema } from '../schema/auditSchema';
import HeadInfo from '../components/HeadInfo';
import AuditProcess from '../components/AuditProcess';
import BasicInfo from '../components/BasicInfo';
......
......@@ -12,7 +12,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import { auditSchema } from './schema';
import { auditSchema } from '../schema/auditSchema';
import {
MEMBER_STATUS_TAG_MAP,
MEMBER_INNER_STATUS_BADGE_COLOR,
......
/*
* @Author: XieZhiXiong
* @Date: 2020-09-07 16:33:12
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-23 19:44:24
* @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: '搜索',
},
},
},
},
[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,
},
},
status: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员状态(全部)',
allowClear: true,
},
},
roleId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
},
},
level: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
},
},
source: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '申请来源(全部)',
allowClear: true,
},
},
'[startDate, endDate]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '时间范围(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
export const channelSchema: ISchema = {
type: 'object',
......@@ -193,45 +90,4 @@ export const channelSchema: ISchema = {
},
},
},
};
export const auditModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelAlign: 'top',
},
properties: {
agree: {
type: 'string',
default: 1,
enum: [
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 },
],
'x-component': 'radio',
'x-component-props': {},
},
reason: {
type: 'string',
title: '审核不通过原因',
required: true,
'x-component': 'textarea',
'x-component-props': {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
rows: 5,
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 120,
}
],
},
},
},
},
};
};
\ 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