wsz
2025-06-20 19898bd66dec87b500b200d5d50961d0fb538ce5
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
--[[
    编码: WMS-16-03
    名称: 盘点计划-删除前
    作者:HAN  
    日期:2025-1-29
 
    级别:固定 (说明本段代码在项目中不太会变化)
    
    函数: BeforeDataObjDelete
 
    功能:
        -- 如果 N_B_STATE = 1 (执行中)不能删除
 
    更改记录:
    
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require("oi_base_mobox")
 
function BeforeDataObjDelete ( strLuaDEID )
    local   nRet, strRetInfo, b_state
 
    -- 获取 盘点计划编号
    nRet, strRetInfo = m3.GetSysCurEditDataOneAttr( strLuaDEID, "N_B_STATE" ) 
    if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "GetSysCurEditDataOneAttr失败! "..wh_code ) end
    b_state = lua.StrToNumber( strRetInfo )
 
    if ( b_state == 1 ) then
        mobox.stopProgram( strLuaDEID, "不能删除正在执行中的盘点计划!" )
        return 
    end
end