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
ÿþ--[[
    x: WMS-81-17
     Tðy: úQeQ“^KmՋ-°ežX—zãS-KmՋ{|‹WØSST
    \O€ÿHAN  
    åegÿ2024-1-18
 
    §~+RÿúVš[ (ô‹f,gµkãNx(Wy˜îv-N N*YOØSS)
    
    ýQpeÿ AfterTestTypeChg
 
    ŸRý€:
        ‚YœgKmՋ{|‹W = úQ“^ ÿ–Ï… îvh'MO‘Fh
 
    ôf9e°‹U_:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function AfterTestTypeChg ( strLuaDEID )
    local nRet, strRetInfo
 
    -- ·ƒÖSÓN“^x
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_TEST_TYPE" ) 
    if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "·ƒÖSS_MR‘^\'`1Y%! "..strRetInfo ) end 
    local obj_attrs = json.decode( strRetInfo ) 
    local test_type = lua.Get_StrAttrValue( obj_attrs[1].value )
 
    if ( test_type == "úQ“^" ) then
        local strAction = '[{"action_type":"set_dlg_attr_show","value":[{"attr":"S_TO_LOC_CODE","show":false}]}]'
        nRet, strRetInfo = mobox.setAction( strLuaDEID, strAction  )
        if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction1Y%! "..strRetInfo..' action = '..strAction ) end 
    else
        local strAction = '[{"action_type":"set_dlg_attr_show","value":[{"attr":"S_TO_LOC_CODE","show":true}]}]'
        nRet, strRetInfo = mobox.setAction( strLuaDEID, strAction  )
        if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction1Y%! "..strRetInfo..' action = '..strAction ) end 
    end
end