--[[
|
编码: AMS-106-12
|
名称:
|
作者:
|
日期:2025-05-23
|
|
函数: AfterSelectItem
|
功能:
|
|
更改记录:
|
|
--]]
|
|
wms_base = require ("wms_base")
|
|
function AfterSelectItem ( strLuaDEID )
|
local nRet, strRetInfo, select_dataobj
|
|
local data_json
|
nRet, data_json = m3.GetSysDataJson( strLuaDEID )
|
if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), data_json ) end
|
local nCount = #data_json
|
if ( 0 == nCount ) then
|
mobox.setInfo( strLuaDEID, "请先选中一个商品!" )
|
return
|
end
|
local obj_attrs = m3.KeyValueAttrsToObjAttr( data_json[1].attrs )
|
if ( volume == 0 ) then
|
lua.Error( strLuaDEID, debug.getinfo(1), "选中的物料体积为0! " )
|
end
|
|
local action = {
|
{
|
action_type = "set_dlg_attr",
|
value = {
|
{ attr = "S_ITEM_CODE", value = obj_attrs.S_ITEM_CODE },
|
{ attr = "S_ITEM_NAME", value = obj_attrs.S_ITEM_NAME },
|
{ attr = "S_CELL_TYPE", value = obj_attrs.S_CELL_TYPE },
|
{ attr = "F_VOLUME", value = lua.StrToNumber( obj_attrs.F_VOLUME ) },
|
{ attr = "F_WEIGHT", value = lua.StrToNumber( obj_attrs.F_WEIGHT ) }
|
}
|
}
|
}
|
|
nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action) )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction失败! "..strRetInfo..' action = '..strAction ) end
|
end
|