lzh
2025-06-24 13c4a636539584ab977fddacfae884b3ec250aee
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
ÿþ--[[
   x: 
    Tðy: 
   \O€ÿ
   åegÿ2024-11-12
 
   ýQpeÿ Initial
   ŸRý€:
 
   ôf9e°‹U_:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function Initial( strLuaDEID )
    local nRet, strRetInfo
    nRet, strRetInfo = mobox.getCurEditDataObjAttr(strLuaDEID,"S_ITEM_TYPE","S_TYPE","S_STATUS")
    if (nRet ~= 0) then
        lua.Error(strLuaDEID, debug.getinfo(1), "·ƒÖS‘áOo`1Y% " .. strRetInfo)
    end
    lua.Debug(strLuaDEID, debug.getinfo(1), 'strRetInfo', strRetInfo)
    local obj_attrs = json.decode(strRetInfo)
    local item_type = obj_attrs[1].value
    if(item_type == nil or item_type == '')then item_type = " - " end
    local types = obj_attrs[2].value
    if(types == nil or types == '')then types = "(u" end
    local statuss = obj_attrs[3].value
    if(statuss == nil or statuss == '')then types = "zzò•-N" end
 
    local list1 = '"zzò•-N","xS'-N","‚f\PO(u"'
    local list2 = '"ceňö€","³xў","^P[^"," - "'
    local list3 = '"yrš[","(u"'
    local list4 = '"ÉSf*gán³","xS'ºNXT*g0R—\","A~Ù_öe/T(u","‚fX[:S'án"'
    local setAttr = '[{"attr":"S_ITEM_TYPE","value":"'..item_type..'","choice_list":['..list2..']},{"attr":"S_TYPE","value":"'..types..'","choice_list":['..list3..']},{"attr":"S_REMARK","value":"","choice_list":['..list4..']},{"attr":"S_STATUS","value":"'..statuss..'","choice_list":['..list1..']}]'
    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), "setAction1Y%! "..strRetInfo..' action = '..strAction ) end 
 
end