/** - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ÀÇ·áÁ¤º¸ - ¾È³»¹®°ü¸® ( SMMRC02500_¾È³»¹®°ü¸®.xrw - JScript ) - Version : 1) : Ver.1.00.01 - Author : ÀÌÀº¿µ - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì **/ var xGuideDocuInfoPath = "/root/main/guidedocuinfo/guidedocu"; var xGuideDocuHistInfoPath = "/root/main/guidedocuhistinfo/guidedocuhistlist"; /** * @ver : 2008-02-29 * @desc : È­¸éÃʱâÈ­ * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ fSrchGuideDocuHist(); fDisabled(true); btn_update.disabled = true; btn_delete.disabled = true; btn_save.disabled =true; model.refresh(); } /** * @ver : 2008-02-29 * @desc : ÀÌ·ÂÁ¶È¸ * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fSrchGuideDocuHist(){ model.removenode("/root/send"); model.makeNode("/root/send"); model.copyNode("/root/send", "/root/main/cond"); submit("TRMRC02501"); } /** * @ver : 2008-02-29 * @desc : ÆÄÀÏ Ãß°¡ * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fUploadGuideDocuFile(){ var file = window.fileDialog("open","","false","","","RTF Files(*.rtf)|*.rtf"); if (file == "") { return; } // ¼±ÅÃÇÑ ÆÄÀÏÀ» RTF viewer·Î º¸¿©ÁØ´Ù. rtfviewer.OpenRtfFile(file); rtfviewer.ReadOnly = "true"; model.setValue(xGuideDocuInfoPath+"/guidedocunm",fGetFileName(file)); model.setValue(xGuideDocuInfoPath+"/guidedocudata",rtfviewer.TextRtf); model.refresh(); } /** * @ver : 2008-02-29 * @desc : ÆÄÀÏ¸í °¡Á®¿À±â * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fGetFileName(path) { var lastIdx = path.lastIndexOf("\\"); if (lastIdx >= 0) { return path.substr(lastIdx+1); } else { return path; } } /** * @ver : 2008-02-29 * @desc : ½Å±Ô ¾È³»¹® * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fNewGuideDocu(){ alert("¾È³»¹® ±¸ºÐ Ãß°¡¿¡ °ü·ÃµÈ ¾÷¹«ÇùÀÇ ÁßÀ¸·Î ½Å±ÔÀÛ¼º Á¦ÇÑ Áß."); return ; model.resetInstanceNode(xGuideDocuInfoPath); rtfviewer.clear(); fDisabled(false); btn_update.disabled = true; btn_delete.disabled = true; btn_save.disabled =false; model.setValue(xGuideDocuInfoPath+"/status","i"); model.refresh(); } /** * @ver : 2008-02-29 * @desc : ¾È³»¹® ¼öÁ¤ * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fUpdateGuideDocu(){ var status = model.getValue(xGuideDocuInfoPath +"/status"); if(status == "i" || status == ""){ messageBox("ÇØ´ç ¾È³»¹®À»","C002"); return; } fDisabled(false); btn_update.disabled = true; btn_delete.disabled = false; btn_save.disabled =false; model.refresh(); } /** * @ver : 2008-02-29 * @desc : ¾È³»¹® »èÁ¦ * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fDelGuideDocu(){ alert("±ÇÇÑÀÌ ÀÖ´Â ÀÚ¸¸ »èÁ¦°¡ °¡´ÉÇÕ´Ï´Ù. "); return ; var status = model.getValue(xGuideDocuInfoPath +"/status"); if(status == "i" || status == ""){ messageBox("ÇØ´ç ¾È³»¹®À»","C002"); return; } model.setValue(xGuideDocuInfoPath +"/status","d"); fSave(); } /** * @ver : 2008-02-29 * @desc : ºñȰ¼ºÈ­ ¿©ºÎ * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fDisabled(pFlag){ cmb_guidedocuflag.disabled=pFlag; ipt_guidedocunm.disabled = pFlag; btn_addfile.disabled = pFlag; } /** * @ver : 2008-02-29 * @desc : ÀúÀå * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fSave(){ if(model.getValue(xGuideDocuInfoPath+"/guidedocuflag") == ""){ messageBox("¾È³»¹® ±¸ºÐÀ»","C001"); return; } if(model.getValue(xGuideDocuInfoPath+"/guidedocunm") == ""){ messageBox("¾È³»¹®¸íÀ»","C001"); return; } if(model.getValue(xGuideDocuInfoPath+"/guidedocudata") == ""){ messageBox("ÆÄÀÏÀ» Ãß°¡","I008"); return; } model.removenode("/root/send"); model.makeNode("/root/send"); model.copyNode("/root/send", xGuideDocuInfoPath); model.makeValue("/root/send/srchflag", model.getValue("/root/main/cond/srchflag")); model.removenodeset("/root/main/guidedocuhistinfo"); if(submit("TXMRC02501")){ model.resetInstanceNode(xGuideDocuInfoPath); rtfviewer.clear(); fDisabled(true); btn_update.disabled = true; btn_delete.disabled = true; btn_save.disabled =true; model.refresh(); } } /** * @ver : 2008-02-29 * @desc : ¾È³»¹® Á¤º¸¸¦ Á¶È¸ * @ * @by : ÀÌÀº¿µ * @param : * @return : * @--------------------------------------------------- */ function fSrchGuideDocuInfo(){ if(grd_guidedoculist.isCell(event.target)){ var iRow = grd_guidedoculist.row; if(iRow < 1) return; model.removenode("/root/send"); model.makeValue("/root/send/guidedocucd", model.getValue(xGuideDocuHistInfoPath+"["+iRow+"]/guidedocucd")); if(submit("TRMRC02502")){ rtfviewer.TextRtf = model.getValue(xGuideDocuInfoPath+"/guidedocudata"); rtfviewer.ReadOnly = "true"; fDisabled(true); btn_update.disabled = false; btn_delete.disabled = false; btn_save.disabled =true; model.refresh(); } } } /** * @ver : 2008-02-29 * @desc : Á¶È¸ * @ * @by : * @param : * @return : * @--------------------------------------------------- */ function fSearch(){ alert("¾È³»¹® ±¸ºÐ Ãß°¡¿¡ °ü·ÃµÈ ¾÷¹«ÇùÀÇ ÁßÀÔ´Ï´Ù."); }