国产视频中文字幕,精品国产_亚洲人成在线高清,亚洲天堂手机在线

產品中心 業內新聞 案例中心 視頻中心

Mobox二開的彈窗選擇數據實現技巧 Mobox二開的彈窗選擇數據實現技巧

Mobox二開的彈窗選擇數據實現技巧

Mobox二開的彈窗選擇數據實現技巧

 

需求描述

 

(上圖為多選窗口)

實現方式

需要開發2個lua腳本

 

Lua腳本【試驗類型選擇前

–[[
? ? 這個腳本適合 單個選擇的獲取過程
–]]

json = require (“json”)

mobox = require (“OILua_JavelinExt”)

function BeforeSelectGP ( strLuaDEID )

local nRet, strRetInfo ,strCondition

strCondition = “”

local action = ‘[{“action_type”:”open_data_query_dlg”,”value”:{“mulit_select”:0,”cls_name”:”供應商”,”order”:””,”grid_style”:”default”,”condition”:”‘..strCondition..'”}}]’

mobox.setAction( strLuaDEID, action )

end

 

  • 彈出窗口定義:? ?(注意粘貼下面內容的時候? ”? 可能是中文的,需要改成英文)
  • 單選 “mulit_select”:0??? 多選? “mulit_select”:1
  • 關聯表名 “cls_name”:”部分性能試驗”?? (部分性能試驗 這個是表名)
  • 排序 “order”:””????? (可以設置排序字段名)
  • 窗口grid “grid_style”:”procure”? (不設置就是默認grid)
  • 查詢條件 “condition”:”‘..strCondition..’”? ( strCondition 是變量,拼接的查詢條件)

 

我們在彈出窗口前,可以將我們需要的通過上述參數設置好后 再彈出

Lua腳本【試驗類型選擇后】? 單選和多選例子

–[[

這個腳本適合 單個選擇 的獲取過程

–]]

 

json? = require (“json”)

mobox = require (“OILua_JavelinExt”)

function AfterSelectSYTPYE ( strLuaDEID )

local?? nRet,? strTpyeDESC , strOldDesc

 

— 獲取當前選擇數據

nRet, strRetInfo = mobox.getInputParameter( strLuaDEID )

if ( nRet ~= 0 or? strRetInfo == ”) then

mobox.error( strLuaDEID, “無法獲取導入數據!”)

return

end

 

local retJson = json.decode( strRetInfo )

local input_parameter = retJson[“parameter”]

local n, nCount

 

strTpyeDESC = input_parameter[“S_TST_TPYEDESC”]

 

if ( strTpyeDESC == ”? ) then

mobox.error( strLuaDEID, “試驗類型信息不對!”)

return

end

 

— 設置試驗類型信息

local setAttr = ‘[{“attr”:”S_TST_TPYEDESC”,”value”:”‘..strTpyeDESC..'”}]’

mobox.setCurEditDataObjAttr( strLuaDEID,setAttr )

下面是多選的例子

–[[

這個腳本適合 多個選擇 的獲取過程

–]]

 

json? = require (“json”)

mobox = require (“OILua_JavelinExt”)

function AfterSelectSYTPYE ( strLuaDEID )

local?? nRet,? strTpyeDESC

— 獲取當前選擇數據

nRet, strRetInfo = mobox.getInputParameter( strLuaDEID )

if ( nRet ~= 0 or? strRetInfo == ”) then

mobox.error( strLuaDEID, “無法獲取導入數據!”)

return

end

local retJson = json.decode( strRetInfo )

local input_parameter = retJson[“parameter”]????? —? 或者 retJson.parameter

local n, nCount

nCount = #input_parameter

strTpyeDESC =”

for n = 1 , nCount do???????????????????????????????????? — 需要for循環

??????? if (strTpyeDESC ==”) then

??????????? strTpyeDESC = input_parameter[n].S_TST_TPYEDESC

??????? else

??????????? strTpyeDESC = strTpyeDESC .. ‘、’..input_parameter[n].S_TST_TPYEDESC

??????? end

?? ?end

— 設置試驗類型信息

local setAttr = ‘[{“attr”:”S_TST_TPYEDESC”,”value”:”‘..strTpyeDESC..'”}]’

mobox.setCurEditDataObjAttr( strLuaDEID,setAttr )

 

之后將這個腳本管理的窗口的定義里面

 

標簽:低代碼腳本 上一篇: 下一篇:
展開更多
預約軟件體驗

loading...

    <noscript id="7lhqw"><i id="7lhqw"><legend id="7lhqw"></legend></i></noscript>
    <u id="7lhqw"><optgroup id="7lhqw"><listing id="7lhqw"></listing></optgroup></u>
    1. <blockquote id="7lhqw"><center id="7lhqw"></center></blockquote>
      <address id="7lhqw"></address>
      主站蜘蛛池模板: 忻州市| 资溪县| 汉阴县| 鄢陵县| 基隆市| 光山县| 宁波市| 板桥市| 安化县| 建宁县| 元朗区| 灵璧县| 克东县| 恩平市| 唐海县| 深圳市| 六盘水市| 全南县| 柞水县| 晋州市| 永清县| 永仁县| 吴桥县| 岱山县| 河北省| 贡山| 白水县| 泸定县| 东莞市| 北安市| 潞西市| 丰都县| 尼木县| 琼结县| 宁化县| 宜州市| 克山县| 宜川县| 德阳市| 健康| 金川县|