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
| --[[
| 编码: WMS-20-04
| 名称: 入库单-删除前
| 作者:HAN
| 日期:2025-1-29
|
| 级别:固定 (说明本段代码在项目中不太会变化)
|
| 函数: BeforeDataObjDelete
|
| 功能:
| -- 如果有存在入库波次号并且这个入库波次存在,就不能删除
|
| 更改记录:
|
| --]]
| m3 = require ("oi_base_mobox")
|
| function BeforeDataObjDelete ( strLuaDEID )
| local nRet, strRetInfo
| local inbound_order = {}
| nRet, inbound_order = m3.GetCurEditDataObj( strLuaDEID )
| if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "获取当前编辑属性失败!"..inbound_order ) end
|
| -- 如果有存在入库波次编码
| if ( inbound_order.wave_no ~= "" ) then
| local exist
| nRet, exist = m3.ExistThisDataObject( strLuaDEID, "Inbound_Wave", "S_WAVE_NO", inbound_order.wave_no )
| if ( exist ) then
| -- 如果存在入库单波次提示不能删除
| mobox.stopProgram( strLuaDEID, "入库单不能删除,该入库单在编号'"..inbound_order.wave_no.."'的入库波次中!" )
| return
| end
| end
| end
|
|