/** - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì - ¿Ü·¡Â÷Æ®´ëÃâ½Åû ¹× »óÅÂÁ¶È¸ ( SMMRC01500_¿Ü·¡Â÷Æ®´ëÃâ½Åû ¹× »óÅÂÁ¶È¸.xrw - JScript ) - Version : 1) : Ver.1.00.01 - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì **/ /** * @ver : 2007/12/11 * @desc : ÆûÃʱâÈ­ ¹× °øÅëÄÚµå load,»ó´ÜÁ¤º¸ ÀÖÀ»½Ã °Ë»ö * @ * @by : ÀÌâ·Ï * @param : * @return : * @--------------------------------------------------- */ function finitialize(){ model.removeNodeset("/root/main/appchrt/outchrtlist"); model.removeNodeset("/root/main/otherchrt/otherchrtlist"); mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/wardlist", "W"); //º´µ¿ÄÚµå ÄÞº¸ var pamInfoCvs = getGlobalVariable("paminfo"); if(pamInfoCvs != null && pamInfoCvs != "") { //cvs°¡ nullÀÌ ¾Æ´Ñ °æ¿ì¿¡¸¸ ó¸®ÇÔ. model.removeNodeSet ("/root/main/result/paminfo/list"); setCSVToNode ("/root/main/result/paminfo", pamInfoCvs); var pid = model.getValue("/root/main/result/paminfo/list/pid"); var orddeptcd = model.getValue("/root/main/result/paminfo/list/orddeptcd"); var wardcd = model.getValue("/root/main/result/paminfo/list/wardcd"); var roomcd = model.getValue("/root/main/result/paminfo/list/roomcd"); var indd = model.getValue("/root/main/result/paminfo/list/indd"); //model.setValue("/root/outcond/chrtdept" ,orddeptcd); model.setValue("/root/outcond/ward" ,wardcd); model.setValue("/root/outcond/pid" ,pid); model.setValue("/root/outcond/ddlist" ,getCurrentDate()); model.makeValue("/root/outcond/instcd" ,getUserInfo("dutplceinstcd")); //model.makeValue("/root/outcond/dschdd" ,getCurrentDate()); model.setValue("/root/othercond/ward" ,wardcd); fSelectWard(); fOutChartList(); model.setValue("/root/othercond/room" ,roomcd); fRoomPatList(); model.setValue("/root/othercond/pid" ,pid); model.makeValue("/root/othercond/indd" ,indd); model.makeValue("/root/othercond/instcd",getUserInfo("dutplceinstcd")); fOtherChrtList(); }else if(pamInfoCvs==""){ model.setValue("/root/outcond/ward" ,getUserInfo("dutplcecd")); model.makeValue("/root/outcond/ddlist" ,getCurrentDate()); model.makeValue("/root/outcond/instcd" ,getUserInfo("dutplceinstcd")); fOutChartList(); } grd_outchrtlist.colHidden(10)=true; } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc : ¿Ü·¡Â÷Æ®´ëÃâ »óÅÂÁ¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fOutChartList() { if(submit("TRMRC01501")==true){ var trgCol = grd_outchrtlist.colRef("appdd"); var rendflagCol = grd_outchrtlist.colRef("rendflag"); for(var i =1; i < grd_outchrtlist.rows; i++ ) { if(model.getValue("/root/outcond/dschInddlist")=="dschdd"){ if( grd_outchrtlist.valueMatrix(i, trgCol) != "" ){//±× À妽º °ªÀÌ ¾øÀ» ¶§ grd_outchrtlist.isReadOnly(i, rendflagCol) = true;//edit¸øÇÏ°Ô } }else if(model.getValue("/root/outcond/dschInddlist")=="indd"){ if(grd_outchrtlist.valueMatrix(i,grd_outchrtlist.colRef("appdd"))=="½ÅûÁß"){ grd_outchrtlist.isReadOnly(i, rendflagCol) = true; grd_outchrtlist.refresh(); }else if(grd_outchrtlist.valueMatrix(i,grd_outchrtlist.colRef("appdd"))!=""){ grd_outchrtlist.isReadOnly(i, rendflagCol) = true; grd_outchrtlist.refresh(); }else{ grd_outchrtlist.isReadOnly(i, rendflagCol) = false; } } } } model.refresh(); } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc : ¿Ü·¡Â÷Æ®´ëÃâ * @param : * @return : * @--------------------------------------------------- */ function fRowRendflag(){ if (grd_outchrtlist.isCell(event.target) && grd_outchrtlist.row >= grd_outchrtlist.fixedRows){ var iRow = grd_outchrtlist.row - grd_outchrtlist.fixedRows + 1; var rRow = grd_otherchrtlist.row - grd_otherchrtlist.fixedRows + 1; var rendflag = model.getValue("/root/main/appchrt/outchrtlist[" + iRow + "]/rendflag"); var chrtflag = model.getValue("/root/main/appchrt/outchrtlist[" + iRow + "]/chrtflag"); var appdeptcd = model.getValue("/root/main/appchrt/outchrtlist[" + iRow + "]/appdeptcd"); var appdd = model.getValue("/root/main/appchrt/outchrtlist[" + iRow + "]/appdd"); var appmanid = model.getValue("/root/main/appchrt/outchrtlist[" + iRow + "]/appmanid"); var lendmanid = model.getValue("/root/main/appchrt/outchrtlist[" + iRow + "]/lendmanid"); var rtndd = model.getValue("/root/main/appchrt/outchrtlist[" + iRow + "]/rtndd"); if(chrtflag != "P") { messageBox("ÀÌ È¯ÀÚ´Â ÇØ´ç ÀÔ¿ø°ú Â÷Æ®°¡ ¾øÀ¸´Ï ¿À¸¥ÂÊÀÇ Å¸°ú Â÷Æ® ´ëÃâ¿¡¼­ ½Åû","I008"); model.setValue("/root/main/appchrt/outchrtlist[" + iRow + "]/rendflag", "false"); grd_outchrtlist.refresh(); return; } if(rendflag=="true"){ model.setValue("/root/main/appchrt/outchrtlist[" + iRow + "]/rendflag", "true"); model.setValue("/root/main/appchrt/outchrtlist[" + iRow + "]/appdd",getCurrentDate()); }else if(rendflag=="false"){ model.setValue("/root/main/appchrt/outchrtlist[" + iRow + "]/appdd" , ""); model.setValue("/root/main/appchrt/outchrtlist[" + iRow + "]/rendflag", "false"); grd_outchrtlist.refresh(); } } model.refresh(); } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc : º´µ¿¿¡ º´½Ç Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSelectWard() { model.makeValue("/root/send/reqdata/wardcd", model.getValue("/root/othercond/ward")); submit("TRMRC00051"); cmb_room.refresh(); cmb_pid.refresh(); ipt_pid.value=""; } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc : ÀÔ¿øÈ¯ÀÚÂ÷Æ®¸®½ºÆ® ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fReqLendChrt() { grd_outchrtlist.clearStatus(); var iRow = grd_outchrtlist.row - grd_outchrtlist.fixedRows + 1; var bSave = false; for ( var i= 1; i< grd_outchrtlist.rows; i++) { var check = model.getValue("/root/main/appchrt/outchrtlist[" + i + "]/rendflag"); if(check == "true") { grd_outchrtlist.rowStatus(i) = 1; bSave = true; } } if(bSave == true) { var iRow = grd_outchrtlist.row - grd_outchrtlist.fixedRows+ 1; var ward =model.getValue("/root/outcond/ward"); if (ward=="2280200000"){ //º´µ¿ÀÌ ÀÀ±ÞÀÇ·á¼¾ÅÍÀ϶§ ´ëÃâ¿ëµµ¸¦ °­Á¦·Î 006·Î ÀúÀå model.setValue("/root/main/appchrt/outchrtlist[" + iRow + "]/rendcd","006"); }else model.setValue("/root/main/appchrt/outchrtlist[" + iRow + "]/rendcd","004"); model.makeValue("/root/send/savedata", grd_outchrtlist.getUpdateData()); if(submit("TXMRC01501")==true) { messageBox("¼±ÅÃÇϽŠÂ÷Æ®°¡","I001"); }else{ messageBox("¼±ÅÃÇϽŠÂ÷Æ®°¡","E009"); } model.removeNodeset("/root/send/savedata"); fOutChartList(); model.refresh(); }else{ messageBox("´ëÃâ½ÅûÇÒ Á¾ÀÌÂ÷Æ®¸¦","C002"); } } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc : º´½Ç¿¡ ȯÀÚ °¡Á®¿À±â * @param : * @return : * @--------------------------------------------------- */ function fRoomPatList() { model.makeValue("/root/send/reqdata/room/roomcd", model.getValue("/root/othercond/room")); submit("TRMRC01503"); cmb_pid.refresh(); ipt_pid.value=""; } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc : ±âÁØÀÏÀÚ¿¡ µû¸¥ ¹öư disabled »óź¯°æ ¹× TEXT¸í º¯°æ * @param : * @return : * @--------------------------------------------------- */ function fSelectRdoList() { var dschInddlist=model.getValue("/root/outcond/dschInddlist"); if(dschInddlist=="indd") { cap_snm.text="ÀÔ¿ø±âÁØÀÏ" btn_x_appchrt.disabled = "false"; grd_outchrtlist.colHidden(10)=true; grd_outchrtlist.colHidden(7)=false; model.removeNodeset("/root/main/appchrt/outchrtlist"); }else if(dschInddlist=="dschdd") { cap_snm.text="Åð¿ø±âÁØÀÏ" btn_x_appchrt.disabled = "true"; ipt_srchfrdd.refresh(); grd_outchrtlist.colHidden(10)=false; grd_outchrtlist.colHidden(7)=true; model.setValue("/root/outcond/ddlist",getCurrentDate()); model.removeNodeset("/root/main/appchrt/outchrtlist"); } model.refresh(); } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc :Ÿ°ú Â÷Æ®¸®½ºÆ® Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fOtherChrtList() { var pid=model.getValue("/root/othercond/pid"); var indd=model.getValue("/root/init/roompatlist[ pid = '" + pid + "']/indd"); var iRow = grd_otherchrtlist.row - grd_otherchrtlist.fixedRows+ 1; var instcd = getUserInfo("dutplceinstcd"); model.makeValue("/root/othercond/indd",indd); model.makeValue("/root/othercond/instcd",instcd); if(submit("TRMRC01502")) { for(var i =1; i < grd_otherchrtlist.rows; i++ ) { var trgCol = grd_otherchrtlist.colRef("appdd"); var rendflagCol = grd_otherchrtlist.colRef("rendflag"); var appmCol = cmb_ward.value; if(grd_otherchrtlist.valueMatrix(i, trgCol) =="½ÅûÁß"){ grd_otherchrtlist.isReadOnly(i, rendflagCol) = true; grd_otherchrtlist.refresh(); }else{ if(grd_otherchrtlist.valueMatrix(i, trgCol)!=""){ grd_otherchrtlist.isReadOnly(i, rendflagCol) = true; grd_otherchrtlist.refresh(); }else{ grd_otherchrtlist.isReadOnly(i, rendflagCol) = false; } } } } model.refresh(); // 2009.06.02. ÀÇÁ¤ºÎÀÎ °æ¿ì.. ÀÀ±Þ½Ç, °ÇÁø¼¾ÅÍ ±¸¿µ»ó Á¶È¸Çϱâ.. var instcd = getUserInfo("dutplceinstcd"); if (instcd == "013") { submit("TRMRC00147"); var msgER = ""; var msgAH = ""; var dataCnt = getNodesetCnt(model, "/root/main/oldimg/oldimglist"); for (var i = 1 ; i <= dataCnt ; i++) { var cls = model.getValue("/root/main/oldimg/oldimglist["+ i +"]/cls"); var cnt = model.getValue("/root/main/oldimg/oldimglist["+ i +"]/cnt"); // ±¸¿µ»ó ÀÀ±ÞÀÇÇаú if (cls == "E") { msgER = "¢Ã ±¸¿µ»ó ÀÀ±ÞÀÇÇаú (" + cnt + "°Ç)"; } // ±¸¿µ»ó °ÇÁø if (cls == "S") { msgAH = "¢Ã ±¸¿µ»ó °ÇÁø (" + cnt + "°Ç)"; } } model.setValue("/root/hidden/cap_oldimgER", msgER); cap_oldimgER.refresh(); model.setValue("/root/hidden/cap_oldimgAH", msgAH); cap_oldimgAH.refresh(); } } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc :Ÿ°ú Â÷Æ®½Åû * @param : * @return : * @--------------------------------------------------- */ function fReqotherLendChrt() { grd_otherchrtlist.clearStatus(); var iRow = grd_otherchrtlist.row - grd_otherchrtlist.fixedRows + 1; var cSave = false; for ( var i= 1; i< grd_otherchrtlist.rows; i++) { var check = model.getValue("/root/main/otherchrt/otherchrtlist[" + i + "]/rendflag"); var stat = model.getValue("/root/main/otherchrt/otherchrtlist[" + i + "]/stat"); if(check == "true") { if(stat==""){ grd_otherchrtlist.rowStatus(i) = 1; }else if(stat=="u"){ grd_otherchrtlist.rowStatus(i) = 2; } cSave = true; } } if(cSave == true) { var iRow = grd_otherchrtlist.row - grd_otherchrtlist.fixedRows+ 1; var xOtherChrtListPath="/root/main/otherchrt/otherchrtlist"; var ward =model.getValue("/root/othercond/ward"); if (ward=="2280200000"){ model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/rendcd","006"); }else{ model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/rendcd","004"); } model.makeValue("/root/send/savedata", grd_otherchrtlist.getUpdateData()); if(submit("TXMRC01502")) { messageBox("¼±ÅÃÇÑ Â÷Æ®°¡","I001"); model.removeNodeset("/root/send/savedata"); fOtherChrtList(); } }else{ messageBox("´ëÃâ½ÅûÇÒ Â÷Æ®°¡","I004"); } model.refresh(); } /** * @group : * @ver : 2007.12.11 * @by : ÀÌâ·Ï * @--------------------------------------------------- * @type : function * @access : public * @desc :Ÿ°ú Â÷Æ® ½Åû½Ã ½ÅûµÈ Â÷Æ®´Â È®ÀÎ * @param : * @return : * @--------------------------------------------------- */ function fOtherRowRendflag() { if (grd_otherchrtlist.isCell(event.target) && grd_otherchrtlist.row >= grd_otherchrtlist.fixedRows){ var iRow = grd_otherchrtlist.row - grd_otherchrtlist.fixedRows + 1; var outRow = grd_outchrtlist.row - grd_outchrtlist.fixedRows + 1; var Rendflag = model.getValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/rendflag"); var Chrtflag = model.getValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/chrtflag"); var ward = model.getValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/ward"); var Otherdeptcd = model.getValue("/root/main/otherchrt/otherchrtlist[" + outRow + "]/appdeptcd"); var Outdeptcd = model.getValue("/root/main/appchrt/outchrtlist[" + outRow + "]/appdeptcd"); if(Chrtflag != "P") { messageBox("Á¾ÀÌÂ÷Æ®¸¸ ´ëÃâ½Åû","I006"); model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/rendflag", "false"); grd_otherchrtlist.refresh(); return; } if(Rendflag=="true"){ if(grd_otherchrtlist.valueMatrix(iRow,grd_otherchrtlist.colRef("appdd"))=="½ÅûÁß"){ var Msgchrt=messageBox("ÀÌ Â÷Æ®´Â ÀÌ¹Ì ½ÅûµÈÂ÷Æ®ÀÔ´Ï´Ù. ±×·¡µµ ","Q004"); if(Msgchrt=="7") { model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/rendflag", "false"); model.makeValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appdd" , "½ÅûÁß"); grd_otherchrtlist.refresh(); return; }else if(Msgchrt=="6") { model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/rendflag" ,"true"); model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appdd" ,getCurrentDate()); model.makeValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appmanid" ,getUserId()); model.makeValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appmanm" ,getUserInfo("usernm")); model.makeValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appdeptcd",getUserInfo("dutplcecd")); model.makeValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appdeptnm",getUserInfo("dutplcenm")); //model.makeValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/stat" ,"u"); grd_otherchrtlist.refresh(); } }else{ model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/rendflag", "true"); model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appdd",getCurrentDate()); } }else if(Rendflag=="false"){ model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appdd" , ""); model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appmanid" , ""); model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appmanm" , ""); model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appdeptcd", ""); model.setValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/appdeptnm", ""); } } model.refresh(); } /** * @ver : * @desc : ÀÔ¿ø/Åð¿øÈ¯ÀÚ Â÷Æ® ¸®½ºÆ® Á¶È¸ÇÑ °ÍÀ» ¿¢¼¿¿¡ ÀúÀå * @ * @by : ÀÌâ·Ï * @param : * @return : * @--------------------------------------------------- */ function fChrtListSaveExcel(){ var fileName = window.fileDialog("save", ",", false, "ÀÔÅð¿øÈ¯ÀÚÂ÷Æ®¸®½ºÆ®", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); if (fileName != "") { grd_outchrtlist.saveExcel(fileName, "SheetName", false, false, "", "", "false"); } } /** * @ver : * @desc : ÀÔ/Åð¿øÈ¯ÀÚÂ÷Æ® ¸®½ºÆ® ´õºíŬ¸¯½Ã ȯÀÚº° Â÷Æ®¸®½ºÆ® Á¶È¸ * @ * @by : ÀÌâ·Ï * @param : * @return : * @--------------------------------------------------- */ function fPatChrtInfo(iRow){ model.setValue("/root/othercond/ward" ,model.getValue("/root/main/appchrt/outchrtlist["+iRow+"]/ward")); model.setValue("/root/othercond/instcd" ,model.getValue("/root/main/appchrt/outchrtlist["+iRow+"]/instcd")); fSelectWard(); model.setValue("/root/othercond/room" ,model.getValue("/root/main/appchrt/outchrtlist["+iRow+"]/roomcd")); model.setValue("/root/othercond/indd" ,model.getValue("/root/main/appchrt/outchrtlist["+iRow+"]/indd")); fRoomPatList(); model.setValue("/root/othercond/pid" ,model.getValue("/root/main/appchrt/outchrtlist["+iRow+"]/pid")); fOtherChrtList(); }