SSMNP00800.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* ---------------------------------------------------------------------
  2. 수술실 가동률 통계 (SSMNP00800.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By taebum
  6. : 2008-10-22 오후 4:07:43
  7. ---------------------------------------------------------------------- */
  8. /**
  9. * @group :
  10. * @ver : 2008-09-28 오후 4:07:46
  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/curtab", "dept");
  22. model.setValue("/root/hidden/condition/frdt", getCurrentDate()+getCurrentTime().substr(0,4));
  23. model.setValue("/root/hidden/condition/todt" , getCurrentDate()+getCurrentTime().substr(0,4));
  24. model.refresh();
  25. model.removeNodeSet("/root/main/deptOperRateLists/deptOperRateList");
  26. datagrid1.refresh();
  27. model.removeNodeSet("/root/main/roomOperRateLists/roomOperRateList");
  28. datagrid2.refresh();
  29. }
  30. function fOnClickSearchBtn(){
  31. model.removenode("/root/send");
  32. model.makeValue("/root/send/frdt" ,model.getValue("/root/hidden/condition/frdt"));
  33. model.makeValue("/root/send/todt" ,model.getValue("/root/hidden/condition/todt"));
  34. if(model.getValue("/root/send/frdt") == "" || model.getValue("/root/send/todt") == ""){
  35. messageBox("시작일, 종료일은 필수입력 사항입니다.", "I000");
  36. return;
  37. }
  38. var sCurrentTab = model.getValue("/root/hidden/curtab");
  39. if(sCurrentTab == "dept"){
  40. model.removeNodeSet("/root/main/deptOperRateLists/deptOperRateList");
  41. datagrid1.refresh();
  42. submit("TRSNP00800");
  43. }else if(sCurrentTab == "room"){
  44. model.removeNodeSet("/root/main/roomOperRateLists/roomOperRateList");
  45. datagrid2.refresh();
  46. submit("TRSNP00801");
  47. }
  48. }
  49. /**
  50. * @group :
  51. * @ver : 2007.10.17
  52. * @by : Grace
  53. * @---------------------------------------------------
  54. * @type : function
  55. * @access : public
  56. * @desc : Exel 저장
  57. * @param :
  58. * @return :
  59. * @---------------------------------------------------
  60. */
  61. function fSaveExcel(){
  62. if(model.getValue("/root/hidden/curtab")=="dept"){
  63. fileName = window.fileDialog("save", ",", false, "수술실가동률_과별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  64. if (fileName != "" && fileName != null) {
  65. datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false);
  66. }
  67. }else if(model.getValue("/root/hidden/curtab")=="room"){
  68. fileName = window.fileDialog("save", ",", false, "수술실가동률_방별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  69. if (fileName != "" && fileName != null) {
  70. datagrid2.saveExcel(fileName, "SheetName", true, true, "", "", false);
  71. }
  72. }
  73. }