123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[
- // header파일 중 SMMND02000.js 파일 시작
- /*
- HD 업무현황 (SMMND02000.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- //**전역변수**//
- /**
- * _group :
- * _ver : 2007.07.11
- * _by : 김진아
- * _---------------------------------------------------
- * _type : function
- * _access : public
- * _desc : 화면 초기화
- * _param :
- * _return :
- * _---------------------------------------------------
- */
- function fDone(){
- var currentDate = utlf_getCurrentDate(); // 현재일자
- var sCurrentDate = new Date();
- ds_main_condition.setColumn( 0, "srchtodd" , currentDate); // 현재일자
- ds_main_condition.setColumn( 0, "srchfromdd", (sCurrentDate.getAddDate(-1, "M")).getDateFormat()); // 한 달 이전 일자
- //model.refresh();
- fSrchBizPresCond(); // 업무현황 조회
- }
- /**
- * _group :
- * _ver : 2007.08.13
- * _by : 김진아
- * _---------------------------------------------------
- * _type : function
- * _access : public
- * _desc : 업무현황 조회
- * _param :
- * _return :
- * _---------------------------------------------------
- */
- function fSrchBizPresCond(){
- var TmpPath = ds_tmp_tmpbizprescondlist_tmpbizprescondinfo; // (Tmp)
- var bizPresCondPath = ds_main_bizprescondstatslist_bizprescondstatsinfo; // 업무현황통계
- var patPresCondHDPath_1 = ds_main_patprescondstatslist_patprescondstatsinfo; //[1]"; // 환자현황통계 (HD)
- var patPresCondPDPath_2 = ds_main_patprescondstatslist_patprescondstatsinfo; //[2]"; // 환자현황통계 (PD)
- var patPresCondSumPath_3 = ds_main_patprescondstatslist_patprescondstatsinfo; //[3]"; // 환자현황통계 (Total)
- var HDStatsPath = ds_main_hdstatslist_hdstatsinfo; // 혈액투석 현황통계
- var PDStatsPath = ds_main_pdstatslist_pdstatsinfo; // 복막투석 현황통계
- var PDBizStatsPath = ds_main_pdbizstatslist_pdbizstatsinfo; // 복막투석업무 현황통계
- ds_send_reqdata.clearData();
- dsf_makeValue( ds_send_reqdata, "srchfromdd", "string", ds_main_condition.getColumn(0, "srchfromdd"));
- dsf_makeValue( ds_send_reqdata, "srchtodd", "string", ds_main_condition.getColumn(0, "srchtodd") );
- ds_tmp_tmpbizprescondlist.clearData();
- //submit("TRMND02001");
- var oParam = {};
- oParam.id = "TRMND02001";
- oParam.service = "dialapp.DialSpcl";
- oParam.method = "reqGetBizPresCondInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_tmp_tmpbizprescondlist_tmpbizprescondinfo=bizprescondinfo";
- oParam.async = false;
- tranf_submit(oParam);
- //** 조회된 값 설정 **//
- //* 업무 현황통계 *//
- // 입원
- i = 0;
- bizPresCondPath.setColumn(i, "hdbizprescnt" , TmpPath.getColumn(0, "hdinbizprescnt"));
- bizPresCondPath.setColumn(i, "pdbizprescnt" , TmpPath.getColumn(0, "pdinbizprescnt"));
- bizPresCondPath.setColumn(i, "hpbizprescnt" , TmpPath.getColumn(0, "hpinbizprescnt"));
- bizPresCondPath.setColumn(i, "hdfbizprescnt" , TmpPath.getColumn(0, "hdfinbizprescnt"));
- //2011.07.28 by kya SLED 항목추가
- bizPresCondPath.setColumn(i, "sledbizprescnt" , TmpPath.getColumn(0, "sledinbizprescnt"));
- //2012.02.13 by kya CRRT 항목추가
- bizPresCondPath.setColumn(i, "crrtbizprescnt" , TmpPath.getColumn(0, "crrtinbizprescnt"));
- bizPresCondPath.setColumn(i, "totalbizprescnt", TmpPath.getColumn(0, "totalinbizprescnt"));
- // 중환자실
- i = 1;
- bizPresCondPath.setColumn(i, "hdbizprescnt" , TmpPath.getColumn(0, "hdicubizprescnt"));
- bizPresCondPath.setColumn(i, "pdbizprescnt" , TmpPath.getColumn(0, "pdicubizprescnt"));
- bizPresCondPath.setColumn(i, "hpbizprescnt" , TmpPath.getColumn(0, "hpicubizprescnt"));
- bizPresCondPath.setColumn(i, "hdfbizprescnt" , TmpPath.getColumn(0, "hdficubizprescnt"));
- //2011.07.28 by kya SLED 항목추가
- bizPresCondPath.setColumn(i, "sledbizprescnt" , TmpPath.getColumn(0, "sledicubizprescnt"));
- //2012.02.13 by kya CRRT 항목추가
- bizPresCondPath.setColumn(i, "crrtbizprescnt" , TmpPath.getColumn(0, "crrticubizprescnt"));
- bizPresCondPath.setColumn(i, "totalbizprescnt", TmpPath.getColumn(0, "totalicubizprescnt"));
- // 외래
- i = 2;
- bizPresCondPath.setColumn(i, "hdbizprescnt" , TmpPath.getColumn(0, "hdoutbizprescnt"));
- bizPresCondPath.setColumn(i, "pdbizprescnt" , TmpPath.getColumn(0, "pdoutbizprescnt"));
- bizPresCondPath.setColumn(i, "hpbizprescnt" , TmpPath.getColumn(0, "hpoutbizprescnt"));
- bizPresCondPath.setColumn(i, "hdfbizprescnt" , TmpPath.getColumn(0, "hdfoutbizprescnt"));
- //2011.07.28 by kya SLED 항목추가
- bizPresCondPath.setColumn(i, "sledbizprescnt" , TmpPath.getColumn(0, "sledoutbizprescnt"));
- //2012.02.13 by kya CRRT 항목추가
- bizPresCondPath.setColumn(i, "crrtbizprescnt" , TmpPath.getColumn(0, "crrtoutbizprescnt"));
- bizPresCondPath.setColumn(i, "totalbizprescnt", TmpPath.getColumn(0, "totaloutbizprescnt"));
- // 응급실
- i = 3;
- bizPresCondPath.setColumn(i, "hdbizprescnt" , TmpPath.getColumn(0, "hderbizprescnt"));
- bizPresCondPath.setColumn(i, "pdbizprescnt" , TmpPath.getColumn(0, "pderbizprescnt"));
- bizPresCondPath.setColumn(i, "hpbizprescnt" , TmpPath.getColumn(0, "hperbizprescnt"));
- bizPresCondPath.setColumn(i, "hdfbizprescnt" , TmpPath.getColumn(0, "hdferbizprescnt"));
- //2011.07.28 by kya SLED 항목추가
- bizPresCondPath.setColumn(i, "sledbizprescnt" , TmpPath.getColumn(0, "slederbizprescnt"));
- //2012.02.13 by kya CRRT 항목추가
- bizPresCondPath.setColumn(i, "crrtbizprescnt" , TmpPath.getColumn(0, "crrterbizprescnt"));
- bizPresCondPath.setColumn(i, "totalbizprescnt", TmpPath.getColumn(0, "totalerbizprescnt"));
- // Total
- i = 4;
- bizPresCondPath.setColumn(i, "hdbizprescnt" , parseInt(TmpPath.getColumn(0, "hdinbizprescnt" ))
- + parseInt(TmpPath.getColumn(0, "hdicubizprescnt"))
- + parseInt(TmpPath.getColumn(0, "hdoutbizprescnt"))
- + parseInt(TmpPath.getColumn(0, "hderbizprescnt" )));
- bizPresCondPath.setColumn(i, "pdbizprescnt" , parseInt(TmpPath.getColumn(0, "pdinbizprescnt" ))
- + parseInt(TmpPath.getColumn(0, "pdicubizprescnt"))
- + parseInt(TmpPath.getColumn(0, "pdoutbizprescnt"))
- + parseInt(TmpPath.getColumn(0, "pderbizprescnt" )));
- bizPresCondPath.setColumn(i, "hpbizprescnt" , parseInt(TmpPath.getColumn(0, "hpinbizprescnt" ))
- + parseInt(TmpPath.getColumn(0, "hpicubizprescnt"))
- + parseInt(TmpPath.getColumn(0, "hpoutbizprescnt"))
- + parseInt(TmpPath.getColumn(0, "hperbizprescnt" )));
- bizPresCondPath.setColumn(i, "hdfbizprescnt" , parseInt(TmpPath.getColumn(0, "hdfinbizprescnt" ))
- + parseInt(TmpPath.getColumn(0, "hdficubizprescnt"))
- + parseInt(TmpPath.getColumn(0, "hdfoutbizprescnt"))
- + parseInt(TmpPath.getColumn(0, "hdferbizprescnt" )));
- //추가 2011.07.28 by kya
- bizPresCondPath.setColumn(i, "sledbizprescnt" , parseInt(TmpPath.getColumn(0, "sledinbizprescnt" ))
- + parseInt(TmpPath.getColumn(0, "sledicubizprescnt"))
- + parseInt(TmpPath.getColumn(0, "sledoutbizprescnt"))
- + parseInt(TmpPath.getColumn(0, "slederbizprescnt" )));
- //추가 2012.02.13 by kya
- bizPresCondPath.setColumn(i, "crrtbizprescnt" , parseInt(TmpPath.getColumn(0, "crrtinbizprescnt" ))
- + parseInt(TmpPath.getColumn(0, "crrticubizprescnt"))
- + parseInt(TmpPath.getColumn(0, "crrtoutbizprescnt"))
- + parseInt(TmpPath.getColumn(0, "crrterbizprescnt" )));
- bizPresCondPath.setColumn(i, "totalbizprescnt", parseInt(TmpPath.getColumn(0, "totalinbizprescnt" ))
- + parseInt(TmpPath.getColumn(0, "totalicubizprescnt"))
- + parseInt(TmpPath.getColumn(0, "totaloutbizprescnt"))
- + parseInt(TmpPath.getColumn(0, "totalerbizprescnt" )));
- //* 환자현황통계 *//
- // 신환 수
- patPresCondHDPath_1.setColumn( 0, "fnexamcnt", TmpPath.getColumn(0, "hdfnexamcnt"));
- patPresCondPDPath_2.setColumn( 1, "fnexamcnt", TmpPath.getColumn(0, "pdfnexamcnt"));
- patPresCondSumPath_3.setColumn( 2, "fnexamcnt", TmpPath.getColumn(0, "totalfnexamcnt"));
- // 상담건수
- patPresCondHDPath_1.setColumn( 0, "cnstcnt", TmpPath.getColumn(0, "hdcnstcnt"));
- patPresCondPDPath_2.setColumn( 1, "cnstcnt", TmpPath.getColumn(0, "pdcnstcnt"));
- patPresCondSumPath_3.setColumn( 2, "cnstcnt", TmpPath.getColumn(0, "totalcnstcnt"));
- // 처방교육건수
- patPresCondHDPath_1.setColumn( 0, "prcpeduccnt", TmpPath.getColumn(0, "hdprcpeduccnt"));
- patPresCondPDPath_2.setColumn( 1, "prcpeduccnt", TmpPath.getColumn(0, "pdprcpeduccnt"));
- patPresCondSumPath_3.setColumn( 2, "prcpeduccnt", TmpPath.getColumn(0, "totalprcpeduccnt"));
- // 기록교육건수
- patPresCondHDPath_1.setColumn( 0, "receduccnt", TmpPath.getColumn(0, "hdreceduccnt"));
- patPresCondPDPath_2.setColumn( 1, "receduccnt", TmpPath.getColumn(0, "pdreceduccnt"));
- patPresCondSumPath_3.setColumn( 2, "receduccnt", TmpPath.getColumn(0, "totalreceduccnt"));
- // 원인별 ARF건수
- patPresCondHDPath_1.setColumn( 0, "causecnt1", TmpPath.getColumn(0, "hdcausecnt1"));
- patPresCondPDPath_2.setColumn( 1, "causecnt1", TmpPath.getColumn(0, "pdcausecnt1"));
- patPresCondSumPath_3.setColumn( 2, "causecnt1", TmpPath.getColumn(0, "totalcausecnt1"));
- // 원인별 CRF건수
- patPresCondHDPath_1.setColumn( 0, "causecnt2", TmpPath.getColumn(0, "hdcausecnt2"));
- patPresCondPDPath_2.setColumn( 1, "causecnt2", TmpPath.getColumn(0, "pdcausecnt2"));
- patPresCondSumPath_3.setColumn( 2, "causecnt2", TmpPath.getColumn(0, "totalcausecnt2"));
- // 보험
- patPresCondHDPath_1.setColumn( 0, "healinsucnt", TmpPath.getColumn(0, "hdhealinsucnt"));
- patPresCondPDPath_2.setColumn( 1, "healinsucnt", TmpPath.getColumn(0, "pdhealinsucnt"));
- patPresCondSumPath_3.setColumn( 2, "healinsucnt", TmpPath.getColumn(0, "totalhealinsucnt"));
- // 보호 1종
- patPresCondHDPath_1.setColumn( 0, "proc1kindinsucnt", TmpPath.getColumn(0, "hdproc1kindinsucnt"));
- patPresCondPDPath_2.setColumn( 1, "proc1kindinsucnt", TmpPath.getColumn(0, "pdproc1kindinsucnt"));
- patPresCondSumPath_3.setColumn( 2, "proc1kindinsucnt", TmpPath.getColumn(0, "totalproc1kindinsucnt"));
- // 보호 2종
- patPresCondHDPath_1.setColumn( 0, "proc2kindinsucnt", TmpPath.getColumn(0, "hdproc2kindinsucnt"));
- patPresCondPDPath_2.setColumn( 1, "proc2kindinsucnt", TmpPath.getColumn(0, "pdproc2kindinsucnt"));
- patPresCondSumPath_3.setColumn( 2, "proc2kindinsucnt", TmpPath.getColumn(0, "totalproc2kindinsucnt"));
- // 산재
- patPresCondHDPath_1.setColumn( 0, "inducsinsucnt", TmpPath.getColumn(0, "hdinducsinsucnt"));
- patPresCondPDPath_2.setColumn( 1, "inducsinsucnt", TmpPath.getColumn(0, "pdinducsinsucnt"));
- patPresCondSumPath_3.setColumn( 2, "inducsinsucnt", TmpPath.getColumn(0, "totalinducsinsucnt"));
- // 기타
- patPresCondHDPath_1.setColumn( 0, "etcinsucnt", TmpPath.getColumn(0, "hdetcinsucnt"));
- patPresCondPDPath_2.setColumn( 1, "etcinsucnt", TmpPath.getColumn(0, "pdetcinsucnt"));
- patPresCondSumPath_3.setColumn( 2, "etcinsucnt", TmpPath.getColumn(0, "totaletcinsucnt"));
- // 전원
- patPresCondHDPath_1.setColumn( 0, "chnghospcnt", TmpPath.getColumn(0, "hdchnghospcnt"));
- patPresCondPDPath_2.setColumn( 1, "chnghospcnt", TmpPath.getColumn(0, "pdchnghospcnt"));
- patPresCondSumPath_3.setColumn( 2, "chnghospcnt", TmpPath.getColumn(0, "totalchnghospcnt"));
- // 사망
- patPresCondHDPath_1.setColumn( 0, "dethcnt", TmpPath.getColumn(0, "hddethcnt"));
- patPresCondPDPath_2.setColumn( 1, "dethcnt", TmpPath.getColumn(0, "pddethcnt"));
- patPresCondSumPath_3.setColumn( 2, "dethcnt", TmpPath.getColumn(0, "totaldethcnt"));
- // 신장이식
- patPresCondHDPath_1.setColumn( 0, "bdhttrnptcnt", TmpPath.getColumn(0, "hdbdhttrnptcnt"));
- patPresCondPDPath_2.setColumn( 1, "bdhttrnptcnt", TmpPath.getColumn(0, "pdbdhttrnptcnt"));
- patPresCondSumPath_3.setColumn( 2, "bdhttrnptcnt", TmpPath.getColumn(0, "totalbdhttrnptcnt"));
- // 전환
- patPresCondHDPath_1.setColumn( 0, "cvrtcnt", TmpPath.getColumn(0, "hdcvrtcnt"));
- patPresCondPDPath_2.setColumn( 1, "cvrtcnt", TmpPath.getColumn(0, "pdcvrtcnt"));
- patPresCondSumPath_3.setColumn( 2, "cvrtcnt", TmpPath.getColumn(0, "totalcvrtcnt"));
- //* 종류별 현황통계 *//
- // 혈액투석
- HDStatsPath.setColumn( 0, "patcnt", TmpPath.getColumn(0, "hdavfcount" ));
- HDStatsPath.setColumn( 1, "patcnt", TmpPath.getColumn(0, "hdavgcount" ));
- HDStatsPath.setColumn( 2, "patcnt", TmpPath.getColumn(0, "hdpermccount" ));
- HDStatsPath.setColumn( 3, "patcnt", TmpPath.getColumn(0, "hdjvccount" ));
- HDStatsPath.setColumn( 4, "patcnt", TmpPath.getColumn(0, "hdfvccount" ));
- HDStatsPath.setColumn( 5, "patcnt", TmpPath.getColumn(0, "hdsvccount" ));
- HDStatsPath.setColumn( 6, "patcnt", TmpPath.getColumn(0, "hdetccount" ));
- HDStatsPath.setColumn( 7, "patcnt", parseInt(TmpPath.getColumn(0, "hdavfcount" ))
- + parseInt(TmpPath.getColumn(0, "hdavgcount" ))
- + parseInt(TmpPath.getColumn(0, "hdpermccount"))
- + parseInt(TmpPath.getColumn(0, "hdjvccount" ))
- + parseInt(TmpPath.getColumn(0, "hdfvccount" ))
- + parseInt(TmpPath.getColumn(0, "hdsvccount" ))
- + parseInt(TmpPath.getColumn(0, "hdetccount" )));
- // 복막투석
- PDStatsPath.setColumn( 0, "patcnt", TmpPath.getColumn(0, "pdcapdcount" ));
- PDStatsPath.setColumn( 1, "patcnt", TmpPath.getColumn(0, "pdapdcount" ));
- PDStatsPath.setColumn( 2, "patcnt", TmpPath.getColumn(0, "pdipdcount" ));
- PDStatsPath.setColumn( 3, "patcnt", TmpPath.getColumn(0, "pdnpdcount" ));
- PDStatsPath.setColumn( 4, "patcnt", TmpPath.getColumn(0, "pdccpdcount" ));
- PDStatsPath.setColumn( 5, "patcnt", parseInt(TmpPath.getColumn(0, "pdcapdcount"))
- + parseInt(TmpPath.getColumn(0, "pdapdcount"))
- + parseInt(TmpPath.getColumn(0, "pdipdcount"))
- + parseInt(TmpPath.getColumn(0, "pdnpdcount"))
- + parseInt(TmpPath.getColumn(0, "pdccpdcount")));
- // 복막투석업무
- PDBizStatsPath.setColumn( 0, "cnt", TmpPath.getColumn(0, "catefixcount" ));
- PDBizStatsPath.setColumn( 1, "cnt", TmpPath.getColumn(0, "dinfcount" ));
- PDBizStatsPath.setColumn( 2, "cnt", TmpPath.getColumn(0, "pipecount" ));
- PDBizStatsPath.setColumn( 3, "cnt", TmpPath.getColumn(0, "edemacnfmcount" ));
- PDBizStatsPath.setColumn( 4, "cnt", TmpPath.getColumn(0, "tsetexchcount" ));
- PDBizStatsPath.setColumn( 5, "cnt", TmpPath.getColumn(0, "dialblodcount" ));
- PDBizStatsPath.setColumn( 6, "cnt", parseInt(TmpPath.getColumn(0, "catefixcount" ))
- + parseInt(TmpPath.getColumn(0, "dinfcount" ))
- + parseInt(TmpPath.getColumn(0, "pipecount" ))
- + parseInt(TmpPath.getColumn(0, "edemacnfmcount"))
- + parseInt(TmpPath.getColumn(0, "tsetexchcount" ))
- + parseInt(TmpPath.getColumn(0, "dialblodcount" )));
- }
- /************************************************************************************************************************/
- /**
- * _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 실행함
- grp_biz.tfexcel.launchnewinstance(0);
- //실행된 excel application에서 새로운 workbook을 생성
- grp_biz.tfexcel.createworkbook();
- /* 문제있는 로직 주석처리 2013.06.13 손병은
- grp_biz.tfexcel.activatesheet(1);
- var sheetName;
- var nResult;
- for( var i = 0; i < sheetArrayLen; i++ )
- {
- sheetName = sheetArray[i].split("|")[1];
- if( i > 1 ) {
- nResult = grp_biz.tfexcel.activatesheet(i+1);
- grp_biz.tfexcel.sheetname(i+1) = sheetName;
- }
- else {
- nResult = grp_biz.tfexcel.addsheet(i+1, sheetName);
- }
- if( nResult < 0 ) {
- sysf_messageBox(sheetName + " 저장을", "E009");
- // alert(sheetName + " 오류발생");
- return;
- }
- grp_biz.tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel_" + i + ".xls");
- }
- */
- var sheetName;
- var nResult;
- for( var i = 0; i < sheetArrayLen; i++ )
- {
- sheetName = sheetArray[i].split("|")[1];
- if( i > 0 ) {
- nResult = grp_biz.tfexcel.addsheet(i+1, sheetName);
- }else{
- nResult = grp_biz.tfexcel.activatesheet(i+1);
- }
- grp_biz.tfexcel.sheetname(i+1) = sheetName;
- if( nResult < 0 ) {
- sysf_messageBox(sheetName + " 저장을", "E009");
- // alert(sheetName + " 오류발생");
- return;
- }
- grp_biz.tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel_" + i + ".xls");
- }
- //workbook을 저장.
- grp_biz.tfexcel.save(fileName);
- //excel application을 종료. excel application 생성 후 반드시 close해야함.
- grp_biz.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 = sysf_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 실행함
- grp_biz.tfexcel.launchnewinstance(0);
- // 실행된 excel application에서 새로운 workbook을 생성
- grp_biz.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 = grp_biz.tfexcel.activatesheet(i+1);
- grp_biz.tfexcel.sheetname(i+1) = sheetName;
- }
- else {
- nResult = grp_biz.tfexcel.addsheet(i+1, sheetName);
- }
- if( nResult < 0 ) {
- sysf_messageBox(sheetName + " 저장을", "E009");
- // alert(sheetName + " 오류발생");
- return;
- }
- gridObj.saveText("C:\\Temp\\tmp_TFExcel.csv", "\n", ",", '\:', true);
- grp_biz.tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel.csv");
- }
- //workbook을 저장.
- grp_biz.tfexcel.save(fileName);
- //excel application을 종료. excel application 생성 후 반드시 close해야함.
- grp_biz.tfexcel.close();
- // CSV File 삭제
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- fso.DeleteFile("C:\\Temp\\tmp_TFExcel.csv");
- var rmsg = sysf_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;
- }
- /************************************************************************************************************************/
- // header파일 중 SMMND02000.js 파일 끝]]></Script>
|