createWindowByParam: function(menuId, param, callback) {
var mdiMain = document.querySelector("sc-mdi");
var windowIndex = mdiMain.$.mdiContent.createdWindows.indexOf(menuId);
if(windowIndex > -1){
mdiMain.$.mdiContent.removeWindow(menuId);
}
var menuInfo = mdiMain.$.mdiTopMenu.getMenuNode(menuId);
if (UT.isEmpty(menuInfo))
{
// 권한없는 메뉴는 사용할 수 없습니다.
UT.alert("STD.MDI1011");
return;
}
var _paramArray = [];
for (var key in param)
{
if (param.hasOwnProperty(key))
{
_paramArray.push(key + "=" + param[key]);
}
}
var menuUrl = menuInfo.menu_url + (_paramArray.length > 0 ? "?" + _paramArray.join("&") : "");
var moduleWindow = mdiMain.$.mdiContent.createWindow(menuId, menuInfo.menu_nm, menuUrl);
if(UT.isFunction(callback)) {
moduleWindow.addEventListener("window-module-loaded", function(e) {
callback.call(moduleWindow.module, moduleWindow.module);
moduleWindow.removeEventListener("window-module-loaded", arguments.callee);
});
}
return moduleWindow;
},
onMoveMenu : function(data)
{
var me = this;
var _param = {};
_param.dev_no = data.dev_no;
_param.ptype = data.ptype;
_param.prod_cd = data.prod_cd;
_param.spec_type = data.spec_type;
_param.pkc_no = data.pkc_no;
_param.pkc_rev = data.pkc_rev;
_param.clickedAW = {pack_type:data.pack_type, aw_cd:data.aw_cd};
// 두번째 파라메터로 _param을 던지면 get방식 전달이다.
UT.createWindowByParam("APW20000", null, function(module)
{
// object로 전달
module.onShowDetail(null, _param);
});
},
// em 모듈에서 parameter로 받을때
initialized : function(event)
{
var me = this;
var param = me.params;
// For calls from to-do list
if (param.to_do == "Y")
{
me.$.list.load(param);
}
// For calls from other modules
if (UT.isNotEmpty(param.pkc_no))
{
me.onShowDetail(event, param);
}
},
if (UT.isNotEmpty(me.domHost.clickedAW))
{
// Tab 선택
me.domHost.$.tabNavi.selectIndex(me.domHost.clickedAW.pack_type == "F" ? 1 : 2);
var itemIndex = grid.searchItem("aw_cd", me.domHost.clickedAW.aw_cd, 0);
if (UT.isNotEmpty(itemIndex))
{
var _rowIndex = itemIndex.itemIndex;
grid.setCurrentCell({dataField:"btn_aw", rowIndex:_rowIndex});
var _data = grid.getDataProvider().getItemAt(_rowIndex);
var _item = grid.getCurrentCell();
grid.fire("item-click", {data:_data, item:_item});
}
}
window open
|
2018.10.17 20:15:27
|
2022.04.28 22:03:34
|
489
|
Aiden
Total of Attached file
0.00 Bytes of 0 files
2018.11.02
2018.11.01
2018.10.23
2018.10.22
2018.10.17
2018.10.17
2018.09.19
2018.09.11
2018.08.30
2018.08.28