--[[
|
编码: WMS-40-31
|
名称: 绑托上架界面-站台变化
|
作者:HAN
|
日期:2025-07-4
|
|
级别:固定 (说明本段代码在项目中不太会变化)
|
|
函数: Query
|
|
功能:
|
根据站台的变化,查询作业的条件也发生变化
|
|
更改记录:
|
|
--]]
|
|
json = require ("json")
|
mobox = require ("OILua_JavelinExt")
|
m3 = require("oi_base_mobox")
|
|
function StationChg ( strLuaDEID )
|
local nRet, strRetInfo
|
|
-- 获取站台编码
|
nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_STATION_NO" )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "获取当前编辑属性失败! "..strRetInfo ) end
|
local obj_attrs = json.decode( strRetInfo )
|
local station = lua.Get_StrAttrValue( obj_attrs[1].value )
|
|
if ( station == '' ) then return end
|
|
local strSQL = "S_STATION_NO = '"..station.."'"
|
-- 设置查询条件
|
local action = {
|
{
|
action_type = "set_query_condition",
|
value = {
|
condition = strSQL,
|
order = "S_CODE Desc"
|
}
|
}
|
}
|
|
lua.DebugEx( strLuaDEID, "action", action )
|
|
nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str( action ) )
|
if ( nRet ~= 0 ) then
|
lua.Stop( strLuaDEID, "setAction失败! "..strRetInfo..' action = '..strAction )
|
return
|
end
|
|
end
|