/* --------------------------------------------------------------------- ´ë±â¾È³» ȯÀÚÁøÇàÇöȲ (´ë±â¾È³»°øÅë - JScript ) - Version : 1) : Ver.1.00.01 : Create By YeoWon Lim : 2015.05.02 ----------------------------------------------------------------------*/ var inquiryTime = 5 * 1000 ; // 5ÃÊ (ÀçÁ¶È¸½Ã°£) var clockTime = 1000 ; // 1ÃÊ (½Ã°è) var clockID ; var inquiryID; /** * @group : * @ver : 2008.02.13 * @by : ÀÓ¿©¿ø * @--------------------------------------------------- * @type : function * @access : public * @desc : ´ë±â¾È³» ȯÀÚÁ¶È¸È­¸éÃʱâÈ­ * @param : * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ fSetTimer(); } /** * @group : * @ver : 2007.10.09 * @by : ¹®Ã¢°ï * @--------------------------------------------------- * @type : function * @access : public * @desc : ÁöÁ¤µÈ ½Ã°£°£°Ý¸¶´Ù ±×¸®µåµ¥ÀÌÅÍ Á¶È¸(È­¸é È£Ãâ½Ã óÀ½¸¸ È£ÃâµÈ´Ù) * @param : * @param : * @return : * @--------------------------------------------------- */ function fSetTimer(){ clockID = window.setInterval("clock();" , clockTime); //1ÃÊ inquiryID = window.setInterval("fGetTestRoomInfo();" , inquiryTime); //5ÃÊ } /* --------------------------------------------------*/ /* type : function */ /* access : public */ /* desc : ¿Ü·¡ Áø·á½Ç ÁøÇàÇöȲ Á¶È¸ */ /* --------------------------------------------------*/ function fGetTestRoomInfo(){ var sPath = "/root/main/opdinfo"; model.setValue("/root/main/cond/bizdd", getCurrentDate()); model.removenode("/root/send"); model.makeValue("/root/send/bizdd", model.getValue("/root/main/cond/bizdd")); model.makeValue("/root/send/centcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/centcd")); model.makeValue("/root/send/orddeptcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptcd")); model.makeValue("/root/send/ordroomcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomcd")); setErrorOff(); if (submit("TRMNV11001",false)) { var i; var j = 2; var patstat = true; for(i = 1; i <= getNodesetCount("/root/main/ordroominfo/ordroompatlist") && j <= 6; i++ ) { if(model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/patstat") == "A") { document.all.item("rsrvtm1").value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/rsrvtm"); document.all.item("patnm1").value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/patnm"); patstat = false; } else { if (j < 4 ) { document.all.item("rsrvtm" + j).value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/rsrvtm"); document.all.item("patnm" + j).value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/patnm"); j++; } else { document.all.item("genpatnm" + j).value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/genpatnm"); j++; } } } if(patstat) { document.all.item("rsrvtm1").value = "-"; document.all.item("patnm1").value = "-"; } for(; j <= 6; j++ ) { if (j < 4 ) { document.all.item("rsrvtm" + j).value = "-"; document.all.item("patnm" + j).value = "-"; } else { document.all.item("genpatnm" + j).value = "-"; } } model.refresh(); } else { model.setValue("/root/init/grdStatus","grd:Àå¾Ö"); model.removeNodeset(sPath); model.refresh(); } } /** * @group : * @ver : 2007.10.09 * @by : ¹®Ã¢°ï * @--------------------------------------------------- * @type : function * @access : public * @desc : DataTime Á¶È¸. * @param : * @param : * @return : * @--------------------------------------------------- */ function clock() { var tdate = getCurrentDateTime().substring(0, 4) + "³â " + getCurrentDateTime().substring(4, 6) + "¿ù " + getCurrentDateTime().substring(6, 8) + "ÀÏ " + getCurrentDate().toDate().getDayOfWeek("K") + "¿äÀÏ "; var ttime = getCurrentDateTime().substring(8, 11) + ":" + getCurrentDateTime().substring(11, 13); model.setValue("/root/hidden/date", tdate) ; model.setValue("/root/hidden/time", ttime) ; model.refresh(); } /** * @group : * @ver : 2007.10.09 * @by : ¹®Ã¢°ï * @--------------------------------------------------- * @type : function * @access : public * @desc : 'ESC' or 'Q' ۸¦ ´©¸£¸é ŸÀÌ¸Ó ÇØÁ¦ ¹× À©µµ¿ì ´Ý±â * @param : * @param : * @return : * @--------------------------------------------------- */ function fClearTimer(){ var keyPressed = event.keyCode ; if(keyPressed == 27 || keyPressed == 81) // 'ESC' or 'Q' ۰¡ ´­·ÁÁø °æ¿ì { var answer = messageBox("ÁøÇàÇöȲ ¾È³» ÇÁ·Î±×·¥ Á¾·áÇÕ´Ï´Ù.", "I") ; if(answer == 1) { fCloseBoard(); } } } function fCloseBoard(){ if (clockID != "") window.clearInterval(clockID); if (inquiryID != "") window.clearInterval(inquiryID); model.close(); }