/*********************************************************************************************************************************************** * create date : 2008.02.12 * author : dhkim * file name : SMMNA01040.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); zbcfGetCodeList(new Array("M0376","L0095"), new Array("/root/init/M0376list","/root/init/L0095list")); //Ç÷¾×Çü,Á÷¾÷ÄÚµå //grd_dnorlist.extendLastCol = true; grd_dnorlist.frozencols = grd_dnorlist.colref("sex"); fSearch(); } /* * APU ÇåÇ÷ÀÚ ¸í´Ü¸¦ Á¶È¸ÇÑ´Ù. */ function fSearch(){ var fromdd = model.getValue(xCondPath+'/fromdd'); var todd = model.getValue(xCondPath+'/todd'); var pidflag = model.getValue(xCondPath+'/pidflag'); var pid = model.getValue(xCondPath+'/pid'); var btype = model.getValue(xCondPath+'/btype'); var kindflag = model.getValue(xCondPath+'/kindflag'); if(fromdd == '') fromdd = currentDate; if(todd == '') todd = currentDate; model.removeNodeset(xDnorPath + "/dnorlist"); model.removeNodeset(xReqPath); model.makeValue(xReqPath + '/fromdd', fromdd); model.makeValue(xReqPath + '/todd', todd); model.makeValue(xReqPath + '/pidflag', pidflag); model.makeValue(xReqPath + '/pid', pid); model.makeValue(xReqPath + '/btype', btype); model.makeValue(xReqPath + '/kindflag', kindflag); if(!submit('TRMNA01041')){ messageBox('Á¶È¸¸¦', 'E009'); } } /* * ¿¢¼¿Ãâ·Â */ function fExcel(){ var pGrd = grd_dnorlist; if (pGrd.rows > pGrd.fixedrows ) { var fileName = window.fileDialog("save", ",", false, "APUÇåÇ÷ÀÚ¸í´Ü_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if (fileName != "") { pGrd.saveExcel(fileName, "SheetName", true, true, "", "", false); messageBox("¿¢¼¿ÀúÀåÀÌ ", "I002", ""); //I002 : ¿Ï·áµÇ¾ú½À´Ï´Ù. } } else { messageBox("ÀÚ·á°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.", "E999", ""); } } /* * ÆË¾÷ */ function fSearchPatInfo() { var flag = model.getValue("/root/cond/pidflag"); var vPid = ""; if (flag =="") return; vPid = model.getValue("/root/cond/pid"); var vsrchcond = "1"; //ÆË¾÷Á¶°Ç¼³Á¤ switch (flag) { case "1": // °ø¿©ÀÚÆË¾÷ //dnorno model.removenode("/root/temp"); model.makeValue("/root/temp/srchcond", vsrchcond); model.makeValue("/root/temp/dnorno", vPid); model.makeValue("/root/temp/autoflag", "Y"); //Y:Á¶È¸ ³»¿ªÀÌ 1°ÇÀÏ °æ¿ì ÀÚµ¿ È­¸é ´Ý±â //NON:Á¶È¸ ³»¿ªÀÌ ¾øÀ» °æ¿ì ÀÚµ¿ È­¸é ´Ý±â //dnornm if ( vPid.isNumber() != true ) { vsrchcond = "2"; model.removenode("/root/temp"); model.makeValue("/root/temp/srchcond", vsrchcond); model.makeValue("/root/temp/dnornm", vPid); model.makeValue("/root/temp/autoflag", "Y"); } //ÆË¾÷È£Ãâ modal("SPMNA02000", "1","150", "150", "SPMNA02000", "/root/temp", "/root/send"); break; case "2": // ȯÀÚÆË¾÷ //pid model.removenode("/root/temp"); model.makeValue("/root/temp/srchcond", vsrchcond); model.makeValue("/root/temp/pid", vPid); model.makeValue("/root/temp/autoflag", "Y"); //¸íĪ if ( vPid.isNumber() != true ) { vsrchcond = "2"; model.removenode("/root/temp"); model.makeValue("/root/temp/srchcond", vsrchcond); model.makeValue("/root/temp/pid", ''); model.makeValue("/root/temp/hngnm", vPid); model.makeValue("/root/temp/autoflag", "Y"); } //ÆË¾÷È£Ãâ modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/temp", "/root/send"); break; } //¸®Åϰª if (model.getValue("/root/main/popupendflag") == "ok") { var idnorno = model.getValue("/root/main/dnorpopinfo/dnorpoplist/dnorno"); var idnornm = model.getValue("/root/main/dnorpopinfo/dnorpoplist/dnornm"); var irrgstno = model.getValue("/root/main/dnorpopinfo/dnorpoplist/rrgstno1") + "-" + model.getValue("/root/main/dnorpopinfo/dnorpoplist/rrgstno2") ; model.setValue("/root/cond/pid", idnorno ); model.setValue("/root/cond/pidnm", idnornm ); model.setValue("/root/cond/rrgstno", irrgstno ); model.refresh(); } }