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
c0d3cd9b
Commit
c0d3cd9b
authored
Jul 03, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复 资质证明 未展示的问题
parent
d76b76d7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
14 deletions
+36
-14
index.tsx
src/pages/member/memberQuery/applyMember/index.tsx
+36
-14
No files found.
src/pages/member/memberQuery/applyMember/index.tsx
View file @
c0d3cd9b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-05-26 16:52:48
* @Date: 2021-05-26 16:52:48
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-30 10:22:49
* @LastEditTime: 2021-0
7-03 14:50:48
* @Description: 申请会员
* @Description: 申请会员
*/
*/
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
...
@@ -21,6 +21,7 @@ import ReutrnEle from '@/components/ReturnEle';
...
@@ -21,6 +21,7 @@ import ReutrnEle from '@/components/ReturnEle';
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
normalizeFiledata
,
FileData
}
from
'@/utils'
;
import
schema
,
{
GroupItem
}
from
'./schema'
;
import
schema
,
{
GroupItem
}
from
'./schema'
;
import
{
useBusinessEffects
}
from
'../../components/QualitiesUploadFormItem/effects'
;
import
{
useBusinessEffects
}
from
'../../components/QualitiesUploadFormItem/effects'
;
import
ComingAgreement
from
'./components/ComingAgreement'
;
import
ComingAgreement
from
'./components/ComingAgreement'
;
...
@@ -66,6 +67,16 @@ type ValueType = {
...
@@ -66,6 +67,16 @@ type ValueType = {
},
},
}
}
interface
MemberInfo
{
step4
:
{
qualities
:
{
file
:
FileData
[],
expireDay
:
string
,
permanent
:
number
[],
}[],
},
}
let
countDownLen
=
10
;
let
countDownLen
=
10
;
const
formActions
=
createFormActions
();
const
formActions
=
createFormActions
();
...
@@ -86,6 +97,7 @@ const MemberQueryApplyMember: React.FC = () => {
...
@@ -86,6 +97,7 @@ const MemberQueryApplyMember: React.FC = () => {
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
agreement
,
setAgreement
]
=
useState
(
''
);
const
[
agreement
,
setAgreement
]
=
useState
(
''
);
const
[
agreementLoading
,
setAgreementLoading
]
=
useState
(
false
);
const
[
agreementLoading
,
setAgreementLoading
]
=
useState
(
false
);
const
[
memberInfo
,
setMemberInfo
]
=
useState
<
MemberInfo
>
();
const
stepRef
=
useRef
(
!
validateId
?
0
:
1
);
const
stepRef
=
useRef
(
!
validateId
?
0
:
1
);
...
@@ -131,7 +143,17 @@ const MemberQueryApplyMember: React.FC = () => {
...
@@ -131,7 +143,17 @@ const MemberQueryApplyMember: React.FC = () => {
validateId
:
`
${
validateId
}
`
,
validateId
:
`
${
validateId
}
`
,
});
});
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
const
qualities
=
res
.
data
.
qualities
||
[];
setDepositInfo
(
res
.
data
.
groups
);
setDepositInfo
(
res
.
data
.
groups
);
setMemberInfo
({
step4
:
{
qualities
:
qualities
.
map
((
item
)
=>
({
file
:
item
.
url
?
[
normalizeFiledata
(
item
.
url
)]
:
[],
expireDay
:
item
.
expireDay
,
permanent
:
item
.
permanent
===
1
?
[
item
.
permanent
]
:
[],
}))
},
});
}
}
setLoading
(
false
);
setLoading
(
false
);
};
};
...
@@ -172,6 +194,16 @@ const MemberQueryApplyMember: React.FC = () => {
...
@@ -172,6 +194,16 @@ const MemberQueryApplyMember: React.FC = () => {
content
:
'正在保存,请稍候...'
,
content
:
'正在保存,请稍候...'
,
duration
:
0
,
duration
:
0
,
});
});
const
commonPayload
=
{
qualities
:
qualities
.
map
((
item
)
=>
({
expireDay
:
item
.
expireDay
||
''
,
permanent
:
item
.
permanent
&&
item
.
permanent
[
0
]
||
0
,
url
:
item
.
file
&&
item
.
file
[
0
]
?
item
.
file
[
0
].
url
:
''
,
name
:
item
.
file
&&
item
.
file
[
0
]
?
item
.
file
[
0
].
name
:
''
,
})),
};
if
(
!
validateId
)
{
if
(
!
validateId
)
{
if
((
!
upperMemberId
||
!
upperRoleId
))
{
if
((
!
upperMemberId
||
!
upperRoleId
))
{
return
;
return
;
...
@@ -180,12 +212,7 @@ const MemberQueryApplyMember: React.FC = () => {
...
@@ -180,12 +212,7 @@ const MemberQueryApplyMember: React.FC = () => {
upperMemberId
,
upperMemberId
,
upperRoleId
,
upperRoleId
,
depositDetails
:
step3
,
depositDetails
:
step3
,
qualities
:
qualities
.
map
((
item
)
=>
({
...
commonPayload
,
expireDay
:
item
.
expireDay
||
''
,
permanent
:
item
.
permanent
&&
item
.
permanent
[
0
]
||
0
,
url
:
item
.
file
&&
item
.
file
[
0
]
?
item
.
file
[
0
].
url
:
''
,
name
:
item
.
file
&&
item
.
file
[
0
]
?
item
.
file
[
0
].
name
:
''
,
})),
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
if
(
res
.
code
!==
1000
)
{
return
;
return
;
...
@@ -200,12 +227,7 @@ const MemberQueryApplyMember: React.FC = () => {
...
@@ -200,12 +227,7 @@ const MemberQueryApplyMember: React.FC = () => {
PublicApi
.
postMemberAbilityInfoDepositDetailUpdate
({
PublicApi
.
postMemberAbilityInfoDepositDetailUpdate
({
validateId
,
validateId
,
detail
:
step3
,
detail
:
step3
,
qualities
:
qualities
.
map
((
item
)
=>
({
...
commonPayload
,
expireDay
:
item
.
expireDay
||
''
,
permanent
:
item
.
permanent
&&
item
.
permanent
[
0
]
||
0
,
url
:
item
.
file
&&
item
.
file
[
0
]
?
item
.
file
[
0
].
url
:
''
,
name
:
item
.
file
&&
item
.
file
[
0
]
?
item
.
file
[
0
].
name
:
''
,
})),
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
if
(
res
.
code
!==
1000
)
{
return
;
return
;
...
@@ -320,7 +342,7 @@ const MemberQueryApplyMember: React.FC = () => {
...
@@ -320,7 +342,7 @@ const MemberQueryApplyMember: React.FC = () => {
previewPlaceholder=
" "
previewPlaceholder=
" "
onSubmit=
{
handleSubmit
}
onSubmit=
{
handleSubmit
}
actions=
{
formActions
}
actions=
{
formActions
}
initialValues=
{
{}
}
initialValues=
{
memberInfo
}
components=
{
{
components=
{
{
Checkbox
,
Checkbox
,
CheckboxGroup
:
Checkbox
.
Group
,
CheckboxGroup
:
Checkbox
.
Group
,
...
...
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