/* È£½ºÇǽº´ë±âȯÀÚÇöȲ(SMMNH06500.xrw) - Version : 1.00.01 */ /** * @group : * @ver : 2010.05.27 * @by : byday * @--------------------------------------------------- * @type : function * @access : public * @desc : ÃʱâÈ­ ( * @param : * @param : * @return : * @--------------------------------------------------- */ function fInit(){ model.makeValue("/root/main/cond/bgndt", getCurrentDate()); model.makeValue("/root/main/cond/tempdt", getCurrentDate()); model.makeValue("/root/main/cond/enddt", getCurrentDate()); btn_search.dispatch("DOMActivate"); } /** * @group : * @ver : 2010.05.27 * @by : byday * @--------------------------------------------------- * @type : function * @access : public * @desc : Á¶È¸ ( * @param : * @param : * @return : * @--------------------------------------------------- */ function fSearch(){ var nSwIdx = switch1.selectedIndex; var bgnYear = model.getValue("/root/main/cond/bgndt").substring(0, 4); var endYear = model.getValue("/root/main/cond/enddt").substring(0, 4); if ( nSwIdx == 0 ) { if ( bgnYear == 0 ) { messageBox("Á¶È¸½ÃÀ۳⵵¸¦ ÀÔ·ÂÇϼ¼¿ä..", "I"); return; } if ( endYear == 0 ) { messageBox("Á¶È¸Á¾·á³âµµ¸¦ ÀÔ·ÂÇϼ¼¿ä..", "I"); return; } if ( endYear < bgnYear ) { messageBox("Á¶È¸½ÃÀ۳⵵°¡ Á¶È¸Á¾·á³âµµº¸´Ù Ŭ ¼ö ¾ø½À´Ï´Ù..", "I"); return; } if ( endYear - bgnYear > 2) { messageBox("ÇØ´ç Á¶È¸±â°£À» 3³âÀ̳»·Î ¼³Á¤ÇϽʽÿÀ.", "I"); return; } } else if ( nSwIdx == 1 ) { if ( bgnYear == 0 ) { messageBox("Á¶È¸³âµµ¸¦ ÀÔ·ÂÇϼ¼¿ä..", "I"); return; } } else if ( nSwIdx == 2 ) { var tempDt = model.getValue("/root/main/cond/tempdt").substring(0, 6); if ( tempDt == 0 ) { messageBox("Á¶È¸¿ùÀ» ÀÔ·ÂÇϼ¼¿ä..", "I"); return; } model.setValue("/root/main/cond/bgndt", tempDt); } model.removenode("/root/main/agonal"); submit("TRMNH06501"); if ( nSwIdx == 2 ) { // ÀϺ° grd_list2.colWidth(grd_list2.cols - 2) = (model.getValue("/root/main/agonal/list[1]/cnt31") == "" ? 0 : 60); grd_list2.colWidth(grd_list2.cols - 3) = (model.getValue("/root/main/agonal/list[1]/cnt30") == "" ? 0 : 60); grd_list2.colWidth(grd_list2.cols - 4) = (model.getValue("/root/main/agonal/list[1]/cnt29") == "" ? 0 : 60); //grd_list2.colHidden(grd_list2.cols - 2) = (model.getValue("/root/main/agonal/list[1]/cnt31") == ""); //grd_list2.colHidden(grd_list2.cols - 3) = (model.getValue("/root/main/agonal/list[1]/cnt30") == ""); //grd_list2.colHidden(grd_list2.cols - 4) = (model.getValue("/root/main/agonal/list[1]/cnt29") == ""); } else if ( nSwIdx == 0 ) { // ³âº° var cap1 = "±¸ºÐ^»ó¼¼±¸ºÐ"; var cap2 = "±¸ºÐ^»ó¼¼±¸ºÐ"; for ( var nCnt = grd_list0.fixedCols; nCnt < grd_list0.cols; nCnt++ ) { grd_list0.colWidth(nCnt) = 0; //grd_list0.colHidden(nCnt) = true; } for ( var nCnt = endYear, nPos = 0; nCnt >= bgnYear; nCnt--, nPos++ ) { cap1 += "^ " + nCnt + " ^ " + nCnt + " ^ " + nCnt + " "; cap2 += "^ " + nCnt + "³â ^ " + (nCnt-1) + "³â ^ Áõ°¨(%) "; grd_list0.colHidden(nPos * 3 + grd_list0.fixedCols) = false; grd_list0.colHidden(nPos * 3 + 1 + grd_list0.fixedCols) = false; grd_list0.colHidden(nPos * 3 + 2 + grd_list0.fixedCols) = false; grd_list0.colWidth(nPos * 3 + grd_list0.fixedCols) = 90; grd_list0.colWidth(nPos * 3 + 1 + grd_list0.fixedCols) = 90; grd_list0.colWidth(nPos * 3 + 2 + grd_list0.fixedCols) = 90; } grd_list0.caption = cap1 + "|" + cap2; } model.refresh(); } /** * @group : * @ver : 2010.06.07 * @by : byday * @--------------------------------------------------- * @type : function * @access : public * @desc : ³âµµº°Á¶È¸ ( * @param : * @param : * @return : * @--------------------------------------------------- */ function fSearchYear() { model.toggle("case1"); ipt_bgndt.visible = true; ipt_bgndt2.visible = false; cap_tilde.visible = true; ipt_enddt.visible = true; cap_search.text = "Á¶È¸³âµµ :"; model.setValue("/root/main/cond/dtflag", "Y"); btn_search.dispatch("DOMActivate"); } /** * @group : * @ver : 2010.06.07 * @by : byday * @--------------------------------------------------- * @type : function * @access : public * @desc : ¿ùº°Á¶È¸ ( * @param : * @param : * @return : * @--------------------------------------------------- */ function fSearchMonth() { model.toggle("case2"); ipt_bgndt.visible = true; ipt_bgndt2.visible = false; cap_tilde.visible = false; ipt_enddt.visible = false; cap_search.text = "Á¶È¸³âµµ :"; model.setValue("/root/main/cond/dtflag", "M"); btn_search.dispatch("DOMActivate"); } /** * @group : * @ver : 2010.06.07 * @by : byday * @--------------------------------------------------- * @type : function * @access : public * @desc : ÀϺ°Á¶È¸ ( * @param : * @param : * @return : * @--------------------------------------------------- */ function fSearchDay() { model.toggle("case3"); ipt_bgndt.visible = false; ipt_bgndt2.visible = true; cap_tilde.visible = false; ipt_enddt.visible = false; cap_search.text = "Á¶È¸³â¿ù :"; model.setValue("/root/main/cond/dtflag", "D"); btn_search.dispatch("DOMActivate"); } /** * @desc : excel ÀúÀå Çϱâ * @ * @param : * @return : * @authur : ÀÌÀº¿µ 2008.07.14 * @--------------------------------------------------- */ function fExcel(gridObj, title){ if (title == null) { title = "" } var fileName = window.fileDialog("save", ",", false, title + "_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); if (fileName != "") { gridObj.saveExcel(fileName, "SheetName", true, true, "", "", true); } }