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
18ce0d24
Commit
18ce0d24
authored
Dec 04, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 进货单勾选状态问题
parent
d13aa7e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+8
-3
No files found.
src/pages/lxMall/purchaseOrder/index.tsx
View file @
18ce0d24
...
...
@@ -364,13 +364,13 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
idList
=
[...
idList
,
...
item
.
checkedList
]
}
if
(
idList
.
length
<=
0
)
{
message
.
info
(
"请选择要
移动
的商品"
)
message
.
info
(
"请选择要
删除
的商品"
)
return
false
}
Modal
.
confirm
({
centered
:
true
,
className
:
styles
.
mallComfirm
,
content
:
`是否从进货单中
移
除选中的商品?`
,
content
:
`是否从进货单中
删
除选中的商品?`
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postSearchShopPurchaseDeletePurchase
({
idList
:
idList
}).
then
(
res
=>
{
...
...
@@ -393,16 +393,21 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
* @param ids
*/
const
deleteListItems
=
(
ids
:
number
[])
=>
{
console
.
log
(
ids
,
"ids"
)
const
newOrderList
=
JSON
.
parse
(
JSON
.
stringify
(
orderList
))
const
result
=
[]
for
(
const
item
of
newOrderList
)
{
const
newItem
=
item
newItem
.
checkedList
=
newItem
.
checkedList
.
filter
(
checkItem
=>
!
ids
.
includes
(
checkItem
))
newItem
.
orderList
=
newItem
.
orderList
.
filter
(
orderItem
=>
!
ids
.
includes
(
orderItem
.
id
))
if
(
newItem
.
orderList
.
length
>
0
)
{
result
.
push
(
newItem
)
}
}
setOrderList
(
result
)
if
(
result
.
every
(
resItem
=>
resItem
.
checkedList
.
length
===
0
)){
setIndeterminate
(
false
)
}
}
/**
...
...
@@ -750,7 +755,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
<
Checkbox
value=
{
item
.
id
}
className=
"common_checkbox"
indeterminate=
{
!!
item
.
checkedList
.
length
&&
item
.
checkedList
.
length
<
item
.
defaultCheckedList
.
length
}
indeterminate=
{
!!
item
.
checkedList
.
length
&&
item
.
checkedList
.
length
<
item
.
defaultCheckedList
.
length
&&
item
.
checkedList
.
length
>
0
}
onChange=
{
(
e
)
=>
onCheckChildAllChange
(
e
,
item
.
id
)
}
></
Checkbox
>
<
label
>
{
item
.
shopname
}
</
label
>
...
...
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