Jianw
2025-05-13 3b39fe3810c3ee2ec9ec97236c1769c5c85e062c
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
--[[
   编码: JX-103-01
   名称: 
   作者:
   日期: 2025-1-29
 
   函数: AfterDataObjDelete
   功能:
 
   更改记录:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require("oi_base_mobox")
 
function AfterDataObjDelete( strLuaDEID )
    local   nRet, strRetInfo
 
    -- 获取 S_NO
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_WEO_NO" ) 
    if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "获取当前编辑属性失败! "..strRetInfo ) end 
 
    local obj_attrs = json.decode( strRetInfo ) 
    local io_no = obj_attrs[1].value      
  
    if ( io_no == '' or io_no == nil ) then return end           
 
    local strUpdateSql = "S_WAVE_NO = '', S_STATION_NO = '', S_OPERATOR_NAME = '', S_OPERATOR = '', N_B_STATE = 0"
    strCondition = "S_NO = '"..io_no.."'"
    nRet, strRetInfo = mobox.updateDataAttrByCondition( strLuaDEID, "Inbound_Order", strCondition, strUpdateSql )
    if ( nRet ~= 0 ) then  lua.Error( strLuaDEID, debug.getinfo(1), "更新【入库单】信息失败!"..strRetInfo ) end    
end