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
linweijiong
jinfa-platform
Commits
2ca6d418
Commit
2ca6d418
authored
Aug 04, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 会员信息变更
parent
991442a3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
archiveInfo.tsx
src/pages/member/memberMaintain/detailed/archiveInfo.tsx
+17
-16
No files found.
src/pages/member/memberMaintain/detailed/archiveInfo.tsx
View file @
2ca6d418
...
...
@@ -119,6 +119,8 @@ const MemberArchiveInfo = () => {
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
depositData
,
setDepositData
]
=
useState
({})
const
[
btnLoading
,
setBtnLoading
]
=
useState
(
false
)
const
[
detail
,
setDetail
]
=
useState
<
any
>
({});
const
[
qualitiesList
,
setQualitiesList
]
=
useState
<
any
[]
>
([]);
const
contenxt
=
useContext
(
MemberDetailsContext
);
const
categoryFormRef
=
useRef
<
MemberDocCategoryProRef
|
null
>
(
null
);
...
...
@@ -145,17 +147,18 @@ const MemberArchiveInfo = () => {
const
getDepositDetailData
=
async
()
=>
{
const
{
data
,
code
}
=
await
getMemberAbilityInfoDepositDetail
({
validateId
})
if
(
code
=
==
1000
)
{
setDepositData
(
data
)
depositRef
.
current
.
values
=
{
}
qualitiesRef
.
current
.
values
=
[]
data
?.
groups
?.
length
>
0
&&
data
.
groups
[
0
]?.
elements
?.
length
>
0
&&
if
(
code
!
==
1000
)
{
return
}
if
(
data
?.
groups
?.
length
>
0
&&
data
.
groups
[
0
]?.
elements
?.
length
>
0
)
{
const
param
=
{}
data
.
groups
.
forEach
(
item
=>
{
item
.
elements
.
forEach
(
_item
=>
{
depositRef
.
current
.
values
[
_item
.
fieldName
]
=
_item
.
fieldValue
param
[
_item
.
fieldName
]
=
_item
.
fieldValue
})
})
/* 处理资质证明数据 */
setDetail
(
param
)
}
const
qualitiesList
=
data
.
qualities
?.
length
>
0
?
data
.
qualities
.
map
(
item
=>
(
{
expireDay
:
item
.
expireDay
,
...
...
@@ -163,9 +166,8 @@ const MemberArchiveInfo = () => {
permanent
:
[
item
.
permanent
]
}
))
:
[]
qualitiesRef
.
current
.
values
=
qualitiesList
console
.
log
(
'depositRef'
,
depositRef
);
}
setQualitiesList
(
qualitiesList
)
setDepositData
(
data
)
}
const
inspectionColumns
:
EditableColumns
<
InspectListItemType
>
[]
=
[
...
...
@@ -381,8 +383,7 @@ const MemberArchiveInfo = () => {
];
return
Promise
.
all
(
promises
).
then
(()
=>
{
console
.
log
(
'depositRef.current'
,
depositRef
.
current
?.
values
);
const
qualities
=
qualitiesRef
.
current
?.
values
?.
length
>
0
?
qualitiesRef
.
current
.
values
.
filter
((
item
)
=>
item
.
file
&&
item
.
file
[
0
]
&&
item
.
file
[
0
].
status
===
'done'
)
const
qualities
=
qualitiesList
.
length
>
0
?
qualitiesList
.
filter
((
item
)
=>
item
.
file
&&
item
.
file
[
0
]
&&
item
.
file
[
0
].
status
===
'done'
)
.
map
((
item
)
=>
({
url
:
item
.
file
&&
item
.
file
?.
length
>
0
?
item
.
file
[
0
].
url
:
''
,
name
:
item
.
file
&&
item
.
file
?.
length
>
0
?
item
.
file
[
0
].
name
:
''
,
...
...
@@ -392,8 +393,8 @@ const MemberArchiveInfo = () => {
const
params
=
{
validateId
,
detail
:
depositRef
.
current
?.
values
,
qualities
detail
,
qualities
,
}
postMemberAbilityInfoDepositDetailUpdate
(
params
,
{
ctlType
:
'none'
})
...
...
@@ -426,11 +427,11 @@ const MemberArchiveInfo = () => {
}
const
handleDepositChange
=
(
values
:
DepositValueType
)
=>
{
depositRef
.
current
.
values
=
values
;
setDetail
({...
values
})
};
const
handleQualitiesChange
=
(
values
)
=>
{
qualitiesRef
.
current
.
values
=
values
;
setQualitiesList
([...
values
])
};
return
(
...
...
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