/* »óº´¼±ÅÃHelp °ü¸®(SPMRT01000.xfm - JScript ) - Version : 1) : Ver.1.00.01 */ var xCondPath = "/root/hidden/condition"; var xIndxListPath = "/root/main/indxlist/item"; var xTermListPath = "/root/main/termlist/terminfo"; /** * @group : * @ver : 2007.04.13 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInitalize(){ var indxflag = opener.javascript.getParameter("indxflag"); // Edited by NJ 2007-07-21 getDate() -> getCurrentDate() //model.setValue(xCondPath+"/basedd", getDate()); model.setValue(xCondPath+"/basedd", getCurrentDate()); model.setValue(xCondPath+"/indxflag", indxflag); // 0 : Áø´Ü, 9 : ¼ö¼ú, 2 : ÁÖÈ£¼Ò switch(indxflag){ case "0" : // Áø´Ü model.toggle("case_diagindx"); model.toggle("case_diagterminfo"); break; case "9" : // ¼ö¼ú model.toggle("case_opindx"); model.toggle("case_opterminfo"); break; case "2" : // Á¶È£¼Ò model.toggle("case_ccindx"); model.toggle("case_ccterminfo"); break; } model.removenodeset(xIndxListPath); model.removenodeset(xTermListPath); model.refresh(); model.makeValue("/root/send/indxflag", indxflag); submit("TRMRT01001"); } /** * @group : * @ver : 2007.04.13 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : ¿ë¾î Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSearchTermInfo(flag){ // »öÀμ±Åà ¾øÀÌ Á¶È¸ ¿äû 2008-09-15 ¹ÚÁ¤¿Á /* if(model.getValue(xCondPath+"/indxcd") == ""){ messageBox("»öÀÎÀ» ¸ÕÀú","C002"); return; } */ model.removenode("/root/send"); if(flag == "index"){ model.makeValue("/root/send/srchflag", ""); model.makeValue("/root/send/srchnm", ""); } else { model.makeValue("/root/send/srchflag", model.getValue(xCondPath+"/srchflag")); model.makeValue("/root/send/srchnm", model.getValue(xCondPath+"/srchnm")); } model.makeValue("/root/send/indxflag", model.getValue(xCondPath+"/indxflag")); model.makeValue("/root/send/indxcd", model.getValue(xCondPath+"/indxcd")); model.makeValue("/root/send/basedd", model.getValue(xCondPath+"/basedd")); submit("TRMRT01002"); } /** * @group : * @ver : 2007.04.13 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : ¼±ÅÃµÈ ¿ë¾î µî·Ï * @param : * @return : * @--------------------------------------------------- */ function fSendTermInfo(){ var indxflag = model.getValue(xCondPath+"/indxflag"); // 0 : Áø´Ü, 9 : ¼ö¼ú var sRowCnt = 0; var iSrchDiagRow = 0; var sTermCd = ""; switch(indxflag){ case "0" : // Áø´Ü sRowCnt = grd_diaginfo.rows - grd_diaginfo.fixedrows; var sSrchDiagObj = opener.document.controls("grd_srcheddiaginfo"); var sSrchDiagListPath = "/root/main/srcheddiagcdlist/srcheddiagcdinfo"; for(var iRow=1; iRow <= sRowCnt; iRow++){ if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){ sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd"); if(opener.model.getValue(sSrchDiagListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){ sSrchDiagObj.addItem(); iSrchDiagRow = sSrchDiagObj.rows - sSrchDiagObj.fixedrows; opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termcd",sTermCd); opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm")); opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm")); } } } sSrchDiagObj.rebuild(); break; case "9" : // ¼ö¼ú sRowCnt = grd_opinfo.rows - grd_opinfo.fixedrows; var sSrchOpObj = opener.document.controls("grd_srchedopinfo"); var sSrchOpListPath = "/root/main/srchedopcdlist/srchedopcdinfo"; var iSrchOpRow = 0; for(var iRow=1; iRow <= sRowCnt; iRow++){ if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){ sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd"); if(opener.model.getValue(sSrchOpListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){ sSrchOpObj.addItem(); iSrchOpRow = sSrchOpObj.rows - sSrchOpObj.fixedrows; opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termcd",sTermCd); opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm")); opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm")); } } } sSrchOpObj.rebuild(); break; case "2" : // ÁÖÈ£¼Ò sRowCnt = grd_ccinfo.rows - grd_ccinfo.fixedrows; var sSrchCCObj = opener.document.controls("grd_srchedccinfo"); var sSrchCCListPath = "/root/main/srchedcccdlist/srchedcccdinfo"; var iSrchCCRow = 0; for(var iRow=1; iRow <= sRowCnt; iRow++){ if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){ sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd"); if(opener.model.getValue(sSrchCCListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){ sSrchCCObj.addItem(); iSrchCCRow = sSrchCCObj.rows - sSrchCCObj.fixedrows; opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termcd",sTermCd); opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm")); opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm")); } } } sSrchCCObj.rebuild(); break; } }