/* °£È£Ã³¹æ(Áý°è) (SMMNW10300.xrw - JScript ) - Version : 1) : Ver.1.00.01 */ var comdondeptcd, stemcelldeptcd; /** * @group : * @ver : 2007.10.08 * @by : ±èÁø¾Æ * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸é Ãʱ⼳Á¤ * @param : * @return : * @--------------------------------------------------- */ function fInit(){ submit("TRMNW10301", false); cmb_wardlist.refresh(); model.setValue("root/main/cond/issdeptcd" , getUserInfo("dutplcecd") ); // ºÎ¼­¼³Á¤ (·Î±×ÀÎÇÑ °£È£»çÀÇ ¼Ò¼ÓºÎ¼­) cmb_wardlist.value=getUserInfo("dutplcecd"); model.setValue("/root/main/cond/sumfromdd" , getCurrentDate() ); // Áý°è½ÃÀÛÀÏÀÚ (ÇöÀçÀÏÀÚ) model.setValue("/root/main/cond/sumtodd" , getCurrentDate() ); // Áý°èÁ¾·áÀÏÀÚ (ÇöÀçÀÏÀÚ) model.setValue("/root/main/cond/prcpattrflag" , "3" ); // 󹿼Ӽº±¸ºÐ ("3": Àüü) model.setValue("/root/main/cond/deliveflag" , "1" ); // ºÒÃⱸºÐ ("1": Àüü) model.setValue("/root/main/cond/inputpsnflag" , "2" ); // ÀÔ·ÂÀÚ ("2": °£È£»ç) model.setValue("/root/main/cond/sumtotm" , "2359" ); // Áý°èÁ¾·á½Ã°£ model.setValue("/root/main/cond/sumfromtm" , "0000" ); // Áý°è½ÃÀ۽ð£ model.setValue("/root/main/cond/deltprcpsrchflag", "nm" ); // »ó¼¼°Ë»ö ±¸ºÐ ó¹æÄÚµå·Î ¼ÂÆÃ model.setValue("/root/main/cond/deptflag" , model.getValue("/root/init/dept["+(cmb_wardlist.focusIndex+1)+"]/deptflag")); // ºÎ¼­±¸ºÐ ipt_sumfromdd.disabled = true; // ´çÀÏÀÎ °æ¿ì ³¯Â¥¼öÁ¤ ºÒ°¡(Default ´çÀÏ) ipt_sumtodd.disabled = true; //* ±×¸®µå ÃʱâÈ­ *// model.removeNodeset("/root/main/sumprcplist"); // ó¹æº° Áý°èÇöȲ model.removeNodeset("/root/main/sumpatlist" ); // ȯÀÚº° Áý°èÇöȲ // °£È£ÇϵåÄÚµù Å×À̺í Á¶È¸_20090416(ByJA) var pCode = "'050', '051'"; // Á¶È¸ÇÒ CdGrupID ÄÚµåÁ¤º¸ var pDate = getCurrentDate(); // Á¶È¸±âÁØÀÏÀÚ fGetNursHardCdInfo(pCode, pDate); for(var i=1; i<=getNodesetCount("/root/code/codeinfo/codelist"); i++){ switch (model.getValue("/root/code/codeinfo/codelist["+i+"]/cdgrupid")){ case "050": // ¼ººÐÇåÇ÷½Ç comdondeptcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid"); break; case "051": // Á¶Ç÷¸ð¼¼Æ÷ stemcelldeptcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid"); break; } } model.refresh(); } /** * @group : * @ver : 2007.10.09 * @by : ±èÁø¾Æ * @--------------------------------------------------- * @type : function * @access : public * @desc : ó¹æº° Áý°èÇöȲÁ¶È¸ * @param : sFlag "Delt" - »ó¼¼Ã³¹æ¸íÀ» ÀÌ¿ëÇÑ °Ë»ö "HOME" - °¡Á¤°£È£ °£È£Ã³¹æ Áý°è * @return : * @--------------------------------------------------- */ function fSrchSumPrcpInfo(sFlag){ // Á¶È¸Á¶°Ç üũ var issdeptcd = model.getValue("/root/main/cond/issdeptcd"); // ºÎ¼­ var sumfromdd = model.getValue("/root/main/cond/sumfromdd"); // Áý°è½ÃÀÛÀÏÀÚ var sumtodd = model.getValue("/root/main/cond/sumtodd"); // Áý°èÁ¾·áÀÏÀÚ if(cmb_wardlist.label==""){ messageBox("ºÎ¼­°¡ ¼±ÅõÇÁö ","E007", "ÇØ´çºÎ¼­¸¦ ¼±Åà ÈÄ ´Ù½Ã Á¶È¸ÇϽʽÿÀ."); model.setFocus("cmb_wardlist"); return; } if(sumfromdd.length < 8){ messageBox("Áý°èÀϽà °ªÀÌ À¯È¿ÇÏÁö ¾Ê¾Æ Á¶È¸·ê ¼öÇà ","E001", "È®ÀÎ ÈÄ ´Ù½Ã Á¶È¸ÇϽʽÿÀ."); model.makeValue("/root/main/cond/sumfromdd" , ""); ipt_sumfromdd.refresh(); model.setFocus("ipt_sumfromdd"); return; } if(sumtodd.length < 8){ messageBox("Áý°èÀϽà °ªÀÌ À¯È¿ÇÏÁö ¾Ê¾Æ Á¶È¸·ê ¼öÇà ","E001", "È®ÀÎ ÈÄ ´Ù½Ã Á¶È¸ÇϽʽÿÀ."); model.makeValue("/root/main/cond/sumtodd" , ""); ipt_sumtodd.refresh(); model.setFocus("ipt_sumtodd"); return; } if(sumfromdd > sumtodd){ messageBox("Áý°èÀϽà ±â°£ÀÌ ¿Ã¹Ù¸£Áö ¾Ê¾Æ Á¶È¸·ê ¼öÇà ","E001", "È®ÀÎ ÈÄ ´Ù½Ã Á¶È¸ÇϽʽÿÀ."); model.makeValue("/root/main/cond/sumfromdd" , getCurrentDate()); // Áý°è½ÃÀÛÀÏÀÚ (ÇöÀçÀÏÀÚ) model.makeValue("/root/main/cond/sumtodd" , getCurrentDate()); // Áý°èÁ¾·áÀÏÀÚ (ÇöÀçÀÏÀÚ) ipt_sumfromdd.refresh(); ipt_sumtodd.refresh(); model.setFocus("ipt_sumfromdd"); return; } if(sFlag == "Delt"){ if(model.getValue("/root/main/cond/deltprcpsrchflag")==""){ messageBox("»ó¼¼Á¶È¸ 󹿱¸ºÐÀÌ ¼±ÅõÇÁö","E007", "ó¹æÄÚµå ¶Ç´Â Ã³¹æ¸íÀ» ¼±Åà ÈÄ ´Ù½Ã °Ë»öÇϽʽÿÀ."); model.setFocus("rdo_deltprcpsrchflag"); return; } if(model.getValue("/root/main/cond/deltprcpinfo")==""){ messageBox("»ó¼¼Á¶È¸ ÅØ½ºÆ®°¡ ÀԷµÇÁö","E007", "»ó¼¼Á¶È¸ ÅØ½ºÆ®¸¦ ÀÔ·Â ÈÄ ´Ù½Ã °Ë»öÇϽʽÿÀ."); model.setFocus("ipt_deltprcpinfo"); return; } } fSrchInit(); // ÃʱâÈ­ if(sFlag != "Delt"){ model.setValue("/root/main/cond/deltprcpinfo", ""); } model.removenode("/root/send"); model.makeNode("/root/send/reqdata"); model.makeValue("/root/send/reqdata/issdeptcd" , model.getValue("/root/main/cond/issdeptcd") ); // ºÎ¼­Á¤º¸ model.makeValue("/root/send/reqdata/sumfromdt" , model.getValue("/root/main/cond/sumfromdd") ); // Áý°è½ÃÀÛÀϽà model.makeValue("/root/send/reqdata/sumtodt" , model.getValue("/root/main/cond/sumtodd") ); // Áý°èÁ¾·áÀϽà model.makeValue("/root/send/reqdata/prcpattrflag", model.getValue("/root/main/cond/prcpattrflag")); // 󹿼Ӽº±¸ºÐ model.makeValue("/root/send/reqdata/deliveflag" , model.getValue("/root/main/cond/deliveflag") ); // ºÒÃⱸºÐ model.makeValue("/root/send/reqdata/inputpsnflag", model.getValue("/root/main/cond/inputpsnflag")); // ÀÔ·ÂÀÚ±¸ºÐ model.makeValue("/root/send/reqdata/deptflag" , model.getValue("/root/main/cond/deptflag") ); // ºÎ¼­±¸ºÐ model.makeValue("/root/send/reqdata/deptelmnyn" , model.getValue("/root/main/cond/deptelmnyn") ); // ¿ì¸®ºÎ¼­¿¡¼­ ¹ßÇàÇÑ Ã³¹æÁ¦¿Ü¿©ºÎ // °£È£ÇϵåÄÚµùÀÛ¾÷_20090416(ByJA) if(model.getValue("/root/main/cond/issdeptcd") == comdondeptcd){ // ¼ººÐÇåÇ÷½Ç model.makeValue("/root/send/reqdata/deptflag", "comdon"); }else if(model.getValue("/root/main/cond/issdeptcd") == stemcelldeptcd){ // Á¶Ç÷¸ð¼¼Æ÷ model.makeValue("/root/send/reqdata/deptflag", "stemcell"); }else{ model.makeValue("/root/send/reqdata/deptflag", model.getValue("/root/main/cond/deptflag")); } // »ó¼¼°Ë»ö ½Ã if(sFlag == "Delt"){ model.makeValue("/root/send/reqdata/deltprcpsrchflag", model.getValue("/root/main/cond/deltprcpsrchflag")); // »ó¼¼Ã³¹æÁ¶È¸ ±¸ºÐ model.makeValue("/root/send/reqdata/deltprcpinfo", model.getValue("/root/main/cond/deltprcpinfo")); // »ó¼¼Ã³¹æÄÚµå/󹿏í } // °¡Á¤°£È£ °£È£Ã³¹æ Áý°è ½Ã_20090109 model.makeValue("/root/send/reqdata/unitflag", sFlag); // ¾÷¹«±¸ºÐ submit("TRMNW10302"); grd_sumprcpinfo.allStyle("all", "color") = "black"; // ±ÛÀÚ ÃʱâÈ­(°ËÁ¤, º¸Åë±½±â) grd_sumprcpinfo.allStyle("all", "font-weight") = "normal"; for(var i=0; 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 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; } /************************************************************************************************************************/