SMMNP20200.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. //model.makeValue("/root/cond/gbn", 1);
  19. submit("TRMNP20201");
  20. model.refresh();
  21. }
  22. //이전 년버튼 클릭시 - 전년도+월로 세팅
  23. function fClkBfYear(srchym){
  24. var yyear = srchym.substring(0, 4);
  25. var mmont = srchym.substring(4, 6);
  26. yyear--;
  27. scmonth = yyear + mmont;
  28. model.setValue('/root/cond/scmonth', scmonth);
  29. model.refresh();
  30. }
  31. //다음 년버튼 클릭시 - 다음년도+월로 세팅
  32. function fClkAfYear(scmonth){
  33. var yyear = scmonth.substring(0, 4);
  34. var mmont = scmonth.substring(4, 6);
  35. yyear++;
  36. scmonth = yyear + mmont;
  37. model.setValue('/root/cond/scmonth', scmonth);
  38. model.refresh();
  39. }
  40. //이전 달버튼 클릭시 - 년도+전월 세팅
  41. function fClkBfMonth(scmonth){
  42. var yyear = scmonth.substring(0, 4);
  43. var mmont = scmonth.substring(4, 6);
  44. mmont = mmont.toDate('MM').getAddDate(-1, "M").getDateFormat('MM');
  45. if(mmont == '12'){
  46. yyear--;
  47. }
  48. scmonth = yyear + mmont;
  49. model.setValue('/root/cond/scmonth', scmonth);
  50. model.refresh();
  51. }
  52. //다음 달버튼 클릭시 - 년도+다음월 세팅
  53. function fClkAfMonth(scmonth){
  54. var yyear = scmonth.substring(0, 4);
  55. var mmont = scmonth.substring(4, 6);
  56. mmont = mmont.toDate('MM').getAddDate(+1, "M").getDateFormat('MM');
  57. if(mmont == '01'){
  58. yyear++;
  59. }
  60. scmonth = yyear + mmont;
  61. model.setValue('/root/cond/scmonth', scmonth);
  62. model.refresh();
  63. }