/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ¼­½ÄSET°ü¸® ( SMMRF03100_¼­½ÄSET.xrw - JScript ) - Version : 1) : Ver.1.00.01 * ¼öÁ¤ÀÌ·Â: 2008-11-26 fFormInit() °ú ÄÚµå ºÒ·¯¿À´Â ÇÔ¼ö ÆÄ¶ó¹ÌÅÍ º¯°æ. - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ var refresh_u = 0; var refresh_d = 0; var refresh_a = 0; var sSETLIST = "/root/main/indxlist/item"; var sSETLIST_HIDDEN = "/root/hidden/indxlist/item"; var sMOUSE_CLK_STATUS; //¸¶¿ì½º Ŭ¸¯ Á¿ì¹öư ±¸ºÐ //var obj; //Æ®¸®ºä ±¸ºÐ /** * @desc : ÆûÃʱâÈ­ * @ * @param : flag (0:¼­½Ä¸ñ·Ï, 1:¼­½Ä¼Â°ü¸®) * @return : * @--------------------------------------------------- */ function fFormInit(flag){ // Æú´õ¸íĪ popup grup_saveas.visible = "false"; model.removeNodeset("/root/main/formlist/row"); // ºÎ¼­ÄÚµå ¸®½ºÆ® ºÒ·¯¿À±â... // °ú ÄÚµå ºÒ·¯¿À´Â ÇÔ¼ö ÆÄ¶ó¹ÌÅÍ º¯°æ. //mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/deptlist/orddept", "D"); //mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/deptlist/orddept", "O"); mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/deptlist/orddept", "A"); addComboInstance("/root/init/deptlist/orddept", "deptcd^depthngnm", "-^Àüü", "dept"); //Áø·á°ú ÀüüÇ׸ñ Ãß°¡ /*model.setValue("/root/cond/orddeptcd", "-"); reqGetDeptList("/root/send/reqdeptlist", "/root/init/deptlist", "", "012"); model.makeValue("/root/init/deptlist/orddept/deptcd","ALL"); model.makeValue("/root/init/deptlist/orddept/deptnm","Àüü"); */ model.refresh(); model.setValue("/root/send/reqformlist/formdeptcd",getUserInfo("dutplcecd")); // admin Àΰ¡? º¸¿©Áٰ͸¸ º¸¿©ÁØ´Ù.. // °ü¸®ÀÚ : °³ÀÎ, °ú, Àüü µî·Ï/¼öÁ¤/»èÁ¦ °¡´É // »ç¿ëÀÚ : °³Àθ¸ °¡´É var result = fUserAdmin(); // var result = true; if (result == true) { grup_srch1.visible = "true"; grup_srch2.visible = "true"; model.setValue("/root/send/cond/admin", "true"); } else { grup_srch1.visible = "false"; grup_srch2.visible = "false"; model.setValue("/root/send/cond/admin", "false"); // »ç¿ëÀÚÁ¤º¸ ¼Â. model.setValue("/root/send/cond/userid", getUserId()); model.setValue("/root/send/cond/usernm", getUserInfo("usernm")); model.setValue("/root/send/cond/deptcd", getUserInfo("dutplcecd")); model.setValue("/root/send/cond/mydeptcd", getUserInfo("dutplcecd")); model.setValue("/root/send/cond/jobkind", getUserInfo("jobkindcd")); } model.toggle("case_dept"); btn_dept.dispatch("DOMActivate"); // µðÆúÆ® Æ®¸®ºä if (flag == 0 ) { // ¼­½Ä¸ñ·ÏÀ϶§¸¸ °úÄÚµå ºÎ¿©ÇØÁØ´Ù.. model.setValue("/root/send/reqdata/deptcd", getUserInfo("dutplcecd")); // Switch (°³ÀÎ,°ú,Àüü,¼­½Ä¸ñ·Ï) sw_setflag.case_user.selected = "false"; sw_setflag.case_dept.selected = "true"; sw_setflag.case_all.selected = "false"; sw_setflag.case_list.selected = "false"; sw_setflag.refresh(); // °ú ¸ñ·Ï º¸¿©ÁÖÀÚ~ fSetIndxListSelect("D"); } else { // Switch (°³ÀÎ,°ú,Àüü,¼­½Ä¸ñ·Ï) sw_setflag.case_user.selected = "false"; sw_setflag.case_dept.selected = "true"; sw_setflag.case_all.selected = "false"; sw_setflag.refresh(); // °ú ¸ñ·Ï º¸¿©ÁÖÀÚ~ fSetIndxListSelect("D"); } } /** * @desc : ¹öư Ŭ¸¯ (°³ÀÎ/°ú/Àüü) * @ * @param : * @return : * @--------------------------------------------------- */ function fSetIndxListSelect(setflag){ model.setValue("/root/send/cond/setflag", setflag); model.refresh(); grup_saveas.visible = "false"; // °³ÀÎ if (setflag == "U") { btn_user.selected = "true"; if (refresh_u == 0) { submit("TRMRF03102"); model.removeNodeset("/root/main/indxlist_u/item"); copyNode(model, model, "/root/main/indxlist_u", "/root/main/indxlist"); trv_indxlist_u.rebuild(); } else { copyNodeset("/root/main/indxlist/item", "/root/main/indxlist_u/item"); model.refresh(); } refresh_u = 1; // ù¹øÂ° ¸¸ ¿ÀÇÂÇÏÀÚ!! trv_indxlist_u.expand(0, true); // °ú } else if (setflag == "D") { btn_dept.selected = "true"; if (refresh_d == 0) { submit("TRMRF03102"); model.removeNodeset("/root/main/indxlist_d/item"); copyNode(model, model, "/root/main/indxlist_d", "/root/main/indxlist"); trv_indxlist_d.rebuild(); } else { copyNodeset("/root/main/indxlist/item", "/root/main/indxlist_d/item"); model.refresh(); } refresh_d = 1; // ù¹øÂ° ¸¸ ¿ÀÇÂÇÏÀÚ!! trv_indxlist_d.expand(0, true); // °øÅë } else if (setflag == "A") { btn_all.selected = "true"; if (refresh_a == 0) { submit("TRMRF03102"); model.removeNodeset("/root/main/indxlist_a/item"); copyNode(model, model, "/root/main/indxlist_a", "/root/main/indxlist"); model.refresh(); } else { copyNodeset("/root/main/indxlist/item", "/root/main/indxlist_a/item"); model.refresh(); } refresh_a = 1; // ù¹øÂ° ¸¸ ¿ÀÇÂÇÏÀÚ!! trv_indxlist_a.expand(0, true); } } /** * @desc : °ú ¼±Åà * @ * @param : * @return : * @--------------------------------------------------- */ function fDeptCDSelect(){ model.setValue("/root/send/cond/userid",""); submit("TRMRF03102"); model.removeNodeset("/root/main/indxlist_d/item"); //model.copyNode("/root/main/indxlist_d", "/root/main/indxlist"); copyNode(model, model, "/root/main/indxlist_d", "/root/main/indxlist"); model.refresh(); } /** * @desc : »ç¿ëÀÚÁ¤º¸ * @ * @param : * @return : * @--------------------------------------------------- */ function fGetUserInfo(userid,usernm,deptcd , instcd) { model.setValue("/root/send/cond/userid", userid); model.setValue("/root/send/cond/usernm", usernm); model.setValue("/root/send/cond/deptcd", deptcd); ipt_saveas_userid.text = usernm; ipt_saveas_userid.refresh(); submit("TRMRF03102"); model.makeValue("/root/temp/instcd",instcd); //Á¶È¸ÇÑ »ç¿ëÀÚ ±â°üÄÚµå model.removeNodeset("/root/main/indxlist_u/item"); //model.copyNode("/root/main/indxlist_u", "/root/main/indxlist"); copyNode(model, model, "/root/main/indxlist_u", "/root/main/indxlist"); model.refresh(); } /** * @desc : Æ®¸®ºä ¼Â * @ * @param : * @return : * @--------------------------------------------------- */ function fSetTreeView(){ var setflag = model.getValue("/root/send/cond/setflag"); var rtn = ""; if (setflag == "U") { rtn = "trv_indxlist_u" + "|" + "/root/main/indxlist_u/item"; } if (setflag == "D") { rtn = "trv_indxlist_d" + "|" + "/root/main/indxlist_d/item"; } if (setflag == "A") { rtn = "trv_indxlist_a" + "|" + "/root/main/indxlist_a/item"; } return rtn; } /** * @desc : ¸¶¿ì½º ¿À¸¥ÂÊ ¹öư ÆË¾÷â * @ * @param : * @return : * @--------------------------------------------------- * 1. ¸¶¿ì½º ¿ìŬ¸¯Àΰ¡? * 2. °ü¸®ÀÚÀΰ¡? »ç¿ëÀÚÀΰ¡? * 3. ±¸ºÐÀÌ °³ÀÎÀΰ¡? °úÀΰ¡? ÀüüÀΰ¡? * 4. Æú´õÀΰ¡? ÆÄÀÏÀΰ¡? ·çÆ®Àΰ¡? */ function fMouseRghtBtnPopup() { var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; if(event.button == 3) { if(obj.isCell(event.target) && obj.selectedIndex > -1) { var item = obj.item(obj.selectedIndex); var rowpos = item.index + 1; var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth"); var item_length = obj.length; // ·çÆ®Àΰ¡? (º¸¿©ÁÖ´Â ºÎºÐÀ¸·Î..) if (depth == 1 && item_length > 1) { window.setPopupMenu(false); return; } // °ü¸®ÀÚÀΰ¡? ±¸ºÐÀÌ °³ÀÎÀΰ¡? var admin = model.getValue("/root/send/cond/admin"); var setflag = model.getValue("/root/send/cond/setflag"); if(setflag =="U"){ // °³ÀÎ indx sSETLIST = "/root/main/indxlist_u/item" }else if(setflag =="D"){ // °ú indx sSETLIST = "/root/main/indxlist_d/item" } if (admin == "true" || setflag == "U") { if(setflag == "A"){ //Àüü´Â ÀÔ·Â¾ÈµÊ return; } if("°øÅë¼­½Ä" == model.getValue("/root/main/indxlist_d/item[" + rowpos + "]/indxnm")) { return; } if (depth == 2) { window.setPopupMenu(true, "/root/temp/menu2/menu", "label", "func", false); return; } else { var linkflag = model.getValue(sSETLIST + "[" + rowpos + "]/linkflag"); if (linkflag == "N") { // Æú´õÀΰæ¿ì, »õÆú´õ/Æú´õ¼öÁ¤/Æú´õ»èÁ¦.. window.setPopupMenu(true, "/root/temp/menu/menu", "label", "func", false); return; } else if (linkflag == "Y") { // ÆÄÀÏÀΰæ¿ì, ÆÄÀÏ»èÁ¦¸¸.. window.setPopupMenu(true, "/root/temp/menu1/menu", "label", "func", false); return; } else { window.setPopupMenu(false); } } } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } /** * @desc : »õÆú´õ Ãß°¡ * @ * @param : * @return : * @--------------------------------------------------- */ function fAddDiagSet(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var item = obj.item(obj.selectedIndex); var rowPos = item.index + 1; fSetDiagInfo(rowPos, "i"); model.setValue(sSETLIST_HIDDEN + "/status", "i"); model.setValue("/root/main/iptbox/indxnm", ""); model.refresh(); fShowWndIptBox(); } /** * @desc : Æú´õ »èÁ¦ * @ * @param : * @return : * @--------------------------------------------------- */ function fDelDiagSet() { // È®ÀÎ ¹öư var ret = messageBox("Á¤¸»","Q001"); if(ret != "6") { return; } var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var item = obj.item(obj.selectedIndex); var rowPos = item.index + 1; if(fSetDiagInfo(rowPos, "d")!= -1){ fSaveDiagSet("Y"); } } /** * @desc : Æú´õ ¼öÁ¤ * @ * @param : * @return : * @--------------------------------------------------- */ function fUpdtDiagSet(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var item = obj.item(obj.selectedIndex); var rowPos = item.index + 1; var indxnm = item.label; model.setValue("/root/main/iptbox/indxnm", indxnm); model.refresh(); if(fSetDiagInfo(rowPos, "u")!=-1){ fShowWndIptBox(); } } /** * @desc : ¼­½Ä SET ÀúÀå * @ * @param : * @return : * @--------------------------------------------------- */ function fSaveDiagSet(linkflag) { grup_saveas.visible = "false"; var indxnm = model.getValue("/root/main/iptbox/indxnm"); if (linkflag == "N" && indxnm == "") { messageBox("Æú´õ¸íĪÀ» ", "C001"); return; } model.setValue(sSETLIST_HIDDEN + "/indxnm" , indxnm); model.setValue(sSETLIST_HIDDEN + "/linkflag" , linkflag); var admin = model.getValue("/root/send/cond/admin"); model.setvalue(sSETLIST_HIDDEN + "/admin" , admin); var setflag = model.getValue("/root/send/cond/setflag"); model.setvalue(sSETLIST_HIDDEN + "/setflag" , setflag); // ±¸ºÐ¿¡ µû¶ó [°ú, »ç¿ëÀÚ] Á¤º¸¸¦ ³Ñ°Ü¾ß Çϴµ¥... var userid = model.getValue("/root/send/cond/userid"); var deptcd = model.getValue("/root/send/cond/deptcd"); if (setflag == "U") { model.setValue(sSETLIST_HIDDEN + "/userid" , userid); model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd); var instcd = model.getValue("/root/temp/instcd"); if(instcd == ""){ model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd")); }else { model.setValue(sSETLIST_HIDDEN + "/instcd" , instcd); } } else if (setflag == "D") { model.setValue(sSETLIST_HIDDEN + "/userid" , ""); model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd); model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd")); } // ·Î±×ÀÎ °ú Á¤º¸ ³Ñ±â±â... model.makeValue(sSETLIST_HIDDEN + "/mydeptcd", getUserInfo("dutplcecd")); model.copyNode("/root/send/savedata", sSETLIST_HIDDEN); submit("TXMRF03101"); if (setflag == "U") { model.removeNodeset("/root/main/indxlist_u/item"); model.copyNode("/root/main/indxlist_u", "/root/main/indxlist"); refresh_u = 1; refresh_a = 0; trv_indxlist_u.rebuild(); } else if (setflag == "D") { model.removeNodeset("/root/main/indxlist_d/item"); model.copyNode("/root/main/indxlist_d", "/root/main/indxlist"); refresh_d = 1; refresh_a = 0; trv_indxlist_d.rebuild(); } else if (setflag == "A") { model.removeNodeset("/root/main/indxlist_a/item"); model.copyNode("/root/main/indxlist_a", "/root/main/indxlist"); refresh_u = 0; refresh_d = 0; refresh_a = 1; } model.refresh(); } /** * @desc : ¼­½Ä°ü¸® Æú´õ¸íÀ» ÀÔ·ÂÇÒ InputBox¸¦ º¸¿©ÁÜ. * @ * @param : * @return : * @--------------------------------------------------- */ function fShowWndIptBox(){ grup_saveas.attribute("top") = event.clientY; grup_saveas.visible = "true"; model.setFocus("ipt_saveas_indxnm1"); } /** * @desc : ¼­½Ä SET Á¶È¸ * @ * @param : * @return : * @--------------------------------------------------- */ function fReqDetlSet(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; if (obj.selectedIndex == 0) { return; } var item = obj.item(obj.selectedIndex); if (item != null) { var rowpos = item.index + 1; fSetDiagInfo(rowpos); var depth = model.getValue(sSETLIST_HIDDEN + "/depth"); if(depth == 2){ return; } } } /** * @desc : Mouse Drag Drop * @ * @param : * @return : void * @authur : * @--------------------------------------------------- */ function fOndrop(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var rowpos = obj.mouseRow + 1; var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth"); var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm"); var x = event.clientX; var maxposX = 24 + 16 * (depth - 1) + ( 13 * indxnm.length); var minposX = 24 + 16 * (depth - 1); if(maxposX > x){ fDiagSetDrop(); }else{ return; } } /** * @desc : Mouse Drag Over * @ * @param : * @return : void * @authur : * @--------------------------------------------------- */ function fMouseOver(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var rowpos = obj.mouseRow + 1; var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth"); var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm"); var x = event.clientX; var maxposX = 24 + 16 * (depth - 1) + ( 10 * indxnm.length); var minposX = 24 + 16 * (depth - 1); if(maxposX > x){ for ( var i = 0; i < obj.length; i++ ) { obj.item(i).attribute("background-color") = "#ffffff"; obj.item(i).attribute("text-decoration") = ""; } obj.item(obj.mouseRow).attribute("background-color") = "#ece1ec"; obj.item(obj.mouseRow).attribute("text-decoration") = ""; } } /** * @desc : TreeView¿¡ Drag»óÅ·ΠMouse overµÈ °æ¿ì itemÀÇ background color¸¦ clearÇÔ * @ * @param : * @return : void * @authur : * @--------------------------------------------------- */ function fOnDragMouseOver(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var treeObj = document.controls.item(event.currentTarget); var rowpos = obj.mouseRow + 1; var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth"); var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm"); var x = event.clientX; var maxposX = 24 + 16 * (depth - 1) + ( 10 * indxnm.length); var minposX = 24 + 16 * (depth - 1); if(maxposX > x){ if( obj.selectedIndex != treeObj.mouseRow ) { for ( var i = 0; i < treeObj.length; i++ ) { treeObj.item(i).attribute("background-color") = "#ffffff"; treeObj.item(i).attribute("text-decoration") = ""; } treeObj.item(treeObj.mouseRow).attribute("background-color") = "#ece1ec"; treeObj.item(treeObj.mouseRow).attribute("text-decoration") = ""; } } } /** * @desc : ¼­½Ä SET Drag * @ * @param : * @return : * @--------------------------------------------------- */ function fDiagSetDrag(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; if (obj.selectedIndex == 0) { return; } var item = obj.item(obj.selectedIndex); if (item != null) { var rowpos = item.index + 1; fSetDiagInfo(rowpos, "u"); var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm"); model.setValue("/root/main/iptbox/indxnm", indxnm); model.refresh(); } } /** * @desc : ¼­½Ä SET Drop * @ * @param : * @return : * @--------------------------------------------------- */ function fDiagSetDrop(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; fClrTreeViweSelect(); var admin = model.getValue("/root/send/cond/admin"); var setflag = model.getValue("/root/send/cond/setflag"); // °ü¸®ÀÚÀΰ¡? ±¸ºÐÀÌ °³ÀÎÀΰ¡? if (admin == "true" || setflag == "U") { var treeObj = document.controls.item(event.currentTarget); var rowpos = obj.mouseRow + 1; var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth"); var itemindxseq = model.getValue(sSETLIST + "[" + rowpos + "]/itemindxseq"); var supitemindxseq = model.getValue(sSETLIST + "[" + rowpos + "]/supitemindxseq"); var linkflag = model.getValue(sSETLIST + "[" + rowpos + "]/linkflag"); var cmpdepth = model.getValue(sSETLIST_HIDDEN + "/depth"); var cmpitemindxseq = model.getValue(sSETLIST_HIDDEN + "/itemindxseq"); var cmpsupitemindxseq = model.getValue(sSETLIST_HIDDEN + "/supitemindxseq"); var cmplinkflag = model.getValue(sSETLIST_HIDDEN + "/linkflag"); // À̵¿ÇÏ´Â Æú´õ°¡ ÆÄÀÏ ¾Æ·¡·Î À̵¿ÇÏ´Â°Í ¹æÁöÇÔ. if(linkflag == "Y"){ //messageBox("Æú´õ°¡ ¾Æ´Ñ À§Ä¡·Î À̵¿", "E001"); obj.item(obj.mouseRow).attribute("background-color") = "#ffffff"; obj.item(obj.mouseRow).attribute("text-decoration") = ""; return; } if(itemindxseq == cmpitemindxseq){ // messageBox("µ¿ÀÏÇÑ À§Ä¡·Î À̵¿", "E001"); obj.item(obj.mouseRow).attribute("background-color") = "#ffffff"; obj.item(obj.mouseRow).attribute("text-decoration") = ""; return; }else if(itemindxseq == cmpsupitemindxseq){ // °°Àº °ú, °°Àº »ç¿ëÀÚ°¡ ¾Æ´Ï¸é À̵¿ÀÌ ¾ÈµÊ. (why? with¹® update°¡ ¾ÈµÇ´Ï±î..) // if (deptcd != cmpdeptcd || userid != cmpuserid) { // messageBox("ÁöÁ¤µÈ À§Ä¡·Î À̵¿", "E001"); // obj.item(obj.mouseRow).attribute("background-color") = "#ffffff"; // obj.item(obj.mouseRow).attribute("text-decoration") = ""; // return; // } } //À̵¿ÇÏ´Â SETÆú´õÀÇ depth°¡ µµÂøÇÏ´Â °÷º¸´Ù ³·Àº ·¹º§ÀÏ °æ¿ì, //ÀÚ½ÅÀÇ child node ¾Æ·¡·Î À̵¿ÇÏ´Â °ÍÀ» ¹æÁöÇÔ. if(cmpdepth < depth){ var rootdepth; var rootitemindxseq; while(cmpdepth != rootdepth){ rootdepth = model.getValue(sSETLIST + "[" + rowpos + "]/depth"); rootitemindxseq = model.getValue(sSETLIST + "[" + rowpos + "]/itemindxseq"); rowpos--; } if(rootitemindxseq == cmpitemindxseq){ //messageBox("ÁöÁ¤µÈ À§Ä¡·Î À̵¿", "E001"); obj.item(obj.mouseRow).attribute("background-color") = "#ffffff"; obj.item(obj.mouseRow).attribute("text-decoration") = ""; return; } } // À̵¿ Æú´õÀÇ (°ú, »ç¿ëÀÚ) Á¤º¸, À̵¿ ´ë»óÀÇ (°ú, »ç¿ëÀÚ) Á¤º¸ var deptcd = model.getValue(sSETLIST + "[" + rowpos + "]/deptcd"); var userid = model.getValue(sSETLIST + "[" + rowpos + "]/userid"); var cmpdeptcd = model.getValue(sSETLIST_HIDDEN + "/deptcd"); var cmpuserid = model.getValue(sSETLIST_HIDDEN + "/userid"); // °°Àº °ú, °°Àº »ç¿ëÀÚ°¡ ¾Æ´Ï¸é À̵¿ÀÌ ¾ÈµÊ. (why? with¹® update°¡ ¾ÈµÇ´Ï±î..) if (deptcd != cmpdeptcd || userid != cmpuserid) { //messageBox("ÁöÁ¤µÈ À§Ä¡·Î À̵¿", "E001"); obj.item(obj.mouseRow).attribute("background-color") = "#ffffff"; obj.item(obj.mouseRow).attribute("text-decoration") = ""; return; } // À̵¿ Æú´õÀÇ (°ú, »ç¿ëÀÚ) Á¤º¸¸¦ ¼ÂÇÔ... model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd); model.setValue(sSETLIST_HIDDEN + "/userid" , userid); model.setValue(sSETLIST_HIDDEN + "/supitemindxseq" , itemindxseq); fSaveDiagSet("Y"); } } /** * @desc : Æú´õ¸í °Ë»öÇÒ °æ¿ì °Ë»öÇÑ À§Ä¡·Î focus¸¦ À̵¿ÇÑ´Ù. * @ * @param : * @return : void * @authur : * @--------------------------------------------------- */ function fSrchDiagIndxNM(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var sFolderNM = model.getValue("/root/main/cond/foldernm"); if (obj.selectedIndex+1 == obj.length) { obj.selectedIndex = 0; } for(var i=obj.selectedIndex+1; i= 3) // depth°¡ 4ÀÌ»ó ÀΰͺÎÅÍ È®ÀÎ(»èÁ¦´ë»óÀº Æú´õ³ª ÆÄÀÏ) { if(linkflag == "N") depth = 3; // Æú´õ else depth = 4; // ÆÄÀÏ } } model.setValue(sSETLIST_HIDDEN + "/status" , status); model.setValue(sSETLIST_HIDDEN + "/depth" , depth); model.setValue(sSETLIST_HIDDEN + "/path" , path); model.setValue(sSETLIST_HIDDEN + "/itemindxseq" , itemindxseq); // supitemindxseq : »õ·Î¿î µî·ÏÀÌ¸é »óÀ§Á¤º¸, ¼öÁ¤ÀÌ¸é ±âÁ¸Á¤º¸ if(status == "i"){ model.setValue(sSETLIST_HIDDEN + "/supitemindxseq", itemindxseq); }else{ model.setValue(sSETLIST_HIDDEN + "/supitemindxseq", supitemindxseq); } //¿¬°á±¸ºÐÀÌ 'Y' ÀÎ °æ¿ì : ¼­½Ä¸íĪ¿¡ °ªÀ» ³ÖÁö ¾Ê´Â´Ù.. (2007.06.12) if (linkflag == 'N') { model.setValue(sSETLIST_HIDDEN + "/indxnm" , indxnm); } else { model.setValue(sSETLIST_HIDDEN + "/indxnm" , ""); } model.setValue(sSETLIST_HIDDEN + "/linkflag" , "N"); model.setValue(sSETLIST_HIDDEN + "/linkcd" , ""); // »óÀ§ Á¤º¸ (»ç¿ëÀÚ, °ú) var userid = model.getValue(sSETLIST + "[" + rowpos + "]/userid"); var deptcd = model.getValue(sSETLIST + "[" + rowpos + "]/deptcd"); model.setValue(sSETLIST_HIDDEN + "/userid" , userid); model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd); // ±âº» Á¤º¸ var instflag = model.getValue("/root/send/cond/setflag"); //°³Àΰú±¸ºÐ if(instflag =="U"){ var instcd = model.getValue("/root/temp/instcd"); if(instcd == ""){ model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd")); }else { model.setValue(sSETLIST_HIDDEN + "/instcd" , instcd); } }else{ model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd")); } model.setValue(sSETLIST_HIDDEN + "/indxflag" , "F"); model.setValue(sSETLIST_HIDDEN + "/valiyn" , "Y"); model.setValue(sSETLIST_HIDDEN + "/sortno" , 1000); model.setValue(sSETLIST_HIDDEN + "/comnseq" , 0); model.setValue(sSETLIST_HIDDEN + "/slipno" , 0); // »ç¿ëÀÚ Á¤º¸(°ü¸®ÀÚ, ÀϹݻç¿ëÀÚ) // ±¸ºÐ Á¤º¸(°³ÀÎ,°ú,Àüü) var admin = model.getValue("/root/send/cond/admin"); var setflag = model.getValue("/root/send/cond/setflag"); model.setValue(sSETLIST_HIDDEN + "/admin" , admin); model.setValue(sSETLIST_HIDDEN + "/setflag" , setflag); model.refresh(); } /** * @desc : ¼­½Ä SET ¿¡ ÆÄÀÏ ¿¬°áÇϱâ * @ * @param : * @return : * @--------------------------------------------------- */ function fAddindx(){ var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; // ¼±ÅÃÆú´õ°¡ Àִ°¡? if (obj.selectedIndex == -1) { messageBox("Æú´õ¸¦ ", "C002"); return; } // ¼±ÅÃÇÑ ¾ÆÀÌÅÛ ·Î¿ì~!! var item = obj.item(obj.selectedIndex); var rowpos = item.index + 1; // ·çÆ®Àΰ¡? (À̵¿ÇÒ ¼ö ¾ø´Ù..) var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth"); if (depth == 1) { //messageBox("ÁöÁ¤µÈ À§Ä¡·Î À̵¿", "E001"); return; } // Æú´õÀΰ¡? ÆÄÀÏÀÌ¸é ÆÄÀÏÀ» Ãß°¡ÇÏÁö ¾Ê´Â´Ù. var linkflag = model.getValue(sSETLIST + "[" + rowpos + "]/linkflag"); if (linkflag == "Y") { messageBox("Æú´õ¸¦ ", "C002"); return; } // ¼±ÅÃÇÑ ¼­½ÄÀÌ Àִ°¡? var checkflag = "false"; for(var i = grd_formlist.fixedRows; i < grd_formlist.rows; i++){ var flag = model.getValue("/root/main/formlist/row["+ i +"]/check"); if(flag == "true"){ checkflag = "true"; break; } } if(checkflag == "false"){ messageBox("¼­½ÄÀ» ", "C002"); return; } var item = obj.item(obj.selectedIndex); var rowpos = item.index + 1; var indxfocus = item.value; model.setValue("/root/temp/indxfocus", indxfocus); for(var i = grd_formlist.fixedRows; i < grd_formlist.rows; i++){ var flag = model.getValue("/root/main/formlist/row["+ i +"]/check"); if(flag=="true" ){ model.setValue("/root/main/formlist/row["+ i +"]/check","false"); var formcd = model.getValue("/root/main/formlist/row["+ i +"]/formcd"); model.setValue(sSETLIST_HIDDEN + "/linkcd" , formcd); var userid = model.getValue("/root/send/cond/userid"); var deptcd = model.getValue("/root/send/cond/deptcd"); //model.setValue(sSETLIST_HIDDEN + "/userid" , userid); model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd); // ¼­½Ä¸íĪ¿¡ °ªÀ» ³ÖÁö ¾Ê´Â´Ù.. (2007.06.12) model.setValue(sSETLIST_HIDDEN + "/indxnm" , ""); model.setValue(sSETLIST_HIDDEN + "/supitemindxseq" , indxfocus); model.setValue(sSETLIST_HIDDEN + "/depth" , ""); model.setValue(sSETLIST_HIDDEN + "/itemindxseq" , ""); model.setValue(sSETLIST_HIDDEN + "/path" , ""); model.setValue(sSETLIST_HIDDEN + "/status" , "i"); model.setValue(sSETLIST_HIDDEN + "/sortno" , 1000); // ±âº» Á¤º¸ var instflag = model.getValue("/root/send/cond/setflag"); //°³Àΰú±¸ºÐ if(instflag =="U"){ var instcd = model.getValue("/root/temp/instcd"); if(instcd == ""){ model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd")); }else { model.setValue(sSETLIST_HIDDEN + "/instcd" , instcd); } model.setValue(sSETLIST_HIDDEN + "/userid" , userid); }else{ model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd")); } model.setValue(sSETLIST_HIDDEN + "/indxflag" , "F"); var admin = model.getValue("/root/send/cond/admin"); model.setValue(sSETLIST_HIDDEN + "/admin" , admin); var setflag = model.getValue("/root/send/cond/setflag"); model.setValue(sSETLIST_HIDDEN + "/setflag" , setflag); model.setValue(sSETLIST_HIDDEN + "/linkflag" , "Y"); model.setValue(sSETLIST_HIDDEN + "/valiyn" , "Y"); model.setValue(sSETLIST_HIDDEN + "/comnseq" , 0); model.setValue(sSETLIST_HIDDEN + "/slipno" , 0); model.copyNode("/root/send/savedata", sSETLIST_HIDDEN); model.makeValue("/root/send/savedata/retflag","ret"); //ÀúÀåÈÄ Á¶È¸¿©ºÎ submit("TXMRF03101"); } } submit("TRMRF03102"); if (setflag == "U") { model.removeNodeset("/root/main/indxlist_u/item"); model.copyNode("/root/main/indxlist_u", "/root/main/indxlist"); } else if (setflag == "D") { model.removeNodeset("/root/main/indxlist_d/item"); model.copyNode("/root/main/indxlist_d", "/root/main/indxlist"); } else if (setflag == "A") { model.removeNodeset("/root/main/indxlist_a/item"); model.copyNode("/root/main/indxlist_a", "/root/main/indxlist"); } model.refresh(); } /** * @desc : ÆûÄÚµå ³Ñ°ÜÁÖ±â * @ * @param : * @return : * @--------------------------------------------------- */ function fSendFormInfo() { var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var rowpos = obj.mouseRow + 1; var formcd = model.getValue(path + "[" + rowpos + "]/formcd"); if (formcd != "") { parent.window.javascript.fOpenNewForm(formcd); // window.close(); } } /** * @desc : ÆûÄÚµå ³Ñ°ÜÁÖ±â * @ * @param : * @return : * @--------------------------------------------------- */ function fSendFormListInfo() { var rowpos = trv_formlist.mouseRow + 1; var formcd = model.getValue("/root/main/formlist/item" + "[" + rowpos + "]/formcd"); if (formcd != "") { // ºÎ¸ðâÀÇ ¼Ó¼º°ª¿¡ Á¤ÇØÁØ´Ù.. //parent.window.model.makeValue("/root/hidden/parameters/formcd",formcd); parent.window.javascript.fOpenNewForm(formcd); // ÆÄ¶ó¸ÞŸ°ªÀ¸·Î ³Ñ°ÜÁØ´Ù.. //window.close(); } } /** * @desc : formcd,formnm ³Ñ°ÜÁÖ±â * @ * @param : * @return : * @--------------------------------------------------- */ function fSendFormcdFormnm() { var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var rowpos = obj.mouseRow + 1; var formcd = model.getValue(path + "[" + rowpos + "]/formcd"); if(formcd !=""){ // Æú´õ ¾Æ´Ñ°æ¿ì¸¸ formcd³Ñ±ä´Ù var formnm = model.getValue(path + "[" + rowpos + "]/formnm"); opener.javascript.setParameter("formcd", formcd); opener.javascript.setParameter("formnm", formnm); model.close(); } } /** * @desc : formcd,formnm ³Ñ°ÜÁÖ±â * @ * @param : * @return : * @--------------------------------------------------- */ function fSendFormListFormnm() { var rowpos = trv_formlist.mouseRow + 1; var formcd = model.getValue("/root/main/formlist/item" + "[" + rowpos + "]/formcd"); if(formcd !=""){ // Æú´õ ¾Æ´Ñ°æ¿ì¸¸ formcd³Ñ±ä´Ù var formnm = model.getValue("/root/main/formlist/item" + "[" + rowpos + "]/displaynm"); opener.javascript.setParameter("formcd", formcd); opener.javascript.setParameter("formnm", formnm); model.close(); } } /** * @desc : °øÅë¼¼¼Çº¯¼ö¿¡ formlistÀúÀåÇϱâ * @ * @param : * @return : * @--------------------------------------------------- */ function fFormsetglobal() { model.toggle("case_list"); return; var flag = getGlobalVariable("emr_gsv_formflag"); //°øÅë¼¼¼Çº¯¼ö¿¡ formlist ÀúÀå if(flag!="Y"){ var reqnode = instance1.selectNodes("/root/main/formlist/item"); var csv = getNodeListCSV(reqnode); setGlobalVariable("emr_gsv_formflag","Y"); setGlobalVariable("emr_gsv_formflag_userid",getUserId()); setGlobalVariable("emr_gsv_formlist",csv); } } /** * @desc : °øÅë¼¼¼Çº¯¼ö¿¡ indxlistÀúÀåÇϱâ * @ * @param : * @return : * @--------------------------------------------------- */ function fIndxsetglobal(flag) { return; var reqnode = instance1.selectNodes("/root/main/indxlist_"+ flag +"/item"); var csv = getNodeListCSV(reqnode); setGlobalVariable("emr_gsv_formflag_"+flag, "Y"); setGlobalVariable("emr_gsv_formlist_"+flag, csv); } /** * @desc : Æ®¸® expand »óÅ ¾ò±â * @ * @param : * @return : * @--------------------------------------------------- */ function fExpandCheck(trvObj) { //alert(trvObj); var Obj = window.document.controls(trvObj); //alert(Obj); // var Obj = trvObj; var expandstr = 0; //Æ®¸® expand °ª ÀúÀå for(var i = 0; i < Obj.length ; i++){ if(Obj.item(i).expanded == 1) { expandstr += "."+i; } } //°øÅë¼¼¼Çº¯¼ö¿¡ ÀúÀå // setGlobalVariable("emr_gsv_"+trvObj ,expandstr); //alert("a"); } /** * @desc : Æ®¸® expand »óÅ ¼³Á¤Çϱâ * @ * @param : * @return : * @--------------------------------------------------- */ function fSetTreeExpand(trvObj) { return; var Obj = window.document.controls(trvObj); var str = getGlobalVariable("emr_gsv_"+trvObj); if(str != ""){ var strlen = str.split('.'); var strArray = new Array(strlen.length); for(var i=0; i 0) { var depth = ""; var itemindxseq = ""; var node = root.main.indxlist_a; for(var i = nodelength; i > 0; i--) { itemindxseq = model.getValue(stRef + "[" + i + "]/itemindxseq"); depth = model.getValue(stRef + "[" + i + "]/depth"); subNode = instance.selectSingleNode(stRef + "[" + i + "]"); node.insertAfter(subNode, refNode); //Á¶È¸Ç׸ñÀ» »óÀ§Ç׸ñÀÇ ÀÚ½ÄÀ¸·Î »ðÀÔ } // Á¶È¸ ·¹º§ ¿ÀÇÂÇÏÀÚ!! model.setValue("/root/main/selected_a", itemindxseq); model.refresh(); } } /** * @desc : ±×¸®µå ¼±Åýà check ¼±Åà * @ * @param : * @return : * @--------------------------------------------------- */ function fSetCheck() { var check = model.getValue("/root/main/formlist/row["+grd_formlist.row+"]/check"); var gridObj = event.ptarget.parent; if( gridObj.col == "0") { if(check == "false") { model.setValue("/root/main/formlist/row["+grd_formlist.row+"]/check","false"); } else { model.setValue("/root/main/formlist/row["+grd_formlist.row+"]/check","true"); } } else { if(check == "true"){ model.setValue("/root/main/formlist/row["+grd_formlist.row+"]/check","false"); } else { model.setValue("/root/main/formlist/row["+grd_formlist.row+"]/check","true"); } } } /** * @desc : ¸¶¿ì½º ¿ìŬ¸¯ * @ * @param : * @return : * @--------------------------------------------------- */ function fMouseBtn(trvObj) { var selected = trvObj.value; if(selected == ""){ return; } if(trvObj.isCell(event.target) && trvObj.mouseRow <= trvObj.length) { fMouseRghtBtnPopup(); } else { initPopupMenu(); } } function fReqFormlist() { model.makeValue("/root/send/reqformlist/reqkindflag", "CPLT"); // complete model.makeValue("/root/send/reqformlist/reqformprogflag", "-"); // ¼­½Ä±¸ºÐÀÌ 'µðÀÚÀÎ' Àΰ͸¸ ³ª¿À°Ô ¼öÁ¤ÇÔ. submit("TRMRF03101"); } function fPreviewForm() { try { var rtn = fSetTreeView(); rtn = rtn.split("|"); var obj = document.controls(rtn[0]); var path = rtn[1]; var item = obj.item(obj.selectedIndex); var rowPos = item.index + 1; var formcd = model.getValue("/root/main/indxlist_d/item[" + rowPos + "]/linkcd"); if(formcd != "") { setParameter("SPMRF05500_formcd", formcd); model.makeValue("/root/hidden/condition/formcd", formcd); model.makeValue("/root/hidden/condition/formdegnseq", ""); model.makeValue("/root/hidden/condition/extnunitformlistyn", "N"); model.makeValue("/root/hidden/condition/cashedformdegnseq", ""); model.makeValue("/root/hidden/condition/sysformrecdt", ""); model.makeValue("/root/hidden/condition/mode", "D"); submit("TRMRF02001"); copyNodeset("/root/main/forminfo/formmast", "/root/temp/forminfo/formmast", "replace", model, model); var formprogflag = model.getValue("/root/main/forminfo/formmast/formprogflag"); var formxrwyn = model.getValue("/root/main/forminfo/formmast/formxrwyn"); var formdegnseq = model.getValue("/root/main/forminfo/formmast/formdegnseq"); if(formprogflag == "MAIN" || formprogflag == "PROF" || formprogflag == "-" || formprogflag == "PROG") { if(formxrwyn == "Y" && formdegnseq != "") modal("SPMRF05500", 1,10, 10, "SPMRF05500", "", ""); //open("SPMRF05500", "2", 0, 0, "SPMRF05500", "", ""); else messageBox("ÇØ´ç ¼­½ÄÀº ÀúÀåµÇÁö", "E007"); } else { messageBox("ÇØ´ç ¼­½ÄÀº " + formprogflag + " À¯Çü ¼­½Ä", "I009"); return; } } } catch(e) { } } function fPreviewFormByGrd() { try { var formcd = model.getValue("/root/main/formlist/row["+grd_formlist.row+"]/formcd"); if(formcd != "") { setParameter("SPMRF05500_formcd", formcd); model.makeValue("/root/hidden/condition/formcd", formcd); model.makeValue("/root/hidden/condition/formdegnseq", ""); model.makeValue("/root/hidden/condition/extnunitformlistyn", "N"); model.makeValue("/root/hidden/condition/cashedformdegnseq", ""); model.makeValue("/root/hidden/condition/sysformrecdt", ""); model.makeValue("/root/hidden/condition/mode", "D"); submit("TRMRF02001"); copyNodeset("/root/main/forminfo/formmast", "/root/temp/forminfo/formmast", "replace", model, model); var formprogflag = model.getValue("/root/main/forminfo/formmast/formprogflag"); var formxrwyn = model.getValue("/root/main/forminfo/formmast/formxrwyn"); var formdegnseq = model.getValue("/root/main/forminfo/formmast/formdegnseq"); if(formprogflag == "MAIN" || formprogflag == "PROF" || formprogflag == "-" || formprogflag == "PROG") { if(formxrwyn == "Y" && formdegnseq != "") modal("SPMRF05500", 1,10, 10, "SPMRF05500", "", ""); //open("SPMRF05500", "2", 0, 0, "SPMRF05500", "", ""); else messageBox("ÇØ´ç ¼­½ÄÀº ÀúÀåµÇÁö", "E007"); } else { messageBox("ÇØ´ç ¼­½ÄÀº " + formprogflag + " À¯Çü ¼­½Ä", "I009"); return; } } } catch(e) { } }