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
6d2b2382
Commit
6d2b2382
authored
Jul 26, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 加工嵌套表格反选问题
parent
2545bc04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
index.tsx
src/pages/handling/assign/create/index.tsx
+8
-3
No files found.
src/pages/handling/assign/create/index.tsx
View file @
6d2b2382
...
...
@@ -544,10 +544,10 @@ const Create = () => {
onSelectAll
:
async
(
selected
:
boolean
,
selectedRows
:
GetOrderProcessingOrderListResponseDetail
[
'productDateilss'
],
changeRows
:
any
[])
=>
{
const
filterEmptyRows
=
changeRows
.
filter
(
Boolean
)
const
keys
=
filterEmptyRows
.
map
((
_item
)
=>
`
${
_item
.
orderId
}
_
${
_item
.
id
}
`
);
const
orderId
=
changeRows
[
0
].
orderId
;
const
currentOrderData
=
fetchedOrderData
?.
filter
((
_item
)
=>
_item
.
id
===
orderId
)[
0
];
if
(
selected
)
{
const
orderId
=
changeRows
[
0
].
orderId
;
const
currentOrderData
=
fetchedOrderData
?.
filter
((
_item
)
=>
_item
.
id
===
orderId
)[
0
];
const
addTempRow
=
orderProductselectRowRecord
.
concat
(
filterEmptyRows
);
const
addTempRowKeys
=
addTempRow
.
map
((
_item
)
=>
`
${
_item
.
orderId
}
_
${
_item
.
id
}
`
)
...
...
@@ -575,8 +575,13 @@ const Create = () => {
return
;
}
}
else
{
setOrderProductSelectRowKeys
((
prev
)
=>
prev
.
filter
((
_item
)
=>
!
keys
.
includes
(
_item
)))
const
removeKeys
=
orderProductSelectRowKeys
.
filter
((
_item
)
=>!
keys
.
includes
(
_item
))
// const removeRecord =
setOrderProductSelectRowKeys
(
removeKeys
)
setOrderProductSelectRowRecord
((
prev
)
=>
prev
.
filter
((
_item
)
=>
!
keys
.
includes
(
`
${
_item
.
orderId
}
_
${
_item
.
id
}
`
)))
if
(
currentOrderData
.
productDateilss
.
length
!==
removeKeys
.
length
)
{
setProcessOrder
((
prev
)
=>
prev
.
filter
((
_item
)
=>
_item
.
id
!==
currentOrderData
.
id
))
}
}
}
// onSelectAll: onSelectAll
...
...
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