Commit 52577705 authored by XieZhiXiong's avatar XieZhiXiong

fixbug、提取公共shema

parent 48f1a45e
......@@ -4,8 +4,6 @@
/node_modules
/npm-debug.log*
/yarn-error.log
/yarn.lock
/package-lock.json
# production
/dist
......
......@@ -132,7 +132,7 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
onBack={() => history.push(`/memberAbility/manage/maintian`)}
title={
<HeadInfo
info={{
......
......@@ -53,7 +53,6 @@ const memberMaintain: React.FC<[]> = () => {
const [visibleModal, setVisibleModal] = useState(false);
const fetchData = async (params: any) => {
console.log('params', params)
const { startDate, endDate } = params;
const payload = params;
const res = await PublicApi.getMemberMaintenancePage({
......
......@@ -263,7 +263,15 @@ export const initDetailSchema = (props: any) => {
'x-component-props': {
label: '注册手机',
required: true,
inline: true,
wrapperCol: 24,
},
properties: {
MEGA_LAYOUT1_1_1: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
},
properties: {
countryCodeId: {
......@@ -277,6 +285,9 @@ export const initDetailSchema = (props: any) => {
phone: {
type: 'string',
required: true,
'x-mega-props': {
span: 2,
},
'x-component-props': {
placeholder: '请输入你的手机号码',
maxLength: 11,
......@@ -290,6 +301,8 @@ export const initDetailSchema = (props: any) => {
},
},
},
},
},
email: {
type: 'string',
title: '邮箱',
......
......@@ -26,13 +26,12 @@ import {
MEMBER_INNER_STATUS_BADGE_COLOR,
MEMBER_OUTER_STATUS_TYPE,
} from '../constant';
import { auditModalSchema } from './schema';
import { auditModalSchema } from '../schema/auditSchema';
import HeadInfo from '../components/HeadInfo';
import StatusTag from '../components/StatusTag';
import BasicInfo from '../components/BasicInfo';
import AuditProcess from '../components/AuditProcess';
import styles from './index.less';
import { values } from 'mobx';
const treeActions = createTreeActions();
const modalFormActions = createFormActions();
......
......@@ -11,7 +11,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,
......
......@@ -26,13 +26,12 @@ import {
MEMBER_INNER_STATUS_BADGE_COLOR,
MEMBER_OUTER_STATUS_TYPE,
} from '../constant';
import { auditModalSchema } from './schema';
import { auditModalSchema } from '../schema/auditSchema';
import HeadInfo from '../components/HeadInfo';
import StatusTag from '../components/StatusTag';
import BasicInfo from '../components/BasicInfo';
import AuditProcess from '../components/AuditProcess';
import styles from './index.less';
import { values } from 'mobx';
const treeActions = createTreeActions();
const modalFormActions = createFormActions();
......
......@@ -11,7 +11,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,
}
],
},
},
},
},
};
......@@ -27,13 +27,12 @@ import {
MEMBER_INNER_STATUS_BADGE_COLOR,
MEMBER_OUTER_STATUS_TYPE,
} from '../constant';
import { auditModalSchema } from './schema';
import { auditModalSchema } from '../schema/auditSchema';
import HeadInfo from '../components/HeadInfo';
import StatusTag from '../components/StatusTag';
import BasicInfo from '../components/BasicInfo';
import AuditProcess from '../components/AuditProcess';
import styles from './index.less';
import { values } from 'mobx';
const treeActions = createTreeActions();
const modalFormActions = createAsyncFormActions();
......
......@@ -12,7 +12,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import { MEMBER_INNER_STATUS_SUCCESS, MEMBER_INNER_STATUS_FAILED } 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,
}
],
},
},
},
},
};
......@@ -26,13 +26,12 @@ import {
MEMBER_INNER_STATUS_BADGE_COLOR,
MEMBER_OUTER_STATUS_TYPE,
} from '../constant';
import { auditModalSchema } from './schema';
import { auditModalSchema } from '../schema/auditSchema';
import HeadInfo from '../components/HeadInfo';
import StatusTag from '../components/StatusTag';
import BasicInfo from '../components/BasicInfo';
import AuditProcess from '../components/AuditProcess';
import styles from './index.less';
import { values } from 'mobx';
const treeActions = createTreeActions();
const modalFormActions = createFormActions();
......
......@@ -11,7 +11,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,
}
],
},
},
},
},
};
......@@ -133,8 +133,8 @@ export const auditModalSchema: ISchema = {
reason: {
type: 'string',
title: '审核不通过原因',
required: true,
'x-component': 'textarea',
required: true,
'x-component-props': {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
rows: 5,
......@@ -150,4 +150,3 @@ export const auditModalSchema: ISchema = {
},
},
};
This source diff could not be displayed because it is too large. You can view the blob instead.
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