/** * @group : * @ver : 2009.12.19 * @by : ¹Ú±¸¼ø * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸éÀ» ÃʱâÈ­ ÇÑ´Ù * @param : * @return : * @--------------------------------------------------- */ function fInitalize(){ var MenuParam = getScreenMenuParameter(); grd_abbrLists.attribute("height") = 645; // °øÅëÄڵ带 Á¶È¸ÇÑ´Ù. //zbcfGetCodeList( new Array("A0129"), new Array("/root/init/A0129list") ); submit("TRMRF00802"); if ( MenuParam == "S") { model.setValue("/root/init/abbrtype","02"); radio1.dispatch("xforms-value-changed"); radio1.refresh(); fSelectAbbrMasterLists(); radio1.disabled = true; } } function fInit1(){ grd_abbrLists.attribute("height") = 645; model.removeNodeset("/root/main/abbrinfo"); model.makeNode("/root/main/abbrinfo"); model.copyNode("/root/main/abbrinfo","/root/init/abbrinfo"); button9.visible = "true"; button5.visible = "false" button29.visible = "false" } function fSelectAbbrType(){ if(radio1.value =="01"){ group2.visible = "true"; model.setValue("/root/init/abbrkind","%"); cmb_abbrkind.refresh(); cmb_abbrkind.disabled = "false"; }else{ group2.visible = "false"; model.setValue("/root/init/abbrkind","%"); cmb_abbrkind.refresh(); cmb_abbrkind.disabled = "true"; } } function fSelectAbbrNM(param){ fInit1(); // model.setValue("/root/send/abbrtype","01"); // model.setValue("/root/send/abbrkind","%"); // model.setValue("/root/send/perfectyn","N"); // model.setValue("/root/send/useyn","%"); // model.setValue("/root/send/keyword",param); // model.setValue("/root/send/keytag","09"); model.setValue("/root/send/abbrtype" ,model.getValue("/root/init/abbrtype")); model.setValue("/root/send/abbrkind" ,model.getValue("/root/init/abbrkind")); model.setValue("/root/send/perfectyn",model.getValue("/root/init/perfectyn")); model.setValue("/root/send/useyn" ,model.getValue("/root/init/useyn")); model.setValue("/root/send/keyword",param); model.setValue("/root/send/keytag","09"); submit("TRMRT00801"); } function fSelectAbbrMasterLists(){ model.setValue("/root/send/abbrtype" ,model.getValue("/root/init/abbrtype")); model.setValue("/root/send/abbrkind" ,model.getValue("/root/init/abbrkind")); model.setValue("/root/send/perfectyn",model.getValue("/root/init/perfectyn")); model.setValue("/root/send/useyn" ,model.getValue("/root/init/useyn")); model.setValue("/root/send/keyword" ,model.getValue("/root/init/keyword")); if(ipt_keyword.value.length < 2 && model.getValue("/root/init/perfectyn") =="N" &&model.getValue("/root/init/abbrtype")=="01"){ if(model.getValue("/root/init/abbrkind")=="%"||model.getValue("/root/init/abbrkind")=="01"||model.getValue("/root/init/abbrkind")=="02"){ messageBox("°Ë»ö¾î´Â 2ÀÚ ÀÌ»ó ÀÔ·ÂÇØ¾ß °¡´É ÇÕ´Ï´Ù. ","I007");//I007=È®ÀÎÇϽʽÿÀ. return; } } model.setValue("/root/send/keytag" ,model.getValue("/root/init/keytag")); submit("TRMRT00801"); } function fSelectAbbrMasterInfo(){ var cur_row = grd_abbrLists.row; var vAbbrcd = grd_abbrLists.valueMatrix(cur_row,3); if(cur_row <= 0 || cur_row =="undefined") { messageBox("¼öÁ¤ ÇÒ ÇàÀ» ¼±ÅÃÇϽñ⠹ٶø´Ï´Ù.","I007"); return; } if(vAbbrcd !=""){ var vAbbrType = grd_abbrLists.valueMatrix(cur_row,1); fSetAbbrMasterInfo("update", vAbbrType); rdo_abbrtype.disabled="true"; grd_abbrLists.attribute("height") = 360; button9.visible = "false"; button5.visible = "true" button29.visible = "true" model.setValue("/root/send/abbrcd" ,vAbbrcd); submit("TRMRT00802"); }else{ messageBox("¾à¾îÄÚµå Á¤º¸°¡ ¾ø½À´Ï´Ù.","I003"); } } function fSetAbbrMasterInfo(flag, vAbbrType){ if(flag=="new"){ if(vAbbrType =="01"){ // ¾à¾îÀΰæ¿ì¼¼ÆÃ // rdo_abbrtype.disabled="true"; // ¼öÁ¤½Ã ¾à¾î ±ÝÁö¾î º¯°æ ¸øÇÏ°Ô ¸·À½ btn_synominfo.visible ="true"; btn_recminfo.visible ="false"; model.setValue("/root/main/abbrinfo/abbrkind","01"); rdo_abbrkind.refresh(); rdo_abbrkind.disabled = "false"; model.setValue("/root/main/abbrinfo/unitkindseq",""); cmb_unitkindseq.refresh(); cmb_unitkindseq.disabled = "false"; model.setValue("/root/main/abbrinfo/exchval",""); ipt_exchval.refresh(); ipt_exchval.disabled = "false"; ipt_dclrtresn.disabled="true"; }else if(vAbbrType =="02"){ // ±ÝÁö¾î ÀÎ °æ¿ì ¼¼ÆÃ // rdo_abbrtype.disabled="true"; // ¼öÁ¤½Ã ¾à¾î ±ÝÁö¾î º¯°æ ¸øÇÏ°Ô ¸·À½ btn_synominfo.visible ="false"; btn_recminfo.visible ="true"; ipt_dclrtresn.disabled="false"; model.setValue("/root/main/abbrinfo/abbrkind","-"); rdo_abbrkind.refresh(); model.setValue("/root/main/abbrinfo/unitkindseq",""); cmb_unitkindseq.refresh(); cmb_unitkindseq.disabled = "true"; model.setValue("/root/main/abbrinfo/exchval",""); ipt_exchval.refresh(); ipt_exchval.disabled = "true"; rdo_abbrkind.disabled = "true"; } }else{ if(flag =="01"){ // ¾à¾îÀΰæ¿ì¼¼ÆÃ // rdo_abbrtype.disabled="true"; // ¼öÁ¤½Ã ¾à¾î ±ÝÁö¾î º¯°æ ¸øÇÏ°Ô ¸·À½ btn_synominfo.visible ="true"; btn_recminfo.visible ="false"; rdo_abbrkind.disabled = "false"; cmb_unitkindseq.disabled = "false"; ipt_exchval.disabled = "false"; ipt_dclrtresn.disabled="true"; }else if(flag =="02"){ // ±ÝÁö¾î ÀÎ °æ¿ì ¼¼ÆÃ // rdo_abbrtype.disabled="true"; // ¼öÁ¤½Ã ¾à¾î ±ÝÁö¾î º¯°æ ¸øÇÏ°Ô ¸·À½ btn_synominfo.visible ="false"; btn_recminfo.visible ="true"; ipt_dclrtresn.disabled="false"; cmb_unitkindseq.disabled = "true"; ipt_exchval.disabled = "true"; rdo_abbrkind.disabled = "true"; } } } function fSetNewAbbrMasterInfo(){ grd_abbrLists.attribute("height") = 360; rdo_abbrtype.disabled="false"; model.removeNodeset("/root/main/abbrinfo"); model.makeNode("/root/main/abbrinfo"); model.copyNode("/root/main/abbrinfo","/root/init/abbrinfo"); button9.visible = "false"; button5.visible = "true" button29.visible = "true" model.makeValue("/root/main/abbrinfo/abbrtodd","29991231"); model.makeValue("/root/main/abbrinfo/abbrfromdd",getCurrentDate().substr(0, 8)); model.refresh(); fSetAbbrMasterInfo("new","01"); } /* * ÀúÀå ¹öưÀ» Ŭ¸¯ÇÏ¿´À» °æ¿ì À̺¥Æ® * */ function fOnClickSaveBtn(){ if(""==model.getValue("/root/main/abbrinfo/abbrnm")){ messageBox("¾à¾î Ç׸ñÀÌ ´©¶ô µÇ¾ú½À´Ï´Ù.","I003"); return; } if(""==model.getValue("/root/main/abbrinfo/abbrengnm")){ messageBox("¿µ¹®¸í Ç׸ñÀÌ ´©¶ô µÇ¾ú½À´Ï´Ù.","I003"); return; } // if(""==model.getValue("/root/main/abbrinfo/abbrhngnm")){ // messageBox("Çѱ۸í Ç׸ñÀÌ ´©¶ô µÇ¾ú½À´Ï´Ù.","I003"); // return; // } if(""==model.getValue("/root/main/abbrinfo/abbrfromdd")){ messageBox("½ÃÀÛÀÏÀÚ Ç׸ñÀÌ ´©¶ô µÇ¾ú½À´Ï´Ù.","I003"); return; } if(""==model.getValue("/root/main/abbrinfo/abbrtodd")){ messageBox("Á¾·áÀÏÀÚ Ç׸ñÀÌ ´©¶ô µÇ¾ú½À´Ï´Ù.","I003"); return; } if("01"==model.getValue("/root/main/abbrinfo/abbrtype") && "03"==model.getValue("/root/main/abbrinfo/abbrkind")){ // ¾à¾î+´ÜÀ§ if(""==model.getValue("/root/main/abbrinfo/unitkindseq")){ // ±ÝÁö¾î messageBox("´ÜÀ§À¯Çü Ç׸ñÀÌ ´©¶ô µÇ¾ú½À´Ï´Ù.","I003"); return; } // if(""==model.getValue("/root/main/abbrinfo/exchval")){ // ±ÝÁö¾î // messageBox("´ÜÀ§È¯»ê°ª Ç׸ñÀÌ ´©¶ô µÇ¾ú½À´Ï´Ù.","I003"); // return; // } } if("02"==model.getValue("/root/main/abbrinfo/abbrtype")){ // ±ÝÁö¾î if(""==model.getValue("/root/main/abbrinfo/dclrtresn")){ // ±ÝÁö¾î messageBox("±ÝÁö»çÀ¯ Ç׸ñÀÌ ´©¶ô µÇ¾ú½À´Ï´Ù.","I003"); return; } } // model.removeNodeset("/root/newabbrcd"); if( submit("TXMRT00801")){ // model.setValue("/root/send/abbrcd" ,model.getValue("/root/newabbrcd/abbrcd")); // submit("TRMRT00802"); fSetAbbrMasterInfo("save",model.getValue("/root/main/abbrinfo/abbrtype")); button9.visible = "true"; button5.visible = "false" button29.visible = "false" } } function fOnClickCancleBtn(){ model.removeNodeset("/root/main/abbrinfo"); model.makeNode("/root/main/abbrinfo"); model.copyNode("/root/main/abbrinfo","/root/init/abbrinfo"); button9.visible = "true"; button5.visible = "false"; button29.visible = "false"; model.refresh(); } function fOpenSynomPop(){ var vAbbrcd = model.getValue("/root/main/abbrinfo/abbrcd"); if(vAbbrcd!=""){ setParameter("SPMRJ01800_abbrcd", vAbbrcd); modal("SPMRT01800"); //SPMRT01800_¾à¾îÀǵ¿ÀǾî°ü¸®.xrw submit("TRMRT00802"); }else{ messageBox("¾à¾îÄÚµå Á¤º¸°¡ ¾ø½À´Ï´Ù.","I003"); } } function fOpenRecmPop(){ var vAbbrcd = model.getValue("/root/main/abbrinfo/abbrcd"); if(vAbbrcd!=""){ setParameter("SPMRJ01900_abbrcd", vAbbrcd); modal("SPMRT01900"); //SPMRT01800_¾à¾îÀǵ¿ÀǾî°ü¸®.xrw submit("TRMRT00802"); }else{ messageBox("¾à¾îÄÚµå Á¤º¸°¡ ¾ø½À´Ï´Ù.","I003"); } } function fOpenAbbrPop(){ modal("SPMRT02000"); //SPMRT02000_¾à¾î°Ë»ö.xrw } function fSaveExecl(){ var vRowCount = grd_abbrLists.Rows; if( vRowCount <= 1){ messageBox("ÀúÀå ÇÒ Á¤º¸°¡ ¾ø½À´Ï´Ù.","I003"); }else{ var saveFileName = getCurrentDate().substr(0, 8)+"_¾à¾î°Ë»ö"; var fileName = window.fileDialog("save", ",", false, saveFileName, "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if (fileName != ""){ grd_abbrLists.saveExcel(fileName); } } }