/*************************************************************************************************************************************************** * create : 2009.01.14 * author : dhkim * desc : Ư¼öÁÖ»ç½Ç ÅëÇÕÅë°è * ***************************************************************************************************************************************************/ /* * create : 20090114 * author : dhkim * desc : ÃʱâÈ­ */ function fInit(){ //model.removenode('/root/cond'); model.makeValue('/root/cond/yyyy', getCurrentDate().substring(0, 4)); //default Ç×¾ÏÄ¡·á½Ã°£Åë°è model.makeValue('/root/cond/swflag', '1'); model.toggle("case1"); model.setValue(ipt_fromdd.attribute("ref"), getCurrentDate()); model.setValue(ipt_todd.attribute("ref"), getCurrentDate()); model.setValue(ipt_srchfromdd.attribute("ref"), getCurrentDate()); model.setValue(ipt_srchtodd.attribute("ref"), getCurrentDate()); ipt_stddd.refresh(); ipt_fromdd.refresh(); ipt_todd.refresh(); ipt_srchfromdd.refresh(); ipt_srchtodd.refresh(); fSearch(); } /* * create : 20090114 * author : dhkim * desc : Ç×¾ÏÄ¡·á½Ã°£Åë°è Á¶È¸ */ function fSearchChemoTime(){ var yyyy = model.getValue('/root/cond/yyyy'); if(yyyy == null || yyyy == ''){ yyyy = getCurrentDate().substring(0, 4); model.setValue('/root/cond/yyyy', yyyy); model.refresh(); } model.removenode('/root/main/chemotimeinfo'); model.makenode('/root/main/chemotimeinfo'); model.removenode('/root/send'); model.makeValue('/root/send/yyyy', yyyy); model.refresh(); if(!submit('TRSNW00301')){ messageBox('Ç×¾ÏÄ¡·á ½Ã°£ Åë°è Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.', 'E999'); } } /* * create : 20090114 * author : dhkim * desc : ÀÓ»ó°úº°Åë°è Á¶È¸ */ function fSearchDeptGrp(){ var yyyy = model.getValue('/root/cond/yyyy'); if(yyyy == null || yyyy == ''){ yyyy = getCurrentDate().substring(0, 4); model.setValue('/root/cond/yyyy', yyyy); model.refresh(); } model.removenode('/root/main/deptgrpinfo'); model.makenode('/root/main/deptgrpinfo'); model.removenode('/root/send'); model.makeValue('/root/send/yyyy', yyyy); model.refresh(); if(!submit('TRSNW00302')){ messageBox('ÀÓ»ó°úº° ÀÌ¿ë Åë°è Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.', 'E999'); } } /* * create : 20090114 * author : dhkim * desc : ¿äÀϺ°Åë°è Á¶È¸ */ function fSearchDayGrp(){ var yyyy = model.getValue('/root/cond/yyyy'); if(yyyy == null || yyyy == ''){ yyyy = getCurrentDate().substring(0, 4); model.setValue('/root/cond/yyyy', yyyy); model.refresh(); } model.removenode('/root/main/daygrpinfo'); model.makenode('/root/main/daygrpinfo'); model.removenode('/root/send'); model.makeValue('/root/send/yyyy', yyyy); model.refresh(); if(!submit('TRSNW00303')){ messageBox('¿äÀϺ° Åë°è Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.', 'E999'); } } /* * create : 20090115 * author : dhkim * desc : Á¶È¸Á¶°Ç ÀÛ³âÀ¸·Î À̵¿ */ function fMovePreYear(){ var yyyy = model.getValue('/root/cond/yyyy'); if(yyyy == null || yyyy == ''){ yyyy = getCurrentDate().substring(0, 4); model.setValue('/root/cond/yyyy', yyyy); model.refresh(); } yyyy = parseInt(yyyy) - 1; model.setValue('/root/cond/yyyy', yyyy); model.refresh(); fSearch(); } /* * create : 20090115 * author : dhkim * desc : Á¶È¸Á¶°Ç ³»³âÀ¸·Î À̵¿ */ function fMoveNextYear(){ var yyyy = model.getValue('/root/cond/yyyy'); if(yyyy == null || yyyy == ''){ yyyy = getCurrentDate().substring(0, 4); model.setValue('/root/cond/yyyy', yyyy); model.refresh(); } yyyy = parseInt(yyyy) + 1; model.setValue('/root/cond/yyyy', yyyy); model.refresh(); fSearch(); } /* * create : 20090115 * author : dhkim * desc : ÅǺ° Á¶È¸ */ function fSearch(){ fSearchChemoTime(); fSearchDeptGrp(); fSearchDayGrp(); fSearchDayPatCnt(); fSearchOpRatioInfo(); //var swflag = model.getValue('/root/cond/swflag'); //if(swflag == '1'){ // fSearchChemoTime(); //}else if(swflag == '2'){ // fSearchDeptGrp(); //}else if(swflag == '3'){ // fSearchDayGrp(); //} } function fSearchDayPatCnt() { model.copyNode("/root/send", "/root/cond"); submit("TRSNW00304"); } function fSearchOpRatioInfo() { model.makeNode("/root/send/reqdata"); model.copyNode("/root/send/reqdata", "/root/cond"); submit("TRSNW00305"); } /** * @group : * @ver : * @by : ±è±â¿ë * @--------------------------------------------------- * @type : function * @access : public * @desc : ±×¸®µå º° ¿¢¼¿ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function saveExcelAll(){ var paramLen = saveExcelAll.arguments.length; // ¸¶Áö¸· ÀÎÀÚ°¡ BooleanÀÏ °æ¿ì ó¸® var extendsCaptionBool; if( typeof(saveExcelAll.arguments[paramLen - 1]) == "boolean" ) { extendsCaptionBool = saveExcelAll.arguments[paramLen - 1]; paramLen = paramLen - 1; } else{ extendsCaptionBool = false; } var tmpParamArray = new Array(); if( extendsCaptionBool ) { for( var i = 0; i < paramLen; i++ ) { tmpParamArray[i] = saveExcelAll.arguments[i]; } saveExcelAllWithCaption(tmpParamArray); } else{ for( var i = 0; i < paramLen; i++ ) { tmpParamArray[i] = saveExcelAll.arguments[i]; } saveExcelAllWithNotCaption(tmpParamArray); } } function saveExcelAllWithCaption( sheetArray ) { // alert(gridCaptionArray); var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if( fileName == "" ) return; // var sheetArray = new Array("grd_bizprescondstats|¾÷¹«ÇöȲ", "grd_patprescondstats|ȯÀÚÇöȲ", "grd_hdstatsinfo|Ç÷¾×Åõ¼®ÇöȲ", "grd_pdstatsinfo|º¹¸·Åõ¼®ÇöȲ", "grd_pdbizstatsinfo|º¹¸·Åõ¼®¾÷¹«ÇöȲ"); var sheetArrayLen = sheetArray.length; var gridId; var gridObj; for( var i = 0; i < sheetArray.length; i++ ) { gridId = sheetArray[i].split("|")[0]; gridObj = document.all.item(gridId); // saveText() ÇÔ¼ö´Â CaptionÀúÀåÀÌ ºÒ°¡´É ÇÏ¿© SaveExcel()À» ÀÌ¿ëÇÑ´Ù. gridObj.saveExcel("C:\\Temp\\tmp_TFExcel_" + i +".xls"); } // excel application ½ÇÇàÇÔ tfexcel.launchnewinstance(0); //½ÇÇàµÈ excel application¿¡¼­ »õ·Î¿î workbookÀ» »ý¼º tfexcel.createworkbook(); tfexcel.activatesheet(1); var sheetName; var nResult; for( var i = 0; i < sheetArrayLen; i++ ) { sheetName = sheetArray[i].split("|")[1]; if( i > 1 ) { nResult = tfexcel.activatesheet(i+1); tfexcel.sheetname(i+1) = sheetName; } else { nResult = tfexcel.addsheet(i+1, sheetName); } if( nResult < 0 ) { messageBox(sheetName + " ÀúÀåÀ»", "E009"); // alert(sheetName + " ¿À·ù¹ß»ý"); return; } tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel_" + i + ".xls"); } // tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel.xls"); //workbookÀ» ÀúÀå. tfexcel.save(fileName); //excel applicationÀ» Á¾·á. excel application »ý¼º ÈÄ ¹Ýµå½Ã closeÇØ¾ßÇÔ. tfexcel.close(); var fso = new ActiveXObject("Scripting.FileSystemObject"); for( var i = 0; i < sheetArrayLen; i++ ) { fso.DeleteFile("C:\\Temp\\tmp_TFExcel_" + i + ".xls"); } var rmsg = messageBox("ÀúÀåµÈ ExcelÀ»", "Q004"); // var rmsg = window.alert("ÀúÀåµÈ ExcelÀ» ½ÇÇàÇϽðڽÀ´Ï±î?", "¾Ë¸²", 36); if( rmsg == 6 ) window.exec("excel.exe", '\"' + fileName + '\"'); } function fShowCntrl() { var swflag = model.getValue("/root/cond/swflag"); if(swflag == "4") { group3.visible = true; group1.visible = false; group4.visible = false; } else if(swflag == "5") { group3.visible = false; group1.visible = false; group4.visible = true; } else { group3.visible = false; group1.visible = true; group4.visible = false; } } function fShowCtrl2() { var val = rdo_srchflag.value; if(val == "1") { ipt_srchfromdd.visible = true; ipt_srchtodd.visible = true; cap_bar.visible = true; ipt_srchmm.visible = false; ipt_srchyy.visible = false; } else if(val == "2") { ipt_srchfromdd.visible = false; ipt_srchtodd.visible = false; ipt_srchmm.visible = true; ipt_srchyy.visible = false; cap_bar.visible = false; } else if(val == "3") { ipt_srchfromdd.visible = false; ipt_srchtodd.visible = false; ipt_srchmm.visible = false; ipt_srchyy.visible = true; cap_bar.visible = false; } }