Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈智峰
jinfa-platform
Commits
1c8b104a
Commit
1c8b104a
authored
Jul 05, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 展示资质证明
parent
84841277
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
7 deletions
+42
-7
index.tsx
...omingData/components/UploadQualificationsDrawer/index.tsx
+40
-6
verify.tsx
src/pages/member/memberPrVerifyComingData/verify.tsx
+2
-1
No files found.
src/pages/member/memberPrVerifyComingData/components/UploadQualificationsDrawer/index.tsx
View file @
1c8b104a
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-06-01 20:03:23
* @Date: 2021-06-01 20:03:23
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-15 13:54:42
* @LastEditTime: 2021-0
7-05 16:15:48
* @Description: 补充资质证明抽屉
* @Description: 补充资质证明抽屉
*/
*/
import
React
from
'react'
;
import
React
,
{
useMemo
}
from
'react'
;
import
{
import
{
Drawer
,
Drawer
,
Button
,
Button
,
...
@@ -13,7 +13,8 @@ import {
...
@@ -13,7 +13,8 @@ import {
import
{
import
{
createFormActions
,
createFormActions
,
}
from
'@formily/antd'
;
}
from
'@formily/antd'
;
import
{
DatePicker
,
Checkbox
}
from
'@formily/antd-components'
import
{
DatePicker
,
Checkbox
}
from
'@formily/antd-components'
;
import
{
normalizeFiledata
}
from
'@/utils'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
schema
}
from
'./schema'
;
import
{
schema
}
from
'./schema'
;
import
{
useBusinessEffects
}
from
'../../../components/QualitiesUploadFormItem/effects'
;
import
{
useBusinessEffects
}
from
'../../../components/QualitiesUploadFormItem/effects'
;
...
@@ -43,7 +44,7 @@ export type FileType = {
...
@@ -43,7 +44,7 @@ export type FileType = {
url
:
string
,
url
:
string
,
}
}
export
type
ValueType
=
{
export
type
Submit
ValueType
=
{
/**
/**
* 文件
* 文件
*/
*/
...
@@ -58,15 +59,38 @@ export type ValueType = {
...
@@ -58,15 +59,38 @@ export type ValueType = {
permanent
:
number
[],
permanent
:
number
[],
}
}
export
type
ValueType
=
{
/**
* 文件name
*/
name
:
string
,
/**
* 文件url
*/
url
:
string
,
/**
* 到期日
*/
expireDay
:
string
,
/**
* 有效期
*/
permanent
:
number
,
}
interface
IProps
{
interface
IProps
{
/**
/**
* 值
*/
value
:
ValueType
[],
/**
* 是否可见
* 是否可见
*/
*/
visible
:
boolean
,
visible
:
boolean
,
/**
/**
* Form 确认事件
* Form 确认事件
*/
*/
onSubmit
:
(
values
:
ValueType
[])
=>
void
,
onSubmit
:
(
values
:
Submit
ValueType
[])
=>
void
,
/**
/**
* 抽屉关闭事件
* 抽屉关闭事件
*/
*/
...
@@ -77,6 +101,7 @@ const formActions = createFormActions();
...
@@ -77,6 +101,7 @@ const formActions = createFormActions();
const
UploadQualificationsDrawer
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
UploadQualificationsDrawer
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
{
const
{
value
=
[],
visible
,
visible
,
onSubmit
,
onSubmit
,
onClose
,
onClose
,
...
@@ -88,12 +113,20 @@ const UploadQualificationsDrawer: React.FC<IProps> = (props: IProps) => {
...
@@ -88,12 +113,20 @@ const UploadQualificationsDrawer: React.FC<IProps> = (props: IProps) => {
}
}
};
};
const
handleSubmit
=
(
values
:
{
qualities
:
ValueType
[]
})
=>
{
const
handleSubmit
=
(
values
:
{
qualities
:
Submit
ValueType
[]
})
=>
{
if
(
onSubmit
)
{
if
(
onSubmit
)
{
onSubmit
(
values
.
qualities
);
onSubmit
(
values
.
qualities
);
}
}
};
};
const
initialValues
=
useMemo
(()
=>
({
qualities
:
value
.
map
((
item
)
=>
({
file
:
item
.
url
?
[
normalizeFiledata
(
item
.
url
)]
:
[],
expireDay
:
item
.
expireDay
,
permanent
:
item
.
permanent
===
1
?
[
item
.
permanent
]
:
[],
})),
}),
[
value
]);
return
(
return
(
<
Drawer
<
Drawer
title=
"补充资质证明"
title=
"补充资质证明"
...
@@ -117,6 +150,7 @@ const UploadQualificationsDrawer: React.FC<IProps> = (props: IProps) => {
...
@@ -117,6 +150,7 @@ const UploadQualificationsDrawer: React.FC<IProps> = (props: IProps) => {
>
>
<
NiceForm
<
NiceForm
previewPlaceholder=
" "
previewPlaceholder=
" "
initialValues=
{
initialValues
}
components=
{
{
components=
{
{
DatePicker
,
DatePicker
,
Checkbox
,
Checkbox
,
...
...
src/pages/member/memberPrVerifyComingData/verify.tsx
View file @
1c8b104a
...
@@ -36,7 +36,7 @@ import DepositDetailsCard from './components/DepositDetailsCard';
...
@@ -36,7 +36,7 @@ import DepositDetailsCard from './components/DepositDetailsCard';
import
PicWrap
from
'../components/PicWrap'
;
import
PicWrap
from
'../components/PicWrap'
;
import
VerifyComingDataDrawer
,
{
ValueType
as
VerifyData
}
from
'./components/VerifyComingDataDrawer'
;
import
VerifyComingDataDrawer
,
{
ValueType
as
VerifyData
}
from
'./components/VerifyComingDataDrawer'
;
import
ChangeComingDataDrawer
,
{
ValueType
as
ComingData
,
RefHandle
}
from
'./components/ChangeComingDataDrawer'
;
import
ChangeComingDataDrawer
,
{
ValueType
as
ComingData
,
RefHandle
}
from
'./components/ChangeComingDataDrawer'
;
import
UploadQualificationsDrawer
,
{
ValueType
as
QualificationData
}
from
'./components/UploadQualificationsDrawer'
;
import
UploadQualificationsDrawer
,
{
Submit
ValueType
as
QualificationData
}
from
'./components/UploadQualificationsDrawer'
;
const
MemberPrVerifyComingDataVerify
:
React
.
FC
<
{}
>
=
()
=>
{
const
MemberPrVerifyComingDataVerify
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
validateId
}
=
usePageStatus
();
const
{
validateId
}
=
usePageStatus
();
...
@@ -314,6 +314,7 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
...
@@ -314,6 +314,7 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
/>
/>
<
UploadQualificationsDrawer
<
UploadQualificationsDrawer
value=
{
memberInfo
?.
qualities
}
visible=
{
visibleQualificationsDrawer
}
visible=
{
visibleQualificationsDrawer
}
onClose=
{
()
=>
handleVisibleQualificationsDrawer
(
false
)
}
onClose=
{
()
=>
handleVisibleQualificationsDrawer
(
false
)
}
onSubmit=
{
handleQualificationsSubmit
}
onSubmit=
{
handleQualificationsSubmit
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment