/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ÀÇ»ç Áø·áÀÏÁ¤ Á¶È¸ ( SPMMR03900_Áø·áÀÏÁ¤.xrw - JScript ) - Version : 1) : Ver.1.00.01 - Author : ¹ÚÁ¾ÈÆ - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ var cnstflag = ""; /** * @desc : È­¸éÃʱâÈ­ * @id : * @event : xforms-ready * @return : void * @authur : ¹ÚÁ¾ÈÆ */ function fInitalize() { cnstflag = parent.window.javascript.getParameter("MMR05000_cnstflag"); grup_cnst3.attribute("left") = 0; if (cnstflag == "1") { var ioflag = parent.model.getValue ("/root/main/result/paminfo/list/ioflag"); grup_cnst3.attribute("width") = 0; grup_cnst3.attribute("height") = 0; grup_cnst1.attribute("visibility") = "visible"; if (ioflag == "I" || ioflag == "E" || ioflag == "D") { rdo_cnstioflag.attribute("visibility") = "visible"; //model.setValue("/root/init/cnstioflag", ioflag); ioflag = "I"; } else { rdo_cnstioflag.attribute("visibility") = "hidden"; ioflag = "O"; } model.setValue("/root/init/cnstioflag", ioflag); window.Height = parseInt(grup_cnst1.attribute("height")) + 55; window.width = parseInt(grup_cnst1.attribute("width")) + 25; } else if (cnstflag == "3") { grup_cnst1.attribute("width") = 0; grup_cnst1.attribute("height") = 0; grup_cnst3.attribute("visibility") = "visible"; window.Height = parseInt(grup_cnst3.attribute("height")) + 55; window.width = parseInt(grup_cnst3.attribute("width")) + 25; } model.setValue("/root/send/ioflag", model.getValue("/root/init/cnstioflag")); model.setValue("/root/send/cnstflag", cnstflag); submit("TRMMR04902"); //ÄÁ¼³Æ®ºÎ¼­Á¶È¸ } /** * @desc : ³»¿ø±¸ºÐ ¼±Åà * @id : * @event : ondblclick * @return : void * @authur : ¹ÚÁ¾ÈÆ */ function fSelIOFlag() { model.removeNodeset("/root/main/cnstformlist/cnstform"); model.removeNodeset("/root/main/drschlist"); model.setValue("/root/send/ioflag", model.getValue("/root/init/cnstioflag")); model.setValue("/root/send/cnstflag", cnstflag); submit("TRMMR04902"); //ÄÁ¼³Æ®ºÎ¼­Á¶È¸ } /** * @desc : ºÎ¼­¸®½ºÆ® ¼±Åà * @id : * @event : ondblclick * @return : void * @authur : ¹ÚÁ¾ÈÆ */ function fClickDeptList() { if((grd_deptlist.isCell(event.target) && grd_deptlist.mouserow >= grd_deptlist.fixedrows && (grd_deptlist.Rows > 1))) //±×¸®µå¿¡¼­ µ¥ÀÌŸ¿µ¿ª¸¸ { //var deptcd = model.getValue("/root/main/deptlist/dept[" + grd_deptlist.row + "]deptcd"); var deptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptcd")); var cnstflag = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstflag")); var fr_date = new Date(); var to_date = new Date(); to_date = to_date.getAddDate(29, "D"); //2009-06-19 ¿ÀÈÄ 8:38:58 °­ÁöÈÆ Ãß°¡ : ƯÁ¤°ú´Â Áø·áÀÏÁ¤À̾ø¾îµµ ¸ðµç Áø·áÀǸ¦ º¸¿©ÁÖ¾î¾ß ÇÑ´Ù. mmbfGetHardCodeInfo("/root/send/formhrdcd", "/root/tmp/depthrcd", 9902); var cnstdeptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptcd")); var seledtedDeptcd = model.getValue("/root/tmp/depthrcd/hardcd[hardcd = "+ cnstdeptcd +"]/hardcd"); var cnstioflag = ""; if(seledtedDeptcd == ""){ cnstioflag = "O" //Áø·áÀÏÁ¤ÀÌ ÀÖ´Â Àǻ縸 º¸¿©ÁØ´Ù. } else{ cnstioflag = "I" //Áø·áÀÏÁ¤ÀÌ ¾ø´Â ÀÇ»ç±îÁö ¸ðµÎ º¸¿©ÁØ´Ù. } //alert("fr_date:"+fr_date.getDateFormat()); //alert("to_date:"+to_date.getDateFormat()); model.makeValue("/root/send/orddeptcd", deptcd); model.makeValue("/root/send/fromdd", fr_date.getDateFormat()); model.makeValue("/root/send/todd", to_date.getDateFormat()); model.makeValue("/root/send/cnstdeptcd", cnstdeptcd ); model.makeValue("/root/send/cnstdeptnm", grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptnm")) ); model.makeValue("/root/send/formcd", grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("formcd")) ); model.makeValue("/root/send/cnstioflag", cnstioflag); model.removeNodeset("/root/main/endresnlist"); model.removeNodeset("/root/main/endresn"); if(submit("TRMMR03901")) { grd_drschlist.rowheight(1) = 0; grd_drschlist.rowheight(2) = 0; grd_drschlist.resizeCells(); fSetGrdColor(); } } } /** * @desc : ÀçȰ°í·Á¼­½ÄÀ» À§ÇÑ ÇÔ¼ö */ function fClickDeptList_koryo() { if(grd_deptlist.Rows > 1) //±×¸®µå¿¡¼­ µ¥ÀÌŸ¿µ¿ª¸¸ { //var deptcd = model.getValue("/root/main/deptlist/dept[" + grd_deptlist.row + "]deptcd"); var deptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptcd")); var cnstflag = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstflag")); var fr_date = new Date(); var to_date = new Date(); to_date = to_date.getAddDate(29, "D"); //2009-06-19 ¿ÀÈÄ 8:38:58 °­ÁöÈÆ Ãß°¡ : ƯÁ¤°ú´Â Áø·áÀÏÁ¤À̾ø¾îµµ ¸ðµç Áø·áÀǸ¦ º¸¿©ÁÖ¾î¾ß ÇÑ´Ù. mmbfGetHardCodeInfo("/root/send/formhrdcd", "/root/tmp/depthrcd", 9902); var cnstdeptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptcd")); var seledtedDeptcd = model.getValue("/root/tmp/depthrcd/hardcd[hardcd = "+ cnstdeptcd +"]/hardcd"); var cnstioflag = ""; if(seledtedDeptcd == ""){ cnstioflag = "O" //Áø·áÀÏÁ¤ÀÌ ÀÖ´Â Àǻ縸 º¸¿©ÁØ´Ù. } else{ cnstioflag = "I" //Áø·áÀÏÁ¤ÀÌ ¾ø´Â ÀÇ»ç±îÁö ¸ðµÎ º¸¿©ÁØ´Ù. } //alert("fr_date:"+fr_date.getDateFormat()); //alert("to_date:"+to_date.getDateFormat()); model.makeValue("/root/send/orddeptcd", deptcd); model.makeValue("/root/send/fromdd", fr_date.getDateFormat()); model.makeValue("/root/send/todd", to_date.getDateFormat()); model.makeValue("/root/send/cnstdeptcd", cnstdeptcd ); model.makeValue("/root/send/cnstdeptnm", grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptnm")) ); model.makeValue("/root/send/formcd", grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("formcd")) ); model.makeValue("/root/send/cnstioflag", cnstioflag); model.removeNodeset("/root/main/endresnlist"); model.removeNodeset("/root/main/endresn"); if(submit("TRMMR03901")) { grd_drschlist.rowheight(1) = 0; grd_drschlist.rowheight(2) = 0; grd_drschlist.resizeCells(); fSetGrdColor(); } } } /** * @desc : ÀÏÁ¤º° »ö»ó ¼³Á¤ * @id : * @event : ondblclick * @return : void * @authur : ¹ÚÁ¾ÈÆ */ function fSetGrdColor() { var cols = grd_drschlist.cols; var rows = grd_drschlist.rows; for( var i = 1; i <= rows; i++ ) { for( var j = 1; j <= cols; j++ ) { var drsch = grd_drschlist.valueMatrix(i, j); if (i > 3) { if (drsch == "¿ÀÀü") { grd_drschlist.cellStyle("background-color", i, j) = "#ffff99"; } else if (drsch == "¿ÀÈÄ") { grd_drschlist.cellStyle("background-color", i, j) = "#ccffff"; } else if (drsch == "ÀüÀÏ") { grd_drschlist.cellStyle("background-color", i, j) = "#ffcc99"; } else if (drsch.substr(0, 2) == "ÈÞÁø") { grd_drschlist.cellStyle("background-color", i, j) = "#3366ff"; } else if (drsch == "¸¶°¨") { grd_drschlist.cellStyle("background-color", i, j) = "#999999"; } else { grd_drschlist.cellStyle("background-color", i, j) = "#ffffff"; } } else if (i == 1) { if (drsch == "4") { grd_drschlist.cellStyle("color", 4, j) = "#3366ff"; //Åä¿äÀÏ } else if (drsch == "8") { grd_drschlist.cellStyle("color", 4, j) = "#ff0000"; //ÀÏ¿äÀÏ } else { grd_drschlist.cellStyle("color", 4, j) = "#4d4d4d"; } } if(i == 3 || j == 1) { //grd_drschlist.cellStyle("background-color", i, j) = "#99ccff"; //³¯Â¥, ÀÇ»ç¸í grd_drschlist.cellStyle("color", i, j) = "#4d4d4d"; grd_drschlist.cellStyle("background-image", i, j) = "../../../com/commonweb/images/grid_bg.gif"; grd_drschlist.cellStyle("background-repeat", i, j) = "repeat-x"; grd_drschlist.cellStyle("background-stretch", i, j) = "stretch"; grd_drschlist.cellStyle("border-style", i, j) = "solid"; grd_drschlist.cellStyle("border-left-color", i, j) = "#c6e4ff"; grd_drschlist.cellStyle("border-top-color", i, j) = "#8ebcff"; grd_drschlist.cellStyle("border-right-color", i, j) = "#8ebcff"; grd_drschlist.cellStyle("border-bottom-color", i, j) = "#8ebcff"; } } } } /** * @desc : ÀÏÁ¤ ¼±Åà * @id : * @event : ondblclick * @return : void * @authur : ¹ÚÁ¾ÈÆ */ function fClickSchList_old() { var col = grd_drschlist.col; var row = grd_drschlist.row; var day_rowno = 2; var drnm = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrnm")); if (col > 1 && row > 4) { // var drsch = grd_drschlist.valueMatrix(row, col); // // if (drsch == "") // { // messageBox("¼±ÅÃÇϽг¯Â¥¿¡ " + drnm + "´ÔÀÇ Áø·áÀÏÁ¤ÀÌ", "I004"); // } // else // { var drid = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrid")); var cnstflag = "1"; var orddd = grd_drschlist.valueMatrix(day_rowno, col); if (orddd != "") { if (orddd < getCurrentDate()) { messageBox("°ú°ÅÀÏ·Î ÀÇ·ÚÇÒ ¼ö", "I004"); return; } else { var deptcd = model.getValue("/root/send/cnstdeptcd"); var deptnm = model.getValue("/root/send/cnstdeptnm"); var formcd = model.getValue("/root/send/formcd"); //alert("ºÎ¼­ÄÚµå=" + deptcd + ", ÀÇ»çID=" + drid + ", ÀÇ»çÀ̸§=" + drnm + ", Áø·áÀÏ=" + orddd); parent.window.javascript.fOpenCnstForm(formcd, deptcd, deptnm, drid, drnm, orddd, cnstflag, "", ""); window.close(); } } // } } } /** * @desc : Ÿ°úÀÇ·Ú ¼±Åà * @id : * @event : ondblclick * @return : void * @authur : ¹ÚÁ¾ÈÆ */ function fClickCnstList() { var col = grd_cnstlist.col; var row = grd_cnstlist.row; var formcd = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("formcd")); var formnm = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("formnm")); var deptcd = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("cnstdeptcd")); var deptnm = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("cnstdeptnm")); var replflag = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("replflag")); var cnstflag = "3"; parent.window.javascript.setParameter("SPMMR03900_formcd", formcd); parent.window.javascript.setParameter("SPMMR03900_deptcd", deptcd); parent.window.javascript.setParameter("SPMMR03900_deptnm", deptnm); parent.window.javascript.setParameter("SPMMR03900_cnstflag", cnstflag); parent.window.javascript.setParameter("SPMMR03900_formnm", formnm); parent.window.javascript.setParameter("SPMMR03900_replflag", replflag); //parent.window.javascript.fOpenCnstForm(formcd, deptcd, deptnm, "", "", "", cnstflag, formnm, replflag); window.close(); } /** * @desc : ´ÙÀ½´Þ, ÀÌÀü´Þ * @id : * @event : ondblclick * @return : void * @authur : ¹ÚÁ¾ÈÆ */ function fCalMonth(tmp) { var tmp_fr_date = model.getValue("/root/send/fromdd").toDate(); var tmp_to_date = model.getValue("/root/send/todd").toDate(); if (tmp == "prev") { var fr_date = tmp_fr_date.getAddDate(-30, "D"); var to_date = tmp_to_date.getAddDate(-30, "D"); } else { var fr_date = tmp_fr_date.getAddDate(30, "D"); var to_date = tmp_to_date.getAddDate(30, "D"); } model.makeValue("/root/send/fromdd", fr_date.getDateFormat()); model.makeValue("/root/send/todd", to_date.getDateFormat()); if(submit("TRMMR03901")) { grd_drschlist.rowheight(1) = 0; fSetGrdColor(); } } /** * @desc : ÀÇ»ç ¼±ÅÃ(ÈÞÁøÀÏÁ¤ ¼ÂÆÃ) * @id : * @event : ondblclick * @return : void * @authur : ¹ÚÁ¾ÈÆ */ function fClickDrNm() { var col = grd_drschlist.col; var row = grd_drschlist.row; var day_rowno = 2; if (row > 4) { var drid = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrid")); model.removeNodeset("/root/main/endresn"); copyNodeset("/root/main/endresn", "/root/main/endresnlist[orddrid=" +drid+ "and ordendresnnm != '']", "replace", model, model); model.refresh(); } } /***************************************************************************** Æ©´× ******************************************************************************/ /** * @group : * @ver : 2008.06.13 * @by : snoweye * @--------------------------------------------------- * @type : function * @access : private * @desc : ÀÇ·ÚÀǻ縦 ¼±ÅÃÇÑ´Ù. * @param : * @return : * @--------------------------------------------------- */ function fClickSchList() { var col = grd_drschlist.col; var row = grd_drschlist.row; var day_rowno = 2; var drnm = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrnm")); if (!fGetSuspendDiagInfo()) { return; } if (col > 1 && row > 4) { var drid = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrid")); var cnstflag = "1"; //2013/01/23 Start ¿ø¹«ÆÀÀÇ ¿Ü·¡ ÄÁ¼³Æ® hopedd »ç¿ë ÇÒ ¼ö ÀÖµµ·Ï ¼öÁ¤ var orddd = grd_drschlist.valueMatrix(day_rowno, col); //var orddd = getCurrentDate(); //2012/01/23 End if (orddd != "") { if (orddd < getCurrentDate()) { messageBox("°ú°ÅÀÏ·Î ÀÇ·ÚÇÒ ¼ö", "I004"); return; } else { var deptcd = model.getValue("/root/send/cnstdeptcd"); var deptnm = model.getValue("/root/send/cnstdeptnm"); var formcd = model.getValue("/root/send/formcd"); var reqdeptno = model.getValue("/root/main/cnstformlist/cnstform[" + grd_deptlist.row + "]/reqdeptno"); //¼±ÅÃµÈ Áø·áÀÇ Á¤º¸¸¦ ºÎ¸ðâ¿¡ Àü´ÞÇÑ´Ù. parent.window.javascript.setParameter("SPMMR03900_formcd", formcd); parent.window.javascript.setParameter("SPMMR03900_deptcd", deptcd); parent.window.javascript.setParameter("SPMMR03900_deptnm", deptnm); parent.window.javascript.setParameter("SPMMR03900_drid", drid); parent.window.javascript.setParameter("SPMMR03900_drnm", drnm); parent.window.javascript.setParameter("SPMMR03900_orddd", orddd); parent.window.javascript.setParameter("SPMMR03900_cnstflag", cnstflag); parent.window.javascript.setParameter("SPMMR03900_reqdeptno", reqdeptno); parent.window.javascript.setParameter("SPMMR03900_cnstioflag", model.getValue("/root/init/cnstioflag")); //parent.window.javascript.fOpenCnstForm(formcd, deptcd, deptnm, drid, drnm, orddd, cnstflag, "", ""); window.close(); } } } } /** * ¼±ÅÃÇÑ ¼ö½ÅÀÇÀÇ ÈÞÁø Á¤º¸ Á¶È¸ */ function fGetSuspendDiagInfo() { model.makeValue("/root/send/reqsuspend/orddeptcd", model.getValue("/root/send/cnstdeptcd")); model.makeValue("/root/send/reqsuspend/orddrid", grd_drschlist.valueMatrix(grd_drschlist.row, grd_drschlist.colref("orddrid"))); var sDrNm = grd_drschlist.valueMatrix(grd_drschlist.row, grd_drschlist.colref("orddrnm")); model.removeNodeset("/root/hidden/suspendinfo"); if (submit("TRMMR04905")) { if (model.getValue("/root/hidden/suspendinfo/spndyn") == "Y") { if (messageBox("["+sDrNm+"] ¼±»ý´ÔÀÇ ÈÞÁøÁ¤º¸ÀÔ´Ï´Ù. \n\n"+ model.getValue("/root/hidden/suspendinfo/description")+"\n\nÀÇ·ÚÇϽðڽÀ´Ï±î?", "Q", "") == 7) { return; } } } return true; }