/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ÀÔ¿ø¿¹¾à³»¿ª (SPMMO14800_ÀÔ¿ø¿¹¾à³»¿ª.xrw - JScript ) - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ var sINREQFRMINFO_PATH = "/root/main/inreqfrminfo/inreqfrminfo"; var sINREQHISTLIST_PATH = "/root/main/inreqhistinfo/inreqhistlist"; /** * @desc : ÀÔ¿ø°áÁ¤¼­ ³»¿ª Á¶È¸ * @ * @param : * @return : * @author : ¿ÀÁöÈÆ * @--------------------------------------------------- */ function fInitialize_SPMMO14800(){ model.removeNodeset("/root/main/inreqhistinfo/inreqhistlist"); zbcfGetCodeList(new Array("P0020", "P0378"), new Array("/root/init/inrsrvcnclresn", "/root/init/specroomyn")); mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "D"); model.setValue("/root/main/cond/year" , getCurrentDate().substr(0, 4)); //year model.setValue("/root/main/cond/month", getCurrentDate().substr(4, 2)); //month grd_calendar.dataheight = 31; // grid data height default set fReqInReqCalendar(); //´Þ·ÂÁ¶È¸ } /** * @desc : ÀÔ¿ø°áÁ¤¼­ ³»¿ª Á¶È¸ * @ * @param : pid - µî·Ï¹øÈ£ * : inrsrvacptseqno- ÀÔ¿ø¿¹¾à¹øÈ£ * @return : * @author : ¿ÀÁöÈÆ * @--------------------------------------------------- */ function fReqInReqHistList(pid, inrsrvacptdd, orddeptcd, inrsrvacptseqno){ model.removeNodeset("/root/send/reqdata"); model.makeValue("/root/send/reqdata/pid" , pid); model.makeValue("/root/send/reqdata/inrsrvacptdd" , inrsrvacptdd); model.makeValue("/root/send/reqdata/orddeptcd" , orddeptcd); model.makeValue("/root/send/reqdata/inrsrvacptseqno" , inrsrvacptseqno); model.makeValue("/root/send/reqdata/queryflag", "nurse"); //°£È£ Á¶È¸¿ë Äõ¸®, ¹Ì·¡ÀÏÀÚ ÀÔ¿ø°áÁ¤¼­´Â Á¶È¸ÇÏÁö ¾Ê´Â´Ù. if(submit("TRMMO00109")){ fDispInReqHistInfo(1); } fReqInReqDiagOpList(); //ÀÔ¿ø°áÁ¤¼­ Áø´Ü,¼ö¼úÁ¶È¸ } /** * @desc : ÀÔ¿ø³»¿ª ¸®½ºÆ® Ŭ¸¯½Ã -> ÀÔ¿ø³»¿ª Á¤º¸ display * @ * @param : * @return : * @author : ¿ÀÁöÈÆ * @--------------------------------------------------- */ function fDispInReqHistInfo(currow){ var orddeptcd = model.getValue(sINREQHISTLIST_PATH + "[" + currow + "]/orddeptcd"); if(orddeptcd == ""){ return; } mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist", orddeptcd, "0330"); model.copyNode(sINREQFRMINFO_PATH, sINREQHISTLIST_PATH + "[" + currow + "]"); model.refresh(); } /** * @desc : ÀÔ¿øÀÇ·Ú¼­ Áø´Ü,¼ö¼ú ¸®½ºÆ® Á¶È¸ * @ * @param : * @return : * @author : ¿ÀÁöÈÆ * @--------------------------------------------------- */ function fReqInReqDiagOpList(){ model.removeNodeset("/root/send/reqdata"); var pid = model.getValue(sINREQFRMINFO_PATH + "/pid"); var inhopedd = model.getValue(sINREQFRMINFO_PATH + "/inhopedd"); var orddeptcd= model.getValue(sINREQFRMINFO_PATH + "/orddeptcd"); var orddrid = model.getValue(sINREQFRMINFO_PATH + "/orddrid"); if(pid == "" || inhopedd == "" || orddeptcd == "" || orddrid == ""){ //ÀÔ¿ø°áÁ¤¼­°¡ ¾ø´Â °æ¿ì, return; //ÀÔ¿ø°áÁ¤¼­ Áø´ÜÀ» Á¶È¸ÇÏÁö ¾Ê´Â´Ù. } model.makeValue("/root/send/reqdata/pid" , pid); model.makeValue("/root/send/reqdata/orddd" , inhopedd); //ÀÔ¿øÈñ¸ÁÀÏÀÚ model.makeValue("/root/send/reqdata/cretno" , 0); model.makeValue("/root/send/reqdata/orddeptcd", orddeptcd); model.makeValue("/root/send/reqdata/orddrid" , orddrid); if(submit("TRMMO00112")){ } } /** * @desc : ÀÔ¿øÀÇ·Ú¼­ ´Þ·Â Á¶È¸ * @ * @param : * @return : * @author : ¿ÀÁöÈÆ * @--------------------------------------------------- */ function fReqInReqCalendar(){ model.removeNodeset("/root/main/week/week"); model.removeNodeset("/root/main/calendar/calendar"); model.refresh(); var year = model.getValue("/root/main/cond/year"); var month = model.getValue("/root/main/cond/month"); var orgyear = year; var orgmonth = month; model.removeNodeset("/root/send/reqdata"); model.makeValue("/root/send/reqdata/fromdd" , year + "-" + month + "-" + "01"); if(month == 12){ //12¿ùÀÎ °æ¿ì, ÇØ¸¦ ³Ñ°Ü¼­ °è»êÇÑ´Ù. year++; month = "01"; }else{ month = eval(month) + 1; if(month < 10){month = "0".concat(month);} } model.makeValue("/root/send/reqdata/todd" , year + "-" + month + "-" + "01"); model.makeValue("/root/send/reqdata/basedd" , ("" + orgyear + "").concat(orgmonth)); model.makeValue("/root/send/reqdata/orddeptcd", model.getValue(sINREQFRMINFO_PATH + "/orddeptcd")); if(submit("TRMMO00110")){ fMakeCalendar(); //Á¶È¸ ÈÄ ´Þ·Â °ªÀ» ¼³Á¤ } } /** * @desc : ´Þ·Â°ª ¼³Á¤ * @ * @param : * @return : * @author : ¿ÀÁöÈÆ * @--------------------------------------------------- */ function fMakeCalendar(){ model.refresh(); grd_calendar.addRow(false, true); var row = 0; var col = 0; var patsum = 0; var totcnt = getNodeSetCnt("/root/main/calendar/calendar"); for(var i = 1; i <= totcnt ; i++){ row = model.getValue("/root/main/calendar/calendar[" + i + "]/week"); col = model.getValue("/root/main/calendar/calendar[" + i + "]/day") - 1; patsum = model.getValue("/root/main/calendar/calendar[" + i + "]/patsum"); dutflag = model.getValue("/root/main/calendar/calendar[" + i + "]/dutflag"); if(dutflag == 4){ //Åä grd_calendar.cellstyle("color", row, col) = "#0000FF"; }else if(dutflag == 8){ //ÀÏ grd_calendar.cellstyle("color", row, col) = "#FF0000"; }else{ //ÈÞÀÏ grd_calendar.cellstyle("color", row, col) = "#000000"; } grd_calendar.valueMatrix(row, col) = i + "\n(" + patsum + ")"; if(col == 6){ grd_calendar.addRow(false, true); } } grd_calendar.rebuild(); } /** * @desc : ´Þ·Â ³âµµ º¯°æ ¹öư Ŭ¸¯ * @ * @param : pflag - bf ÀÌÀü ÇØ * - af ´ÙÀ½ ÇØ * @return : * @author : ¿ÀÁöÈÆ * @--------------------------------------------------- */ function fClkBtnYear(pflag){ model.removeNodeset("/root/main/week/week"); var year = model.getValue("/root/main/cond/year"); if(pflag == "bf"){ model.setValue("/root/main/cond/year", --year); }else if(pflag == "af"){ model.setValue("/root/main/cond/year", ++year); } model.refresh(); fReqInReqCalendar(); } /** * @desc : ´ç·Â ¿ù º¯°æ ¹öư Ŭ¸¯ * @ * @param : pflag - bf ÀÌÀü ÇØ * - af ´ÙÀ½ ÇØ * @return : * @author : ¿ÀÁöÈÆ * @--------------------------------------------------- */ function fClkBtnMonth(pflag){ model.removeNodeset("/root/main/week/week"); var year = model.getValue("/root/main/cond/year"); var month = model.getValue("/root/main/cond/month"); if(pflag == "af"){ month = eval(month) + 1; if(month == 13){ year = eval(year) + 1; month = "01"; }else if(month < 10){ //2ÀÚ¸®°¡ ¾Æ´Ñ °æ¿ì, ¾ÕÀÚ¸®¿¡ 0À» ºÙÀδÙ. month = "0".concat(month); } }else if(pflag == "bf"){ month -= 1; if(month == 0){ year -= 1; month = 12; }else if(month < 10){ //2ÀÚ¸®°¡ ¾Æ´Ñ °æ¿ì, ¾ÕÀÚ¸®¿¡ 0À» ºÙÀδÙ. month = "0".concat(month); } } model.setValue("/root/main/cond/year", year); model.setValue("/root/main/cond/month", month); model.refresh(); fReqInReqCalendar(); } function fReqPatInfo(pid){ if(pid != ""){ fReqInReqHistList(pid); //ÀÔ¿ø³»¿ªÁ¶È¸ fReqInReqDiagOpList(); //ÀÔ¿ø°áÁ¤¼­ Áø´Ü,¼ö¼úÁ¶È¸ } }