SSMNP00100.js 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. /* ---------------------------------------------------------------------
  2. 마취종류별 수술건수 통계 (SSMNP00100.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By taebum
  6. : 2008-09-25 오후 10:15:29
  7. ---------------------------------------------------------------------- */
  8. /**
  9. * @group :
  10. * @ver : 2008-09-23 오후 4:20:36
  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. //2010-02-28 오후 5:39:12 taebum add 일자별 조회 후 다시 집도과별로 조회시 수술일자가 월로만 조회됨 오류 올라온건 관련 수정작업
  24. model.setValue("/root/temp/org_searfromdd", getCurrentDate());
  25. model.refresh();
  26. /*
  27. model.removenode("/root/send");
  28. model.makeValue("/root/send/flag" , "X" );
  29. model.makeValue("/root/send/searchitem", "XX" );
  30. model.makeValue("/root/send/deptflag" , "011" );
  31. submit("TRMNP00107");
  32. */
  33. //addComboItem("cmb_orddept" , "전 체", "", "above" );
  34. //addComboItem("cmb_oproomlist", "전 체", "", "above" );
  35. }
  36. function fOnClickSearchBtn(){
  37. var sCurrentTab = model.getValue("/root/init/tab");
  38. if(sCurrentTab == "" || sCurrentTab == null || sCurrentTab == "undefined"){
  39. return;
  40. }
  41. model.setValue("/root/send/frdd", model.getValue("/root/hidden/condition/frdd"));
  42. model.setValue("/root/send/todd", model.getValue("/root/hidden/condition/todd"));
  43. model.setValue("/root/send/ssflag1", model.getValue("/root/hidden/condition/ssflag1"));
  44. model.setValue("/root/send/ssflag2", model.getValue("/root/hidden/condition/ssflag2"));
  45. model.setValue("/root/send/ssflag3", model.getValue("/root/hidden/condition/ssflag3"));
  46. model.setValue("/root/send/etcflag1", model.getValue("/root/hidden/condition/etcflag1"));
  47. model.setValue("/root/send/etcflag2", model.getValue("/root/hidden/condition/etcflag2"));
  48. model.setValue("/root/send/etcflag3", model.getValue("/root/hidden/condition/etcflag3"));
  49. switch(sCurrentTab){
  50. case "dept" :
  51. if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){
  52. messageBox("시작일, 종료일은 필수입력 사항입니다.", "I000");
  53. return;
  54. }
  55. model.removeNodeSet("/root/main/deptlists/AnstKindDeptlist");
  56. datagrid4.refresh();
  57. if(submit("TRSNP00100")){
  58. //진료과 갯수를 count하여 진료과명이 없는 Line은 width를 0으로 줄인다.
  59. var iGridCnt = getNodesetCnt(model, "/root/main/deptlists/AnstKindDeptlist");
  60. fHiddenGridCol(iGridCnt, datagrid4);
  61. }
  62. break;
  63. case "day" :
  64. if(model.getValue("/root/send/frdd") == "" || (model.getValue("/root/send/frdd")).length < 6){
  65. messageBox("년월은 필수입력 사항입니다.", "I000");
  66. return;
  67. }
  68. model.removeNodeSet("/root/main/daylists/AnstKindDaylist");
  69. datagrid1.refresh();
  70. submit("TRSNP00101");
  71. break;
  72. case "room" :
  73. if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){
  74. messageBox("시작일, 종료일은 필수입력 사항입니다.", "I000");
  75. return;
  76. }
  77. model.removeNodeSet("/root/main/roomlists/AnstKindRoomlist");
  78. datagrid3.refresh();
  79. if(submit("TRSNP00102")){
  80. var iGridCnt = getNodesetCnt(model, "/root/main/roomlists/AnstKindRoomlist");
  81. fHiddenGridCol(iGridCnt, datagrid3);
  82. }
  83. break;
  84. default :
  85. break;
  86. }
  87. }
  88. /**
  89. * 탭 버튼 클릭시 이벤트
  90. *
  91. */
  92. function fClickTab(pFlag){
  93. if(pFlag == "dept"){
  94. model.setValue("/root/init/tab", "dept");
  95. ipt_refcond.visible = true;
  96. caption1.visible = true;
  97. input1.visible = true;
  98. ipt_refcond.attribute("maxlength")= 8;
  99. ipt_refcond.attribute("format")= "yyyy-mm-dd";
  100. //2010-02-28 오후 5:39:12 taebum add 일자별 조회 후 다시 집도과별로 조회시 수술일자가 월로만 조회됨 오류 올라온건 관련 수정작업
  101. if((model.getValue("/root/hidden/condition/frdd")).length < 7){
  102. model.setValue("/root/hidden/condition/frdd", model.getValue("/root/temp/org_searfromdd"));
  103. model.refresh();
  104. }
  105. }else if(pFlag == "day"){
  106. model.setValue("/root/init/tab", "day");
  107. ipt_refcond.visible = true;
  108. caption1.visible = false;
  109. input1.visible = false;
  110. ipt_refcond.attribute("maxlength")= 6;
  111. ipt_refcond.attribute("format")= "yyyy-mm";
  112. model.setValue("/root/hidden/condition/frdd", (model.getValue("/root/hidden/condition/frdd").substr(0,6)));
  113. ipt_refcond.refresh();
  114. }else if(pFlag == "room"){
  115. model.setValue("/root/init/tab", "room");
  116. ipt_refcond.visible = true;
  117. caption1.visible = true;
  118. input1.visible = true;
  119. ipt_refcond.attribute("maxlength")= 8;
  120. ipt_refcond.attribute("format")= "yyyy-mm-dd";
  121. //2010-02-28 오후 5:39:12 taebum add 일자별 조회 후 다시 집도과별로 조회시 수술일자가 월로만 조회됨 오류 올라온건 관련 수정작업
  122. if((model.getValue("/root/hidden/condition/frdd")).length < 7){
  123. model.setValue("/root/hidden/condition/frdd", model.getValue("/root/temp/org_searfromdd"));
  124. model.refresh();
  125. }
  126. }
  127. }
  128. /**
  129. * @group :
  130. * @ver : 2007.10.17
  131. * @by : Grace
  132. * @---------------------------------------------------
  133. * @type : function
  134. * @access : public
  135. * @desc : Exel 저장
  136. * @param :
  137. * @return :
  138. * @---------------------------------------------------
  139. */
  140. function fSaveExcel(){
  141. var sCurrentTab = model.getValue("/root/init/tab");
  142. if(sCurrentTab == "" || sCurrentTab == null || sCurrentTab == "undefined"){
  143. return;
  144. }
  145. var fileName = null;
  146. switch(sCurrentTab){
  147. case "dept" :
  148. fileName = window.fileDialog("save", ",", false, "마취종류별통계_집도과별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  149. if (fileName != "" && fileName != null) {
  150. datagrid4.saveExcel(fileName, "SheetName", true, true, "", "", false);
  151. }
  152. break;
  153. case "day" :
  154. fileName = window.fileDialog("save", ",", false, "마취종류별통계_일자별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  155. if (fileName != "" && fileName != null) {
  156. datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false);
  157. }
  158. break;
  159. case "room" :
  160. fileName = window.fileDialog("save", ",", false, "마취종류별통계_방별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  161. if (fileName != "" && fileName != null) {
  162. datagrid3.saveExcel(fileName, "SheetName", true, true, "", "", false);
  163. }
  164. break;
  165. default :
  166. break;
  167. }
  168. }
  169. /**
  170. * @group :
  171. * @ver : 2007.10.17
  172. * @by :
  173. * @---------------------------------------------------
  174. * @type : function
  175. * @access : public
  176. * @desc : 그리드의 1행에 데이터 없는 열 감추기
  177. * @param :
  178. * @return :
  179. * @---------------------------------------------------
  180. */
  181. function fHiddenGridCol(iGridCnt, pGrid){
  182. if(iGridCnt >1){
  183. for(var i = 1; i < pGrid.cols; i++){
  184. if(pGrid.valuematrix(1, i) == ""){
  185. pGrid.colwidth(i) = 0;
  186. }
  187. }
  188. }
  189. }