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