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
294531f6
Commit
294531f6
authored
Feb 20, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 过滤掉取消勾选的数据
parent
700178c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+2
-1
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+2
-1
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+2
-1
No files found.
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
294531f6
...
...
@@ -544,7 +544,8 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
};
value
.
push
(
atom
);
});
const
concated
=
[...
value
,
...
preValues
];
// 先过滤掉 value 中没有,preValues 中有的数据
const
concated
=
[...
value
,
...
preValues
.
filter
(
item
=>
value
.
find
(
val
=>
val
.
extraData
.
id
===
item
.
extraData
.
id
))];
const
newData
=
concated
.
filter
((
item
,
index
)
=>
findLastIndex
(
concated
,
val
=>
val
.
extraData
.
id
===
item
.
extraData
.
id
)
===
index
);
if
(
preValues
.
length
)
{
newData
.
reverse
();
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
294531f6
...
...
@@ -364,7 +364,8 @@ const RepairForm: React.FC<BillsFormProps> = ({
};
value
.
push
(
atom
);
});
const
concated
=
[...
value
,
...
preValues
];
// 先过滤掉 value 中没有,preValues 中有的数据
const
concated
=
[...
value
,
...
preValues
.
filter
(
item
=>
value
.
find
(
val
=>
val
.
extraData
.
id
===
item
.
extraData
.
id
))];
const
newData
=
concated
.
filter
((
item
,
index
)
=>
findLastIndex
(
concated
,
val
=>
val
.
extraData
.
id
===
item
.
extraData
.
id
)
===
index
);
if
(
preValues
.
length
)
{
newData
.
reverse
();
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
294531f6
...
...
@@ -550,7 +550,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({
};
value
.
push
(
atom
);
});
const
concated
=
[...
value
,
...
preValues
];
// 先过滤掉 value 中没有,preValues 中有的数据
const
concated
=
[...
value
,
...
preValues
.
filter
(
item
=>
value
.
find
(
val
=>
val
.
extraData
.
id
===
item
.
extraData
.
id
))];
const
newData
=
concated
.
filter
((
item
,
index
)
=>
findLastIndex
(
concated
,
val
=>
val
.
extraData
.
id
===
item
.
extraData
.
id
)
===
index
);
if
(
preValues
.
length
)
{
newData
.
reverse
();
...
...
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