/* --------------------------------------------------------------------- ÀÓ»ó°úº° ¼ö¼ú¸íº° Æò±Õ ¼ö¼ú½Ã°£ (SMMCT00204.xfm - JScript ) - Version : 1) : Ver.1.00.01 : Create By taebum : 2009-09-25 ¿ÀÈÄ 2:52:20 ---------------------------------------------------------------------- */ /** * @group : * @ver : 2009-09-25 ¿ÀÈÄ 2:40:53 * @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/avgoptminfo/avgoptmlist"); grd_avgoptmlst.refresh(); var instcd = getUserInfo("dutplceinstcd"); var rslt_ref = "/root/init/orddeptlist"; model.setValue("/root/main/condition/orddrid", ""); chk_secprcp.value = "Y"; //zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, currDate); submit("TRMCT00208"); addComboItem("cmb_subdept"); } /* * 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-15 ¿ÀÈÄ 6:45:47 * @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 subdeptcd = model.getValue("/root/main/condition/subdeptcd"); var orddrid = model.getValue("/root/main/condition/orddrid"); var search = model.getValue("/root/main/condition/search").toUpperCase(); var searchcond = model.getValue("/root/main/condition/searchcond"); var secprcpyn = model.getValue("/root/main/condition/secprcpyn"); 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½Ã ÀÌÀüÀÏ °æ¿ì Á¶È¸ Á¶°ÇÀº 1´ÞÀÌ»ó Á¶È¸µÇÁö ¾Êµµ·Ï ÇÔ. if(sCurrentTm < "1700"){ var sSearchTerm = getDateInterval(fromdd, todd); if(sSearchTerm > 30){ model.alert("±Ù¹«½Ã°£¿¡´Â 1´Þ ÀÌ»ó Á¶È¸ÇÒ ¼ö ¾ø½À´Ï´Ù."); return; } } } model.setValue("/root/send/todd" , todd ); model.setValue("/root/send/fromdd" , fromdd ); model.setValue("/root/send/subdeptcd", subdeptcd); model.setValue("/root/send/orddrid" , orddrid ); model.setValue("/root/send/search", search); model.setValue("/root/send/searchcond", searchcond); model.setValue("/root/send/secprcpyn", secprcpyn); model.removeNodeSet("/root/main/avgoptminfo/avgoptmlist"); grd_avgoptmlst.refresh(); if(submit("TRMCT00204")){ }else{ model.alert("¼ö¼ú¸í´Ü Á¶È¸ ½Ã ¼­¹ö ¿À·ù°¡ ¹ß»ýµÇ¾ú½À´Ï´Ù."); return; } } /** * @group : * @ver : 2009-09-15 ¿ÀÈÄ 6:45:47 * @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 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")); submit("TRMNO00104"); // Àǻ縮½ºÆ® Á¶È¸ addComboItem("cmb_orddrid"); } /** * @group : * @ver : 2009-09-23 ¿ÀÈÄ 3:17:39 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : Excel ÀúÀå ¹öư Ŭ¸¯ ½Ã * @param : * @return : * @--------------------------------------------------- */ function fOnClickExcelBtn(){ fileName = window.fileDialog("save", ",", false, "ÀÓ»ó°úº° ¼ö¼ú¸íº° Æò±Õ ¼ö¼ú½Ã°£_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if (fileName != "" && fileName != null) { grd_avgoptmlst.saveExcel(fileName, "SheetName", true, true, "", "", false); } }