|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
5 N5 x& e9 v; l# D! S& R
Aras 配置开发分享,弹出搜索对话框
# c3 a4 _0 y( C; ?6 f+ P8 K# I( v1 L/ E! o! Z! N( J
[mw_shl_code=javascript,true]var param = {; G$ K, r% U2 U2 Y6 \( r
aras: top.aras, , i: n0 c4 g9 z- Z
itemtypeName: 'Part', // tbd: use inArgs
( S3 t7 V" F: k* i2 q' ~" X multiselect: false,3 E" P( [: b" x% k* n( n& S
type: 'SearchDialog',
) L, h5 t* a$ x1 r8 s; w dialogHeight: 450,
- c! s) P' G9 ~; x9 x. u dialogWidth: 700,3 U/ i& c. c. o8 w( R& N
resizable: true# t, g+ |" i W. n
}; ]! s. I( r$ a5 a. x9 M" t
; T* [1 A; h: \; p0 E$ e/ b( p$ a! O
var searchedItem;
; Z( q ~8 Y& o9 ~) e( g/ s8 r! Q/ Vvar callback = function(dlgRes){
: n4 ]* u: b; m) M/ c if(!dlgRes) {
& p1 M2 P7 _8 ~1 ]0 l8 c return;
/ s2 K; a0 o) i) }8 z }- {) e/ G, W0 m# Y- Q p* ^
( U9 W9 z& G+ w" ]) J4 p, F
searchedItem = dlgRes.item;7 |) }, c; C: x$ Q
if(!searchedItem){
1 s2 J5 C8 H% s4 N return;2 f1 y& o$ `0 q0 T$ o3 r
}+ Y* G2 h% y" O3 G$ R' [
var keyed_name = top.aras.getKeyedNameEx(searchedItem);
" R; F* v: ^# ]. Y var table = getFieldByName("searchResult").getElementsByTagName("input")[0];
: f" V+ P$ {* |. [2 n% @) c- E5 G4 U table.setAttribute("value", keyed_name);7 e! q4 R' g( K: ~; G
};* o, f) k+ T% Q# t& X3 b
var wnd = top.aras.getMainWindow();2 `) A# \- N8 v# R
wnd = wnd === top ? wnd.main : top;
+ Z/ T. j" H, Z. Y5 e6 zwnd.ArasModules.Dialog.show('iframe', param).promise.then(callback);[/mw_shl_code]
" Z% l* z/ {. R( v/ G( D |
|