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
ÿþ--[[
    x: WMS-01-03
     Tðy: ¹[hV- Rd–T
    \O€ÿHAN  
    åegÿ2024-06-03
 
    §~+RÿúVš[ (ô‹f,gµkãNx(Wy˜îv-N N*YOØSS)
    
    ýQpeÿ AfterDataObjDelete
 
    ŸRý€:
        --  Rd–0Container_Good 0
        --  Rd–0CG_Detail0
    ôf9e°‹U_:
 
--]]
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function AfterDataObjDelete ( strLuaDEID ) 
    local   nRet, strRetInfo
 
    -- step1  ·ƒÖS¹[hVx
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_CODE" ) 
    if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "·ƒÖSS_MR‘^\'`1Y%! "..strRetInfo ) end 
    local obj_attrs = json.decode( strRetInfo ) 
    local cntr_code = obj_attrs[1].value             -- ¹[hVx
 
    --  Rd– 0;‘“^:S'MOsQT€hˆ0
    if ( cntr_code ~= '') then
        local strCondition = "S_CNTR_CODE = '" .. cntr_code .."'"
        nRet, strRetInfo = mobox.dbdeleteData(strLuaDEID, "Container_Good", strCondition)
        if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), " Rd–0Container_Good01Y%!"..strRetInfo) end
 
        nRet, strRetInfo = mobox.dbdeleteData(strLuaDEID, "CG_Detail", strCondition)
        if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), " Rd–0CG_Detail01Y%!"..strRetInfo) end        
    end
end