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

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

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>
      主站蜘蛛池模板: 长丰县| 阜城县| 乌兰察布市| 大丰市| 阿鲁科尔沁旗| 西安市| 靖安县| 西宁市| 龙南县| 阜康市| 莫力| 堆龙德庆县| 黔南| 合水县| 荣昌县| 吉首市| 湄潭县| 榆社县| 廊坊市| 华容县| 阿合奇县| 陕西省| 门头沟区| 衡阳县| 隆子县| 上林县| 东光县| 长阳| 张家界市| 咸宁市| 兴隆县| 上思县| 新绛县| 徐闻县| 孟州市| 嵊泗县| 安阳县| 贡觉县| 五指山市| 夏邑县| 温泉县|