/* ȯÀÚº° Åõ¼® history Á¶È¸(SMMND02100.xrw - JScript ) - Version : 1) : Ver.1.00.01 */ /** * @group : * @ver : 2007.06.20 * @by : ±èÁø¾Æ * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸é ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fDone(){ //**±×¸®µå ÃʱâÈ­**// model.removeNodeset("/root/main/pathistlist/pathistinfo"); var sCurrentDate = getCurrentDate(); // ÇöÀçÀÏÀÚ model.setValue("/root/main/condition/srchfromdd", (sCurrentDate.substr(0,4)-1)+sCurrentDate.substr(4,4)); model.setValue("/root/main/condition/srchtodd" , sCurrentDate); //**°øÅëÄÚµå °¡Á®¿À±â**// zbcfGetCodeList( new Array ( "M0133" // µµ°ü°ü¸® ºÎÀ§ , "M0134" // µµ°ü°ü¸® Á¾·ù1 , "M0135" // µµ°ü°ü¸® Á¾·ù2 , "M0136" // Ç÷¾×Åõ¼®µµ°ü Á¦°ÅÀÌÀ¯ , "M0138" // µ¿Á¤¸Æ·ç ºÎÀ§ , "M0137" // µ¿Á¤¸Æ·ç Á¾·ù , "M0139" // µ¿Á¤¸Æ·ç »ç¿ëÇ÷°ü , "M0140" // ½Ã¼úÁ¾·ù , "M0141" // ½Ã¼ú¿øÀÎ , "M0345" // Ç÷¾×Åõ¼®¾× , "M0127" // Åõ¼®±â , "M0128" // ¿ëÀû , "M0142" // Cath.Á¾·ù , "M0144" // º¹¸·Åõ¼®µµ°ü Á¦°Å»çÀ¯ , "M0145" // °¨¿°Á¾·ù , "M0146" // ¿øÀÎ±Õ , "M0147" // ¿¹ÈÄ , "M0131" // º¹¸·Åõ¼®¾× ȸ»ç¸í , "M0132" // º¹¸·Åõ¼®¾× ) , new Array ( "/root/init/M0133list" // µµ°ü°ü¸® ºÎÀ§ , "/root/init/M0134list" // µµ°ü°ü¸® Á¾·ù1 , "/root/init/M0135list" // µµ°ü°ü¸® Á¾·ù2 , "/root/init/M0136list" // Ç÷¾×Åõ¼®µµ°ü Á¦°ÅÀÌÀ¯ , "/root/init/M0138list" // µ¿Á¤¸Æ·ç ºÎÀ§ , "/root/init/M0137list" // µ¿Á¤¸Æ·ç Á¾·ù , "/root/init/M0139list" // µ¿Á¤¸Æ·ç »ç¿ëÇ÷°ü , "/root/init/M0140list" // ½Ã¼úÁ¾·ù , "/root/init/M0141list" // ½Ã¼ú¿øÀÎ , "/root/init/M0345list" // Ç÷¾×Åõ¼®¾× , "/root/init/M0127list" // Åõ¼®±â , "/root/init/M0128list" // ¿ëÀû , "/root/init/M0142list" // Cath.Á¾·ù , "/root/init/M0144list" // º¹¸·Åõ¼®µµ°ü Á¦°Å»çÀ¯ , "/root/init/M0145list" // °¨¿°Á¾·ù , "/root/init/M0146list" // ¿øÀÎ±Õ , "/root/init/M0147list" // ¿¹ÈÄ , "/root/init/M0131list" // º¹¸·Åõ¼®¾× ȸ»ç¸í , "/root/init/M0132list" // º¹¸·Åõ¼®¾× ) ); //** »ó´ÜȯÀÚ È­¸é¼³Á¤ **// var node = getGlobalVariable("paminfo"); setCSVToNode("/root/temp/paminfo", node); if(getNodesetCount("/root/temp/paminfo/list") > 0) { var sSelPid = model.getValue("/root/temp/paminfo/list/pid"); // µî·Ï¹øÈ£ model.setValue("/root/main/condition/pid", sSelPid); } if(model.getValue("/root/main/condition/pid")!=""){ fSrchPatHistList(); // ȯÀÚº° Åõ¼® History ¸®½ºÆ® Á¶È¸ } } /** * @group : * @ver : 2007.06.20 * @by : ±èÁø¾Æ * @--------------------------------------------------- * @type : function * @access : public * @desc : ȯÀÚº° Åõ¼® History ¸®½ºÆ® Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSrchPatHistList(){ if(model.getValue("/root/main/condition/pid") == "") { fClearChildNode("/root/main/condition"); var sCurrentDate = getCurrentDate(); // ÇöÀçÀÏÀÚ model.setValue("/root/main/condition/srchfromdd", (sCurrentDate.substr(0,4)-1)+sCurrentDate.substr(4,4)); model.setValue("/root/main/condition/srchtodd" , sCurrentDate); model.refresh(); messageBox("µî·Ï¹øÈ£´Â", "I003", ""); fClearChildNode("/root/main/patbaselist/patbaseinfo"); model.removeNodeset("/root/main/pathistlist"); model.refresh(); return; } // Á¶È¸±â°£ üũ if(model.getValue("/root/main/condition/srchfromdd") > model.getValue("/root/main/condition/srchtodd")) { messageBox("¿¹¾àÀÏÀÚ ±â°£ÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.", "E"); var sCurrentDate = getCurrentDate(); // ÇöÀçÀÏÀÚ model.setValue("/root/main/condition/srchfromdd", (sCurrentDate.substr(0,4)-1)+sCurrentDate.substr(4,4)); model.setValue("/root/main/condition/srchtodd" , sCurrentDate); model.refresh(); } model.removenode("/root/send"); model.makeNode ("/root/send"); model.makeValue ("/root/send/reqdata/pid ", model.getValue("/root/main/condition/pid ")); // µî·Ï¹øÈ£ model.makeValue ("/root/send/reqdata/hngnm ", model.getValue("/root/main/condition/hngnm ")); // ȯÀÚ¸í model.makeValue ("/root/send/reqdata/srchfromdd", model.getValue("/root/main/condition/srchfromdd")); // Á¶È¸±â°£(½ÃÀÛ) model.makeValue ("/root/send/reqdata/srchtodd ", model.getValue("/root/main/condition/srchtodd ")); // Á¶È¸±â°£(³¡) model.removeNodeset("/root/main/pathistlist"); model.removeNodeset("/root/main/patbaselist"); submit("TRMND02101"); // if(model.getValue("/root/main/pathistlist/pathistinfo/recdd") == ""){ // model.removeNodeset("/root/main/pathistlist"); // } // ȯÀÚ¸í ¼³Á¤ model.makeValue("/root/main/condition/hngnm", model.getValue("/root/main/patbaselist/patbaseinfo/hngnm")); // ±×¸®µåMerge¼³Á¤ for(var i=2;i 1 ) { nResult = tfexcel.activatesheet(1); tfexcel.sheetname(1) = sheetName; } else { nResult = tfexcel.activatesheet(1);//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 saveExcelAllWithNotCaption( sheetArray ) { // alert(gridCaptionArray); var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if( fileName == "" ) return; // excel application ½ÇÇàÇÔ tfexcel.launchnewinstance(0); // ½ÇÇàµÈ excel application¿¡¼­ »õ·Î¿î workbookÀ» »ý¼º tfexcel.createworkbook(); // var sheetArray = new Array("grd_bizprescondstats|¾÷¹«ÇöȲ", "grd_patprescondstats|ȯÀÚÇöȲ", "grd_hdstatsinfo|Ç÷¾×Åõ¼®ÇöȲ", "grd_pdstatsinfo|º¹¸·Åõ¼®ÇöȲ", "grd_pdbizstatsinfo|º¹¸·Åõ¼®¾÷¹«ÇöȲ"); var sheetArrayLen = sheetArray.length; var gridId; var gridObj; var sheetName; var nResult; for( var i = 0; i < sheetArrayLen; i++ ) { gridId = sheetArray[i].split("|")[0]; gridObj = document.all.item(gridId); 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; } gridObj.saveText("C:\\Temp\\tmp_TFExcel.csv", "\n", ",", '\:', true); tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel.csv"); } //workbookÀ» ÀúÀå. tfexcel.save(fileName); //excel applicationÀ» Á¾·á. excel application »ý¼º ÈÄ ¹Ýµå½Ã closeÇØ¾ßÇÔ. tfexcel.close(); // CSV File »èÁ¦ var fso = new ActiveXObject("Scripting.FileSystemObject"); fso.DeleteFile("C:\\Temp\\tmp_TFExcel.csv"); var rmsg = messageBox("ÀúÀåµÈ ExcelÀ»", "Q004"); // var rmsg = window.alert("ÀúÀåµÈ ExcelÀ» ½ÇÇàÇϽðڽÀ´Ï±î?", "¾Ë¸²", 36); if( rmsg == 6 ) window.exec("excel.exe", '\"' + fileName + '\"'); } function createTFExcel(tfExcelID, parentObj) { if( parentObj == null ) parentObj = body; var tfExcelObj = parentObj.createChild("xforms:object", "id:" + tfExcelID + "; clsid:{fe8d1001-6a9d-424d-ae2a-301493bb12da}; left:100px; top:100px; width:100px; height:100px; "); return tfExcelObj; } /************************************************************************************************************************/