--[[
|
编码: WMS-19-09
|
名称: 3036新增窗口初始化
|
作者:HAN
|
日期:2025-1-29
|
|
级别:项目
|
|
函数: InitialDlg
|
|
功能:
|
-- 获取【容器】中的编码属性
|
|
更改记录:
|
|
--]]
|
|
json = require ("json")
|
mobox = require ("OILua_JavelinExt")
|
m3 = require("oi_base_mobox")
|
|
function InitialDlg ( strLuaDEID )
|
local nRet, strRetInfo
|
local run_paramter
|
|
-- step1 获取运行环境参数
|
nRet, run_paramter = m3.GetRuntimeParam(strLuaDEID)
|
if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), run_paramter ) end
|
local master = run_paramter.master
|
if (master == nil) then lua.Error( strLuaDEID, debug.getinfo(1), "系统没有在环境参数中定义master对象信息!" ) end
|
|
if (master.objAttr.S_CODE == '' or master.objAttr.S_CODE == nil) then return end
|
|
local str_cntr_code = master.objAttr.S_CODE
|
local setAttr = '[{"attr":"S_CNTR_CODE","value":"'..master.objAttr.S_CODE..'"}]'
|
local action = {}
|
|
action.action_type = "set_dlg_attr"
|
action.value = json.decode(setAttr)
|
|
nRet, strRetInfo = mobox.setAction( strLuaDEID, '['..lua.table2str(action)..']' )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction失败! "..strRetInfo..' action = '..strAction ) end
|
end
|