SMMMB08400.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /**
  2. * @desc : 화면 초기화
  3. * @
  4. * @param :
  5. * @return :
  6. * @author : 엄영만
  7. * @---------------------------------------------------
  8. */
  9. function fInitialize_SMMMB08400(){
  10. fGetMhrcdList();
  11. }
  12. /**
  13. * @desc : 진료공통코드 리스트 조회
  14. * @
  15. * @param :
  16. * @return :
  17. * @author : 엄영만
  18. * @---------------------------------------------------
  19. */
  20. function fGetMhrcdList(){
  21. model.removeNodeset("/root/main/info/mhrcd/mhrcdlist"); // 진료공통코드 리스트
  22. model.resetInstanceNode("/root/main/hardcdinfo/mhrcdinfo");
  23. model.resetInstanceNode("/root/main/dhrcd/dhrcdlist");
  24. model.resetInstanceNode("/root/main/ahrcd/ahrcdlist");
  25. model.setValue("/root/main/cond/userid", getUserInfo("userid"));
  26. model.setValue("/root/main/cond/deptcd", getUserInfo("dutplcecd"));
  27. submit("TRMMB08401");
  28. model.refresh(); // 트리가 접힌 상태에서 재조회 하면 그리드에 접힌 수만큼 조회 되지 않는 오류 수정.
  29. setTree(grd_mhrcdlist, grd_mhrcdlist.colRef("levl"), grd_mhrcdlist.colRef("displaynm"), false);
  30. //input박스 비활성화
  31. ipt_hardcdno.disabled = true;
  32. ipt_hardcdnm.disabled = true;
  33. ipt_suphardcdno.disabled = true;
  34. txt_rmk.disabled = true;
  35. // 저장버튼 비활성화
  36. btn_SaveMhrcd.disabled = true;
  37. btn_SaveAhrcd.disabled = true;
  38. btn_SaveDhrcd.disabled = true;
  39. grd_dhrcdlist.clearStatus();
  40. grd_ahrcdlist.clearStatus();
  41. model.refresh();
  42. }
  43. /**
  44. * @desc : 진료공통코드 리스트 클릭시 기본정보 설정
  45. * @
  46. * @param :
  47. * @return :
  48. * @author : 엄영만
  49. * @---------------------------------------------------
  50. */
  51. function fSetHrcdInfo(){
  52. var nRow = grd_mhrcdlist.row;
  53. var sHardCdNo = model.getValue("/root/main/mhrcd/mhrcdlist["+nRow+"]/hardcdno");
  54. if(!isNull(sHardCdNo)) {
  55. model.makeValue("/root/send/reqdata/userid", getUserInfo("userid"));
  56. model.makeValue("/root/send/reqdata/deptcd", getUserInfo("dutplcecd"));
  57. model.makeValue("/root/send/reqdata/hardcdno", sHardCdNo);
  58. if (submit("TRMMB08402")){
  59. model.resetInstanceNode("/root/main/hardcdinfo/mhrcdinfo");
  60. model.resetInstanceNode("/root/main/dhrcd/dhrcdlist");
  61. model.resetInstanceNode("/root/main/ahrcd/ahrcdlist");
  62. copyNodesetType("/root/main/hardcdinfo/mhrcdinfo", "/root/main/recv/mhrcdinfo", "replace", model, model);
  63. copyNodesetType("/root/main/dhrcd/dhrcdlist", "/root/main/recv/dhrcdlist", "replace", model, model);
  64. copyNodesetType("/root/main/ahrcd/ahrcdlist", "/root/main/recv/ahrcdlist", "replace", model, model);
  65. //input박스 비활성화
  66. ipt_hardcdno.disabled = true;
  67. ipt_hardcdnm.disabled = true;
  68. ipt_suphardcdno.disabled = true;
  69. txt_rmk.disabled = true;
  70. grd_dhrcdlist.clearStatus();
  71. grd_ahrcdlist.clearStatus();
  72. var sAuthType = model.getValue("/root/main/hardcdinfo/mhrcdinfo/authtype");
  73. if(sAuthType == "A" || getUserInfo("userid") == "EMR") {
  74. btn_SaveMhrcd.disabled = false;
  75. btn_SaveAhrcd.disabled = false;
  76. btn_SaveDhrcd.disabled = false;
  77. } else if(sAuthType == "E"){
  78. btn_SaveMhrcd.disabled = true;
  79. btn_SaveAhrcd.disabled = true;
  80. btn_SaveDhrcd.disabled = false;
  81. } else {
  82. btn_SaveMhrcd.disabled = true;
  83. btn_SaveAhrcd.disabled = true;
  84. btn_SaveDhrcd.disabled = true;
  85. }
  86. model.removeNodeset("/root/main/recv");
  87. model.refresh();
  88. }
  89. }
  90. }
  91. /**
  92. * @desc : 진료공통코드 상세 리스트 저장
  93. * @
  94. * @param :
  95. * @return :
  96. * @author : 엄영만
  97. * @---------------------------------------------------
  98. */
  99. function fSaveMHrcdInfo(){
  100. if( messageBox("기본정보를","Q002") == 6 ){
  101. copyNodesetType("/root/send/savedata/mhrcdinfo", "/root/main/hardcdinfo/mhrcdinfo", "replace", model, model);
  102. if ( submit("TXMMB08401") ) {
  103. fGetMhrcdList();
  104. }
  105. }
  106. }
  107. /**
  108. * @desc : 진료공통코드 상세 리스트 저장
  109. * @
  110. * @param :
  111. * @return :
  112. * @author : 엄영만
  113. * @---------------------------------------------------
  114. */
  115. function fSaveDHrcdList(){
  116. if( messageBox("상세코드 정보를","Q002") == 6 ){
  117. model.setValue("/root/send/savedata/dhrcdlist", grd_dhrcdlist.getUpdateData());
  118. if ( submit("TXMMB08402") ) {
  119. fSetHrcdInfo();
  120. }
  121. }
  122. }
  123. /**
  124. * @desc : 진료공통코드 권한 리스트 저장
  125. * @
  126. * @param :
  127. * @return :
  128. * @author : 엄영만
  129. * @---------------------------------------------------
  130. */
  131. function fSaveAHrcdList(){
  132. if( messageBox("권한정보를","Q002") == 6 ){
  133. model.setValue("/root/send/savedata/ahrcdlist", grd_ahrcdlist.getUpdateData());
  134. if ( submit("TXMMB08403") ) {
  135. fSetHrcdInfo();
  136. }
  137. }
  138. }