Commit 9be3d2eb authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加 没有入库资料展示

parent 28e29bee
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 16:52:48
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-05 10:40:46
* @LastEditTime: 2021-07-05 15:03:14
* @Description: 申请会员
*/
import React, { useState, useEffect, useRef } from 'react';
......@@ -21,6 +21,7 @@ import { usePageStatus } from '@/hooks/usePageStatus';
import ReutrnEle from '@/components/ReturnEle';
import NiceForm from '@/components/NiceForm';
import MellowCard from '@/components/MellowCard';
import NoData from '@/components/NoData';
import { PublicApi } from '@/services/api';
import { normalizeFiledata, FileData } from '@/utils';
import schema, { GroupItem } from './schema';
......@@ -130,6 +131,11 @@ const MemberQueryApplyMember: React.FC<RouteComponentProps> = (props: any) => {
});
if (res.code === 1000) {
setDepositInfo(res.data.depositDetails);
if (!res.data.depositDetails || !res.data.depositDetails.length) {
formActions.setFieldState('step3.NO_DEPOSIT', state => {
state.visible = true;
});
}
}
setLoading(false);
};
......@@ -156,6 +162,11 @@ const MemberQueryApplyMember: React.FC<RouteComponentProps> = (props: any) => {
}))
},
});
if (!res.data.groups || !res.data.groups.length) {
formActions.setFieldState('step3.NO_DEPOSIT', state => {
state.visible = true;
});
}
}
setLoading(false);
};
......@@ -353,6 +364,7 @@ const MemberQueryApplyMember: React.FC<RouteComponentProps> = (props: any) => {
AreaSelect,
QualitiesUpload,
QualitiesUploadFormItem,
NoData,
}}
expressionScope={{
currenStep,
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 17:00:39
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-30 09:55:17
* @LastEditTime: 2021-07-05 14:59:46
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -19,13 +19,21 @@ export type GroupItem = {
elements: ElementType[],
};
const schema = (groups: GroupItem[], validateId?: number): ISchema => {
const depositSchema: ISchema = {
type: 'object',
properties: {},
};
const depositSchema: ISchema = {
type: 'object',
properties: {
NO_DEPOSIT: {
type: 'object',
visible: false,
'x-component': 'NoData',
'x-component-props': {
content: '您当前无可变更的入库信息',
},
},
},
};
const schema = (groups: GroupItem[], validateId?: number): ISchema => {
(groups || []).forEach((item, index) => {
depositSchema.properties[`CARD_BOX_${index}`] = {
type: 'object',
......
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