/*********************************************************************************************************************************************** * create date : 2008.02.12 * author : dhkim * file name : SMMNA01000.js * desc : APU_¾÷¹«ÇöȲÁ¶È¸ ***********************************************************************************************************************************************/ var xDnorPath = '/root/main/dnorinfo'; var xCondPath = '/root/cond'; var xReqPath = '/root/send/reqdata'; var currentDate = getCurrentDate(); /* * ÃʱâÈ­ */ function fInit(){ model.removeNodeset(xDnorPath); model.setValue(xCondPath + '/fromdd', currentDate); model.setValue(xCondPath + '/todd', currentDate); //20090206 dhkim //°øÅëÄÚµå zbcfGetCodeList(new Array("L0099" , "L0100" , "L0101" , "L0102" , "L0103") , new Array("/root/init/L0099list" , "/root/init/L0100list" , "/root/init/L0101list" , "/root/init/L0102list" , "/root/init/L0103list") , true); //zbcfGetCodeList(new Array("M0376"), new Array("/root/init/M0376list")); //Ç÷¾×Çü submit("TRMNA01053"); //º´µ¿ÄÞº¸ //grd_dnorlist.extendLastCol = true; grd_dnorsum.frozencols = grd_dnorsum.colRef("depttotal"); grd_dnorlist.frozencols = grd_dnorlist.colRef("execdt"); grd_dnorsum.rowheight(0) = 30; grd_dnorsum.rowheight(1) = 35; //alert(grd_dnorsum.rowheight(0) + "/" + grd_dnorsum.rowheight(1)); fSearch(); } /* * APU_¾÷¹«ÇöȲÁ¶È¸ */ function fSearch(){ var dayflag = model.getValue(xCondPath+'/dayflag'); var fromdd = model.getValue(xCondPath+'/fromdd'); var todd = model.getValue(xCondPath+'/todd'); if(fromdd == '') fromdd = currentDate; if(todd == '') todd = currentDate; if (dayflag == "M") { fromdd = fromdd.substring(0,6) + '01'; todd = todd.substring(0,6) + '31' ; } if (dayflag == "Y") { fromdd = fromdd.substring(0,4)+ '0101' ; todd = todd.substring(0,4)+ '1231'; } model.removeNodeset(xDnorPath + "/dnorlist"); model.removeNodeset(xReqPath); model.makeValue(xReqPath + '/dayflag', dayflag); model.makeValue(xReqPath + '/fromdd', fromdd); model.makeValue(xReqPath + '/todd', todd); //if(!submit('TRMNA01051')){ if(!submit('TRMNA01052')){ messageBox('Á¶È¸¸¦', 'E009'); } fSearch2(); } /* * Áý°è±×¸®µå ¸¸µé±â */ function fSearch2(){ //1.ŸÀÌÆ²¸¸µé±â //2.±×¸®µå»ý¼ºÇϱâ } /* * ¿¢¼¿Ãâ·Â */ function fExcel(flag){ var fileNm = ""; var pGrd ; switch (flag) { case "S": fileNm = "APU ¾÷¹«³»¿ªSUM"; pGrd = grd_dnorsum; break; case "D": fileNm = "APU ¾÷¹«³»¿ªLIST"; pGrd = grd_dnorlist; break; } if (pGrd.rows > pGrd.fixedrows ) { var fileName = window.fileDialog("save", ",", false, fileNm + "_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if (fileName != "") { pGrd.saveExcel(fileName, "SheetName", true, true, "", "", false); messageBox("¿¢¼¿ÀúÀåÀÌ ", "I002", ""); //I002 : ¿Ï·áµÇ¾ú½À´Ï´Ù. } } else { messageBox("ÀÚ·á°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.", "E999", ""); } } /** * ³â,¿ù,ÀϺ° °Ë»öÁ¶°Ç¿¡ µû¶ó Á¶È¸½ÃÀÛ, Á¾·á ³¯Â¥ ÄÄÆÛ³ÍÆ®¸¦ ³â,¿ù,ÀÏ Çü½Ä¿¡ ¸Â°Ô ¹Ù²ãÁØ´Ù. * */ function fChangeDDFlag(ddflag){ var xCondPath = '/root/cond'; //Á¶È¸ xPath //model.removeNodeset(xCondPath); //model.makeNode(xCondPath + '/dayflag'); //model.makeNode(xCondPath + '/fromdd'); //model.makeNode(xCondPath + '/todd'); //var condDate = currentDate; if(ddflag == 'D'){ cap_date.value = '½ÃÇàÀÏÀÚ : '; ipt_Fromdd.attribute("width") = "95"; ipt_Enddd.attribute("width") = "95"; ipt_Fromdd.attribute('format') = 'yyyy-mm-dd'; ipt_Enddd.attribute('format') = 'yyyy-mm-dd'; }else if(ddflag == 'M'){ //condDate = condDate.substring(0, 6); cap_date.value = '½ÃÇà³â¿ù : '; ipt_Fromdd.attribute("width") = "80"; ipt_Enddd.attribute("width") = "80"; ipt_Fromdd.attribute('format') = 'yyyy-mm'; ipt_Enddd.attribute('format') = 'yyyy-mm'; }else if(ddflag == 'Y'){ //condDate = condDate.substring(0, 4); cap_date.value = '½ÃÇà³âµµ : '; ipt_Fromdd.attribute("width") = "60"; ipt_Enddd.attribute("width") = "60"; ipt_Fromdd.attribute('format') = 'yyyy'; ipt_Enddd.attribute('format') = 'yyyy'; } //model.setValue(xCondPath + '/ddflag', ddflag); //model.setValue(xCondPath + '/fromdd', condDate); //model.setValue(xCondPath + '/todd', condDate); model.refresh(); }