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
ÿþ--[[
    x: WMS-40-03
     Tðy:  Rd–MR
    \O€ÿLZH  
    åegÿ2024-8-1
 
    §~+RÿúVš[ (ô‹f,gµkãNx(Wy˜îv-N N*YOØSS)
    
    ýQpeÿ BeforeDataObjDelete
 
    ŸRý€:
        1    ÿ Rd–\ONMR$R­e¶r`/f&T:NgbLˆ ÿgbLˆ¶r`„v\ON NAQ¸‹ Rd–
    ØSôf°‹U_:
 
--]]
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function BeforeDataObjDelete( strLuaDEID )
    local   nRet, strRetInfo
    -- ·ƒÖSS_MR\ON„vN¡R¶r`
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID,"N_B_STATE" ) 
    if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "·ƒÖSS_MR‘^\'`1Y%! "..strRetInfo ) end 
    local obj_attrs = json.decode( strRetInfo ) 
    local b_state = lua.StrToNumber( obj_attrs[1].value )           -- N¡R¶r`
 
    if ( b_state == nil ) then lua.Error( strLuaDEID, debug.getinfo(1), "·ƒÖSN¡R¶r`1Y%! "..strRetInfo ) end
 
    -- step1   Rd–\ONMR$R­e¶r`/f&T:NgbLˆ ÿgbLˆ¶r`„v\ON NAQ¸‹ Rd–
    if ( b_state == wms_base.Get_nConst(strLuaDEID, "\ON¶r`-gbLˆ")) then
        lua.Error( strLuaDEID, debug.getinfo(1), "gbLˆ¶r`„v\ON NAQ¸‹ Rd–!" ) 
    end   
end