--[[
|
编码: WMS-21-30
|
名称:
|
作者:
|
日期:2025-05-22
|
|
函数: LocChange
|
功能:
|
|
更改记录:
|
|
--]]
|
|
json = require ("json")
|
mobox = require ("OILua_JavelinExt")
|
m3 = require ("oi_base_mobox")
|
wms_base = require( "wms_base" )
|
wms_cntr= require( "wms_container" )
|
wms_wh = require( "wms_wh" )
|
|
|
function LocChange( strLuaDEID )
|
-- 获取表头界面中的输入条码
|
nRet, attrs = m3.GetSysInputParameter(strLuaDEID)
|
if (nRet ~= 0) then
|
mobox.setInfo(strLuaDEID, "获取当前输入面板里的属性失败! " .. attrs)
|
return
|
end
|
|
local input_attr = m3.KeyValueAttrsToObjAttr(attrs)
|
local io_no = input_attr.S_IO_NO -- 入库单号
|
local item_code = input_attr.S_ITEM_CODE -- 物料编码
|
local code = input_attr.S_EXT_ATTR1 -- 货位编码
|
|
nRet, loc = wms_wh.GetLocInfo( code )
|
if ( nRet ~= 0 ) then
|
mobox.setInfo(strLuaDEID, "货位'"..code.."'不存在!" )
|
return
|
end
|
if (loc.lock_state ~= 0) then
|
mobox.setInfo(strLuaDEID, "货位'" ..loc.. "'有锁,不可操作!")
|
return
|
end
|
if (loc.area_code ~= "rg") then
|
mobox.setInfo(strLuaDEID, "货位'" ..loc.. "'非人工库,不可操作!")
|
return
|
end
|
|
end
|