Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
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
wuhao
ems3.3
Commits
5432ea82
Commit
5432ea82
authored
Feb 21, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
d80e190e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
index.jsx
src/pages/spare/outstore/index.jsx
+15
-13
No files found.
src/pages/spare/outstore/index.jsx
View file @
5432ea82
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
useState
,
useMemo
,
useRef
,
useEffect
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
PremButton
from
'@/components/PremButton'
;
...
@@ -32,7 +32,6 @@ function Outstore(props) {
...
@@ -32,7 +32,6 @@ function Outstore(props) {
}
}
},
},
});
});
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
PremButton
<
PremButton
...
@@ -230,7 +229,7 @@ function Outstore(props) {
...
@@ -230,7 +229,7 @@ function Outstore(props) {
},
},
]
}
]
}
pagetitle=
"备件信息"
pagetitle=
"备件信息"
dataSource=
{
drawer
?.
submitdata
}
dataSource=
{
drawer
?.
submitdata
||
[]
}
expandable=
{
{
expandable=
{
{
expandedRowRender
:
(
record
)
=>
{
expandedRowRender
:
(
record
)
=>
{
return
(
return
(
...
@@ -275,22 +274,26 @@ function Outstore(props) {
...
@@ -275,22 +274,26 @@ function Outstore(props) {
preserveSelectedRowKeys
:
true
,
preserveSelectedRowKeys
:
true
,
selectedRowKeys
:
selectedRowKeys
:
value
&&
value
.
length
>
0
value
&&
value
.
length
>
0
?
value
?
value
?.
filter
?.((
it
)
=>
it
?.
id
==
record
.
id
)[
0
]
?.
filter
?.((
it
)
=>
it
?.
id
==
record
.
id
)[
0
]
?
value
?.
taskSpareSupplierList
?.
map
?.((
it
)
=>
it
?.
spareSupplierStockId
)
?.
filter
?.((
it
)
=>
it
?.
id
==
record
.
id
)[
0
]
?.
taskSpareSupplierList
?.
map
?.((
it
)
=>
it
?.
spareSupplierStockId
)
:
[]
:
[],
:
[],
onChange
:
(
selectedKeys
,
selectedRows
)
=>
{
onChange
:
(
selectedKeys
,
selectedRows
)
=>
{
// debugger;
const
curval
=
const
curval
=
value
?.
filter
?.((
it
)
=>
it
?.
id
==
record
.
id
)[
0
]
value
?.
filter
?.((
it
)
=>
it
?.
id
==
record
.
id
)[
0
]
?.
taskSpareSupplierList
??
[];
?.
taskSpareSupplierList
??
[];
const
rowkeylist
=
curval
const
rowkeylist
=
?
curval
?.
map
((
it
)
=>
it
?.
spareSupplierStockId
)
curval
&&
curval
.
length
>
0
:
[];
?
curval
?.
map
((
it
)
=>
it
?.
spareSupplierStockId
)
:
[];
const
newValue
=
selectedRows
?.
map
((
its
)
=>
{
const
newValue
=
selectedRows
?.
map
((
its
)
=>
{
if
(
rowkeylist
.
includes
(
its
?.
id
))
{
if
(
rowkeylist
?
.
includes
(
its
?.
id
))
{
return
curval
.
filter
(
return
curval
?
.
filter
(
(
it
)
=>
it
?.
spareSupplierStockId
==
its
?.
id
,
(
it
)
=>
it
?.
spareSupplierStockId
==
its
?.
id
,
)[
0
];
)[
0
];
}
else
{
}
else
{
...
@@ -310,11 +313,10 @@ function Outstore(props) {
...
@@ -310,11 +313,10 @@ function Outstore(props) {
});
});
}
else
{
}
else
{
nvalue
.
push
({
nvalue
.
push
({
id
:
record
.
id
,
id
:
record
?
.
id
,
taskSpareSupplierList
:
newValue
,
taskSpareSupplierList
:
newValue
,
});
});
}
}
setvalue
(
nvalue
);
setvalue
(
nvalue
);
},
},
}
}
}
}
...
...
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