/*********************************************************************************************************************************************** * create date : 2007.12.29 * author : dhkim * file name : SMLBD01700.js * desc : Ç÷¾×Æó±â¹°¸®½ºÆ®¸¦ Á¶È¸ÇÑ´Ù. ***********************************************************************************************************************************************/ var xCondPath = '/root/cond'; //Á¶È¸ xPath var xSendPath = '/root/send/reqdata'; //request xPath var currentDate = getCurrentDate(); //ÇöÀçÀÏÀÚ /* * Ç÷¾×Æó±â¹° ³»¿ªÀ» Á¶È¸ÇÑ´Ù. */ function fSearch(){ var sdate = model.getValue(xCondPath + '/fromdd'); var edate = model.getValue(xCondPath + '/todd'); if(sdate > edate){ messageBox('Á¶È¸½ÃÀÛÀÏÀÚ¸¦ Á¶È¸Á¾·áÀÏÀÚº¸´Ù ÀÌÀüÀ¸·Î', 'C001'); return false; } model.removeNodeset(xSendPath); model.makeValue(xSendPath+'/ddflag', model.getValue(xCondPath + '/ddflag')); model.makeValue(xSendPath+'/fromdd', model.getValue(xCondPath + '/fromdd')); model.makeValue(xSendPath+'/todd', model.getValue(xCondPath + '/todd')); submit('TRLBD01701'); } /** * Á¶È¸Á¶°Ç ÃʱâÈ­ */ function fInit(){ fChangeDDFlag('dd'); model.refresh(); fSearch(); } /** * ³â,¿ù,ÀϺ° °Ë»öÁ¶°Ç¿¡ µû¶ó Á¶È¸½ÃÀÛ, Á¾·á ³¯Â¥ ÄÄÆÛ³ÍÆ®¸¦ ³â,¿ù,ÀÏ Çü½Ä¿¡ ¸Â°Ô ¹Ù²ãÁØ´Ù. * */ function fChangeDDFlag(ddflag){ model.removeNodeset(xCondPath); model.makeNode(xCondPath + '/ddflag'); model.makeNode(xCondPath + '/fromdd'); model.makeNode(xCondPath + '/todd'); var condDate = currentDate; if(ddflag == 'dd'){ cap_date.value = '±âÁØÀÏÀÚ : '; ipt_fromdd.attribute("width") = "95"; ipt_todd.attribute("width") = "95"; ipt_fromdd.attribute('format') = 'yyyy-mm-dd'; ipt_todd.attribute('format') = 'yyyy-mm-dd'; }else if(ddflag == 'mm'){ condDate = condDate.substring(0, 6); cap_date.value = '±âÁسâ¿ù : '; ipt_fromdd.attribute("width") = "80"; ipt_todd.attribute("width") = "80"; ipt_fromdd.attribute('format') = 'yyyy-mm'; ipt_todd.attribute('format') = 'yyyy-mm'; }else if(ddflag == 'yy'){ condDate = condDate.substring(0, 4); cap_date.value = '±âÁس⵵ : '; ipt_fromdd.attribute("width") = "60"; ipt_todd.attribute("width") = "60"; ipt_fromdd.attribute('format') = 'yyyy'; ipt_todd.attribute('format') = 'yyyy'; } model.setValue(xCondPath + '/ddflag', ddflag); model.setValue(xCondPath + '/fromdd', condDate); model.setValue(xCondPath + '/todd', condDate); model.refresh(); }