欧美激情一区二区三区在线-欧美激情一区二区三区在线播放-欧美激情一区二区三区中文字幕-欧美激情伊人-国产高清视频免费-国产高清视频免费观看

產(chǎn)品中心 業(yè)內(nèi)新聞 案例中心 視頻中心

Mobox低代碼開發(fā)-數(shù)據(jù)屬性獲取 Mobox低代碼開發(fā)-數(shù)據(jù)屬性獲取

Mobox低代碼開發(fā)-數(shù)據(jù)屬性獲取

1. 數(shù)據(jù)屬性獲取/設(shè)置

1.1 getCurEditDataObjAttr

說明:獲取當(dāng)前Lua腳本正在處理的數(shù)據(jù)對象屬性
使用頻次:高

getCurEditDataObjAttr?(strLuaDEID, strAttrName1, strAttrName2,… )

輸入?yún)?shù):

序號 參數(shù) 必有 說明
1 strLuaDEID Y Lua C++數(shù)據(jù)交換區(qū)標(biāo)識, 是一個(gè)GUID
2 strAttrName1 N 數(shù)據(jù)屬性1
3 strAttrName2 N 數(shù)據(jù)屬性2

注意: 如果只輸入一個(gè)參數(shù),系統(tǒng)返回當(dāng)前編輯數(shù)據(jù)對象中所有屬性

輸出參數(shù):

    1. nRet?= 0 表示成功, 非零失敗
    1. strRetInfo?返回結(jié)果
        [ 
            {"attr":"attr1","value":"xxx1"},
            {"attr":"attr2","value":"xxx2"},
            ...
        ]

Example

    -- 獲取入庫原材料批次號、紅票重量
    local nRet, strRetInfo

    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_B_CODE","F_RT_WEIGHT" )
    if ( nRet ~= 0 or strRetInfo == '' ) then
        mobox.error( strLuaDEID, "無法獲取入庫原材料批次號!")
        return
    end

    local retAttrs = json.decode( strRetInfo )  
    local strBCode = retAttrs[1].value                -- 原材料批次號
    local fRTWeight = tonumber( retAttrs[2].value )   -- 重量

標(biāo)簽:手冊 上一篇: 下一篇:
展開更多
預(yù)約軟件體驗(yàn)

loading...