|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
6 u" s4 v4 p; v3 A, u& V9 z: g$ KAras 配置开发分享,弹出搜索对话框
3 M" L1 I8 t6 B; ?3 L3 {' z& Z8 |, f! ?
[mw_shl_code=javascript,true]var param = {7 i2 u! [. v5 z" r* f9 d' c
aras: top.aras, 5 n8 C; `" v# b, A+ T
itemtypeName: 'Part', // tbd: use inArgs
' x9 o- ?% j9 Z' y: o multiselect: false,
6 i4 ] N S3 ]; X3 @ type: 'SearchDialog',2 x! t$ c; J9 O+ H, T6 J
dialogHeight: 450,. ~$ K3 }% ?/ @% M
dialogWidth: 700,( R: m$ Z+ `& y
resizable: true
8 f2 B$ v% R: a' a};3 W) ~/ N' t' c" G3 K! D) Y
$ S! x6 o& A* e9 j/ c4 U0 \0 Jvar searchedItem;7 U$ t7 F+ Q$ B$ N) p6 _) k
var callback = function(dlgRes){3 O0 x1 A# c& g1 t7 D: v
if(!dlgRes) {
6 y3 x; D9 d8 L$ Z return;4 C: h) d; Q" B+ j' ^$ m$ Q
}1 s. `$ w: U8 U( V9 g
2 P8 L1 ~8 N) S& s' f
searchedItem = dlgRes.item;3 L! _: _, h7 i
if(!searchedItem){" }4 J9 }' W# d: H
return;+ q$ B/ n$ Z! k; q. _
}
. z* w2 e% l& i! N8 J* Y var keyed_name = top.aras.getKeyedNameEx(searchedItem);
! L$ M+ j- F8 J4 N8 a) P var table = getFieldByName("searchResult").getElementsByTagName("input")[0];
% ?. P1 o3 l: g- x1 b8 n table.setAttribute("value", keyed_name);" p/ w9 Z( O4 Z7 j* ~/ y" V$ a
};4 o! ^7 ?- i# ?% E" K
var wnd = top.aras.getMainWindow();
4 m1 M) E8 q: A* {+ n* X, K4 Q/ lwnd = wnd === top ? wnd.main : top;6 r& y" Z2 |8 h+ y; e
wnd.ArasModules.Dialog.show('iframe', param).promise.then(callback);[/mw_shl_code]
3 a9 N- D: C6 ]# l |
|