--[[
|
编码: WMS-33-11
|
名称: 指定出库-新增窗口-出库类型变化后
|
作者:HAN
|
日期:2025-1-29
|
级别:固定 (说明本段代码在项目中不太会变化)
|
|
函数: AfterTypeChg
|
|
功能:
|
根据出库类型不同 设置显示不显示一些控件
|
|
更改记录:
|
|
--]]
|
|
json = require ("json")
|
mobox = require ("OILua_JavelinExt")
|
m3 = require("oi_base_mobox")
|
|
function AfterTypeChg ( strLuaDEID )
|
local nRet, strRetInfo
|
|
nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "N_TYPE" )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "获取当前编辑属性失败! "..strRetInfo ) end
|
local obj_attrs = json.decode( strRetInfo )
|
local type = lua.Get_NumAttrValue( obj_attrs[1].value )
|
|
local action = {}
|
if ( type == 1 ) then
|
-- 指定容器出库
|
action = {
|
{
|
action_type = "set_dlg_attr_show",
|
value = {
|
{ attr = "S_ITEM_CODE", show = false },
|
{ attr = "S_ITEM_NAME", show = false },
|
{ attr = "S_CNTR_CODE", show = true },
|
}
|
}
|
}
|
else
|
-- 指定货品出库
|
action = {
|
{
|
action_type = "set_dlg_attr_show",
|
value = {
|
{ attr = "S_ITEM_CODE", show = true },
|
{ attr = "S_ITEM_NAME", show = true },
|
{ attr = "S_CNTR_CODE", show = false },
|
}
|
}
|
}
|
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
|