fy36
2025-05-14 a37aca60ff9914b0abb710f04118b22420f4f398
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--[[
    编码: WMS-02-01
    名称: 仓库-新增小窗口初始化
    作者:HAN  
    日期:2025-1-29
 
    级别:BASIS
    
    函数: InitialNewAddDlg
 
    功能:
        1)根据当前操作者获取操作者的所属单位编码,把这个编码设置到 S_FACTORY
    更改记录:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3    = require("oi_base_mobox")
 
function InitialNewAddDlg ( strLuaDEID ) 
    local nRet, strRetInfo, factory
 
    nRet, factory = m3.GetMyFactory( strLuaDEID )
    if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "GetMyFactory失败! "..factory ) end
 
    local setAttr = '[{"attr":"S_FACTORY","value":"'..factory..'"}]'
    local strAction = '[{"action_type":"set_dlg_attr","value":'..setAttr..'}]'
    nRet, strRetInfo = mobox.setAction( strLuaDEID, strAction  )
    if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction失败! "..strRetInfo..' action = '..strAction ) end 
end