SMMNN008.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. 분만장부(SMMNN00800_분만장부.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var xPartRtnListPath = "/root/main/womanlist/womanlist";
  7. /**
  8. * @group :
  9. * @ver : 2007.06.15
  10. * @by : 최경용
  11. * @---------------------------------------------------
  12. * @type : function
  13. * @access : public
  14. * @desc : 초기화 작업을 합니다.
  15. * @param :
  16. * @param :
  17. * @return :
  18. * @---------------------------------------------------
  19. */
  20. function fInitialize(){
  21. model.setValue("/root/main/cond/bthddfromdd", getCurrentDate().substr(0,6) + "01");
  22. model.setValue("/root/main/cond/bthddtodd", getCurrentDate());
  23. grd_wardpatlist.mergecells = "bycol";
  24. for(var i = 3; i < grd_wardpatlist.cols; i++){
  25. grd_wardpatlist.mergecol(i) = false;
  26. }
  27. //fSearchClick();
  28. model.refresh();
  29. }
  30. /**
  31. * @group :
  32. * @ver : 2007.06.15
  33. * @by : 최경용
  34. * @---------------------------------------------------
  35. * @type : function
  36. * @access : public
  37. * @desc : 분만장부 리스트 조회
  38. * @param :
  39. * @param :
  40. * @return :
  41. * @---------------------------------------------------
  42. */
  43. function fSearchClick(){
  44. model.copyNode("/root/send/reqdata", "/root/main/cond");
  45. submit("TRMNN00801");
  46. }
  47. /**
  48. * @group :
  49. * @ver : 2007.07.09
  50. * @by : 최경용
  51. * @---------------------------------------------------
  52. * @type : function
  53. * @access : public
  54. * @desc : 분만실 환자 정보 더블클릭시
  55. * @param :
  56. * @param :
  57. * @return :
  58. * @---------------------------------------------------
  59. */
  60. function fGridDbClick(row){
  61. grd_wardpatlist.gridToInstance();
  62. var pid = model.getValue(xPartRtnListPath + "[" + row + "]/pid") ;
  63. var indd = model.getValue(xPartRtnListPath + "[" + row + "]/indd") ;
  64. var cretno = model.getValue(xPartRtnListPath + "[" + row + "]/cretno");
  65. var instcd = model.getValue(xPartRtnListPath + "[" + row + "]/instcd");
  66. var bthdd = model.getValue(xPartRtnListPath + "[" + row + "]/bthdd") ;
  67. var patnm = model.getValue(xPartRtnListPath + "[" + row + "]/patnm") ;
  68. //파라미터 추가_2009-02-17_SMY
  69. var wardcd = model.getValue(xPartRtnListPath + "[" + row + "]/wardcd");
  70. var roomcd = model.getValue(xPartRtnListPath + "[" + row + "]/roomcd");
  71. //파라미터 추가_2009-02-24_SMY
  72. var indschacptstat = model.getValue(xPartRtnListPath + "[" + row + "]/indschacptstat");
  73. /*
  74. if( grd_wardpatlist.row > 1 ) {
  75. condparam = "I" + "▦" + pid
  76. + "▦" + indd
  77. + "▦" + cretno
  78. + "▦" + instcd
  79. + "▦" + bthdd ;
  80. setParameter("condparam", condparam);
  81. modal("SPMMO08900", "1", "450", "400");
  82. }*/
  83. setParameter("pid" , pid );
  84. setParameter("patnm" , patnm);
  85. setParameter("indd" , indd);
  86. setParameter("cretno", cretno);
  87. setParameter("wardcd", wardcd);
  88. setParameter("roomcd", roomcd);
  89. setParameter("indschacptstat", indschacptstat);
  90. modal("SMMNN00700");
  91. }
  92. function fSaveExcel(grd){
  93. file = window.fileDialog("save","","true","","xls","All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  94. if(file != "") {
  95. grd.saveExcel(file);
  96. }
  97. }
  98. /**
  99. * @group :
  100. * @ver : 2007.06.23
  101. * @by : 최경용
  102. * @---------------------------------------------------
  103. * @type : function
  104. * @access : public
  105. * @desc : Excel파일로 저장
  106. * @param : grid 명
  107. * @param :
  108. * @return :
  109. * @---------------------------------------------------
  110. */
  111. function fSaveExcel(){
  112. grd_wardpatlist.gridToInstance();
  113. file = window.fileDialog("save","","true","","xls","All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  114. if(file != "") {
  115. grd_wardpatlist.saveExcel(file);
  116. }
  117. }
  118. /**
  119. * @group :
  120. * @ver : 2007.06.23
  121. * @by : 최경용
  122. * @---------------------------------------------------
  123. * @type : function
  124. * @access : public
  125. * @desc : 분만장부 출력
  126. * @param : grid 명
  127. * @param :
  128. * @return :
  129. * @---------------------------------------------------
  130. */
  131. function fClickPrint(){
  132. grd_wardpatlist.gridToInstance();
  133. model.removenode("/root/send/printdata");
  134. //send 재구성
  135. model.makeValue("/root/send/printdata","");
  136. model.copynode("/root/send/printdata", "/root/main");
  137. //생사여부
  138. for(var i = 1; i < grd_wardpatlist.rows-2; i++){
  139. model.setValue("/root/send/printdata/womanlist/womanlist["+i+"]/deathyn", grd_wardpatlist.labelMatrix((i+2), grd_wardpatlist.colRef("deathyn")));
  140. }
  141. exeReportPreview("RPMNN00801", "XMLSTR");
  142. }