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
shenshaokai
jinfa-platform
Commits
dcf870c6
Commit
dcf870c6
authored
Dec 23, 2022
by
shenshaokai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 供应商变更-发票信息是否默认修改
parent
bc916ea7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
index.tsx
src/pages/balance/settleRules/receipt/index.tsx
+15
-1
archiveInfo.tsx
src/pages/member/memberMaintain/detailed/archiveInfo.tsx
+1
-1
No files found.
src/pages/balance/settleRules/receipt/index.tsx
View file @
dcf870c6
...
...
@@ -227,6 +227,20 @@ const Receipt: React.ForwardRefRenderFunction<RefHandle, IProps> = (props, ref)
setList
(
newList
);
}
const
updateIsDefault
=
(
list
,
currentValue
)
=>
{
const
findDefault
=
list
.
find
(
item
=>
(
item
.
id
===
currentValue
.
id
&&
item
.
isDefault
))
if
(
findDefault
)
{
return
list
.
map
(
item
=>
{
item
.
isDefault
=
false
if
(
item
.
id
===
currentValue
.
id
)
{
item
.
isDefault
=
true
}
return
item
;
})
}
return
list
}
const
invoiceModalConfirm
=
(
value
)
=>
{
const
index
=
list
.
findIndex
(
item
=>
item
.
id
===
value
.
id
);
if
(
index
!==
-
1
)
{
...
...
@@ -234,7 +248,7 @@ const Receipt: React.ForwardRefRenderFunction<RefHandle, IProps> = (props, ref)
}
else
{
list
.
push
(
value
)
}
setList
(
list
.
slice
(
));
setList
(
updateIsDefault
(
list
,
value
));
invoiceModalRef
?.
current
?.
setVisible
(
false
)
}
...
...
src/pages/member/memberMaintain/detailed/archiveInfo.tsx
View file @
dcf870c6
...
...
@@ -420,7 +420,7 @@ const MemberArchiveInfo = () => {
if
(
deposit
)
{
Object
.
assign
(
params
,
{
deposit
})
}
Object
.
assign
(
params
,
{
invoices
:
(
invoiceRef
.
current
?.
getList
()
||
[]).
map
(
item
=>
({
...
item
,
invoiceId
:
item
.
id
}))
})
Object
.
assign
(
params
,
{
invoices
:
(
invoiceRef
.
current
?.
getList
()
||
[]).
map
(
item
=>
({
...
item
,
invoiceId
:
item
.
id
,
isDefault
:
item
.
isDefault
?
1
:
0
}))
})
}
postMemberAbilityInfoDepositDetailUpdate
(
params
).
then
((
res
)
=>
{
...
...
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