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
40
| --[[
| 编码: WMS-51-02
| 名称: 配盘- 删除前
| 作者:HAN
| 日期:2025-1-29
|
|
| 级别:固定 (说明本段代码在项目中不太会变化)
|
| 函数: AfterDataObjDelete
|
| 功能:
| 根据不同的业务状态 删除数据对象(数据回退)
|
| 更改记录:
|
| --]]
|
| wms_base = require( "wms_base" )
|
| function AfterDataObjDelete ( strLuaDEID )
| local nRet, strRetInfo
| local distribution_cntr
|
| nRet, distribution_cntr = m3.GetSysCurEditDataObj( strLuaDEID, "Distribution_CNTR" )
| if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "获取当前删除对象属性失败! "..distribution_cntr ) end
| local b_state = distribution_cntr.b_state
| -- step1 删除【配盘明细】对象
| -- 7 错误
| if ( b_state == 7 ) then b_state = distribution_cntr.per_b_state end
|
| -- 拣货完成前
| strCondition = "S_DC_NO = '" .. distribution_cntr.dc_no .."'"
| if ( b_state <= 3 ) then
| nRet, strRetInfo = mobox.deleteDataObject( strLuaDEID, "Distribution_CNTR_Detail", strCondition )
| else
| nRet, strRetInfo = mobox.dbdeleteData( strLuaDEID, "Distribution_CNTR_Detail", strCondition )
| end
| if ( nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除配盘相关的【配盘明细】失败! "..strRetInfo ) end
| end
|
|