/** * @desc : È­¸éÃʱâÈ­ * * @param : * @return : * @author : °æºÏ´ëÇб³ * @--------------------------------------------------- */ var PARAM; function fIni(){ PARAM = getScreenMenuParameter(); model.setValue("/root/send/param", PARAM); grd_studyprojlist.frozenCols = grd_studyprojlist.colRef("rshnm"); zbcfGetCodeList(new Array("I0010") , new Array("/root/init/status")); zbcfGetCodeList(new Array("I0010") , new Array("/root/init/grdstatus")); zbcfGetCodeList(new Array("I0011") , new Array("/root/init/kind")); zbcfGetCodeList(new Array("C0048") , new Array("/root/init/C0048list")); //addComboItem("cmb_instcd","Àüü","","above"); model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd")); model.setValue("/root/main/cond/rshdeptnm" , getUserInfo("dutplcenm")); model.setValue("/root/main/cond/rshdeptcd" , getUserInfo("dutplcecd")); var len = getNodesetCount("/root/init/status"); for( i = 1 ; i <= len ; i++){ model.makeNode("/root/init/grdstatus[" + i + "]"); model.copyNode("/root/init/grdstatus[" + i + "]", "/root/init/status[" + i + "]"); } //addComboItem("cmb_status","-Àüü-","","above"); model.setValue("/root/main/cond/ddfrom" , "20090101"); model.setValue("/root/main/cond/ddto" , getCurrentDate()); model.setValue("/root/main/cond/ddflag" , "01"); model.setValue("/root/main/cond/kind" , "-"); model.setValue("/root/main/cond/chkstatus" , "P" ); model.setValue("/root/main/cond/status" , "'P'" ); if (PARAM == "P" || PARAM == "N") { model.setValue("/root/main/cond/rshid" , getUserInfo("userid")); model.setValue("/root/main/cond/rshnm" , getUserInfo("usernm")); btn_useid.attribute("visibility") = "hidden"; btn_new.attribute("visibility") = "hidden"; btn_excel.attribute("visibility") = "hidden"; btn_save.attribute("visibility") = "hidden"; btn_del.attribute("visibility") = "hidden"; cpt_rshdept.visible = false; btn_rshdept.visible = false; ipt_rshdeptnm.visible = false; if( PARAM == "N" ){ btn_amt.attribute("visibility")="hidden"; } model.setValue("/root/main/cond/rshdeptnm" , ""); model.setValue("/root/main/cond/rshdeptcd" , ""); cmb_instcd.disabled= false; grd_studyprojlist.colDisabled(1) = true; model.refresh(); fSearch(); }else{ cpt_rshdept.visible = true; btn_rshdept.visible = true; ipt_rshdeptnm.visible = true; cmb_instcd.disabled= true; model.refresh(); } } function fSearch(){ if (PARAM == "P" || PARAM == "N") { if ( model.getValue("/root/main/cond/rshid") == "" && model.getValue("/root/main/cond/studycd") == "" ) { messageBox("°úÁ¦¹øÈ£/Ã¥ÀÓ¿¬±¸¿ø µÑÁß¿¡ Çϳª¸¦ ÀÔ·ÂÇØÁֽʽÿÀ.","I999"); return; } } model.makeValue("/root/send/reqdata/ddflag" , model.getValue("/root/main/cond/ddflag")); model.makeValue("/root/send/reqdata/status" , model.getValue("/root/main/cond/status")); model.makeValue("/root/send/reqdata/kind" , model.getValue("/root/main/cond/kind")); model.makeValue("/root/send/reqdata/ddfrom" , model.getValue("/root/main/cond/ddfrom")); model.makeValue("/root/send/reqdata/ddto" , model.getValue("/root/main/cond/ddto")); model.makeValue("/root/send/reqdata/rshid" , model.getValue("/root/main/cond/rshid")); model.makeValue("/root/send/reqdata/studycd" , model.getValue("/root/main/cond/studycd")); model.makeValue("/root/send/reqdata/estatus" , model.getValue("/root/main/cond/estatus")); model.makeValue("/root/send/reqdata/instcd" , model.getValue("/root/main/cond/instcd")); model.makeValue("/root/send/reqdata/rshdeptcd" , model.getValue("/root/main/cond/rshdeptcd")); model.makeValue("/root/send/reqdata/rshdeptnm" , model.getValue("/root/main/cond/rshdeptnm")); if( submit("TRRIS00101") ){ for(var a = 1; a <= grd_studyprojlist.rows - grd_studyprojlist.fixedRows ; a++ ){ if( model.getValue("/root/result/studyprojlist[" + a + "]/status") == "P" ){ grd_studyprojlist.cellstyle("font-weight", a, 2, a, 2 ) = "bold"; grd_studyprojlist.cellstyle("color", a, 2, a, 2) = "blue"; }else{ grd_studyprojlist.cellstyle("font-weight", a, 2, a, 2 ) = "normal"; grd_studyprojlist.cellstyle("color", a, 2, a, 2) = "black"; } } } model.refresh(); } function fNew(){ modal("SPRIS00201"); } function fCnrt(){ var selectedRow = grd_studyprojlist.row; if ( selectedRow < 1) { messageBox("¼±ÅÃµÈ row°¡ ¾ø½À´Ï´Ù","I999"); return; } var projcd=model.getValue("/root/result/studyprojlist["+selectedRow+"]/projcd"); setParameter("SPRIS00210_projcd",projcd); open("SPRIS00210"); } function fDetail() { var selectedRow = grd_studyprojlist.row; if (selectedRow < 1) { messageBox("¼±ÅÃµÈ row°¡ ¾ø½À´Ï´Ù","I999"); return; } var projcd = model.getValue("/root/result/studyprojlist["+selectedRow+"]/projcd"); var studycd = model.getValue("/root/result/studyprojlist["+selectedRow+"]/studycd"); var instcd = model.getValue("/root/result/studyprojlist["+selectedRow+"]/instcd"); setParameter( "SMRIS00201_procd" , projcd ); setParameter( "SMRIS00201_studycd" , studycd ); setParameter( "SMRIS00201_instcd" , instcd ); modal("SPRIS00201"); } function fSetUserinfo(){ setParameter("search_condition","usernm"); setParameter("resultref","/root/send/userinfo"); modal("SPZSU10100"); var userinfo = model.getValue("/root/send/userinfo"); userinfo = userinfo.split("|"); var rshid = userinfo[2]; var rshnm = userinfo[3]; model.setValue("/root/main/cond/rshid" , rshid ); model.setValue("/root/main/cond/rshnm" , rshnm ); model.resetInstanceNode("/root/send/userinfo"); model.refresh(); } // º¸°í¼­ °ü¸® function fManStudyReport() { var selectedRow = grd_studyprojlist.row; if (selectedRow < 1) { messageBox("¼±ÅÃµÈ row°¡ ¾ø½À´Ï´Ù","I999"); return; } var studycd = model.getValue("/root/result/studyprojlist["+selectedRow+"]/studycd"); var rshid = model.getValue("/root/result/studyprojlist["+selectedRow+"]/rshid"); var rshnm = model.getValue("/root/result/studyprojlist["+selectedRow+"]/rshnm"); setParameter("SMRIF02200_menuparam" , PARAM); setParameter("SMRIF02200_studycd" , studycd); setParameter("SMRIF02200_rshid" , rshid); setParameter("SMRIF02200_rshnm" , rshnm); open("SMRIF02200"); } //º¸°í¼­ ½Åû¼­ ÀÛ¼º function fManStudyReportWrite() { var selectedRow = grd_studyprojlist.row; if (selectedRow < 1) { messageBox("¼±ÅÃµÈ row°¡ ¾ø½À´Ï´Ù","I999"); return; } var studycd = model.getValue("/root/result/studyprojlist["+selectedRow+"]/studycd"); var rshid = model.getValue("/root/result/studyprojlist["+selectedRow+"]/rshid"); var rshnm = model.getValue("/root/result/studyprojlist["+selectedRow+"]/rshnm"); var workkind = model.getValue("/root/result/studyprojlist["+selectedRow+"]/workkind"); setParameter("SMRIF02100_menuparam" , PARAM ); setParameter("SMRIF02100_studycd" , studycd ); setParameter("SMRIF02100_rshid" , rshid ); setParameter("SMRIF02100_rshnm" , rshnm ); setParameter("SMRIF02100_workkind" , workkind ); open("SMRIF02100"); } // ¿¬±¸¿ø µî·Ï ¹× Á¶È¸ function fManStudyUser() { var viewflag = "true"; if( PARAM == "P" ){ // ¿¬±¸¿ø Âü¿©, °øµ¿ if( model.getValue("/root/result/studyprojlist[" + grd_studyprojlist.row + "]/workkind") != "C"){ viewflag = "false"; }else{ // ¿¬±¸¿ø Ã¥ÀÓ viewflag = "true"; } }else{ // ¿¬±¸¼Ò viewflag = "true"; } if( viewflag == "true"){ var selectedRow = grd_studyprojlist.row; if (selectedRow < 1) { messageBox("¼±ÅÃµÈ row°¡ ¾ø½À´Ï´Ù","I999"); return; } var studycd = model.getValue("/root/result/studyprojlist["+selectedRow+"]/studycd"); var rshid = model.getValue("/root/result/studyprojlist["+selectedRow+"]/rshid"); var rshnm = model.getValue("/root/result/studyprojlist["+selectedRow+"]/rshnm"); setParameter("SMRIS00600_menuparam" , PARAM); setParameter("SMRIS00600_studycd" , studycd); setParameter("SMRIS00600_rshid" , rshid); setParameter("SMRIS00600_rshnm" , rshnm); open("SMRIS00600"); }else{ messageBox("ÇØ´ç È­¸é¿¡ ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.","I999"); return; } } //ÀÔÃâ±Ý ³»¿ªÁ¶È¸ ¹× °ü¸® function fManAmt() { var viewflag = "true"; if( PARAM == "P" ){ // ¿¬±¸¿ø Âü¿©, °øµ¿ if( model.getValue("/root/result/studyprojlist[" + grd_studyprojlist.row + "]/workkind") != "C"){ viewflag = "false"; }else{ // ¿¬±¸¿ø Ã¥ÀÓ viewflag = "true"; } }else{ // ¿¬±¸¼Ò viewflag = "true"; } if( viewflag == "true"){ var selectedRow = grd_studyprojlist.row; if (selectedRow < 1) { messageBox("¼±ÅÃµÈ row°¡ ¾ø½À´Ï´Ù","I999"); return; } var studycd = model.getValue("/root/result/studyprojlist["+selectedRow+"]/studycd"); var rshid = model.getValue("/root/result/studyprojlist["+selectedRow+"]/rshid"); var rshnm = model.getValue("/root/result/studyprojlist["+selectedRow+"]/rshnm"); setParameter("SMRIS00301_menuparam" , PARAM); setParameter("SMRIS00301_studycd" , studycd); setParameter("SMRIS00301_rshid" , rshid); setParameter("SMRIS00301_rshnm" , rshnm); open("SMRIS00301"); }else{ messageBox("ÇØ´ç È­¸é¿¡ ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.","I999"); return; } } // »óŰª º¯°æ (°ü¸®ÀÚ ±â´É) 2013.05.27 cyw function fSave(){ if( model.getValue("/root/main/cond/btnflag") == "1" ){ // °ü¸®ÀÚ¸¸ »óź¯°æ °¡´ÉÇϵµ·Ï ¼öÁ¤ 2013.05.27 cyw if ( messageBox("¿¬±¸°úÁ¦ »óŰªÀ»","Q002")== 6 ) { var updtdata = getGridUpdateData(grd_studyprojlist); if (updtdata == "" ) { messageBox("º¯°æµÈ µ¥ÀÌÅͰ¡","I004"); return; } model.makeNode("/root/send/reqdata/cond"); model.copyNode("/root/send/reqdata/cond", "/root/main/cond" ); model.makeValue("/root/send/reqdata/studyprojlist", grd_studyprojlist.getUpdateData()); if(submit("TXRIS00303")){ btn_search.dispatch("DOMActivate"); } model.removeNodeset("/root/send/reqdata"); } }else{ if ( messageBox("ÇØ´ç°úÁ¦¸¦ Á¦°ÅÇϽðڽÀ´Ï±î?","Q999 ")== 6 ) { var updtdata = grd_studyprojlist.row; if (updtdata == "" ) { messageBox("¼±ÅÃµÈ µ¥ÀÌÅͰ¡","I004"); return; } model.removeNodeset("/root/send/reqdata"); model.makeNode("/root/send/reqdata/cond"); model.copyNode("/root/send/reqdata/cond", "/root/main/cond" ); grd_studyprojlist.addStatus(grd_studyprojlist.row , "update"); model.makeValue("/root/send/reqdata/studyprojlist", grd_studyprojlist.getUpdateData()); if(submit("TXRIS00303")){ model.removeNodeset("/root/send/reqdata"); btn_search.dispatch("DOMActivate"); } model.removeNodeset("/root/send/reqdata"); } } model.refresh(); }