/* --------------------------------------------------------------------- ¼ö¼ú½Ç ½ÃÁ¡º° ¼Ò¿ä½Ã°£ (SMMCT00203.xfm - JScript ) - Version : 1) : Ver.1.00.01 : Create By taebum : 2009-09-24 ¿ÀÀü 9:57:31 ---------------------------------------------------------------------- */ /** * @group : * @ver :2009-09-24 ¿ÀÀü 9:16:55 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInit(){ var currDate = getCurrentDate(); model.setValue("/root/main/condition/fromdd" , fCalcDate(currDate,-1)); model.setValue("/root/main/condition/todd" , currDate); model.refresh(); model.removeNodeSet("/root/main/oppnttmusetminfo/oppnttmusetmlist"); grd_oppnttmusetmlst.refresh(); var instcd = getUserInfo("dutplceinstcd"); var rslt_ref = "/root/init/orddeptlist"; //model.setValue("/root/main/cond/orddeptcd", "%"); model.setValue("/root/main/condition/orddrid", ""); //zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, currDate); submit("TRMCT00208"); //¼ö¼ú¹æ Á¤º¸ Á¶È¸ fGetOproomList(); addComboItem("cmb_subdept"); fValueChangedSchCombo(); } /* * 1´ÞÀ» ÀÚµ¿ ¼¼ÆÃµÇ°Ô ÇÏ´Â ÇÔ¼ö * sDate : ÀÏÀÚ(string) * iFlag : int 1/-1 (1´Þ ÀÌÀü/ÀÌÈÄÀÇ ³¯Â¥ °è»ê¿ëµµ) */ function fCalcDate(sDt,iFlag){ var sDate = sDt.toDate("YYYYMMDD").getAddDate(iFlag, "M").getAddDate(-(iFlag), "D") //alert(sDt.toDate("YYYYMMDD").getAddDate(iFlag, "M").getAddDate(-(iFlag), "D").getDayOfWeek("K")); -- ÇØ´ç¿äÀÏ rtnDate = sDate.getFullYear(); rtnDate = rtnDate.toString() + (( sDate.getMonth() + 1 > 9 ) ? sDate.getMonth() + 1 : "0" + (sDate.getMonth() + 1)); rtnDate = rtnDate.toString() + (( sDate.getDate() > 9 ) ? sDate.getDate() : "0" + sDate.getDate()) ; return rtnDate; } /** * @group : * @ver : 2009-09-24 ¿ÀÀü 9:17:01 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fClickSearchBtn(){ model.resetInstanceNode("/root/send"); var todd = model.getValue("/root/main/condition/todd"); var fromdd = model.getValue("/root/main/condition/fromdd"); var oproomcd = model.getValue("/root/main/condition/oproomcd"); var subdeptcd = model.getValue("/root/main/condition/subdeptcd"); var orddrid = model.getValue("/root/main/condition/orddrid"); var tab = model.getValue("/root/main/condition/tab"); //¹æº°, °úº° ¼±Åà ÅÇ by ¹Ú¿µ¿ì 20091222 if(fromdd == "" || fromdd == "undefined" || fromdd == null){ model.alert("½ÃÀÛÀÏÀÚ´Â Çʼö ÀÔ·Â Ç׸ñÀÔ´Ï´Ù."); return; } if(todd == "" || todd == "undefined" || todd == null){ model.alert("Á¾·áÀÏÀÚ´Â Çʼö ÀÔ·Â Ç׸ñÀÔ´Ï´Ù."); return; } //ÇöÀç½Ã°£À» ºñ±³ÇÏ¿© ±Ù¹«½Ã°£ ÀÌÈÄÀÏ °æ¿ì 6°³¿ùÀÌ»ó Á¶È¸°¡´É Çϵµ·Ï ¼³Á¤ var sCurrentTm = getCurrentTime().substr(0,4); var sCurrentDay = getCurrentDate().toDate("YYYYMMDD").getDayOfWeek("K"); if(sCurrentDay == "¿ù" || sCurrentDay == "È­" || sCurrentDay == "¼ö" || sCurrentDay == "¸ñ" || sCurrentDay == "±Ý"){ //¿ÀÈÄ 5½Ã ÀÌÀüÀÏ °æ¿ì Á¶È¸ Á¶°ÇÀº 6´ÞÀÌ»ó Á¶È¸µÇÁö ¾Êµµ·Ï ÇÔ. if(sCurrentTm < "1700"){ var sSearchTerm = getDateInterval(fromdd, todd); if(sSearchTerm > 183){ model.alert("±Ù¹«½Ã°£¿¡´Â 6°³¿ù ÀÌ»ó Á¶È¸ÇÒ ¼ö ¾ø½À´Ï´Ù."); return; } } } model.setValue("/root/send/todd" , todd ); model.setValue("/root/send/fromdd" , fromdd ); model.setValue("/root/send/tab" , tab ); // ¹æº°, °úº°, Àǻ纰 ±¸ºÐ Ãß°¡ by ¹Ú¿µ¿ì 20091222 model.setValue("/root/send/oproomcd" , oproomcd ); model.setValue("/root/send/subdeptcd", subdeptcd); model.setValue("/root/send/orddrid" , orddrid ); model.removeNodeSet("/root/main/oppnttmusetminfo/oppnttmusetmlist"); grd_oppnttmusetmlst.refresh(); if(submit("TRMCT00203")){ } } /** * @group : * @ver : 2009-09-24 ¿ÀÀü 9:17:04 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·á°ú º¯°æ½Ã ÀÇ»ç Á¶È¸ À̺¥Æ® * @param : * @return : * @--------------------------------------------------- */ function fValueChangedOrddrCombo(){ var sordclsdeptflag = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/ordclsdeptflag"); // ´ëÇ¥/ºÐ°ú/¼­ºê ±¸ºÐ var sorddeptkind = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/orddeptkind"); // ¼¾ÅÍ/´ëÇ¥ ±¸ºÐ var ssupdeptcd = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/supdeptcd"); // »óÀ§ºÎ¼­ÄÚµå var tab = model.getValue("/root/main/condition/tab"); //¹æº°, °úº° ¼±Åà ÅÇ by ¹Ú¿µ¿ì 20091222 var sorddeptflag = ""; if (sorddeptkind == "C") { // ¼¾ÅÍÀ̸é sorddeptflag = "C"; } else if (sorddeptkind != "C" && sordclsdeptflag == "A") { // ¼¾ÅͰ¡ ¾Æ´Ï¸é¼­ ºÐ°úÀ̸é sorddeptflag = "A"; } else { // ±×¿Ü¿¡ ±âŸ°ú sorddeptflag = "etc"; } if(model.getValue("/root/main/condition/subdeptcd") == ""){ model.setValue("/root/main/condition/orddrid",""); cmb_orddrid.refresh(); } model.makeValue("/root/send/reqdata/ordclsdeptflag", sorddeptflag); model.makeValue("/root/send/reqdata/supdeptcd", ssupdeptcd); model.makeValue("/root/send/reqdata/prcpspecflag", "Y"); model.makeValue("/root/send/reqdata/orddd", getCurrentDate()); model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/condition/subdeptcd")); if(tab=="D") { //°ú,Àǻ纰ÀÏ °æ¿ì¿¡¸¸ Àǻ縮½ºÆ® Á¶È¸ by ¹Ú¿µ¿ì 20091222 submit("TRMNO00104"); // Àǻ縮½ºÆ® Á¶È¸ addComboItem("cmb_orddrid"); } } /** * @group : * @ver : 2009-12-22 ¿ÀÈÄ 4:27:47 * @by : ¹Ú¿µ¿ì * @--------------------------------------------------- * @type : function * @access : public * @desc : °Ë»ö combo º¯°æ½Ã À̺¥Æ® * @param : * @return : * @--------------------------------------------------- */ function fValueChangedSchCombo(){ var sTab = model.getValue("/root/main/condition/tab"); if(sTab == "R"){ //¹æº° //comboº¯°æ½Ã ½Ã°£ ÀçÁ¶Á¤ by ¹Ú¿µ¿ì 20091222 model.removenodeset("/root/main/oppnttmusetminfo"); model.setValue("/root/main/condition/oproomcd", ""); model.setValue("/root/main/condition/subdeptcd", ""); model.setValue("/root/main/condition/orddrid", ""); caption14.visible = true; cmb_oproom.visible = true; caption7.visible = false; cmb_subdept.visible = false; caption1.visible = false; cmb_orddrid.visible = false; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("oproomnm"))=false; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("deptengabbr"))=true; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("perfdrnm"))=true; model.refresh(); }else if(sTab == "E"){ //°úº° Ãß°¡ by ¹Ú¿µ¿ì 20091216 //comboº¯°æ½Ã ±×¸®µå, °úº°, ½Ã°£ ÀçÁ¶Á¤ by ¹Ú¿µ¿ì 20091222 model.removenodeset("/root/main/oppnttmusetminfo"); model.setValue("/root/main/condition/oproomcd", ""); model.setValue("/root/main/condition/subdeptcd", ""); model.setValue("/root/main/condition/orddrid", ""); caption14.visible = false; cmb_oproom.visible = false; caption7.visible = true; cmb_subdept.visible = true; caption1.visible = false; cmb_orddrid.visible = false; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("oproomnm"))=true; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("deptengabbr"))=false; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("perfdrnm"))=true; model.refresh(); }else if(sTab == "D"){ //comboº¯°æ½Ã ±×¸®µå, °úº°, Àǻ纰, ½Ã°£ ÀçÁ¶Á¤ by ¹Ú¿µ¿ì 20091222 model.removenodeset("/root/main/oppnttmusetminfo"); model.setValue("/root/main/condition/oproomcd", ""); model.setValue("/root/main/condition/subdeptcd", ""); model.setValue("/root/main/condition/orddrid", ""); caption14.visible = false; cmb_oproom.visible = false; caption7.visible = true; cmb_subdept.visible = true; caption1.visible = true; cmb_orddrid.visible = true; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("oproomnm"))=true; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("deptengabbr"))=false; grd_oppnttmusetmlst.colHidden(grd_oppnttmusetmlst.colref("perfdrnm"))=false; model.refresh(); } } /** * @group : * @ver : 2009-09-15 ¿ÀÈÄ 6:45:47 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : ¼ö¼ú¹æ Á¤º¸ Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fGetOproomList(){ model.setValue("/root/send/fromdd" , getCurrentDate() ); //ÇöÀçÀÏÀÚ¿¡ À¯È¿ÇÑ ¼ö¼ú¹æÀ» Á¶È¸ÇÑ´Ù. submit("TRMCT00207"); addComboItem("cmb_oproom"); }