/* --------------------------------------------------------------------- ¿ù°£¼ö¼úÅë°è (SSMNP01200.xfm - JScript ) - Version : 1) : Ver.1.00.01 : Create By taebum : 2009-09-09 ¿ÀÈÄ 7:57:02 ---------------------------------------------------------------------- */ /** * @group : * @ver : 2009-09-09 ¿ÀÈÄ 7:57:15 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInit(){ model.removenode("/root/main/lists/list"); datagrid1.refresh(); model.setValue("/root/hidden/condition/frdd", fCalcDate(getCurrentDate(),-1)); model.setValue("/root/hidden/condition/todd", getCurrentDate()); model.refresh(); } /* * 1´ÞÀ» ÀÚµ¿ ¼¼ÆÃµÇ°Ô ÇÏ´Â ÇÔ¼ö * sDate : ÀÏÀÚ(string) * iFlag : int 1/-1 (1´Þ ÀÌÀü/ÀÌÈÄÀÇ ³¯Â¥ °è»ê¿ëµµ) */ function fCalcDate(sDt,iFlag){ var sDate = sDt.toDate("YYYYMMDD").getAddDate(iFlag, "M").getAddDate(-(iFlag), "D") //alert(sDt.toDate("YYYYMMDD").getAddDate(iFlag, "M").getAddDate(-(iFlag), "D").getDayOfWeek("K")); -- ÇØ´ç¿äÀÏ rtnDate = sDate.getFullYear(); rtnDate = rtnDate.toString() + (( sDate.getMonth() + 1 > 9 ) ? sDate.getMonth() + 1 : "0" + (sDate.getMonth() + 1)); rtnDate = rtnDate.toString() + (( sDate.getDate() > 9 ) ? sDate.getDate() : "0" + sDate.getDate()) ; return rtnDate; } /** * @group : * @ver : 2009-09-09 ¿ÀÈÄ 8:02:14 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : Á¶ ȸ * @param : * @return : * @--------------------------------------------------- */ function fOnClickSearchBtn(){ model.removenode("/root/send"); model.makeValue("/root/send/frdd" ,model.getValue("/root/hidden/condition/frdd")); model.makeValue("/root/send/todd" ,model.getValue("/root/hidden/condition/todd")); model.makeValue("/root/send/ssflag1" ,model.getValue("/root/hidden/condition/ssflag1")); model.makeValue("/root/send/ssflag2" ,model.getValue("/root/hidden/condition/ssflag2")); model.makeValue("/root/send/ssflag3" ,model.getValue("/root/hidden/condition/ssflag3")); model.makeValue("/root/send/etcflag1",model.getValue("/root/hidden/condition/etcflag1")); model.makeValue("/root/send/etcflag2",model.getValue("/root/hidden/condition/etcflag2")); model.makeValue("/root/send/etcflag3",model.getValue("/root/hidden/condition/etcflag3")); model.makeValue("/root/send/deptcd" ,model.getValue("/root/hidden/condition/deptcd")); model.makeValue("/root/send/oproomcd",model.getValue("/root/hidden/condition/oproomcd")); model.makeValue("/root/send/opcd" ,model.getValue("/root/hidden/condition/opcd")); if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){ messageBox("½ÃÀÛÀÏ, Á¾·áÀÏÀº ÇʼöÀÔ·Â »çÇ×ÀÔ´Ï´Ù.", "I000"); return; } model.removenode("/root/main/lists/list"); datagrid1.refresh(); if(submit("TRSNP01200")){ fSetGridTitle(); }else{ model.alert("¿ù°£¼ö¼úÅë°è Á¶È¸ ½Ã ¼­¹ö ¿À·ù°¡ ¹ß»ýµÇ¾ú½À´Ï´Ù. ´Ù½Ã Á¶È¸ÇϽñ⠹ٶø´Ï´Ù."); return; } } /** * @group : * @ver : 2009-09-09 ¿ÀÈÄ 8:01:39 * @by : Grace * @--------------------------------------------------- * @type : function * @access : public * @desc : Exel ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fSaveExcel(){ var iGridCnt = getNodesetCnt(model, "/root/main/lists/list"); if(iGridCnt < 1){ model.alert("ÀúÀåÇÒ µ¥ÀÌÅͰ¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù."); return; } var fileName = null; fileName = window.fileDialog("save", ",", false, "¿ù°£¼ö¼úÅë°è_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if (fileName != "" && fileName != null) { datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false); } } /** * @group : * @ver : 2009-09-09 ¿ÀÈÄ 8:01:25 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : Grid ¿¬µµ Setting * @param : * @return : * @--------------------------------------------------- */ function fSetGridTitle(){ var sDt = model.getValue("/root/hidden/condition/frdd"); var sTitle1 = sDt.substr(0,4); var sDate = sDt.toDate("YYYYMMDD").getAddDate(-1, "Y"); rtnDate = sDate.getFullYear(); var sTitle2 = rtnDate.toString(); sDate = sDt.toDate("YYYYMMDD").getAddDate(-2, "Y"); rtnDate = sDate.getFullYear(); var sTitle3 = rtnDate.toString(); datagrid1.valuematrix(1, 2) = sTitle3; datagrid1.valuematrix(1, 3) = sTitle2; datagrid1.valuematrix(1, 4) = sTitle1; datagrid1.valuematrix(1, 7) = sTitle3; datagrid1.valuematrix(1, 8) = sTitle2; datagrid1.valuematrix(1, 9) = sTitle1; datagrid1.valuematrix(1, 12) = sTitle3; datagrid1.valuematrix(1, 13) = sTitle2; datagrid1.valuematrix(1, 14) = sTitle1; datagrid1.valuematrix(1, 17) = sTitle3; datagrid1.valuematrix(1, 18) = sTitle2; datagrid1.valuematrix(1, 19) = sTitle1; datagrid1.valuematrix(1, 22) = sTitle3; datagrid1.valuematrix(1, 23) = sTitle2; datagrid1.valuematrix(1, 24) = sTitle1; }