--[[
|
编码: AMS-106-11
|
名称:
|
作者:
|
日期:2025-05-23
|
|
函数: BeforeSelectItem
|
功能:
|
|
更改记录:
|
|
--]]
|
|
json = require ("json")
|
mobox = require ("OILua_JavelinExt")
|
m3 = require("oi_base_mobox")
|
|
function BeforeSelectItem ( strLuaDEID )
|
local nRet, strRetInfo
|
local runtime_parameter
|
nRet, runtime_parameter = m3.GetRuntimeParam(strLuaDEID)
|
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "GetRuntimeParam失败! "..runtime_parameter ) end
|
|
if(runtime_parameter.master == "") then
|
lua.Stop(strLuaDEID , "无法获取对应的表头参数!!")
|
return
|
end
|
if(runtime_parameter.master.objAttr == "") then
|
lua.Stop(strLuaDEID , "无法获取对应的数据!!")
|
return
|
end
|
local wh_code = runtime_parameter.master.objAttr.S_WH_CODE
|
local area_code = runtime_parameter.master.objAttr.S_AREA_CODE
|
local op_type = runtime_parameter.master.objAttr.S_OP_TYPE
|
local bs_no = runtime_parameter.master.objAttr.S_BS_NO
|
|
if(wh_code == nil or wh_code == "") then
|
lua.Stop(strLuaDEID , "仓库无值!!")
|
return
|
end
|
if(area_code == nil or area_code == "") then
|
lua.Stop(strLuaDEID , "库区无值!!")
|
return
|
end
|
if(op_type == nil or op_type == "") then
|
lua.Stop(strLuaDEID , "来源类型无值!!")
|
return
|
end
|
if(bs_no == nil or bs_no == "") then
|
lua.Stop(strLuaDEID , "来源单号无值!!")
|
return
|
end
|
|
local strCondition = "S_UDF01 = '" ..area_code.. "' "
|
|
|
local action = {
|
{
|
action_type = "open_data_query_dlg",
|
value = {
|
multi_choice = true,
|
cls_name = "SKU",
|
grid_style = "basis-选择面板用",
|
condition = strCondition,
|
order = "S_ITEM_CODE"
|
}
|
}
|
}
|
nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action) )
|
if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), strRetInfo ) end
|
end
|