--[[
|
编码: WMS-56-33
|
名称: 获取入库空料箱计算结果
|
作者:HAN
|
日期:2025-3-12
|
|
级别:项目
|
|
函数: GetEmptyBoxOutResult
|
|
功能:
|
-- 点击【呼出空料箱】按钮后后台进程进行呼出空料箱计算
|
|
更改记录:
|
--]]
|
|
wms_base = require ("wms_base")
|
|
function GetEmptyBoxOutResult ( strLuaDEID )
|
local nRet, strRetInfo, n
|
local paramter
|
|
nRet, paramter = m3.GetSysDataJson( strLuaDEID )
|
if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), paramter ) end
|
|
nRet, strRetInfo = mobox.getBackendScriptProcResult( paramter.proc_id )
|
local action = {}
|
if ( nRet == 0 ) then
|
-- 后台脚本还没处理完成
|
action[1] =
|
{
|
action_type = "wait",
|
value = {
|
time = 1,
|
event = {
|
cls_name = "Pre_Alloc_CNTR_Detail",
|
event_name = "获取入库空料箱计算结果",
|
data_json = paramter
|
}
|
}
|
}
|
elseif ( nRet == 1 ) then
|
-- 后台脚本执行成功
|
local result = json.decode( strRetInfo )
|
|
local input_parameter = {
|
cls_id = "Inbound_Wave",
|
obj_id = result.wave_obj_id,
|
from = paramter.from,
|
station = paramter.station,
|
bs_type = paramter.bs_type,
|
bs_no = paramter.bs_no
|
}
|
local data_json = {
|
cntr_count = result.cntr_count,
|
cntr_cell_list = result.cntr_cell_list
|
}
|
action =
|
{
|
{
|
action_type = "refresh_master_panel",
|
value = {
|
sub_page = {"站台超重货品明细"}
|
}
|
},
|
{
|
action_type = "open_html_dlg",
|
value = {
|
dlg_name = "空料箱呼出确认",
|
cls_id = "Inbound_Order",
|
data_json = data_json,
|
input_parameter = input_parameter
|
}
|
},
|
{
|
action_type = "refresh",
|
value = ""
|
}
|
}
|
else
|
-- 错误
|
mobox.setInfo( strLuaDEID, strRetInfo )
|
return
|
end
|
nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action) )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction失败! "..strRetInfo..' action = '..strAction ) end
|
|
end
|