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-38-03
     Tðy: ,dЏcäN-Rú^MR
    \O€ÿHAN  
    åegÿ2023-02-25
 
    §~+RÿúVš[ (ô‹f,gµkãNx(Wy˜îv-N N*YOØSS)
    
    ýQpeÿ AfterDataObjDelete
 
    ŸRý€:
        1    ÿ Rd–(WûN¡RøvsQ„v0ûN¡R¨R\O0
    ôf9e°‹U_:
        V3.0 HAN 2023-6-16
        V6.0 HAN 2023/9/6  -- lua.Error/lua.Debug ýQpeØSS 
        V6.1 HAN 2023/9/22 -- S_TASK_CODE -- S_CODE  
        V6.2 HAN 2023/10/19 -- Œ(u wms_UnlockLocation ã‰• ÿ‚YœgX[(W1\㉕
--]]
wms_base = require( "wms_base" )
 
function AfterDataObjDelete ( strLuaDEID ) 
    local   nRet, strRetInfo
    -- step1  ·ƒÖSS_MR Rd–„vûN¡Rx
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_CODE" ) 
    if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "·ƒÖSS_MR Rd–„v0ûN¡R0ù[aŒáOo`1Y%! "..strRetInfo ) end 
    local obj_attrs = json.decode( strRetInfo ) 
    local task_code = obj_attrs[1].value             -- \ON{|‹W
 
    if ( task_code ~= "" ) then
        --  Rd–øvsQ„vûN¡R¨R\O
        local strCondition = "S_TASK_CODE = '"..task_code.."'"
        nRet, strRetInfo = mobox.deleteDataObject( strLuaDEID, "Task_Action", strCondition )
        if ( nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), " Rd–ûN¡RøvsQ„v0ûN¡R¨R\O01Y%!  "..strRetInfo ) end  
 
        -- V6.2
        nRet, strRetInfo = wms.wms_UnlockByTask(strLuaDEID,task_code)
        if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "wms_UnlockByTask 1Y%! "..strRetInfo ) end 
    end
end