--[[
|
编码: AMS-60-20
|
名称:
|
作者:
|
日期:2025-07-07
|
|
函数: ClickOkButton
|
功能:
|
|
更改记录:
|
|
--]]
|
|
json = require ("json")
|
mobox = require ("OILua_JavelinExt")
|
m3 = require ("oi_base_mobox")
|
|
function ClickOkButton( strLuaDEID )
|
|
local nRet, strRetInfo
|
local parameter
|
local out_order_array
|
|
-- 获取自定义表单附加参数
|
nRet, parameter = m3.GetSysInputParameter(strLuaDEID)
|
if (nRet ~= 0) then
|
lua.Error(strLuaDEID, debug.getinfo(1), parameter)
|
end
|
|
-- step1 获取当前点中的任务
|
nRet, objs = m3.GetSysDataJson( strLuaDEID )
|
if ( nRet ~=0 ) then lua.Error( strLuaDEID, debug.getinfo(1), objs ) end
|
-- [{"id":"","attrs":[{"attr":"","value":""},..]},..]
|
local nCount = #objs
|
if (nCount == 0) then return end
|
|
local parameter = m3.KeyValueAttrsToObjAttr(objs[1].attrs)
|
lua.Debug(strLuaDEID, debug.getinfo(1), "parameter", parameter)
|
local id = parameter.S_ID
|
local wave_no = parameter.S_WAVE_NO
|
|
-- -- 开始配盘
|
nRet, strRetInfo = mobox.triggerClsEvent(strLuaDEID, "Outbound_Wave", id, "自动配盘")
|
if (nRet ~= 0) then
|
lua.Error(strLuaDEID, debug.getinfo(1), "执行【盘点计划启动】脚本失败!" .. strRetInfo)
|
end
|
|
-- 刷新界面
|
local action = {
|
{
|
action_type = "close_dlg",
|
value = ""
|
},
|
{
|
action_type = "refresh",
|
value = ""
|
}
|
}
|
|
nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str(action))
|
if (nRet ~= 0) then
|
lua.Error(strLuaDEID, debug.getinfo(1), "setAction失败! " .. strRetInfo)
|
end
|
|
mobox.setInfo(strLuaDEID, "配盘成功!")
|
end
|