Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CnChunfeng
/
scm_wms_outstore_service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
81cd46e0
authored
May 18, 2020
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加箱子标签
parent
2eababed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
app/Http/Model/Logic/PalletLogic.php
app/Http/Model/Logic/PalletLogic.php
View file @
81cd46e0
...
...
@@ -394,22 +394,26 @@ class PalletLogic
//获取打印的
拣货任务
信息
//获取打印的
箱子标签
信息
public
function
print_box_label
(
$data
)
{
//查找拣货任务ID
$pickTask
=
PickTaskModel
::
where
(
'pick_task_sn'
,
$data
[
'pick_task_sn'
])
->
value
(
'pick_task_id'
);
$box
=
BoxModel
::
where
(
'box_id'
,
$data
[
'box_id'
])
->
where
(
'box_sn'
,
$data
[
'box_sn'
])
->
whereIn
(
'status'
,
[
1
,
3
])
->
select
(
'box_id'
,
'box_sn'
,
'weight'
)
->
with
(
'ReceivingList'
)
->
first
()
->
toArray
();
if
(
empty
(
$
pickTask
)){
throw
new
\Exception
(
'该
拣货任务不存在
'
);
if
(
empty
(
$
box
)){
throw
new
\Exception
(
'该
箱子暂无需要打印的数据
'
);
}
$outStoreDetailData
=
OutStoreDetailModel
::
where
(
'pick_task_id'
,
$pickTask
)
->
get
()
->
toArray
();
if
(
empty
(
$outStoreDetailData
)){
throw
new
\Exception
(
'该拣货任务不存在'
);
//将相同的物料合并
$Receiving
=
[];
foreach
(
$box
[
'receiving_list'
]
as
$k
=>
$v
)
{
if
(
empty
(
$Receiving
[
$v
[
'goods_id'
]]))
{
$Receiving
[
$v
[
'goods_id'
]]
=
$v
;
continue
;
}
$Receiving
[
$v
[
'goods_id'
]][
'number'
]
=
bcadd
(
$Receiving
[
$v
[
'goods_id'
]][
'number'
],
$v
[
'number'
],
4
);
}
return
$
outStoreDetailData
;
$box
[
'receiving_list'
]
=
array_values
(
$Receiving
);
return
$
box
;
}
...
...
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