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: WMS-81-13
     Tðy: úQeQ“^KmՋ-°ežX—zãS-    îvh'MOMR
    \O€ÿHAN  
    åegÿ2024-1-18
 
    §~+RÿúVš[ (ô‹f,gµkãNx(Wy˜îv-N N*YOØSS)
    
    ýQpeÿ BeforeSelectLoc
 
    ŸRý€:
        9_úQ'MOågâ‹b—g
    ôf9e°‹U_:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function BeforeSelectLoc ( strLuaDEID )
    local nRet, strRetInfo
 
    -- ·ƒÖSÓN“^x
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_TO_WH_CODE","S_TO_AREA_CODE" ) 
    if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "·ƒÖSS_MR‘^\'`1Y%! "..strRetInfo ) end 
    local obj_attrs = json.decode( strRetInfo ) 
    local wh_code = lua.Get_StrAttrValue( obj_attrs[1].value )
    local area_info = lua.Get_StrAttrValue( obj_attrs[2].value )
    if ( area_info == '' or  wh_code == '') then return end
 
    local seg = {}
    seg = lua.split( area_info, '#' )
    local area_code = seg[1]
 
    -- ¾‹n action „vÂSpe
    local action = {}
    local value = {}
    action.action_type = "open_data_query_dlg"
    value.multi_choice = false                      --  NY    
    value.cls_name = "Location"                      --     éb„vpenc{|hƋ
    value.grid_style = "    ébb—g(u"                  --     ébb—g-N GridStyle
    value.condition = "S_WH_CODE = '"..wh_code.."' AND S_AREA_CODE = '"..area_code.."'"
    value.order = "S_CODE" 
    action.value = value
 
    nRet, strRetInfo = mobox.setAction( strLuaDEID, '['..lua.table2str(action)..']' )
    if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), strRetInfo ) end
end