Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-pda-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-pda-master
Commits
88fbd04f
Commit
88fbd04f
authored
Dec 10, 2024
by
honghy
Committed by
wux
Dec 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
空运备货-新增无需打包批量操作
parent
0f18e1b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
2 deletions
+106
-2
api.js
src/pages/stocking/api.js
+7
-0
stocking.vue
src/pages/stocking/stocking.vue
+99
-2
No files found.
src/pages/stocking/api.js
View file @
88fbd04f
...
...
@@ -15,6 +15,13 @@ export const noNeedPack = (orderItemId) => {
})
}
// 批量无需打包
export
const
noNeedPacks
=
(
data
)
=>
{
return
http
(
'
/order/order-warehouse-in/no-need-to-packs
'
,
data
,
{
method
:
'
POST
'
,
})
}
// 完成打包(管理端-订单管理/管理后台 - 订单仓库相关接口)
export
const
finishPack
=
(
data
)
=>
{
return
http
(
'
/order/order-warehouse-in/finish-packed
'
,
data
,
{
...
...
src/pages/stocking/stocking.vue
View file @
88fbd04f
...
...
@@ -49,8 +49,23 @@
</uni-card>
</view>
<view
class=
"content-wrap"
v-if=
"detail && detail.orderItemVOList"
>
<view
class=
"flex solid-bottom justify-between"
>
<view
class=
"margin-xs"
>
<checkbox-group
@
tap=
"checkAll"
>
<checkbox
:checked=
"allChecked"
/>
</checkbox-group>
</view>
<view
class=
"margin-xs"
>
<button
size=
"mini"
type=
"warn"
@
click=
"noNeedPacks"
:loading=
"loading"
>
{{
$t
(
'
无需打包
'
)
}}
</button>
</view>
</view>
<view
v-for=
"(item, index) in detail.orderItemVOList"
:key=
"index"
class=
"info-wrap"
style=
"margin-top:15px"
>
<view
class=
"info-header pos"
>
<view>
<checkbox-group
@
change=
"checkClick(item)"
>
<checkbox
:checked=
"item.checked"
/>
</checkbox-group>
</view>
<view
class=
"header-title"
>
{{
$t
(
'
序号
'
)
}}
:
{{
index
+
1
}}
</view>
<view
class=
"header-status"
v-if=
"item.warehouseInInfoVO"
>
<template
v-if=
"wareItemPackStatus(item.orderItemId) == 1"
>
...
...
@@ -266,7 +281,8 @@ import {
finishStock
,
getFirstWarehouseIn
,
finishPack
,
getPackStatistics
getPackStatistics
,
noNeedPacks
}
from
"
@/pages/stocking/api
"
;
import
Pack
from
"
@/pages/stocking/components/pack
"
;
import
{
...
...
@@ -311,7 +327,10 @@ export default {
// 首次入仓数据
firstWarehouseIn
:
null
,
// 统计
statistics
:
{}
statistics
:
{},
selectedData
:
[],
allChecked
:
false
,
loading
:
false
}
},
computed
:{
...
...
@@ -367,7 +386,16 @@ export default {
})
},
loadOrder
(){
this
.
allChecked
=
false
this
.
selectedData
=
[]
getOrder
(
this
.
orderId
).
then
(
data
=>
{
var
orderItemVOList
=
data
.
orderItemVOList
var
list
=
[]
for
(
let
a
of
orderItemVOList
)
{
a
[
'
checked
'
]
=
false
list
.
push
(
a
)
}
data
.
orderItemVOList
=
list
this
.
detail
=
data
})
this
.
getStatistics
()
...
...
@@ -413,6 +441,75 @@ export default {
})
})
},
noNeedPacks
()
{
confirm
(
this
.
$t
(
'
确认无需打包?
'
),
this
.
$t
(
'
提示
'
)).
then
(()
=>
{
if
(
this
.
selectedData
.
length
===
0
)
{
alert
(
this
.
$t
(
'
请选择
'
))
return
;
}
var
selectedData
=
this
.
selectedData
var
ids
=
[]
for
(
var
i
=
0
;
i
<
selectedData
.
length
;
i
++
){
if
(
this
.
wareItem
(
selectedData
[
i
].
orderItemId
).
packStatus
!=
1
)
{
alert
(
this
.
$t
(
'
请检查
'
))
return
;
}
ids
.
push
(
selectedData
[
i
].
orderItemId
)
}
this
.
loading
=
true
noNeedPacks
(
ids
).
then
((
res
)
=>
{
alert
(
this
.
$t
(
'
操作成功
'
))
this
.
loadOrder
();
this
.
loading
=
false
});
})
},
checkClick
(
item
)
{
item
.
checked
=
!
item
.
checked
console
.
log
(
item
)
if
(
item
.
checked
)
{
this
.
selectedData
.
push
(
item
);
}
else
{
const
index
=
this
.
selectedData
.
findIndex
(
data
=>
data
===
item
);
if
(
index
!==
-
1
)
{
this
.
selectedData
.
splice
(
index
,
1
);
}
}
if
(
!
item
.
checked
)
{
this
.
allChecked
=
false
}
else
{
// 判断单个是否是被选择的状态
const
goods
=
this
.
detail
.
orderItemVOList
.
every
(
item
=>
{
return
item
.
checked
===
true
})
if
(
goods
)
{
this
.
allChecked
=
true
}
else
{
this
.
allChecked
=
false
}
}
console
.
log
(
this
.
selectedData
)
},
checkAll
(){
this
.
allChecked
=
!
this
.
allChecked
;
if
(
this
.
allChecked
)
{
this
.
detail
.
orderItemVOList
.
map
(
item
=>
{
item
.
checked
=
true
;
if
(
!
this
.
selectedData
.
includes
(
item
))
{
this
.
selectedData
.
push
(
item
);
}
});
}
else
{
this
.
detail
.
orderItemVOList
.
map
(
item
=>
{
item
.
checked
=
false
;
const
index
=
this
.
selectedData
.
findIndex
(
data
=>
data
===
item
);
if
(
index
!==
-
1
)
{
this
.
selectedData
.
splice
(
index
,
1
);
}
});
}
},
// 打包
pack
(
item
,
index
=-
1
){
this
.
curPackItem
=
item
...
...
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