SMMRI00100.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /**
  2. * @desc : 초기화
  3. * @
  4. * @param :
  5. * @return :
  6. * @---------------------------------------------------
  7. */
  8. function fInitialize(){
  9. model.removeNodeset("/root/main/unprepmngt/unpreplist");
  10. model.setValue("/root/main/condition/fromdd", getCurrentDate());
  11. model.setValue("/root/main/condition/todd", getCurrentDate());
  12. model.setValue("/root/main/condition/dschfromdd", getCurrentDate());
  13. model.setValue("/root/main/condition/dschtodd", getCurrentDate());
  14. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "D");
  15. addComboInstance("/root/init/orddept", "deptcd^depthngnm", "-^전체", "dept"); //진료과 전체항목 추가
  16. model.setValue("/root/main/condition/unprepdeptcd", "-");
  17. model.setValue("/root/main/condition/dschdeptcd", "-");
  18. fChgGrdCol();
  19. model.refresh();
  20. }
  21. /**
  22. * @desc : 미비기록리스트 조회 정보
  23. * @
  24. * @param :
  25. * @return :
  26. * @---------------------------------------------------
  27. */
  28. function fSrchInfo(){
  29. var item = model.getValue("/root/main/condition/jobposflag");
  30. var itemArray = item.split(' ');
  31. item = '';
  32. for(var i = 0; i < itemArray.length; i++){
  33. item = item + itemArray[i];
  34. if(i == (itemArray.length-1)){
  35. break;
  36. }
  37. item = item + '\',\'';
  38. }
  39. model.removeNodeset("/root/send/reqdata");
  40. model.removeNodeset("/root/main/unprepmngt/unpreplist");
  41. model.makeNode("/root/send/reqdata");
  42. copyNodeset("/root/send/reqdata", "/root/main/condition");
  43. model.setValue("/root/send/reqdata/jobposflag", item);
  44. }
  45. /**
  46. * @desc : 미비기록리스트 조회
  47. * @
  48. * @param :
  49. * @return :
  50. * @---------------------------------------------------
  51. */
  52. function fSrchUnprepList(){
  53. fSrchInfo();
  54. submit("TRMRI00101");
  55. }
  56. /**
  57. * @desc : 부서선택
  58. * @id :
  59. * @event : xforms-select
  60. * @return : void
  61. */
  62. function fUnprepDept()
  63. {
  64. model.removeNodeset("/root/init/userlist");
  65. model.makeNode("/root/init/userlist/usercombo");
  66. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist", cmb_orddept.value, "0330");
  67. addComboInstance("/root/init/userlist", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
  68. model.setValue("/root/main/condition/unprepdrid", "-");
  69. model.refresh();
  70. }
  71. /**
  72. * @desc : 엑셀 저장
  73. * @
  74. * @param :
  75. * @return :
  76. * @---------------------------------------------------
  77. */
  78. function fSaveExcel(){
  79. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  80. if (fileName != "")
  81. {
  82. grd_unpreplist.saveExcel(fileName, "SheetName", true, true, "", "", "false");
  83. }
  84. }
  85. /**
  86. * @desc : 부서 선택에 따른 그리드 컬럼 변경
  87. * @
  88. * @param :
  89. * @return :
  90. * @---------------------------------------------------
  91. */
  92. function fChgGrdCol() {
  93. var dateflag = model.getValue("/root/main/condition/dateflag")
  94. if (dateflag == "orddd" ) {
  95. grd_unpreplist.colHidden(grd_unpreplist.colRef("dschdeptnm")) = true;
  96. grd_unpreplist.colHidden(grd_unpreplist.colRef("orddeptnm")) = false;
  97. grd_unpreplist.colHidden(grd_unpreplist.colRef("indd")) = false;
  98. grd_unpreplist.colHidden(grd_unpreplist.colRef("dschdd")) = true;
  99. } else {
  100. grd_unpreplist.colHidden(grd_unpreplist.colRef("dschdeptnm")) = false;
  101. grd_unpreplist.colHidden(grd_unpreplist.colRef("orddeptnm")) = true;
  102. grd_unpreplist.colHidden(grd_unpreplist.colRef("indd")) = true;
  103. grd_unpreplist.colHidden(grd_unpreplist.colRef("dschdd")) = false;
  104. }
  105. }