/************************************************************************************************************************************************ * @project name : ast/fthcnstweb * * @create date : 2008.01.15 * * @author : dhkim * * @see : SMAYA02500_±³Á÷¿øÁ¾±³ÇöȲÁ¶È¸.xrw * * @desc : ¿ø¸ñ/±³Á÷¿ø°ü¸®/±³Á÷¿øÁ¾±³ÇöȲÁ¶È¸¿¡¼­ »ç¿ëÇÏ´Â ½ºÅ©¸³Æ®ÀÌ´Ù. * *************************************************************************************************************************************************/ var xSendPath = '/root/send/reqdata'; //request xPath var xCondPath = '/root/cond'; //Á¶È¸Á¶°Ç xPath var xTreePath = '/root/main/tree'; //ºÎ¼­tree xPath var xGridPath = '/root/main/religinfo/relist'; //ȯÀÚÃß°¡Á¤º¸Grid xPath var currentdate = getCurrentDate(); /** * @date : 2008.01.15 * @author : dhkim * @desc : ¸ðµç Á¶È¸Á¶°Ç ¹× Á¶È¸°á°ú³»¿ªÀ» ÃʱâÈ­ÇÑ´Ù. * Á¶È¸Á¶°Ç - Á¾±³ default´Â Àüü * ±¸ºÐ defult´Â ÇØ´ç¾øÀ½ */ function fInit(){ //ÀνºÅϽºÃʱâÈ­ model.removeNodeset(xGridPath); //±³Á÷¿øÁ¾±³ÇöȲ¸®½ºÆ®±×¸®µå model.makeNode(xGridPath); //Á¾±³Á¤º¸·Îµå model.removeNode('/root/hidden/relign'); model.makeNode('/root/hidden/relign'); zbcfGetCodeList(new Array("R0137"), new Array("/root/hidden/relign"), true); addComboItem('cmb_relign', 'Àüü', '', 'above');//ÄÞº¸¿¡ ÀüüÁ¶È¸Á¶°Ç Ãß°¡ //tree ÃʱâÈ­ model.removeNodeset(xTreePath); model.makeNode(xTreePath); submit('TRAYA02502'); //Á¶È¸Á¶°Ç ÃʱâÈ­ model.removeNodeset(xCondPath); model.makeNode(xCondPath + '/deptnm'); //ºÎ¼­¸í model.makeNode(xCondPath + '/deptcd'); //ºÎ¼­ÄÚµå model.makeNode(xCondPath + '/deptupcd'); //»óÀ§ºÎ¼­ÄÚµå model.makeValue(xCondPath + '/deptdownyn', 'Y');//ÇÏÀ§ºÎ¼­Á¸Àç¿©ºÎ model.makeNode(xCondPath + '/depth'); //ºÎ¼­·¹º§ model.makeValue(xCondPath + '/relicd', ''); //Á¾±³ÄÚµå model.makeNode(xCondPath + '/emplnm'); //»ç¿ø¸í model.makeNode(xCondPath + '/emplcd'); //»ç¿ø¹øÈ£ model.makeValue(xCondPath + '/ddflag', 'none'); //ÀÏÀÚ±¸ºÐ model.makeNode(xCondPath + '/fromdd'); //Á¶È¸½ÃÀÛÀÏ model.makeNode(xCondPath + '/todd'); //Á¶È¸Á¾·áÀÏ model.refresh(); } /** * @date : 2008.01.13 * @author : dhkim * ------------------------------------------------------------------------------------------------------------------------------------------------------------ * @type : function * @access : public * @desc : Á¶È¸Á¶°ËÀÇ ±¸ºÐ¶óµð¿À¹öưÀÌ ÇØ´ç¾øÀ½À϶§´Â Á¶È¸½ÃÀÛ,Á¾·áÀÏÀ» disabledó¸®, ¼Î·ÊÀÏ,°ßÁøÀÏ,¿µ¸íÃàÀÏ,»ýÀÏÀ϶§´Â enableó¸® * ¿µ¸íÃàÀÏ, »ýÀÏÀ» ¼±ÅÃÇÑ °æ¿ì¿¡´Â ³¯Â¥ Á¶°ÇÀ» ¿ù/Àϸ¸ Á¶È¸Çϵµ·Ï input componentº¯°æÃ³¸® * ¼¼·ÊÀÏ:bapt, °ßÁøÀÏ:conf, ¿µ¸íÃàÀÏ:fest, »ýÀÏ: birth * ------------------------------------------------------------------------------------------------------------------------------------------------------------ */ function fIsEnableDate(ddflag){ //ÇØ´ç¾øÀ½ ¼±Åà if(ddflag == 'none'){ ipt_fromdd.disabled = true; ipt_todd.disabled = true; ipt_fromdd.attribute("width") = "95"; ipt_todd.attribute("width") = "95"; ipt_fromdd.attribute('format') = 'yyyy-mm-dd'; ipt_todd.attribute('format') = 'yyyy-mm-dd'; model.setValue(xCondPath + '/fromdd', ''); model.setValue(xCondPath + '/todd', ''); } //¿µ¸íÃàÀÏ or »ýÀϼ±Åà else if(ddflag == 'fest' || ddflag == 'birth'){ ipt_fromdd.disabled = false; ipt_todd.disabled = false; ipt_fromdd.attribute("width") = "60"; ipt_todd.attribute("width") = "60"; ipt_fromdd.attribute('format') = 'mm-dd'; ipt_todd.attribute('format') = 'mm-dd'; model.setValue(xCondPath + '/fromdd', currentdate.substring(4)); model.setValue(xCondPath + '/todd', currentdate.substring(4)); } else{ ipt_fromdd.disabled = false; ipt_todd.disabled = false; ipt_fromdd.attribute("width") = "95"; ipt_todd.attribute("width") = "95"; ipt_fromdd.attribute('format') = 'yyyy-mm-dd'; ipt_todd.attribute('format') = 'yyyy-mm-dd'; model.setValue(xCondPath + '/fromdd', currentdate); model.setValue(xCondPath + '/todd', currentdate); } model.refresh(); } /** * @date : 2008.01.13 * @author : dhkim * ------------------------------------------------------------------------------------------------------------------------------------------------------------ * @type : function * @access : public * @desc : Æ®¸®¿¡¼­ ¼±ÅÃÇÑ ºÎ¼­ÀÇ ÇÏÀ§¿¡ ÆÀÀÌ Á¸ÀçÇÒ °æ¿ì ÇÏÀ§¿¡ ¼ÓÇÑ Á÷¿øµµ Á¶È¸µÇµµ·Ï ÇÑ´Ù. * ºÎ¼­¸¦ ¼±ÅÃÇÏÁö ¾Ê°í Á¶È¸ÇÏ´Â °æ¿ì¿¡ ¶óµð¿À±¸ºÐÀ» »ýÀÏÀ» ¼±ÅÃÇϰųª ±³Á÷¿ø¸íÀ» ÀÔ·ÂÇÑ °æ¿ì°¡ ¾Æ´Ï¶ó¸é ºÎ¼­¼±ÅÃÀº ÇʼöÁ¶°ÇÀ¸·Î üũÇÑ´Ù. * Á¶È¸Á¶°Ç ½ÃÀÛ,Á¾·áÀÏÀº ÇÑ´ÞÀÌ»óÀ» ³ÑÁö ¾Êµµ·Ï ÇÑ´Ù. * ¿µ¸íÃàÀÏ/»ýÀÏ ¼±ÅÃÀÇ °æ¿ì¿¡´Â Á¶È¸Á¶°ÇÀ» mm-dd ·Î °Ë»öÇÑ´Ù. * ------------------------------------------------------------------------------------------------------------------------------------------------------------ */ function fSearch(){ var deptcd = model.getValue(xCondPath + '/deptcd'); //ºÎ¼­ÄÚµå if(deptcd == ''){ var idx = 1; model.setValue(xCondPath + '/deptcd', model.getValue(xTreePath + "/item[" + idx + "]/deptcd")); model.setValue(xCondPath + '/deptnm', model.getValue(xTreePath + "/item[" + idx + "]/deptnm")); model.setValue(xCondPath + '/depth', model.getValue(xTreePath + "/item[" + idx + "]/depth")); model.refresh(); } var depth = model.getValue(xCondPath + '/depth'); //·¹º£·ç var deptdownyn = model.getValue(xCondPath + '/deptdownyn'); //ÇÏÀ§ºÎ¼­Á¸Àç¿©ºÎ var religioncd = model.getValue(xCondPath + '/religioncd'); //Á¾±³ var emplnm = model.getValue(xCondPath + '/emplnm'); //»ç¿ø¸í var ddflag = model.getValue(xCondPath + '/ddflag'); //±¸ºÐ var fromdd = model.getValue(xCondPath + '/fromdd'); //½ÃÀÛÀÏ var todd = model.getValue(xCondPath + '/todd'); //Á¾·áÀÏ // if(depth < 3 && ddflag == 'none' && emplnm == ''){ if(depth < 2 && ddflag == 'none' && emplnm == ''){ messageBox('±³Á÷¿ø¸íÀ» ÀÔ·ÂÇϽðųª ÇÏÀ§ºÎ¼­¸¦', 'C002'); return false; } if(ddflag == 'bapt' || ddflag == 'conf'){ if(fromdd == '' || !isValidDateTime(fromdd, 'YYYYMMDD')){ messageBox('Á¶È¸½ÃÀÛÀÏÀ» ³¯Â¥Çü½Ä(¿¹:2008-01-01)¿¡ ¸Â°Ô', 'C001'); return false; } if(todd == '' || !isValidDateTime(todd, 'YYYYMMDD')){ messageBox('Á¶È¸Á¾·áÀÏÀ» ³¯Â¥Çü½Ä(¿¹:2008-01-01)¿¡ ¸Â°Ô', 'C001'); return false; } if(fromdd > todd){ messageBox('½ÃÀÛÀÏÀÌ Á¾·áÀϺ¸´Ù Ŭ ¼ö' , 'I004'); return false; } if(getDateInterval(fromdd, todd) > 30){ messageBox('½ÃÀÛÀÏ, Á¾·áÀÏÀÇ ±¸°£À» ÇÑ´Þ´ÜÀ§·Î', 'C001'); return false; } }else if(ddflag == 'fest' || ddflag == 'birth'){ if(fromdd == '' || !isValidDateTime(fromdd, 'MMDD')){ messageBox('Á¶È¸½ÃÀÛÀÏÀ» ³¯Â¥Çü½Ä(¿¹:01-01)¿¡ ¸Â°Ô', 'C001'); return false; } if(todd == '' || !isValidDateTime(todd, 'MMDD')){ messageBox('Á¶È¸Á¾·áÀÏÀ» ³¯Â¥Çü½Ä(¿¹:01-01)¿¡ ¸Â°Ô', 'C001'); return false; } if(fromdd > todd){ messageBox('½ÃÀÛÀÏÀÌ Á¾·áÀϺ¸´Ù Ŭ ¼ö' , 'I004'); return false; } if(getDateInterval('0000'+fromdd, '0000'+todd) > 30){ messageBox('½ÃÀÛÀÏ, Á¾·áÀÏÀÇ ±¸°£À» ÇÑ´Þ´ÜÀ§·Î', 'C001'); return false; } } model.removenode(xSendPath); model.makeNode(xSendPath); model.copyNode(xSendPath, xCondPath); if(!submit('TRAYA02501')){ messageBox('Á¶È¸¸¦', 'E009'); } } /** * @date : 2008.01.15 * @author : dhkim * ------------------------------------------------------------------------------------------------------------------------------------------------------------ * @type : function * @access : public * @desc : ExcelÆÄÀÏ·Î ÀúÀå * ------------------------------------------------------------------------------------------------------------------------------------------------------------ */ function fSaveExcel(){ var file = window.fileDialog("save","","true","","xls","All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if(file != "") { grd_religion.saveExcel(file); } } /** * @date : 2008.01.15 * @author : dhkim * ------------------------------------------------------------------------------------------------------------------------------------------------------------ * @type : function * @access : public * @desc : ±×¸®µå¿¡ Á¶È¸µÈ ±³Á÷¿øÁ¾±³ÇöȲ°á°ú¸¦ rexpert·Î Ãâ·Â * ------------------------------------------------------------------------------------------------------------------------------------------------------------ */ function fPrint(){ //±×¸®µå¿¡ Á¶È¸µÈ Çà»çÀÏÁ¤ °á°ú¸¦ rexpert¸¦ ÀÌ¿ëÇØ Ãâ·Â exeReportPreview("RPAYA02501", "XMLSTR"); //¹Ì¸®º¸±â } /** * @date : 2008.01.15 * @author : dhkim * ------------------------------------------------------------------------------------------------------------------------------------------------------------ * @type : function * @access : public * @desc : ºÎ¼­¼±ÅÃÆË¾÷À» È£Ãâ * ------------------------------------------------------------------------------------------------------------------------------------------------------------ */ function fPopDeptCode(){ var search_condition = "deptnm"; var search_term = model.getValue("/root/cond/deptnm"); var receive_deptcd_path = "/root/cond/deptcd"; var receive_deptnm_path = "/root/cond/deptnm"; var standard_yn = "orduseyn"; var ord_deptflag = "D"; zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag, new Array("deptcd", "depthngnm")); //±â°üº° ºÎ¼­Á¤º¸ °Ë»ö ÆË¾÷À» È£Ãâ }