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
d881618b
Commit
d881618b
authored
Jan 05, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复单据明细多选旧数据丢失的问题
parent
398a3b70
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+6
-6
No files found.
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
d881618b
...
@@ -5,6 +5,7 @@ import { DeleteOutlined } from '@ant-design/icons';
...
@@ -5,6 +5,7 @@ import { DeleteOutlined } from '@ant-design/icons';
import
{
Radio
,
ArrayTable
}
from
'@formily/antd-components'
;
import
{
Radio
,
ArrayTable
}
from
'@formily/antd-components'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
findLastIndex
}
from
'lodash'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
SaveOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
...
@@ -426,11 +427,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
...
@@ -426,11 +427,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
const
value
=
[];
const
value
=
[];
values
.
forEach
(
item
=>
{
values
.
forEach
(
item
=>
{
const
existing
=
preValues
.
find
(
val
=>
val
.
id
===
item
.
id
);
const
atom
=
{
const
atom
=
existing
?
existing
:
{
orderNo
:
item
.
orderNo
,
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
productName
:
item
.
productName
,
...
@@ -449,7 +446,10 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
...
@@ -449,7 +446,10 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
};
};
value
.
push
(
atom
);
value
.
push
(
atom
);
});
});
addSchemaAction
.
setFieldValue
(
'replaceGoodsList'
,
value
);
const
concated
=
[...
value
,
...
preValues
];
const
newData
=
concated
.
filter
((
item
,
index
)
=>
findLastIndex
(
concated
,
val
=>
val
.
extraData
.
id
===
item
.
extraData
.
id
)
===
index
).
reverse
();
addSchemaAction
.
setFieldValue
(
'replaceGoodsList'
,
newData
);
};
};
const
handleGoodsChange
=
values
=>
{
const
handleGoodsChange
=
values
=>
{
...
...
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