1
Jianw
2025-07-09 88e26a2a960dbbc148332772448b79b9877102d8
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
--[[
   编码: AMS-21-29
   名称: 
   作者:
   日期:2025-05-22
 
   函数: NoChange
   功能:
 
   更改记录:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require ("oi_base_mobox")
 
function NoChange( strLuaDEID )
    local nRet, strRetInfo
    local cntr_detail_array
 
    -- 获取当前编辑的容器编码
    nRet, strRetInfo = mobox.getCurEditDataObjAttr(strLuaDEID, "S_IO_NO")
    if (nRet ~= 0) then
        lua.Error(strLuaDEID, debug.getinfo(1), "获取当前编辑属性失败! "..strRetInfo)
    end
 
    local obj_attrs = json.decode(strRetInfo)
    local io_no = lua.Get_StrAttrValue(obj_attrs[1].value)
    
    local strCondition = "S_NO = '" .. io_no .. "'"
    nRet, strRetInfo = m3.GetDataObjByCondition(strLuaDEID, "Inbound_Order", strCondition)
    if (nRet ~= 0) then 
        mobox.setInfo(strLuaDEID, "查询 Inbound_Order 表失败: " .. strRetInfo) 
        return
    end
    
    local bs_state = strRetInfo.b_state
    local area_code = strRetInfo.area_code
    if(area_code ~= 'rg') then
        mobox.setInfo(strLuaDEID,"编码 = '" .. io_no .. "'的入库单非人工库,不可操作!!!")
        return
    end
    
    if(bs_state == 3) then
        mobox.setInfo(strLuaDEID, "编码 = '" .. io_no .. "'的入库单已经完成!!!")
        return
    end
 
end