/* °ú»öÀÎ °ü¸®(SMMRT01300.xfm - JScript ) - Version : 1) : Ver.1.00.01 */ var xCondPath = "/root/hidden/condition"; // Á¶È¸Á¶°Ç var xIndxInfoPath = "/root/main/indxinfo/deptindx"; // »öÀÎÁ¤º¸ var xIndxInfoBKPath = "/root/hidden/main/indxinfo/deptindx"; // »öÀÎÁ¤º¸ var xDeptIndxPath = "/root/main/deptindxlist/item"; // °ú»öÀÎÁ¤º¸ /** * @group : * @ver : 2007.04.09 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : °ú»öÀÎ Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSrchDeptIndxList(){ var sIndxFlag = model.getValue(xCondPath+"/indxflag"); if(sIndxFlag == "0"){ // Áø´Ü cap_indxinfo.value = "Áø´Ü »öÀÎ Á¤º¸"; }else if(sIndxFlag == "9"){ // ¼ö¼ú cap_indxinfo.value = "¼ö¼ú »öÀÎ Á¤º¸"; }else if(sIndxFlag == "2"){ // ÁÖÈ£¼Ò cap_indxinfo.value = "ÁÖÈ£¼Ò »öÀÎ Á¤º¸"; } if(model.getValue(xCondPath+"/srcheddeptcd") == ""){ return; } model.removenodeset(xDeptIndxPath); //model.resetInstanceNode(xCondPath); model.removenode("/root/send"); model.makeValue("/root/send/indxflag", model.getValue(xCondPath+"/indxflag")); model.makeValue("/root/send/deptcd", model.getValue(xCondPath+"/srcheddeptcd")); if(submit("TRMRT01301")){ model.setValue(xCondPath+"/selectedindxcd",""); trv_deptindx.rebuild(); } } /** * @group : * @ver : 2007.04.09 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : °ú»öÀÎ »ó¼¼ Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSrchIndxInfo(){ ipt_deptindxcd.disabled = true; model.removenode("/root/send"); model.makeValue("/root/send/deptindxcd", model.getValue(xCondPath+"/selectedindxcd")); model.makeValue("/root/send/deptcd", model.getValue(xCondPath+"/srcheddeptcd")); model.makeValue("/root/send/indxflag", model.getValue(xCondPath+"/indxflag")); if(submit("TRMRT01302")){ model.makeValue(xCondPath+"/highestlvel",""); model.copyNode("/root/hidden/main","/root/main"); model.makeValue(xIndxInfoPath + "/deptnm", model.getValue(xCondPath + "/srcheddeptnm")); model.refresh(); } } /** * @group : * @ver : 2007.04.09 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : °ú»öÀÎ Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fInit(){ model.makeValue(xIndxInfoPath+"/status","I"); var sIndxflag = model.getValue(xCondPath+"/getdata/indxflag"); if(sIndxflag != ""){ model.setValue(xCondPath+"/indxflag", sIndxflag); model.setValue(xCondPath+"/srcheddeptnm", model.getValue(xCondPath+"/getdata/deptnm")); model.setValue(xCondPath+"/srcheddeptcd", model.getValue(xCondPath+"/getdata/deptcd")); fSrchDeptIndxList(); opener.javascript.setParameter("saveyn",""); } } /** * @group : * @ver : 2007.04.09 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : »öÀÎ Ãß°¡ * @param : * @return : * @--------------------------------------------------- */ function fAddIndx(){ var sIndxFlag = model.getValue(xCondPath+"/indxflag"); var sDeptCd = model.getValue(xCondPath+"/srcheddeptcd"); var sUpIndxCd = model.getValue(xCondPath+"/selectedindxcd"); if((trv_deptindx.focusIndex < 0) && (getNodesetCount(xDeptIndxPath) > 0)){ messageBox("»öÀÎÀ» ¼±ÅÃÇÏÁö", "E007"); } if(sIndxFlag == ""){ messageBox("»öÀα¸ºÐÀ»","C002"); return; } if(sDeptCd == ""){ messageBox("ºÎ¼­¸¦","C002"); return; } fIndxClear(); model.setValue(xCondPath+"/highestlvel",""); model.makeValue(xIndxInfoPath+"/deptupindxcd", sUpIndxCd); // »óÀ§»öÀÎÄÚµå model.makeValue(xIndxInfoPath+"/deptupindxnm", model.getValue(xDeptIndxPath+"[deptindxcd = '"+sUpIndxCd+"']/deptindxnm")); // »óÀ§»öÀθí if(getNodesetCount(xDeptIndxPath) == 0){ model.makeValue(xIndxInfoPath+"/deptseqno", "0"); } model.refresh(); } /** * @group : * @ver : 2007.04.09 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : »öÀÎ Á¤º¸ Clear * @param : * @return : * @--------------------------------------------------- */ function fIndxClear(){ ipt_deptindxcd.disabled = false; var iIndx = trv_deptindx.focusIndex + 1; model.setValue("/root/hidden/condition/highestlvel","Y"); model.makeValue(xIndxInfoPath+"/deptindxcd",""); model.makeValue(xIndxInfoPath+"/deptindxflag", model.getValue(xCondPath+"/indxflag")); model.makeValue(xIndxInfoPath+"/deptindxnm",""); model.makeValue(xIndxInfoPath+"/deptupindxcd","-"); model.makeValue(xIndxInfoPath+"/deptupindxnm",""); model.makeValue(xIndxInfoPath+"/deptnm",model.getValue(xCondPath+"/srcheddeptnm")); model.makeValue(xIndxInfoPath+"/deptcd",model.getValue(xCondPath+"/srcheddeptcd")); /* if(model.getValue("/root/hidden/condition/highestlvel") == "Y"){ model.makeValue(xIndxInfoPath+"/deptindxcd",""); model.makeValue(xIndxInfoPath+"/deptindxflag", model.getValue(xCondPath+"/indxflag")); model.makeValue(xIndxInfoPath+"/deptindxnm",""); model.makeValue(xIndxInfoPath+"/deptupindxcd","-"); model.makeValue(xIndxInfoPath+"/deptupindxnm",""); model.makeValue(xIndxInfoPath+"/deptnm",model.getValue(xCondPath+"/srcheddeptnm")); model.makeValue(xIndxInfoPath+"/deptcd",model.getValue(xCondPath+"/srcheddeptcd")); } else if(model.getValue("/root/hidden/condition/highestlvel") == "N"){ model.makeValue(xIndxInfoPath+"/deptindxflag", model.getValue(xCondPath+"/indxflag")); model.makeValue(xIndxInfoPath+"/deptupindxcd", model.getValue(xDeptIndxPath + "[" + iIndx + "]/deptupindxcd")); model.makeValue(xIndxInfoPath+"/deptupindxnm", model.getValue(xDeptIndxPath + "[" + iIndx + "]/deptindxnm")); model.makeValue(xIndxInfoPath+"/deptnm",model.getValue(xCondPath+"/srcheddeptnm")); model.makeValue(xIndxInfoPath+"/deptcd",model.getValue(xCondPath+"/srcheddeptcd")); } */ model.makeValue(xIndxInfoPath+"/status","I"); // »óÅ model.refresh(); } /** * @group : * @ver : 2007.04.09 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : »öÀÎ Á¤º¸ ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fSaveIndxInfo(){ var sStatus = model.getValue(xIndxInfoPath+"/status"); var sIndxCd = model.getValue(xIndxInfoPath+"/deptindxcd"); var rtn = 0; var sNodeInfo ="deptindxcd¢Ëdeptindxnm¢Ì»öÀÎÄÚµå¢Ë»öÀθí"; if(fChkValueEmpty(xIndxInfoPath,sNodeInfo)){ return; } if(model.getValue(xDeptIndxPath+"[deptindxcd ='"+sIndxCd+"']/deptindxcd") != ""){ if(sStatus == "I" || (sStatus == "U" && sIndxCd != model.getValue(xIndxInfoPath+"/srchdeptindxcd"))){ messageBox("ÀÌ¹Ì µî·ÏµÈ »öÀÎÄÚµå","E008"); return; } } if(sStatus == "U"){ if( instance1.selectSingleNode(xIndxInfoPath).xml == instance1.selectSingleNode(xIndxInfoBKPath).xml){ messageBox("º¯°æµÈ µ¥ÀÌÅͰ¡","I004"); return; } } if(sStatus != "D") { rtn = messageBox("","Q002"); }else{ rtn = messageBox("","Q001"); } if(rtn != 6){ if(sStatus == "D"){ if( instance1.selectSingleNode(xIndxInfoPath).xml == instance1.selectSingleNode(xIndxInfoBKPath).xml){ model.setValue(xIndxInfoPath+"/status", "-"); }else{ model.setValue(xIndxInfoPath+"/status", "U"); } } return; } /* if(sStatus == "I" && model.getValue(xIndxInfoPath+"/deptupindxcd") == ""){ model.setValue(xIndxInfoPath+"/deptupindxcd", model.getValue(xIndxInfoPath+"/deptindxcd")); }*/ model.removenode("/root/send"); model.makeValue("/root/send/srchedindxflag",model.getValue(xCondPath+"/indxflag")); model.makeValue("/root/send/srcheddeptcd", model.getValue(xCondPath+"/srcheddeptcd")); model.makeNode("/root/send/deptindxinfo"); model.copyNode("/root/send/deptindxinfo", xIndxInfoPath); if(submit("TXMRT01301")){ fIndxClear(); if(model.getValue(xCondPath+"/getdata/indxflag") != "" && model.getValue(xCondPath+"/getdata/deptcd") == model.getValue(xCondPath+"/srcheddeptcd")){ opener.javascript.setParameter("saveyn","Y"); } //model.refresh(); //ÀÌÀ±ÁÖ ¼öÁ¤(20130312) fSrchDeptIndxList(); } } /** * @group : * @ver : 2007.04.09 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : ºó °ø¹é check * @param : * @return : * @--------------------------------------------------- */ function fChkValueEmpty(pRef, pNodeInfo){ var sNodeInfo = pNodeInfo.split("¢Ì"); var sNode = sNodeInfo[0].split("¢Ë"); var sNodeNm = sNodeInfo[1].split("¢Ë"); for(var i=0; i