/* --------------------------------------------------------------------- ¸¶ÃëÁ¾·ùº° ¼ö¼ú°Ç¼ö Åë°è (SSMNP00100.xfm - JScript ) - Version : 1) : Ver.1.00.01 : Create By taebum : 2008-09-25 ¿ÀÈÄ 10:15:29 ---------------------------------------------------------------------- */ /** * @group : * @ver : 2008-09-23 ¿ÀÈÄ 4:20:36 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInit(){ model.setValue("/root/hidden/condition/frdd", getCurrentDate()); model.setValue("/root/hidden/condition/todd" , getCurrentDate()); //2010-02-28 ¿ÀÈÄ 5:39:12 taebum add ÀÏÀÚº° Á¶È¸ ÈÄ ´Ù½Ã Áýµµ°úº°·Î Á¶È¸½Ã ¼ö¼úÀÏÀÚ°¡ ¿ù·Î¸¸ Á¶È¸µÊ ¿À·ù ¿Ã¶ó¿Â°Ç °ü·Ã ¼öÁ¤ÀÛ¾÷ model.setValue("/root/temp/org_searfromdd", getCurrentDate()); model.refresh(); /* model.removenode("/root/send"); model.makeValue("/root/send/flag" , "X" ); model.makeValue("/root/send/searchitem", "XX" ); model.makeValue("/root/send/deptflag" , "011" ); submit("TRMNP00107"); */ //addComboItem("cmb_orddept" , "Àü ü", "", "above" ); //addComboItem("cmb_oproomlist", "Àü ü", "", "above" ); } function fOnClickSearchBtn(){ var sCurrentTab = model.getValue("/root/init/tab"); if(sCurrentTab == "" || sCurrentTab == null || sCurrentTab == "undefined"){ return; } model.setValue("/root/send/frdd", model.getValue("/root/hidden/condition/frdd")); model.setValue("/root/send/todd", model.getValue("/root/hidden/condition/todd")); model.setValue("/root/send/ssflag1", model.getValue("/root/hidden/condition/ssflag1")); model.setValue("/root/send/ssflag2", model.getValue("/root/hidden/condition/ssflag2")); model.setValue("/root/send/ssflag3", model.getValue("/root/hidden/condition/ssflag3")); model.setValue("/root/send/etcflag1", model.getValue("/root/hidden/condition/etcflag1")); model.setValue("/root/send/etcflag2", model.getValue("/root/hidden/condition/etcflag2")); model.setValue("/root/send/etcflag3", model.getValue("/root/hidden/condition/etcflag3")); switch(sCurrentTab){ case "dept" : if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){ messageBox("½ÃÀÛÀÏ, Á¾·áÀÏÀº ÇʼöÀÔ·Â »çÇ×ÀÔ´Ï´Ù.", "I000"); return; } model.removeNodeSet("/root/main/deptlists/AnstKindDeptlist"); datagrid4.refresh(); if(submit("TRSNP00100")){ //Áø·á°ú °¹¼ö¸¦ countÇÏ¿© Áø·á°ú¸íÀÌ ¾ø´Â LineÀº width¸¦ 0À¸·Î ÁÙÀδÙ. var iGridCnt = getNodesetCnt(model, "/root/main/deptlists/AnstKindDeptlist"); fHiddenGridCol(iGridCnt, datagrid4); } break; case "day" : if(model.getValue("/root/send/frdd") == "" || (model.getValue("/root/send/frdd")).length < 6){ messageBox("³â¿ùÀº ÇʼöÀÔ·Â »çÇ×ÀÔ´Ï´Ù.", "I000"); return; } model.removeNodeSet("/root/main/daylists/AnstKindDaylist"); datagrid1.refresh(); submit("TRSNP00101"); break; case "room" : if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){ messageBox("½ÃÀÛÀÏ, Á¾·áÀÏÀº ÇʼöÀÔ·Â »çÇ×ÀÔ´Ï´Ù.", "I000"); return; } model.removeNodeSet("/root/main/roomlists/AnstKindRoomlist"); datagrid3.refresh(); if(submit("TRSNP00102")){ var iGridCnt = getNodesetCnt(model, "/root/main/roomlists/AnstKindRoomlist"); fHiddenGridCol(iGridCnt, datagrid3); } break; default : break; } } /** * ÅÇ ¹öư Ŭ¸¯½Ã À̺¥Æ® * */ function fClickTab(pFlag){ if(pFlag == "dept"){ model.setValue("/root/init/tab", "dept"); ipt_refcond.visible = true; caption1.visible = true; input1.visible = true; ipt_refcond.attribute("maxlength")= 8; ipt_refcond.attribute("format")= "yyyy-mm-dd"; //2010-02-28 ¿ÀÈÄ 5:39:12 taebum add ÀÏÀÚº° Á¶È¸ ÈÄ ´Ù½Ã Áýµµ°úº°·Î Á¶È¸½Ã ¼ö¼úÀÏÀÚ°¡ ¿ù·Î¸¸ Á¶È¸µÊ ¿À·ù ¿Ã¶ó¿Â°Ç °ü·Ã ¼öÁ¤ÀÛ¾÷ if((model.getValue("/root/hidden/condition/frdd")).length < 7){ model.setValue("/root/hidden/condition/frdd", model.getValue("/root/temp/org_searfromdd")); model.refresh(); } }else if(pFlag == "day"){ model.setValue("/root/init/tab", "day"); ipt_refcond.visible = true; caption1.visible = false; input1.visible = false; ipt_refcond.attribute("maxlength")= 6; ipt_refcond.attribute("format")= "yyyy-mm"; model.setValue("/root/hidden/condition/frdd", (model.getValue("/root/hidden/condition/frdd").substr(0,6))); ipt_refcond.refresh(); }else if(pFlag == "room"){ model.setValue("/root/init/tab", "room"); ipt_refcond.visible = true; caption1.visible = true; input1.visible = true; ipt_refcond.attribute("maxlength")= 8; ipt_refcond.attribute("format")= "yyyy-mm-dd"; //2010-02-28 ¿ÀÈÄ 5:39:12 taebum add ÀÏÀÚº° Á¶È¸ ÈÄ ´Ù½Ã Áýµµ°úº°·Î Á¶È¸½Ã ¼ö¼úÀÏÀÚ°¡ ¿ù·Î¸¸ Á¶È¸µÊ ¿À·ù ¿Ã¶ó¿Â°Ç °ü·Ã ¼öÁ¤ÀÛ¾÷ if((model.getValue("/root/hidden/condition/frdd")).length < 7){ model.setValue("/root/hidden/condition/frdd", model.getValue("/root/temp/org_searfromdd")); model.refresh(); } } } /** * @group : * @ver : 2007.10.17 * @by : Grace * @--------------------------------------------------- * @type : function * @access : public * @desc : Exel ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fSaveExcel(){ var sCurrentTab = model.getValue("/root/init/tab"); if(sCurrentTab == "" || sCurrentTab == null || sCurrentTab == "undefined"){ return; } var fileName = null; switch(sCurrentTab){ case "dept" : fileName = window.fileDialog("save", ",", false, "¸¶ÃëÁ¾·ùº°Åë°è_Áýµµ°úº°_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if (fileName != "" && fileName != null) { datagrid4.saveExcel(fileName, "SheetName", true, true, "", "", false); } break; case "day" : fileName = window.fileDialog("save", ",", false, "¸¶ÃëÁ¾·ùº°Åë°è_ÀÏÀÚº°_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if (fileName != "" && fileName != null) { datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false); } break; case "room" : fileName = window.fileDialog("save", ",", false, "¸¶ÃëÁ¾·ùº°Åë°è_¹æº°_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if (fileName != "" && fileName != null) { datagrid3.saveExcel(fileName, "SheetName", true, true, "", "", false); } break; default : break; } } /** * @group : * @ver : 2007.10.17 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : ±×¸®µåÀÇ 1Çà¿¡ µ¥ÀÌÅÍ ¾ø´Â ¿­ °¨Ãß±â * @param : * @return : * @--------------------------------------------------- */ function fHiddenGridCol(iGridCnt, pGrid){ if(iGridCnt >1){ for(var i = 1; i < pGrid.cols; i++){ if(pGrid.valuematrix(1, i) == ""){ pGrid.colwidth(i) = 0; } } } }