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

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

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

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

1.1 getCurEditDataObjAttr

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

getCurEditDataObjAttr?(strLuaDEID, strAttrName1, strAttrName2,… )

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

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

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

輸出參數(shù):

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

Example

    -- 獲取入庫(kù)原材料批次號(hào)、紅票重量
    local nRet, strRetInfo

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

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

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

loading...

国产性高爱潮有声视频免费,无码国产精品午夜不卡,国产在线一级特黄aa大片,国产AV永久无码天堂影院