|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
0 z6 U" Q' r* T
Aras 配置开发分享,弹出搜索对话框# U" s$ K. n# G7 C9 K \3 K( M
. C! r3 L1 P+ D/ S[mw_shl_code=javascript,true]var param = {2 X$ X7 ~; i/ R' V, J, G' @
aras: top.aras,
% i5 [7 u% X6 m itemtypeName: 'Part', // tbd: use inArgs' a) g$ y" u4 n4 v7 S
multiselect: false,( I+ Q. K7 E! j& K7 B
type: 'SearchDialog',
6 H% k- o6 u- q5 S$ ~ dialogHeight: 450,
( |* m6 H4 S5 W$ M* K dialogWidth: 700,
# l9 _% o1 E' |5 c resizable: true. L, k# `& \# i. T! K( x
};
/ c/ X+ a- w+ B2 a7 I$ u
, q' i: S$ i2 r( Y5 S5 Svar searchedItem;
; r% |' a7 O$ q, ?var callback = function(dlgRes){# f$ [! L' h5 H5 r; q
if(!dlgRes) {
' w# c) r0 Y; x' t return;2 Q" }$ x2 u8 N7 z; d' ~
}( E6 u6 |' ^+ j: \; r
* H, @' Z8 B O: M3 d6 ^
searchedItem = dlgRes.item;8 P/ D3 k# F- j7 g. x. V e7 l
if(!searchedItem){
4 c; y8 {; x: v! s return;
9 U" ~4 b4 J& l# l }
7 v3 f9 _$ Q7 x var keyed_name = top.aras.getKeyedNameEx(searchedItem);
: n8 [% A4 s! v# b# e5 @9 @5 l+ E- o var table = getFieldByName("searchResult").getElementsByTagName("input")[0];
: z& ]# b3 }( ]2 H/ S% W table.setAttribute("value", keyed_name);
& Q7 _( e5 c, [7 [# A* y% p};: I6 W! y, j2 W. l* ?0 l# V
var wnd = top.aras.getMainWindow();
% l5 }3 r% z8 @" c! Zwnd = wnd === top ? wnd.main : top;' V3 p- \: z# ?/ z% _. s* v; U
wnd.ArasModules.Dialog.show('iframe', param).promise.then(callback);[/mw_shl_code]
* x5 r5 M& s: H# }% B2 x# ] |
|