--[[
|
编码: 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
|