SSMNP00400.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /* ---------------------------------------------------------------------
  2. 과별 집도의별 수술명별 수술방 사용시간 통계 (SSMNP00400.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By taebum
  6. : 2008-10-21 오후 3:18:25
  7. ---------------------------------------------------------------------- */
  8. /**
  9. * @group :
  10. * @ver : 2008-09-28 오후 4:07:46
  11. * @by :
  12. * @---------------------------------------------------
  13. * @type : function
  14. * @access : public
  15. * @desc : 초기화
  16. * @param :
  17. * @return :
  18. * @---------------------------------------------------
  19. */
  20. function fInit(){
  21. model.setValue("/root/hidden/condition/frdd", getCurrentDate());
  22. model.setValue("/root/hidden/condition/todd" , getCurrentDate());
  23. model.refresh();
  24. model.removeNodeSet("/root/main/opnmlists/deptDoctOpRoomInfolist");
  25. datagrid3.refresh();
  26. model.removeNodeSet("/root/main/opschelists/deptDoctOpScheulInfolist");
  27. datagrid4.refresh();
  28. model.removenode("/root/send");
  29. model.makeValue("/root/send/flag" , "X" );
  30. model.makeValue("/root/send/searchitem", "XX" );
  31. model.makeValue("/root/send/deptflag" , "011" );
  32. submit("TRMNP00107");
  33. //수술방 조회
  34. model.removenode("/root/send");
  35. model.makeValue("/root/send/flag" , "userid" );
  36. model.makeValue("/root/send/searchitem" , "00009006" );
  37. submit("TRMNP00301", false); // 수술실의 코드와 명칭을 가져온다.
  38. addComboItem("combo1" , "전 체", "%", "above" );
  39. addComboItem("combo2" , "전 체", "%", "above" );
  40. }
  41. function fOnClickSearchBtn(){
  42. model.removenode("/root/send");
  43. model.makeValue("/root/send/frdd" ,model.getValue("/root/hidden/condition/frdd"));
  44. model.makeValue("/root/send/todd" ,model.getValue("/root/hidden/condition/todd"));
  45. model.makeValue("/root/send/ssflag1" ,model.getValue("/root/hidden/condition/ssflag1"));
  46. model.makeValue("/root/send/ssflag2" ,model.getValue("/root/hidden/condition/ssflag2"));
  47. model.makeValue("/root/send/ssflag3" ,model.getValue("/root/hidden/condition/ssflag3"));
  48. model.makeValue("/root/send/etcflag1",model.getValue("/root/hidden/condition/etcflag1"));
  49. model.makeValue("/root/send/etcflag2",model.getValue("/root/hidden/condition/etcflag2"));
  50. model.makeValue("/root/send/etcflag3",model.getValue("/root/hidden/condition/etcflag3"));
  51. model.makeValue("/root/send/deptcd" ,model.getValue("/root/hidden/condition/deptcd"));
  52. model.makeValue("/root/send/oproomcd",model.getValue("/root/hidden/condition/oproomcd"));
  53. model.makeValue("/root/send/opcd" ,model.getValue("/root/hidden/condition/opcd"));
  54. if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){
  55. messageBox("시작일, 종료일은 필수입력 사항입니다.", "I000");
  56. return;
  57. }
  58. var sCurrentTab = model.getValue("/root/init/tab");
  59. if(sCurrentTab == "opnm"){
  60. model.removeNodeSet("/root/main/opnmlists/deptDoctOpRoomInfolist");
  61. datagrid3.refresh();
  62. if(submit("TRSNP00400")){
  63. var iGridCnt = getNodesetCnt(model, "/root/main/opnmlists/deptDoctOpRoomInfolist");
  64. fHiddenGridCol(iGridCnt, datagrid3);
  65. }
  66. }else if(sCurrentTab == "opsch"){
  67. model.removeNodeSet("/root/main/opschelists/deptDoctOpScheulInfolist");
  68. datagrid4.refresh();
  69. submit("TRSNP00401");
  70. }
  71. }
  72. /**
  73. * @group :
  74. * @ver : 2007.10.17
  75. * @by : Grace
  76. * @---------------------------------------------------
  77. * @type : function
  78. * @access : public
  79. * @desc : Exel 저장
  80. * @param :
  81. * @return :
  82. * @---------------------------------------------------
  83. */
  84. function fSaveExcel(){
  85. var sCurrentTab = model.getValue("/root/init/tab");
  86. var fileName = null;
  87. if(sCurrentTab == "opnm"){
  88. fileName = window.fileDialog("save", ",", false, "과별 집도의별 수술명별 수술방 사용시간_수술명별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  89. if (fileName != "" && fileName != null) {
  90. datagrid3.saveExcel(fileName, "SheetName", true, true, "", "", false);
  91. }
  92. }else if(sCurrentTab == "opsch"){
  93. fileName = window.fileDialog("save", ",", false, "과별 집도의별 수술명별 수술방 사용시간_해당수술명 스케쥴별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  94. if (fileName != "" && fileName != null) {
  95. datagrid4.saveExcel(fileName, "SheetName", true, true, "", "", false);
  96. }
  97. }
  98. }
  99. /*
  100. * 수술코드 조회 팝업
  101. *
  102. */
  103. function fClickOpCodeHelp(){
  104. var xpos = event.screenX;
  105. var ypos = event.screenY-300;
  106. modal("SPMNP01501", 1, xpos, ypos);
  107. var sResult = getParameter("SPMNP01501_ResultData");
  108. setParameter("SPMNP01501_ResultData","");
  109. if(sResult != "" && sResult != null && sResult != "undefined"){
  110. var sResultArr = sResult.split("▧");
  111. model.setValue("/root/hidden/condition/opcd", sResultArr[0]);
  112. model.setValue("/root/hidden/condition/opnm", sResultArr[1]);
  113. input3.refresh();
  114. input2.refresh();
  115. }
  116. }
  117. /**
  118. * @group :
  119. * @ver : 2007.10.17
  120. * @by :
  121. * @---------------------------------------------------
  122. * @type : function
  123. * @access : public
  124. * @desc : 그리드의 1행에 데이터 없는 열 감추기
  125. * @param :
  126. * @return :
  127. * @---------------------------------------------------
  128. */
  129. function fHiddenGridCol(iGridCnt, pGrid){
  130. if(iGridCnt >1){
  131. for(var i = 1; i < pGrid.cols; i++){
  132. if(i == 1){
  133. pGrid.valuematrix(0,0) = pGrid.valuematrix(1, 0);
  134. }
  135. pGrid.valuematrix(0,i) = pGrid.valuematrix(1, i);
  136. if(pGrid.valuematrix(1, i) == "시간" || pGrid.valuematrix(1, i) == "건수"){
  137. pGrid.colwidth(i) = 0;
  138. }
  139. }
  140. model.removenode("/root/main/opnmlists/deptDoctOpRoomInfolist");
  141. datagrid3.refresh();
  142. }
  143. }