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