/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ¸¶ÃëȯÀÚ±â·Ï ( SSMMR05900_¸¶ÃëȯÀÚ±â·Ï󹿏ñ·Ï.xrw - JScript ) - Version : 1) : Ver.1.00.01 2008-06-23 - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ /** ¼ö¼úȯÀÚ parameter ±¸Á¶ : mmohoprs¼ö¼ú¿¹¾àÁ¤º¸ tblÀÇ Á¤º¸¸¦ ±âº»À¸·Î ÇÔ var param = ±¸ºÐÀÚ'T' + "¢Ë" + µî·Ï¹øÈ£ :=pid + "¢Ë" + ¼ö¼úÈ®Á¤ÀÏÀÚ :=opcnfmdd + "¢Ë" + (»ý¼º¹øÈ£) :=cretno + "¢Ë" + ±â°üÄÚµå :=instcd + "¢Ë" + Áýµµ°úÄÚµå :=perfdeptcd + "¢Ë" + ÁýµµÀÇ :=perfdrid + "¢Ë" + ȯÀÚ±¸ºÐ :=patflag + "¢Ë" + ==> ¿Ü·¡(I), ÀÔ¿ø(O), DSC(D), ÀÀ±Þ(E) 󸮱¸ºÐ'F' + "¢Ë" + ¼ö¼ú¿¹¾à¹øÈ£ :=oprsrvno + "¢Ë" + ¼ö¼úÀ̷¹øÈ£ :=ophistno + "¢Ë" + Á¶È¸ÀÏÀÚ; */ /** * @desc : ÆûÃʱâÈ­ * @ * @param : * @return : * @--------------------------------------------------- */ function fFormInit(send_anstrecno, nOpcnfmdd) { anstrecno = send_anstrecno; // ¿ë¹ýÁ¶È¸ (ÁÖ»ç¾à) model.setValue ( "/root/send/req/cond1" , "I"); model.setValue ( "/root/send/req/cond2" , 1); model.setValue ( "/root/send/req/cond3" , ""); submit("TRMMR03710"); // 2016.09.30 ÇöÀç ½ÃÁ¡¿¡¼­ ÀÛ¼º ½ÃÁ¡À¸·Î º¯°æ var currentdate = getCurrentDate() + getCurrentTime(); if( nOpcnfmdd != "" ){ currentdate = nOpcnfmdd; } model.setValue("/root/send/reqdata/currentdate", currentdate); if (anstrecno != "0") { // ¸¶Ãë±â·Ï¹øÈ£ model.setValue("/root/send/reqdata/anstrecno", anstrecno); // ¸¶ÃëȯÀÚ Ã³¹æ Á¶È¸ submit("TRMMR03705"); // ¸¶ÃëȯÀÚ Ã³¹æ Åõ¿©ÀϽà Á¶È¸ submit("TRMMR03708"); } } /** * @--------------------------------------------------- * @creat : 20110418 * @author : ÃÖ¿øµ· * @desc : ¸¶ÃëȯÀÚ CDISó¹æ Åõ¿©ÀϽà Á¶È¸ * @--------------------------------------------------- */ function searchAnstCdisItem(ps_anstrecno, ps_anstfromdt) { model.setValue("/root/send/reqdata/anstrecno", ps_anstrecno); model.setValue("/root/send/reqdata/anstfromdt", ps_anstfromdt); submit("TRMMR03719"); } /** * @desc : ¸¶¿ì½º ¿À¸¥ÂÊ ¹öư ÆË¾÷â * @ * @param : * @return : * @--------------------------------------------------- * */ function fMouseRghtBtnPopup(gridObj, job) { if (event.button == 3) { if (gridObj.isCell(event.target)) { if (job == "prcp") { // Àüü ó¹æ ¸ñ·Ï¿¡¼­ ¿ìŬ¸¯½Ã »èÁ¦ ÆË¾÷ if (gridObj.row > 0) { window.setPopupMenu(true, "/root/hidden/menu6/menu", "label", "func", false); } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } /** * @desc : Àüü ó¹æ ¸ñ·Ï »èÁ¦ ¸Þ´º Ŭ¸¯½Ã 󹿏ñ·Ï¿¡¼­ »èÁ¦ÇÏ°í ¸ÞÀÎ ±×¸®µå¿¡¼­ »èÁ¦ÇÑ´Ù. * @ * @param : * @return : * @--------------------------------------------------- */ function fDelPrcpList() { var gridObj = grd_anstprcp; var ref = "/root/main/anstprcp/item"; if (gridObj.row > 0 && gridObj.row < gridObj.rows) { var prcptype = model.getValue(ref+"["+ gridObj.row +"]/prcptype"); var prcpcd = model.getValue(ref+"["+ gridObj.row +"]/prcpcd"); // 2008.09.23. 2°³ÀÌ»ó ó¹æÄÚµå Ãß°¡ ±â·ÏÇϱâ.. (fluidÀ϶§) var prcpseqno= model.getValue(ref+"["+ gridObj.row +"]/prcpseqno"); // Àüü ó¹æ ¸ñ·Ï¿¡ »èÁ¦½Ã Agent ¸¶½ºÅÍ ±×¸®µå ¼±Åà Ãë¼Ò ÈÄ ÀνºÅϽº »èÁ¦Ã³¸®ÇÔ. fCheckedAnstPrcpA01(gridObj, ref, gridObj.row); // Åõ¿©ÀϽà ÀνºÅϽºµµ »èÁ¦ fDestroyAnstItem("root/main/anstitem/item", prcpcd, prcpseqno); // ¸ÞÀÎ ±×¸®µåÀÇ Ã³¹æÄÚµå »èÁ¦ fDeleteRow(prcptype, prcpcd, prcpseqno); // 󹿏ñ·Ï¿¡ ó¹æÄڵ尡 Àִ°¡? del model.destroy(ref+"["+ gridObj.row +"]"); model.refresh(); } } /** * @desc : ¸¶Ãë±â·Ï ¸ÞÀÎ ±×¸®µå¿¡¼­ Ç׸ñ ·Î¿ì »èÁ¦Çϱâ... * @ * @param : * @return : * @--------------------------------------------------- */ function fDeleteRow(linktype, linkcd, linkseqno) { // ó¹æ Ç׸ñ delete.. for (var k = 5 ; k < window.parent.grd_main.rows ; k++) { var grd_linktype = window.parent.grd_main.textMatrix(k, window.parent.javascript.col_linktype); var grd_linkcd = window.parent.grd_main.textMatrix(k, window.parent.javascript.col_linkcd); // 2008.09.23. 2°³ÀÌ»ó ó¹æÄÚµå Ãß°¡ ±â·ÏÇϱâ.. (fluidÀ϶§) var grd_linkseqno= window.parent.grd_main.textMatrix(k, window.parent.javascript.col_linkseqno); if (grd_linktype == linktype && grd_linkcd == linkcd && grd_linkseqno == linkseqno) { window.parent.grd_main.deleteRow(k); break; } } } /** * @desc : Àüü ó¹æ ¸ñ·Ï¿¡ »èÁ¦½Ã Agent ¸¶½ºÅÍ ±×¸®µå ¼±Åà Ãë¼Ò * @ - Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fCheckedAnstPrcpA01(gridObj, ref, row) { var prcptype = model.getValue(ref+"[" + row + "]/prcptype"); var clscd = model.getValue(ref+"[" + row + "]/clscd"); var prcpcd = model.getValue(ref+"[" + row + "]/prcpcd"); var prcpappyn = model.getValue(ref+"[" + row + "]/prcpappyn"); // Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) if (prcptype == "A" && clscd == "01" && prcpappyn == "N") { // 󹿏ñ·Ï ³ëµå var CheckRef = "/root/main/agent01/item"; // ³ëµå °¹¼ö¸¦ °¡Á®¿À±â var dataCnt = getNodesetCnt(window.parent.iv_anstmast.model, CheckRef); // 󹿏ñ·Ï¿¡ ó¹æÄڵ尡 Àִ°¡? »èÁ¦ for (var j=1 ; j <= dataCnt ; j++) { var tmpprcpcd = window.parent.iv_anstmast.model.getValue(CheckRef+"[" + j + "]/prcpcd"); if (tmpprcpcd == prcpcd) { // Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) ¼±Åà Ãë¼Ò window.parent.iv_anstmast.model.setValue(CheckRef+"[" + j + "]/checked", "false"); window.parent.iv_anstmast.model.refresh(); break; } } } // Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) if (prcptype == "A" && clscd == "01" && prcpappyn == "Y") { // 󹿏ñ·Ï ³ëµå var CheckRef = "/root/main/agent01y/item"; // ³ëµå °¹¼ö¸¦ °¡Á®¿À±â var dataCnt = getNodesetCnt(window.parent.iv_anstmast.model, CheckRef); // 󹿏ñ·Ï¿¡ ó¹æÄڵ尡 Àִ°¡? »èÁ¦ for (var j=1 ; j <= dataCnt ; j++) { var tmpprcpcd = window.parent.iv_anstmast.model.getValue(CheckRef+"[" + j + "]/prcpcd"); if (tmpprcpcd == prcpcd) { // Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) ¼±Åà Ãë¼Ò window.parent.iv_anstmast.model.setValue(CheckRef+"[" + j + "]/checked", "false"); window.parent.iv_anstmast.model.refresh(); break; } } } } /** * @desc : Àüü ó¹æ ¸ñ·Ï¿¡¼­ »èÁ¦µÇ¸é °°Àº ó¹æÄÚµåÀÇ Åõ¿©ÀϽà ÀνºÅϽºµµ »èÁ¦ÇÑ´Ù. * @ * @param : * @return : * @--------------------------------------------------- */ function fDestroyAnstItem(ref, linkcd, linkseqno) { var dataCnt = getNodesetCnt(model, ref); for (var i=1 ; i <= dataCnt ; i++) { // 2008.09.23. 2°³ÀÌ»ó ó¹æÄÚµå Ãß°¡ ±â·ÏÇϱâ.. (fluidÀ϶§) var tmplinkcd = model.getValue(ref+"["+ i +"]/linkcd"); var tmplinkseqno = model.getValue(ref+"["+ i +"]/linkseqno"); if (tmplinkcd == linkcd && tmplinkseqno == linkseqno) { // ó¹æÄڵ尡 °°Àº°¡? del model.destroy(ref+"["+ i +"]"); var linktype = model.getValue(ref+"["+ i +"]/linktype"); // µ¥ÀÌŸ¼Â.. dataCnt = dataCnt - 1; i = i - 1; } } model.refresh(); } /** * @desc : 󹿏ñ·Ï ±×¸®µå¿¡ º¸¿©ÁÖ±â... * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fSetAnstPrcp() { var gridObj = grd_anstprcp; var colRef1 = "prcptype"; //±¸ºÐ var colRef2 = "sortno"; //sortno var colRef3 = "prcpnm"; //󹿏í var colRef4 = "prcpseqno"; //prcpseqno gridObj.colsort(gridObj.colRef(colRef1)) = "asc"; gridObj.colsort(gridObj.colRef(colRef2)) = "asc"; gridObj.colsort(gridObj.colRef(colRef3)) = "asc"; gridObj.colsort(gridObj.colRef(colRef4)) = "asc"; gridObj.sort(1, 0, gridObj.rows - 1, gridObj.cols - 1) = "usersort"; gridObj.refresh(); gridObj.gridToInstance(); model.refresh(); }