--[[
|
编码: WMS-05-07
|
名称: 逻辑库区-类型变化后
|
作者:HAN
|
日期:2025-1-29
|
|
级别:固定 (说明本段代码在项目中不太会变化)
|
|
函数: ZoneTypeChange
|
|
功能:
|
1)在5505 功能点(逻辑库区维护)中新增逻辑库区,如果改了逻辑库区类型,需要检查一下类型是否=接驳
|
如果是接驳要显示 接驳类型,否则隐藏
|
更改记录:
|
--]]
|
wms_base = require ("wms_base")
|
|
function ZoneTypeChange ( strLuaDEID )
|
local nRet, strRetInfo, strValue
|
|
-- 获取当前的逻辑库区类型
|
nRet, strValue = m3.GetSysCurEditDataOneAttr( strLuaDEID, "N_TYPE" )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "GetSysCurEditDataOneAttr失败! "..strValue ) end
|
if (strValue == nil or strValue == '') then return end
|
|
-- 如果不是接驳类型的逻辑库区,不显示 N_CONNECT_TYPE
|
local nType = lua.StrToNumber(strValue)
|
local strAction
|
if ( nType ~= wms_base.Get_nConst(strLuaDEID, "逻辑库区类型-接驳") ) then -- 接驳类型
|
strAction = '[{"action_type":"set_dlg_attr_show","value":[{"attr":"N_CONNECT_TYPE","show":false}]}]'
|
else
|
strAction = '[{"action_type":"set_dlg_attr_show","value":[{"attr":"N_CONNECT_TYPE","show":true}]}]'
|
end
|
nRet, strRetInfo = mobox.setAction( strLuaDEID, strAction )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction失败! "..strRetInfo..' action = '..strAction ) end
|
end
|