POPUP
ํ์
ํธ์ถ
// ๋ฉ์ธํ๋ฉด - ์์ฌ ์กฐํ ํ์
ํธ์ถ
$(document).on("click", "#btnProd1", function () {
let selectedItemState = AUIGrid.getSelectedRows('#grid1')[0].STATE;
if (selectedItemState !== 'Created' && selectedItemState !== null && selectedItemState !== undefined && selectedItemState !== '') {
return;
};
ngsUtil.openIframePopUp('POPUP_MATERIAL_PR', '/view/ngs/mes/common/POPUP_MATERIAL_PR.html', that, ngsLang.getLang('Tit_MaterialSearch'), window.innerWidth * 0.8, window.innerHeight * 0.8);// Tit_MaterialSearch: ์์ฌ ์กฐํ
});
openIframePopup ํ๋ผ๋ฏธํฐ
id (string) : ํ์ JS์์ ์ ์ธํ Object๋ช ex) 'AMGZZ0061' <= ํ์๊ฐ
url (string) : ํ์ด์ง ์ ๋๊ฒฝ๋ก ex) '/view/ngs/aming/common/AMGZZ0061.html' <= ํ์๊ฐ
your (object) : ํธ์ถํ๋ ํ์ด์ง์ ๊ฐ๋ณ js ํ์ผ์ ๊ฐ์ฒด ex) AMGZZ006 ํน์ this ํน์ that ๋ฑ <= ํ์๊ฐ
title (string) : ํ์ ์ ์ ๋ชฉ๋ช ์ ๋๋ค. ๋ํดํธ๊ฐ์ 'Pop Up' ๋ํดํธ์ผ ๊ฒฝ์ฐ๋ undefined ์ ๋ ฅ ex) '์ ํ๊ฒ์' <= ์ต์ ๊ฐ
width (int) : ํ์ ์ ๊ฐ๋ก ์ฌ์ด์ฆ(px) ์ ๋๋ค. ๋ํดํธ๊ฐ์ 776, ๋ํดํธ ์ผ๊ฒฝ์ฐ๋ undefined ์ ๋ ฅ <= ์ต์ ๊ฐ
height (int) : ํ์ ์ ์ธ๋ก ์ฌ์ด์ฆ(px) ์ ๋๋ค. ๋ํดํธ๊ฐ์ 443, ๋ํดํธ ์ผ๊ฒฝ์ฐ๋ undefined ์ ๋ ฅ <= ์ต์ ๊ฐ
ํ๋ผ๋ฏธํฐ ์ ๋ฌ
ํ๋ผ๋ฏธํฐ ์ ์ฅ
ngsUtil.setStorage('WO_PRODUCTDEFINITIONID', PRODUCTDEFINITIONID, 'S');
ngsUtil.setStorage('WO_SEQ', 1, 'S');
key , value , type
type์ S(server storage) L(local stroage)
ํ๋ผ๋ฏธํฐ ์ฌ์ฉ
that.WORKORDERID = ngsUtil.getStorage('WONUMBER', 'S');
ํ์
์ด๋ฒคํธ
ํ์
//์ ํ ๋ฒํผ
$body.on('click', '#checkBtn', function(e) {
ngsUtil.messageBox({
type: 'info', html: ngsLang.getLang('msg_mes_Select') /*์ ํ ํ์๊ฒ ์ต๋๊น?*/
, closeButton: {
text: 'Close', after: function() {
AUIGrid.setFocus('#grid1');
},
}, okButton: {
text: 'OK', after: function() {
const checkItem = AUIGrid.getSelectedItems('#grid1');
POPUP_MATERIAL_PR.father.popUpSaveCallBack(0, checkItem, POPUP_MATERIAL_PR.father.rowIndex, 'POPUP_MATERIAL_PR');
that.ngsUtil.closeIframePopUp('POPUP_MATERIAL_PR');
},
},
});
});
ํ์ ์์ ๋ฒํผ ํด๋ฆญ ์ ๋ถ๋ชจ์ popUpSaveCallBack ํจ์๋ฅผ ํธ์ถํ๊ณ ํ์ ์ ์ข ๋ฃํจ
ํ์ ์ ์ข ๋ฃ๋ ์ ํ์ฌํญ
๋ถ๋ชจ ํ์ด์ง popUpSaveCallBack
popUpSaveCallBack: function (index, data, rowIndex, popupName) {
let that = this;
rowIndex = AUIGrid.getSelectedIndex('#grid1')[0];
let isNew = AUIGrid.getGridData('#grid1')[rowIndex].NEW;
let isUpdate = (isNew === undefined || isNew === null) ? 'U' : isNew;
let materialInfo = {
'MATERIALDEFINITIONID' : data[0].item.MATERIALDEFINITIONID,
'MATERIALDEFINITIONNAME' : data[0].item.MATERIALDEFINITIONNAME,
'UNITID' : data[0].item.UNITID,
'POUNITID' : data[0].item.POUNITID,
'WIDTH' : data[0].item.WIDTH,
'INVENTORYRATE' : data[0].item.INVENTORYRATE ? data[0].item.INVENTORYRATE : 1,
'NEW' : isUpdate
}
AUIGrid.updateRow(ngsWidget.grid[index], materialInfo, rowIndex);
const item = AUIGrid.getGridData(ngsWidget.grid[index])[rowIndex];
ngsWidget.entireDatas[index][rowIndex] = item;
that.editAutoValue(
{
dataField: 'MATERIALDEFINITIONID',
item: item,
}
);
},
Last updated