SMMQS00200.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. function fSearch()
  2. {
  3. if ( model.getValue("/root/send/frdd") == "" )
  4. {
  5. alert("시작일을 입력 해 주세요.");
  6. model.setFocus("ipt_dsch1");
  7. return;
  8. }
  9. if ( model.getValue("/root/send/todd") == "" )
  10. {
  11. alert("종료일을 입력 해 주세요.");
  12. model.setFocus("ipt_dsch2");
  13. return;
  14. }
  15. var srhflag = model.getValue("/root/send/srhflag");
  16. if ( srhflag == "PRF" )
  17. {
  18. submit("TRMQS00102");
  19. model.copyNode("/root/main/statcnt", "/root/main/prflist/statcnt");
  20. grd_prfdeptlist.subtotalPosition = "above";
  21. grd_prfdeptlist.subtotal("average", -1, 1, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  22. grd_prfdeptlist.subtotal("average", -1, 2, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  23. grd_prfdeptlist.subtotal("average", -1, 3, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  24. grd_prfdeptlist.subtotal("average", -1, 4, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  25. grd_prfdeptlist.subtotal("average", -1, 5, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  26. grd_prfdeptlist.subtotal("sum", -1, 6, "#,###", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  27. }
  28. else if ( srhflag == "RESI" )
  29. {
  30. submit("TRMQS00103");
  31. grd_resideptlist.subtotalPosition = "above";
  32. grd_resideptlist.subtotal("average", -1, 1, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  33. grd_resideptlist.subtotal("average", -1, 2, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  34. grd_resideptlist.subtotal("average", -1, 3, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  35. grd_resideptlist.subtotal("average", -1, 4, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  36. grd_resideptlist.subtotal("average", -1, 5, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  37. grd_resideptlist.subtotal("average", -1, 6, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  38. grd_resideptlist.subtotal("sum", -1, 7, "#,###", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  39. }
  40. else if ( srhflag == "NURS" )
  41. {
  42. submit("TRMQS00104");
  43. grd_nurswardlist.subtotalPosition = "above";
  44. grd_nurswardlist.subtotal("average", -1, 1, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  45. grd_nurswardlist.subtotal("average", -1, 2, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  46. grd_nurswardlist.subtotal("average", -1, 3, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  47. grd_nurswardlist.subtotal("average", -1, 4, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  48. grd_nurswardlist.subtotal("average", -1, 5, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  49. grd_nurswardlist.subtotal("average", -1, 6, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  50. grd_nurswardlist.subtotal("average", -1, 7, "#,###.9", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  51. grd_nurswardlist.subtotal("sum", -1, 8, "#,###", "background-color:#7ca8d9; font-weight:bold; ", 0, "전체");
  52. }
  53. model.refresh();
  54. //왜 한번에 계산이 안되는 건지 쩝.
  55. opt_ptg.refresh();
  56. model.recalculate();
  57. opt_ptg.refresh();
  58. model.recalculate();
  59. }
  60. function fSetData( ptgflag, srhflag, nodeset1, nodeset2)
  61. {
  62. model.removeNodeset(nodeset1);
  63. if ( nodeset2 != null )
  64. {
  65. model.removeNodeset(nodeset2);
  66. }
  67. model.makeValue("/root/send/ptgflag", ptgflag);
  68. model.makeValue("/root/send/srhflag", srhflag);
  69. }