Jianw
2025-05-14 29f8b36ebb718d2051bf0e7e701973ec4419ee80
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
32
33
34
35
36
37
38
39
40
41
42
--[[
    编码: WMS-91-10
    名称: SKU条码-新增小窗口-初始化
    作者:HAN
    日期:2025-5-10    
 
    级别:项目
    
    函数: InitialDlg
 
    功能:
        -- 获取【SKU】中的货品编码,货主编码
 
    更改记录:
       
--]]
 
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_ITEM_CODE == '' or master.objAttr.S_ITEM_CODE == nil) then return end
 
    local   attr_value = {
        { attr = "S_ITEM_CODE", value = master.objAttr.S_ITEM_CODE },
        { attr = "S_STORER", value = master.objAttr.S_STORER }
    }
 
    nRet, strRetInfo = mobox.setCurEditDataObjAttr( strLuaDEID, lua.table2str(attr_value) ) 
    if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1),"设置【物料条码】信息失败!  "..strRetInfo ) end
    
end