SMMNP20300.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. 수술통계 - 월별/과별/교수별 수술 건수, 총 시간
  3. - Version :
  4. 1) : Ver.1.00.01
  5. - Create : 2012.03.21 KJS
  6. */
  7. var scmonth = "";
  8. //화면초기화
  9. function fInitialize(){
  10. var currentdate = getCurrentDate();
  11. scmonth = currentdate.substr(0,6);
  12. model.setValue("/root/cond/scmonth", scmonth);
  13. model.refresh();
  14. }
  15. // 현황내역 가져오기
  16. function fSearch()
  17. {
  18. submit("TRMNP20300");
  19. var totalcancel = model.getValue("/root/main/total/oplist/cancelcnt")
  20. model.removenode("/root/cond/totalcancel");
  21. model.makeNode("/root/cond/totalcancel");
  22. model.setValue("/root/cond/totalcancel", totalcancel);
  23. submit("TRMNP20301");
  24. model.refresh();
  25. // grd_oplist1.multiTotals = true;
  26. // grd_oplist1.subtotal("clear", 0, 0);
  27. // grd_oplist1.subtotal("sum", grd_oplist1.colRef("num"), grd_oplist1.colRef("totalcnt"), "#,###", "background-color:#99ff99", 1, "합계");
  28. // grd_oplist1.subtotal("sum", grd_oplist1.colRef("num"), grd_oplist1.colRef("confirmcnt"), "#,###", "background-color:#99ff99", 1, "합계");
  29. // grd_oplist1.subtotal("sum", grd_oplist1.colRef("num"), grd_oplist1.colRef("cancelcnt"), "#,###", "background-color:#99ff99", 1, "합계");
  30. // grd_oplist1.insertRow(1);
  31. // grd_oplist1.valueMatrix(1, 3) = "합계";
  32. // grd_oplist1.valueMatrix(1, 4) = model.getValue("/root/main/total/oplist1/norcnt1");
  33. // grd_oplist1.valueMatrix(1, 5) = model.getValue("/root/main/total/oplist1/norcnt2");
  34. // grd_oplist1.valueMatrix(1, 6) = model.getValue("/root/main/total/oplist1/norcnt3");
  35. // grd_oplist1.valueMatrix(1, 7) = model.getValue("/root/main/total/oplist1/norcnt4");
  36. // grd_oplist1.valueMatrix(1, 8) = model.getValue("/root/main/total/oplist1/ercnt1");
  37. // grd_oplist1.valueMatrix(1, 9) = model.getValue("/root/main/total/oplist1/ercnt2");
  38. // grd_oplist1.valueMatrix(1, 10) = model.getValue("/root/main/total/oplist1/ercnt3");
  39. // grd_oplist1.valueMatrix(1, 11) = model.getValue("/root/main/total/oplist1/ercnt4");
  40. // grd_oplist1.valueMatrix(1, 12) = model.getValue("/root/main/total/oplist1/addcnt1");
  41. // grd_oplist1.valueMatrix(1, 13) = model.getValue("/root/main/total/oplist1/addcnt2");
  42. // grd_oplist1.valueMatrix(1, 14) = model.getValue("/root/main/total/oplist1/addcnt3");
  43. // grd_oplist1.valueMatrix(1, 15) = model.getValue("/root/main/total/oplist1/addcnt4");
  44. }
  45. //이전 년버튼 클릭시 - 전년도+월로 세팅
  46. function fClkBfYear(srchym){
  47. var yyear = srchym.substring(0, 4);
  48. var mmont = srchym.substring(4, 6);
  49. yyear--;
  50. scmonth = yyear + mmont;
  51. model.setValue('/root/cond/scmonth', scmonth);
  52. model.refresh();
  53. }
  54. //다음 년버튼 클릭시 - 다음년도+월로 세팅
  55. function fClkAfYear(scmonth){
  56. var yyear = scmonth.substring(0, 4);
  57. var mmont = scmonth.substring(4, 6);
  58. yyear++;
  59. scmonth = yyear + mmont;
  60. model.setValue('/root/cond/scmonth', scmonth);
  61. model.refresh();
  62. }
  63. //이전 달버튼 클릭시 - 년도+전월 세팅
  64. function fClkBfMonth(scmonth){
  65. var yyear = scmonth.substring(0, 4);
  66. var mmont = scmonth.substring(4, 6);
  67. mmont = mmont.toDate('MM').getAddDate(-1, "M").getDateFormat('MM');
  68. if(mmont == '12'){
  69. yyear--;
  70. }
  71. scmonth = yyear + mmont;
  72. model.setValue('/root/cond/scmonth', scmonth);
  73. model.refresh();
  74. }
  75. //다음 달버튼 클릭시 - 년도+다음월 세팅
  76. function fClkAfMonth(scmonth){
  77. var yyear = scmonth.substring(0, 4);
  78. var mmont = scmonth.substring(4, 6);
  79. mmont = mmont.toDate('MM').getAddDate(+1, "M").getDateFormat('MM');
  80. if(mmont == '01'){
  81. yyear++;
  82. }
  83. scmonth = yyear + mmont;
  84. model.setValue('/root/cond/scmonth', scmonth);
  85. model.refresh();
  86. }