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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--[[
    编码: GK-56-22
    名称: 预分配容器明细-入库任务界面-站台重置
    作者:HAN  
    日期:2025-6-26
 
    级别:固定 (说明本段代码在项目中不太会变化)
    
    函数: Reset
 
    功能:
        -- 清除站台中的缓存,这些是入库任务留下的后台缓存
 
    更改记录:
 
 
--]]
wms_base = require( "wms_base" )
 
function Reset ( strLuaDEID ) 
    local nRet, strRetInfo
 
    -- 获取扫码方式
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_STATION_NO") 
    if ( nRet ~= 0 )  then 
        lua.Stop( strLuaDEID, "获取当前编辑属性失败! "..strRetInfo ) 
        return
    end 
    local obj_attrs = json.decode( strRetInfo ) 
    local staion = lua.Get_StrAttrValue( obj_attrs[1].value )  
 
    if staion ~= '' then
        local groupID = "Station:"..staion
 
        -- 清除站台的入库任务操作缓存
        mobox.removeCacheGroup( groupID )
        mobox.setInfo( strLuaDEID, "重置成功!" )
 
        local action = {
            {
            action_type = "refresh_related_panel",
            value = {  
                        {
                            panel_name = "组盘输入",
                            input_parameter = {
                                id = "",
                            }
                        },
                        {
                            panel_name = "料格显示",
                            input_parameter = {
                                cell_no =""
                            }
                        }  
                     }       
            }
        }   
    
        nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action)  )
        if ( nRet ~= 0 ) then 
            lua.Stop( strLuaDEID, "setAction失败! "..strRetInfo ) 
            return
        end         
    end
end