1
Jianw
9 天以前 70f29da38121b9a467841253e3268feb5df02902
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
41
42
43
44
45
46
47
48
--[[
    编码: WMS-24-14
    名称: 出库单-定版
    作者:HAN  
    日期:2025-1-29
 
    级别:固定 (说明本段代码在项目中不太会变化)
    
    函数: Release
 
    功能:
        根据【出库单明细】统计出库单的总重量,体积等属性
 
    更改记录:
 
--]]
wms_base = require( "wms_base" )
 
function Release ( strLuaDEID ) 
    local   nRet, strRetInfo
 
    -- step1  获取当前点中的出库单
    nRet, objs = m3.GetSysDataJson( strLuaDEID )
    if ( nRet ~=0 ) then 
        lua.Stop( strLuaDEID, objs )
        return
    end  
    if #objs == 0 then  return end
 
    nRet, strRetInfo = mobox.triggerClsEvent( strLuaDEID, "Outbound_Order", objs[1].id, "重置汇总信息" )
    if ( nRet ~= 0 ) then 
        lua.Stop( strLuaDEID, debug.getinfo(1), "触发【出库单】重置汇总信息 事件失败!"..strRetInfo ) 
        return
    end
 
    -- 刷新一下当前的出库单
    local action = {
        {
            action_type = "refresh_cur_row",
            value = ""
        }
    }
    nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str(action) )
    if ( nRet ~= 0 ) then 
        lua.Stop( strLuaDEID, "setAction错误: "..strRetInfo)
        return
    end      
end