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
--[[
   编码: JX-19-17
   名称: 
   作者:
   日期:2025-03-04
 
   函数: CellChange
   功能:
 
   更改记录:
 
--]]
 
m3 = require("oi_base_mobox")
wms_base = require( "wms_base" )
wms_wh = require( "wms_wh" )
 
function CellChange(strLuaDEID)
    local nRet, strRetInfo
    local attrs
 
    -- 获取表头界面中的输入条码
    nRet, attrs = m3.GetSysInputParameter(strLuaDEID)
    if (nRet ~= 0) then
        mobox.setInfo(strLuaDEID,  "获取当前输入面板里的属性失败! " .. attrs)
        return
    end
    
    local input_attr = m3.KeyValueAttrsToObjAttr(attrs)
    local cell_no = input_attr.S_CELL_NO            --料格号
    local cntr_code = input_attr.S_CNTR_CODE        -- 容器号
    local item_code = input_attr.S_ITEM_CODE        --  物料编码
    
   
    local action = {}
    -- 设置主页面物料编码输入框为空
    action[1] = {
        action_type = "set_dlg_attr",
        value = {
            lua.KeyValueObj("S_ITEM_CODE", "")
        }
    }
 
    action[2] = {
    action_type = "set_dlg_current_edit_attr",
    value = "S_ITEM_CODE"
    }
 
    -- 执行动作
    nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str(action))
    if (nRet ~= 0) then
        mobox.setInfo(strLuaDEID,  "setAction失败! " .. strRetInfo .. ' action = ' .. lua.table2str(action))
        return
    end
 
 
 
end