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
43
44
45
46
47
48
49
ÿþ--[[
    x: 
     Tðy: å]MO…Q¹[ØSST
    \O€ÿLZH
    åegÿ2023-05-05
 
    ýQpeÿ AfterStationInput
 
    ŸRý€:
       -- å]MO¾‹n:N/T(u¶r`>f:ypeϑ“eQFh
 
    ôf9e°‹U_:
 
--]]
json  = require("json")
mobox = require("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function AfterStationInput(strLuaDEID)
    local nRet, strRetInfo
    nRet, strRetInfo = mobox.getCurEditDataObjAttr(strLuaDEID,"A", "B", "C", "D", "E", "F", "G", "H", "I",
        "J", "K", "L")
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "·ƒÖSS_MR‘^\'`1Y%! " .. strRetInfo) end
    lua.Debug( strLuaDEID, debug.getinfo(1), 'strRetInfo', strRetInfo )
    local obj_attrs = json.decode(strRetInfo)
    local setAttr = ''
    for i = 1,12 do
        local attr = obj_attrs[i].attr
        local value = obj_attrs[i].value
        if(value ~= nil and value == '/T(u') then
            setAttr = setAttr .. '{"attr":"'.. attr.."_QTY" ..'","show":true},'
        else
            setAttr = setAttr .. '{"attr":"'.. attr.."_QTY" ..'","show":false},'
        end
    end
 
    -- »Sd–gTN*N&{÷S
    setAttr = lua.trim_laster_char(setAttr)
    lua.Debug( strLuaDEID, debug.getinfo(1), 'setAttr', setAttr )
 
    setAttr = '['..setAttr..']'
 
    local action = {}
 
    action.action_type = "set_dlg_attr_show"
    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