fy36
2025-05-14 a37aca60ff9914b0abb710f04118b22420f4f398
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
--[[
    编码: JX-108-23
    名称: 巨星任务-巨星出库-站台变化
    作者:HAN  
    日期:2025-1-29
 
    级别:项目
    
    函数: AfterStationChange
 
    功能:
        -- 根据输入的容器号,判断在当前巨星出库任务是否已经到站台
 
    更改记录:
 
--]]
jx_base= require( "jx_base" )
 
function AfterStationChange ( 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 strCondition = "S_STATION_NO = '"..station.."' AND N_B_STATE = 5 AND S_TASK_TYPE = '出库'"
    local action = {}
    action[1] = {
        action_type = "set_query_condition",
        value = {
            condition = strCondition,
            order = "S_SOURNO",
            page_name = "已到站台"
        }            
    }
    strCondition = "S_STATION_NO = '"..station.."' AND (N_B_STATE = 0 OR N_B_STATE = 1) AND S_TASK_TYPE = '出库'"   
    action[2] = {
        action_type = "set_query_condition",
        value = {
            condition = strCondition,
            order = "S_SOURNO",
            page_name = "出库搬运中..."
        }            
    }   
    nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action)  )
    if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction失败! "..strRetInfo ) end 
 
end