noticepopup.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. // DB에서 관리 하는 방법으로 변경 20161209 - smkim
  2. function fOpenNoticePopup() {
  3. window.clearInterval(notice_timerId);
  4. var systemcd = getUserInfo("systemcd");
  5. var userinstcd = getUserInfo("dutplceinstcd");
  6. var jobkindcd = getUserInfo("jobkindcd");
  7. model.setValue("/root/send/noticeinfo/systemkind", systemcd.substr(0, 3));
  8. model.setValue("/root/send/noticeinfo/userinstcd", userinstcd);
  9. model.setValue("/root/send/noticeinfo/jobkindcd", jobkindcd);
  10. if(!submit("TRZUM20501")) return;
  11. var nWidth = 710;
  12. var nHeight = 500;
  13. var count = getNodesetCount("/root/main/noticeinfo/ds_noticeList");
  14. for(var nRowNum = count; nRowNum > 0; nRowNum--) {
  15. var width = model.getValue("/root/main/noticeinfo/ds_noticeList[" + nRowNum + "]/width");
  16. var height = model.getValue("/root/main/noticeinfo/ds_noticeList[" + nRowNum + "]/height");
  17. if(!isNull(width)) nWidth = parseInt(width);
  18. if(!isNull(height)) nHeight = parseInt(height);
  19. if(nWidth < 480) nWidth = 480;
  20. if(nHeight < 250) nHeight = 250;
  21. openInternal("new","SPZSN00500","scn","","","","SPZSN00500","/root/main/noticeinfo/ds_noticeList[" + nRowNum + "]","/root/main/noticeinfo/ds_noticeList","width:" + nWidth + "px; height:" + nHeight + "px;");
  22. }
  23. // 청탁금지 서약서 제출 여부 확인 팝업 20180228 smkim
  24. var systemcd = getSystemCd();
  25. if(systemcd == "HIS031" || systemcd == "HIS032" || systemcd == "MIS030") {
  26. var prohibitreqyn = model.getValue("/root/main/noticeinfo/prohibitreqinfo/prohibitreqyn");
  27. if(prohibitreqyn == "N") {
  28. open("SPZUM02000");
  29. }
  30. }
  31. }
  32. // hismainweb => noticeweb 으로 이동 ( 2013/09/12-손성훈)
  33. //임시 공지사항 팝업 호출
  34. function fOpenNoticePopup_old() {
  35. var userInstcd = getUserInfo("dutplceinstcd");
  36. var jobkindcd = getUserInfo("jobkindcd");
  37. if((getSystemCd().substring(0,3).toLowerCase() == "his") && (userInstcd == "031")) {
  38. // 본원. 의사& 간호사 공통 공지 -----------------------------------------------------
  39. var popupUrl = "/himed/webapps/com/noticeinfoweb/html/tempnotice.html";
  40. var popupWid = "noticepopup";
  41. var w = 530;
  42. var h = 390 ;
  43. //------------------------------------------------------------------------------------- */
  44. // 본원. 의사& 간호사 개별 공지 -----------------------------------------------------
  45. var jobkindcd = getUserInfo("jobkindcd");
  46. var userInstcd = getUserInfo("dutplceinstcd");
  47. // var popupUrl;
  48. // var w;
  49. // var h;
  50. // if(jobkindcd=="0330"){
  51. //popupUrl = "/himed/webapps/com/noticeinfoweb/html/tempnotice.html";
  52. //w = 650;
  53. //h = 500 ;
  54. // }else if(jobkindcd=="1140") {
  55. // popupUrl = "/himed/webapps/com/noticeinfoweb/html/tempnotice_nurse.html";
  56. // w = 550;
  57. // h = 150;
  58. // }
  59. // var popupWid = "noticepopup";
  60. //------------------------------------------------------------------------------------- */
  61. } else if((getSystemCd().substring(0,3).toLowerCase() == "his") && (userInstcd == "032")) {
  62. var jobkindcd = getUserInfo("jobkindcd");
  63. var userInstcd = getUserInfo("dutplceinstcd");
  64. var popupUrl = "/himed/webapps/com/noticeinfoweb/html/tempnotice032.html";
  65. var popupWid = "noticepopup";
  66. var w = 530;
  67. var h = 390 ;
  68. // if(jobkindcd=="0330" || jobkindcd=="1140"){ // 의사만
  69. // popupUrl = "/himed/webapps/com/noticeinfoweb/html/tempnotice032.html";
  70. // w = 480;
  71. // h = 210 ;
  72. // }
  73. //else if(jobkindcd=="1140") {
  74. // popupUrl = "/himed/webapps/com/noticeinfoweb/html/tempnotice032_nurse.html"; //01.15 수정
  75. // w = 550;
  76. // h = 210;
  77. //}
  78. } else if((getSystemCd().substring(0,3).toLowerCase() == "mis") && (userInstcd == "032")) {
  79. var popupUrl = "/himed/webapps/com/noticeinfoweb/html/tempnotice032.html";
  80. var popupWid = "noticepopup";
  81. var w = 530;
  82. var h = 390 ;
  83. //var popupUrl2 = "/himed/webapps/com/noticeinfoweb/html/tempnotice_mis032_2.html";
  84. //var popupWid2 = "noticepopup2";
  85. } else if((getSystemCd().substring(0,3).toLowerCase() == "mis") && (userInstcd == "031")) {
  86. var popupUrl = "/himed/webapps/com/noticeinfoweb/html/tempnotice.html";
  87. var popupWid = "noticepopup";
  88. var w = 530;
  89. var h = 390 ;
  90. //var popupUrl2 = "/himed/webapps/com/noticeinfoweb/html/tempnotice_mis031_2.html";
  91. //var popupWid2 = "noticepopup2";
  92. }
  93. var leftPosition = (htmlwindow.screen.availWidth) ? (htmlwindow.screen.availWidth-w)/2 : 0;
  94. var topPosition = (htmlwindow.screen.availHeight) ? (htmlwindow.screen.availHeight-h)/2 - (h / 2) - 20 : 0;
  95. var prop = 'height='+h+',width='+w+',top='+topPosition+',left='+leftPosition;
  96. leftPosition = (htmlwindow.screen.availWidth) ? (htmlwindow.screen.availWidth-w)/2 : 0;
  97. topPosition = (htmlwindow.screen.availHeight) ? (htmlwindow.screen.availHeight-h)/2 : 0;
  98. var prop2 = 'height='+h+',width='+w+',top='+topPosition+',left='+leftPosition;
  99. var currentDate = getCurrentDate();
  100. // 공지사항 올림 내림 설정.
  101. if((getSystemCd().substring(0,3).toLowerCase() == "mis") && ((userInstcd == "031") || (userInstcd == "032"))) {
  102. // if(userInstcd == "031" || userInstcd == "032"){
  103. // openHtml(getDomain() + popupUrl, popupWid, prop);
  104. // }
  105. // if(userInstcd == "032")
  106. // openHtml(getDomain() + popupUrl, popupWid, prop);
  107. var todd = (userInstcd == "031") ? "20161213" : "20161214";
  108. if(currentDate >= "20161130" && currentDate <= todd)
  109. openHtml(getDomain() + popupUrl, popupWid, prop);
  110. }else if((getSystemCd().substring(0,3).toLowerCase() == "his") && ((userInstcd == "031") )){
  111. // if( /*userInstcd == "031" ){ // && */jobkindcd == "0330" ){
  112. // //if(getCurrentDate() < "20161004")
  113. // openHtml(getDomain() + popupUrl, popupWid, prop);
  114. // }
  115. if(currentDate >= "20161130" && currentDate <= "20161213")
  116. openHtml(getDomain() + popupUrl, popupWid, prop);
  117. }else if((getSystemCd().substring(0,3).toLowerCase() == "his") && ((userInstcd == "032"))){
  118. // if( userInstcd == "032" && (jobkindcd == "0330" || jobkindcd=="1140") ){ //02.10 수정
  119. // var currentdate = getCurrentDate();
  120. // if(currentdate < "20160211")
  121. // openHtml(getDomain() + popupUrl, popupWid, prop);
  122. // }
  123. //
  124. // if(jobkindcd == "0330") {
  125. // if(getCurrentDate() <= "20160930")
  126. // openHtml(getDomain() + popupUrl, popupWid, prop);
  127. // }
  128. if(currentDate >= "20161130" && currentDate <= "20161214")
  129. openHtml(getDomain() + popupUrl, popupWid, prop);
  130. }
  131. }