/* 24½Ã°£ ¾÷¹«º¸°í (SMMNB01200.xrw - JScript ) - Version : 1) : Ver.1.00.01 */ var GRD_INPTLIST_FIXCOL = 15; var dutplcecd = getUserInfo("dutplcecd"); var deptcd = ""; var erdeptflag =""; //Ä¥°î¿¡´Â nullÀ¸·Î °íÁ¤. °ª ¼ÂÆÃÇØÁÖ´Â °÷ ¾øÀ½. var erdeptcd=""; var erdeptnm=""; var cnt = 0; /** * @group : * @ver : 2007.08.13 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : ¿Ü·¡Áø·á ÇöȲ * @param : * @return : * @--------------------------------------------------- */ function fSearch_otptlist(){ // ÅëÇÕÅë°è ¿Ü·¡È¯ÀÚ¼ö ¼­ºê¹Ì¼Ç Å¿ò ¼öÁ¤ by ¹Ú¿µ¿ì 20091215 model.removenodeset("/root/send/reqdata"); model.removenodeset("/root/main/outpatinfo"); //messageBox("°³¹ßÁß","I009"); if ( isNull(model.getValue("/root/temp/srchdd")) ){ messageBox("±â°£","I003");//ÇʼöÀÔ·ÂÀÔ´Ï´Ù return; } model.removeNode("/root/send/reqdata"); model.makeValue("/root/send/reqdata/srchdd", model.getValue("/root/temp/srchdd") ); model.makeValue("/root/send/reqdata/menu", "SUM"); if ( !isNull( model.getValue("/root/temp/orddeptcd") ) && model.getValue("/root/temp/orddeptcd") != "%") { model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/temp/orddeptcd")); } if ( !isNull( model.getValue("/root/temp/orddrid") ) && model.getValue("/root/temp/orddrid") != "%") { model.makeValue("/root/send/reqdata/orddrid", model.getValue("/root/temp/orddrid")); } model.makeValue("/root/send/orddd",ipt_orddd.value); //º¸°íÀÏÀÚ submit("TRSNO00101",false); model.refresh(); } /** * @group : * @ver : 2007.08.13 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : Unitº° ÇöȲ * @param : * @return : * @--------------------------------------------------- */ function fSearch_inptlist(){ for(var i = 1 ; i <= 99 ; i++){ grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = true; } model.removenodeset("/root/main/inpt/dept"); model.removenodeset("/root/main/inpt/inptlist"); model.makeValue("/root/send/orddd",ipt_orddd.value); //º¸°íÀÏÀÚ submit("TRMNB01203",false); model.makeValue("/root/send/orddd",ipt_orddd.value); //º¸°íÀÏÀÚ submit("TRMNB01202",false); } /** * @group : * @ver : 2007.08.13 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : º¸°í ÇàÃß°¡ * @param : * @return : * @--------------------------------------------------- */ function fAdd_Reptrows(grdflg){ var wardcd = dutplcecd; //¼¼¼Ç¿¡¼­ ¹Þ¾ÆÃ³¸® var plandd = getCurrentDate(); var plandt = getCurrentDate()+getCurrentTime().substring(0,4); if(grdflg == "psnlist"){ if(grd_psnlist.rows < 2){ grd_psnlist.addRow(); }else{ grd_psnlist.insertRow(1); } model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","insert"); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/wardcd",wardcd); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/plandd",plandd); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/plandt",plandt); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/posdeptnm",getUserInfo("dutplcenm")); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/deliveflagcd","01"); grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_i.gif"; }else if(grdflg == "wardlist"){ if(grd_wardlist.rows < 2){ grd_wardlist.addRow(); }else{ grd_wardlist.insertRow(1); } model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","insert"); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",plandd); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt",plandt); var strTmp = model.getValue("/root/temp/duty"); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/duty", strTmp == "4" ? "1" : strTmp); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/userid",getUserId()); if(erdeptflag == "Y") { model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/wardcd", erdeptcd); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/posdeptnm", erdeptnm); } else { model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/wardcd", wardcd); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/posdeptnm", getUserInfo("dutplcenm")); } model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/deliveflagcd","02"); }else if(grdflg == "edulist"){ if(grd_edulist.rows < 2){ grd_edulist.addRow(); }else{ grd_edulist.insertRow(1); } model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","insert"); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/wardcd",wardcd); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/plandd",plandd); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/plandt",plandt); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/posdeptnm",getUserInfo("dutplcenm")); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/deliveflagcd","03"); grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_i.gif"; }else if(grdflg == "etclist"){ if(grd_etclist.rows < 2){ grd_etclist.addRow(); }else{ grd_etclist.insertRow(1); } model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","insert"); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/wardcd",wardcd); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/plandd",plandd); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/plandt",plandt); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/deliveflagcd","04"); grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_i.gif"; }else if(grdflg == "notilist"){ if(grd_noti.rows < 2){ grd_noti.addRow(); }else{ grd_noti.insertRow(1); } model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","insert"); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/wardcd",wardcd); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/plandd",plandd); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/plandt",plandt); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/deliveflagcd","05"); grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_i.gif"; } model.refresh(); } /** * @group : * @ver : 2007.08.13 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : º¸°í Çà¼öÁ¤ * @param : * @return : * @--------------------------------------------------- */ function fUpt_Reptrows(grdflg){ var wardcd = dutplcecd; //¼¼¼Ç¿¡¼­ ¹Þ¾ÆÃ³¸® var plandd = model.getValue(ipt_orddd2.attribute("ref")); var plandt = getCurrentDate()+getCurrentTime().substring(0,4); if(grdflg == "psnlist"){ var staiud = model.getValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud"); if( (staiud =="insert") || (staiud =="delete") ){ return; } model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","update"); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/wardcd",wardcd); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/posdeptnm",getUserInfo("dutplcenm")); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/deliveflagcd","01"); grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_u.gif"; }else if(grdflg == "wardlist"){ var staiud = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud"); if( (staiud =="insert") || (staiud =="delete") ){ return; } var dt = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt"); if(dt == null || dt == "") { model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",plandd); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt",plandt); } model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","update"); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/deliveflagcd","02"); }else if(grdflg == "edulist"){ var staiud = model.getValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud"); if( (staiud =="insert") || (staiud =="delete") ){ return; } model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","update"); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/wardcd",wardcd); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/posdeptnm",getUserInfo("dutplcenm")); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/deliveflagcd","03"); grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_u.gif"; }else if(grdflg == "etclist"){ var staiud = model.getValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud"); if( (staiud =="insert") || (staiud =="delete") ){ return; } model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","update"); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/wardcd",wardcd); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/deliveflagcd","04"); grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_u.gif"; }else if(grdflg == "notilist"){ var staiud = model.getValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud"); if( (staiud =="insert") || (staiud =="delete") ){ return; } model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","update"); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/wardcd",wardcd); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/usernm",getUserName()); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/userid",getUserId()); model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/deliveflagcd","05"); grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_u.gif"; } model.refresh(); } /** * @group : * @ver : 2007.08.13 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : º¸°í Çà»èÁ¦ * @param : * @return : * @--------------------------------------------------- */ function fDel_Reptrows(grdflg){ var reptcnt; if(grdflg == "psnlist"){ reptcnt = grd_psnlist.rows; }else if(grdflg == "wardlist"){ reptcnt = grd_wardlist.rows; }else if(grdflg == "edulist"){ reptcnt = grd_edulist.rows; }else if(grdflg == "etclist"){ reptcnt = grd_etclist.rows; }else if(grdflg == "notilist"){ reptcnt = grd_noti.rows; } if(reptcnt < 2){ messageBox("»èÁ¦ ÇÒ ÀÚ·á°¡ ","I004"); return; } if(grdflg == "psnlist"){ model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","delete"); grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_d.gif"; }else if(grdflg == "wardlist"){ model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","delete"); grd_wardlist.rowStatus(grd_wardlist.row) = "4"; }else if(grdflg == "edulist"){ model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","delete"); grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_d.gif"; }else if(grdflg == "etclist"){ model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","delete"); grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_d.gif"; }else if(grdflg == "notilist"){ model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","delete"); grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_d.gif"; } model.refresh(); } /** * @group : * @ver : 2007.08.13 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : ¿Ü·¡Áø·á ÇöȲ * @param : * @return : * @--------------------------------------------------- */ function fCaseChange(){ if(unitflg == 1){ fSearch_inptlist(); fSearch_specnurs(); }else if(unitflg == 2){ fSearch_otptlist(); } } /** * @group : * @ver : 2008.06.05 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : ¼ö¼ú,ÀÀ±Þ,ºÐ¸¸,½Å»ý¾Æ,HD,APU,ÁÖ»ç °¢°¢ Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSearch_specnurs(){ model.removenodeset("/root/main/inpt/specnurs/oprsinfo"); // ¼ö¼ú (Á¤±Ô,ÀÀ±Þ,Åë¿ø,Àüü) model.removenodeset("/root/main/inpt/specnurs/oprsdetl"); // ¼ö¼ú (Á¾·ù,±¸ºÐ,°Ç¼ö) model.removenodeset("/root/main/inpt/specnurs/ernurs"); // ÀÀ±Þ model.removenodeset("/root/main/inpt/specnurs/partrtn"); // ºÐ¸¸ model.removenodeset("/root/main/inpt/specnurs/nbabycare"); // ½Å»ý¾Æ model.removenodeset("/root/main/inpt/specnurs/hdroom"); // HD model.removenodeset("/root/main/inpt/specnurs/apuroom"); // APU model.removenodeset("/root/main/inpt/specnurs/injction"); // ÁÖ»ç model.removenodeset("/root/send"); //model.refresh(); model.makeValue("/root/send/plandd",ipt_orddd.value); //¾÷¹«ÀÏÀÚ model.makeValue("/root/send/deptflg",deptflg); //Ư¼ö°£È£ model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd")); // ±â°üÄÚµå submit("TRMNB01206"); } /** * @group : * @ver : 2007.08.13 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : º¸°í ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fSave_Reptrows(grdflg){ if(messageBox("","Q002") != 6) return; var xReptPath; var reptcnt; var num = ""; if(grdflg == "psnlist"){ xReptPath = "/root/main/inpt/reptdata/psnlist"; reptcnt = grd_psnlist.rows; }else if(grdflg == "wardlist"){ xReptPath = "/root/main/inpt/reptdata/wardlist"; reptcnt = grd_wardlist.rows; }else if(grdflg == "edulist"){ xReptPath = "/root/main/inpt/reptdata/edulist"; reptcnt = grd_edulist.rows; }else if(grdflg == "etclist"){ xReptPath = "/root/main/inpt/reptdata/etclist"; reptcnt = grd_etclist.rows; }else if(grdflg == "notilist"){ xReptPath = "/root/main/inpt/reptdata/notilist"; reptcnt = grd_noti.rows; } for(i=1; i °£È£ºÎÀå°ú ÆÀÀ常 Àüü·Î º¸µµ·Ï. ÀÌ¿øÈñ ¼±»ý´Ô°æ¿ì ÀüºÎµÇµµ·Ï. model.makeValue("/root/send/wardcd","%"); //º´µ¿ÄÚµå model.makeValue("/root/send/authallyn","Y"); //ÀüºÎ¼­Á¶È¸ } else { model.makeValue("/root/send/wardcd",wardcd); //º´µ¿ÄÚµå model.makeValue("/root/send/authallyn","N"); //ÀüºÎ¼­Á¶È¸ if(erdeptflag == "Y") { model.makeValue("/root/send/authallyn", "E"); } } model.makeValue("/root/send/plandd",ipt_orddd2.value); //°èȹÀÏÀÚ model.makeValue("/root/send/duty", "4"); //todo "4":All 20111018_KNUH_Start ¹«Á¶°Ç All·Î Á¶È¸µÇµµ·Ï ¼öÁ¤. model.makeValue("/root/send/deliveflagcd",reptflg); //Àü´Þ±¸ºÐ model.makeValue("/root/send/deptflag", model.getValue(rdo_deptflag.attribute("ref"))); if(cnt == 2) { submit("TRMNB01204", false); } else { submit("TRMNB01204"); } if(grd_wardlist.rows > grd_wardlist.fixedRows) { fstdeptnm = grd_wardlist.valueMatrix(1, grd_wardlist.colRef("posdeptnm")); } for(var i = grd_wardlist.fixedRows; i < grd_wardlist.rows; i++){ deptnm = grd_wardlist.valueMatrix(i, grd_wardlist.colRef("posdeptnm")); if(fstdeptnm != deptnm) { fstdeptnm = deptnm; grd_wardlist.rowStyle(i-1, "data", "border-bottom-color") = "#ff0000"; grd_wardlist.rowStyle(i-1, "data", "border-top-width") = "3"; } else { grd_wardlist.rowStyle(i-1, "data", "border-bottom-color") = "#b0b0b0"; grd_wardlist.rowStyle(i-1, "data", "border-top-width") = "3"; } } opt_certnm.refresh(); opt_certdt.refresh(); } /** * @group : * @ver : 2007.08.21 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : °øÁö»çÇ× ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fSave_board(){ if(messageBox("","Q002") != 6) return; var wardcd = "9999999999"; // º´µ¿ÄÚµå ¸ðµçºÎ¼­°¡ º¸ÀÌ°Ô ÀÓÀÇ·Î ºÎ¿©. var plandd = ipt_orddd2.value; //¾÷¹«ÀÏÀÚ->º¸°íÀÏÀÚ¼öÁ¤ var plandt = ipt_orddd.value+"0000"; //°èȹ½Ã°£ ÇÏ·ç¿¡ 1°³À̱⶧¹®¿¡ ÀÓÀÇ·Î ºÎ¿©. var deliveflagcd = "00"; var staiud; if(model.getValue("/root/main/inpt/board/boarddetl/staiud")=="update"){ staiud = "update"; }else{ staiud = "insert"; } model.removenode("/root/send"); model.makeNode("/root/send"); model.makeValue("/root/send/wardcd" , wardcd ); model.makeValue("/root/send/plandd" , plandd ); model.makeValue("/root/send/plandt" , plandt ); model.makeValue("/root/send/deliveflagcd" , deliveflagcd ); model.makeValue("/root/send/delivecnts" ,model.getValue("/root/main/inpt/board/boarddetl/delivecnts") ); model.makeValue("/root/send/staiud" ,staiud ); model.makeValue("/root/send/seqno" ,model.getValue("/root/main/inpt/board/boarddetl/seqno") ); submit("TXMNB01202"); fSearch_board(); } /** * @group : * @ver : 2007.08.13 * @by : ÇÏÀç·û * @--------------------------------------------------- * @type : function * @access : public * @desc : °øÁö»çÇ× Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSearch_board(){ var wardcd = "9999999999"; //ÀÓÀÇ·Î ÁöÁ¤. // model.makeValue("/root/main/inpt/board/boarddetl/delivecnts",""); // model.makeValue("/root/main/inpt/board/boarddetl/staiud",""); //model.refresh(); model.resetInstanceNode("/root/main/inpt/board/boarddetl"); model.removenodeset("/root/send"); model.makeValue("/root/send/wardcd",wardcd); //º´µ¿ÄÚµå model.makeValue("/root/send/plandd",ipt_orddd2.value); //¾÷¹«ÀÏÀÚ->º¸°íÀÏÀڷμöÁ¤ submit("TRMNB01205"); if ( isNull(model.getValue("/root/main/inpt/board/boarddetl/delivecnts")) ){ model.makeValue("/root/main/inpt/board/boarddetl/delivecnts",""); model.makeValue("/root/main/inpt/board/boarddetl/staiud",""); model.makeValue("/root/main/inpt/board/boarddetl/seqno",""); } /* if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") { model.copyNode("/root/main/inpt/board","/root/temp/board"); } //model.refresh(); */ } function fSearch_DataList(){ //º´µ¿º° °úº° model.removenodeset("/root/main/inpt/dept/deptlist"); model.removenodeset("/root/main/inpt/inptlist"); //Ư¼öÆÄÆ® model.removenodeset("/root/main/inpt/specnurs/oprsinfo"); // ¼ö¼ú (Á¤±Ô,ÀÀ±Þ,Åë¿ø,Àüü) model.removenodeset("/root/main/inpt/specnurs/oprsdetl"); // ¼ö¼ú (Á¾·ù,±¸ºÐ,°Ç¼ö) model.removenodeset("/root/main/inpt/specnurs/ernurs"); // ÀÀ±Þ model.removenodeset("/root/main/inpt/specnurs/partrtn"); // ºÐ¸¸ model.removenodeset("/root/main/inpt/specnurs/nbabycare"); // ½Å»ý¾Æ model.removenodeset("/root/main/inpt/specnurs/hdroom"); // HD model.removenodeset("/root/main/inpt/specnurs/apuroom"); // APU model.removenodeset("/root/main/inpt/specnurs/injction"); // ÁÖ»ç //º¸°í var wardcd = dutplcecd; //¼¼¼Ç¿¡¼­ ¹Þ¾ÆÃ³¸® model.removenodeset("/root/main/inpt/reptdata/psnlist"); model.removenodeset("/root/main/inpt/reptdata/wardlist"); model.removenodeset("/root/main/inpt/reptdata/edulist"); model.removenodeset("/root/main/inpt/reptdata/etclist"); //°øÁö»çÇ× model.removenodeset("/root/main/inpt/board/boarddetl"); model.removenodeset("/root/send"); model.makeValue("/root/send/orddd",ipt_orddd.value); //º¸°íÀÏÀÚ model.makeValue("/root/send/plandd",ipt_orddd.value); //¾÷¹«ÀÏÀÚ model.makeValue("/root/send/deptflg",deptflg); //Ư¼ö°£È£ model.makeValue("/root/send/wardcd",wardcd); //º´µ¿ÄÚµå model.makeValue("/root/send/deliveflagcd",reptflg); //Àü´Þ±¸ºÐ submit("TRMNB01207"); model.refresh(); var inpttitle = "ºÎ¼­^º´»ó^Àç¿ø^ÀÔ¿ø^ÀüÀÔ^ÀÔ½Ç^Åð¿ø^ÀüÃâ^Åð½Ç^»ç¸Á^¼ö¼ú^°¡µ¿À²^ÀüÀÏ\nÅð¿ø¿¹°íÀ²^Æò±Õ\nÀç¿øÀϼö^½ÇÀç¿ø^´çÀÏ\nÀÔÅð¿ø"; var deptengabbr = ""; for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){ grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false; deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr"); inpttitle = inpttitle +"^"+ deptengabbr; } grd_inptlist.caption = inpttitle; if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") { model.copyNode("/root/main/inpt/board","/root/temp/board"); } model.refresh(); } function fSearch_InptDataList(){ // fSearch_inptlist(); fCaseChange(); fSearch_board(); model.refresh(); var inpttitle = "ºÎ¼­^º´»ó^Àç¿ø^ÀÔ¿ø^ÀüÀÔ^ÀÔ½Ç^Åð¿ø^ÀüÃâ^Åð½Ç^»ç¸Á^¼ö¼ú^°¡µ¿À²^ÀüÀÏ\nÅð¿ø¿¹°íÀ²^Æò±Õ\nÀç¿øÀϼö^½ÇÀç¿ø^´çÀÏ\nÀÔÅð¿ø"; var deptengabbr = ""; for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){ grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false; deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr"); inpttitle = inpttitle +"^"+ deptengabbr; } grd_inptlist.caption = inpttitle; // if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") { // model.copyNode("/root/main/inpt/board","/root/temp/board"); // } // "°è"Ç׸ñ ¼ö¼ú°Ç¼ö Æ÷ÇÔ var optotal = 0; for(var i=1; i<=grd_inptlist.rows-1; i++){ optotal += Number(model.getValue("/root/main/inpt/inptlist["+i+"]/opcnfmdd")); } model.makeValue("/root/main/inpt/inptlist["+(grd_inptlist.rows-1)+"]/opcnfmdd", optotal); model.refresh(); } /** * @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 fSearch_idctlist(){ var dept = "" model.removenodeset("/root/send/reqdata"); model.removenodeset("/root/main/idct"); if ( isNull(model.getValue("/root/temp/recdd")) ){ messageBox("ÀÛ¼ºÀÏÀÚ","I003");//ÇʼöÀÔ·ÂÀÔ´Ï´Ù return; } if(model.getValue("/root/temp/deptcd") == ""){ dept = dutplcecd; }else{ dept = model.getValue("/root/temp/deptcd"); } model.makeValue("/root/send/reqdata/deptcd", dept ); model.makeValue("/root/send/reqdata/recdd", model.getValue("/root/temp/recdd") ); submit("TRMNB01211"); } // ÁöÇ¥°ü¸® ÀúÀå function fSave_Idctrows(grdflg){ if(messageBox("","Q002") != 6) return; var xIdctPath; var idctgrd; var updtdata = "Y"; var duty = ""; var recdt = getCurrentDate()+getCurrentTime().substring(0,4); var dept = ""; if(grdflg == "idctdlist"){ xIdctPath = "/root/main/idct/idctdlist"; idctgrd = grd_idctdlist; duty = 1; }else if(grdflg == "idctelist"){ xIdctPath = "/root/main/idct/idctelist"; idctgrd = grd_idctelist; duty = 2; }else if(grdflg == "idctnlist"){ xIdctPath = "/root/main/idct/idctnlist"; idctgrd = grd_idctnlist; duty = 3; } if(model.getValue("/root/temp/deptcd") == ""){ dept = dutplcecd; }else{ dept = model.getValue("/root/temp/deptcd"); } model.removeNodeset("/root/send/savedata"); model.makeNode("/root/send/savedata"); for (i = idctgrd.fixedRows - 1 ; i < idctgrd.rows - 1; i++) { model.setValue(xIdctPath + "[" + i + "]/deptcd",dept); model.setValue(xIdctPath + "[" + i + "]/duty", duty); model.setValue(xIdctPath + "[" + i + "]/recdd", model.getValue("/root/temp/recdd")); model.setValue(xIdctPath + "[" + i + "]/recdt", recdt); } if(grdflg == "idctdlist"){ updtdata = getGridUpdateData(idctgrd); }else if(grdflg == "idctelist"){ updtdata = getGridUpdateData(idctgrd); }else if(grdflg == "idctnlist"){ updtdata = getGridUpdateData(idctgrd); } model.makeValue("/root/send/savedata/idctinfo", updtdata); submit("TXMNB01211"); btn_idct.dispatch("DOMActivate"); } // ÁöÇ¥°ü¸® »èÁ¦ function fDel_Idctrows(grdflg){ var idctchk; var idctgrd; var xIdctPath; if(grdflg == "idctdlist"){ idctchk = grd_idctdlist.row - 1; idctgrd = grd_idctdlist; xIdctPath = "/root/main/idct/idctdlist"; }else if(grdflg == "idctelist"){ idctchk = grd_idctelist.row - 1; idctgrd = grd_idctelist; xIdctPath = "/root/main/idct/idctelist"; }else if(grdflg == "idctnlist"){ idctchk = grd_idctnlist.row - 1; idctgrd = grd_idctnlist; xIdctPath = "/root/main/idct/idctnlist"; } if(grdflg == "idctdlist"){ if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") { idctgrd.addStatus(grd_idctdlist.row, "delete"); }else{ messageBox("»èÁ¦ ÇÒ ÀÚ·á°¡ ","I004"); return; } }else if(grdflg == "idctelist"){ if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") { idctgrd.addStatus(grd_idctelist.row, "delete"); }else{ messageBox("»èÁ¦ ÇÒ ÀÚ·á°¡ ","I004"); return; } }else if(grdflg == "idctnlist"){ if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") { idctgrd.addStatus(grd_idctnlist.row, "delete"); }else{ messageBox("»èÁ¦ ÇÒ ÀÚ·á°¡ ","I004"); return; } } model.refresh(); } // º»¿ø NEW 24½Ã°£ ¾÷¹«º¸°í ÀúÀå function fSave_Reptrows2(){ if(messageBox("","Q002") != 6) return; var updtdata = getGridUpdateData(grd_wardlist) ; model.removenode("/root/send"); model.makeNode("/root/send"); model.makeValue("/root/send/sReptPath" , updtdata); if(updtdata == null || updtdata == ""){ messageBox("ÀúÀåÇÒ ÀÚ·á°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.","I"); return; } submit("TXMNB01201"); btn_srch2.dispatch("DOMActivate"); } // º»¿ø NEW ÀϺ° ºÎ¼­ ÇöȲ Á¶È¸ function fSearch_InptDataList2(){ fCaseChange(); //fSearch_board(); model.refresh(); var inpttitle = "ºÎ¼­^º´»ó^Àç¿ø^ÀÔ¿ø^ÀüÀÔ^ÀÔ½Ç^Åð¿ø^ÀüÃâ^Åð½Ç^»ç¸Á^¼ö¼ú^°¡µ¿À²^ÀüÀÏ\nÅð¿ø¿¹°íÀ²^Æò±Õ\nÀç¿øÀϼö^½ÇÀç¿ø^´çÀÏ\nÀÔÅð¿ø"; var deptengabbr = ""; for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){ grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false; deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr"); inpttitle = inpttitle +"^"+ deptengabbr; } grd_inptlist.caption = inpttitle; // "°è"Ç׸ñ ¼ö¼ú°Ç¼ö Æ÷ÇÔ var optotal = 0; for(var i=1; i<=grd_inptlist.rows-1; i++){ optotal += Number(model.getValue("/root/main/inpt/inptlist["+i+"]/opcnfmdd")); } //model.makeValue("/root/main/inpt/inptlist["+(grd_inptlist.rows-1)+"]/opcnfmdd", optotal); model.refresh(); }