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
ÿþ--[[
    x: GT-01-02
     Tðy:     eg™eáOo`ÞVŒ
    \O€ÿLZH
    åegÿ2024-4-30
    ýQpeÿ CallBackIncomingInfo
    ŸRý€: Šb    -N„veg™eáOo`¾‹n0Rîvh—zãS§cöN
    ôf9e°‹U_:
--]]
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
function CallBack ( strLuaDEID ) 
    -- ·ƒÖS    -N„vpencù[aŒ
    local nRet, obj = m3.GetSysDataJson(strLuaDEID)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), obj) end
    -- ÇýQpelbcÂSpe<h_
    local obj_attrs = m3.KeyValueAttrsToObjAttr(obj.attrs)
    if (obj_attrs == '') then lua.Error(strLuaDEID, debug.getinfo(1), "·ƒÖSÞVŒpenc1Y%ÿ") end
 
    -- ¾‹n—zãS-N„v eg™eáOo`
    local setAttr = '[{"attr":"S_ITEM_CODE","value":"'..obj_attrs.S_ITEM_CODE..'"},'
    setAttr = setAttr..'{"attr":"S_ITEM_NAME","value":"'..obj_attrs.S_ITEM_NAME..'"}]'
    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), "setAction1Y%! " .. strRetInfo .. ' action = ' .. strAction) end
end