SMMMB00800.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /*
  2. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  3. 약속진단관리 ( SMMMB00800_약속진단관리.xrw - JScript )
  4. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  5. */
  6. var sETCPRMSPRCPSETDETLLIST_PATH = "/root/main/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist";
  7. /**
  8. * @desc : 화면 초기화
  9. * @
  10. * @param :
  11. * @return :
  12. * @---------------------------------------------------
  13. */
  14. function fInitializeDone_SMMMB00800(){
  15. model.removeNodeset(sETCPRMSPRCPSETDETLLIST_PATH);
  16. model.refresh();
  17. }
  18. /**
  19. * @desc : 약속SET 조회
  20. * @
  21. * @param :
  22. * @return :
  23. * @---------------------------------------------------
  24. */
  25. function fReqGetPrmsSet(){
  26. var iSetNO = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
  27. var cSetTypeCD = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
  28. model.makeValue("/root/send/reqdata/setno", iSetNO);
  29. model.makeValue("/root/send/reqdata/settypecd", cSetTypeCD);
  30. model.refresh();
  31. submit("TRMMB00602");
  32. }
  33. /**
  34. * @desc : 약속SET 등록버튼 클릭시
  35. * @
  36. * @param :
  37. * @return :
  38. * @---------------------------------------------------
  39. */
  40. function fRgstPrmsDetlSet(){
  41. if(model.getValue("/root/hidden/prmsprcpsetdetlset/setno") == ""){
  42. messageBox("SET폴더를","C002"); //수술SET을 선택하지 않고 등록버튼을 클릭한 경우
  43. return;
  44. }
  45. modal("SPMMO03200"); //진단팝업창을 띄운다.
  46. var useyn = getParameter("SPMMO03200_rtn_useyn"); //진단팝업창에 진단을 선택한 경우 useyn를 y로 설정한다.
  47. if(useyn == "Y"){
  48. fAddPrmsDetlSet(); //팝업창의 return instance를 처리
  49. setParameter("SPMMO03200_rtn_useyn", "");
  50. }
  51. }
  52. /**
  53. * @desc : 약속진단SET추가
  54. * @
  55. * @param :
  56. * @return :
  57. * @---------------------------------------------------
  58. */
  59. function fAddPrmsDetlSet(){
  60. var totcnt = getNodeSetCnt("/root/temp/selectdiaglist");
  61. var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
  62. var settypecd = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
  63. for(var row = 1; row <= totcnt; row++){
  64. diagcd = model.getValue("/root/temp/selectdiaglist[" + row + "]/diagcd");
  65. dispdiagcd = model.getValue("/root/temp/selectdiaglist[" + row + "]/dispdiagcd");
  66. diagengnm = model.getValue("/root/temp/selectdiaglist[" + row + "]/diagengnm");
  67. diaghngnm = model.getValue("/root/temp/selectdiaglist[" + row + "]/diaghngnm");
  68. var compval = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[detlsetcd='" + diagcd + "']/detlsetcd");
  69. if(compval == ""){
  70. grd_etcprmsprcpdetl.addRow(false);
  71. currow = grd_etcprmsprcpdetl.row;
  72. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/setno" , setno);
  73. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/settypecd" , settypecd);
  74. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/detlsetcd" , diagcd);
  75. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/dispdiagcd", dispdiagcd);
  76. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/engnm" , diagengnm);
  77. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/hngnm" , diaghngnm);
  78. }else{
  79. messageBox("[" + diagcd + "] 진단은 이미", "E006");
  80. continue;
  81. }
  82. }
  83. model.refresh();
  84. }
  85. /**
  86. * @desc : 진단코드 복사
  87. * @
  88. * @param :
  89. * @return :
  90. * @---------------------------------------------------
  91. */
  92. function fCopyDiagCD(){
  93. for(var i = 0; i < grd_etcprmsprcpdetl.rows; i++){
  94. if(grd_etcprmsprcpdetl.isselected(i) == true){
  95. model.duplicate("/root/copy/etcprmsprcpsetdetlinfo", sETCPRMSPRCPSETDETLLIST_PATH +"[" + i + "]");
  96. }
  97. }
  98. }
  99. /**
  100. * @desc : 진단코드 붙여넣기
  101. * @
  102. * @param :
  103. * @return :
  104. * @---------------------------------------------------
  105. */
  106. function fPasteDiagCD(){
  107. var iSetNO = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
  108. var cSetTypeCD = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
  109. var iTotCnt = getNodeSetCnt("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist");
  110. var sTrgtCD = "";
  111. for(var iRow = 1; iRow <= iTotCnt ; iRow++){
  112. var sDetlSetCD = model.getValue("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + iRow + "]/detlsetcd");
  113. var sDispDiagCD= model.getValue("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + iRow + "]/dispdiagcd");
  114. var sEngNM = model.getValue("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + iRow + "]/engnm");
  115. var sHngNM = model.getValue("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + iRow + "]/hngnm");
  116. //동일한 진단 같은 폴더에 중복저장 되는 것을 방지 2008. 08. 25 오지훈
  117. sTrgtCD = "";
  118. sTrgtCD = model.getValue("/root/main/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[detlsetcd='" + sDetlSetCD + "']/detlsetcd");
  119. if(sTrgtCD == ""){
  120. grd_etcprmsprcpdetl.addRow(false);
  121. iCurRow = grd_etcprmsprcpdetl.row;
  122. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/setno" , iSetNO);
  123. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/settypecd" , cSetTypeCD);
  124. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/detlsetcd" , sDetlSetCD);
  125. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/engnm" , sEngNM);
  126. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/hngnm" , sHngNM);
  127. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/dispdiagcd", sDispDiagCD);
  128. }else{
  129. messageBox("[" + sDetlSetCD + "] 진단코드는 이미", "E006");
  130. continue;
  131. }
  132. /*
  133. var ifndRow = grd_etcprmsprcpdetl.findRow(sDetlSetCD, 0, 4, true, true);
  134. if(ifndRow < 1){
  135. grd_etcprmsprcpdetl.addRow(false);
  136. iCurRow = grd_etcprmsprcpdetl.row;
  137. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/setno" , iSetNO);
  138. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/settypecd" , cSetTypeCD);
  139. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/detlsetcd" , sDetlSetCD);
  140. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/engnm" , sEngNM);
  141. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/hngnm" , sHngNM);
  142. model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + iCurRow + "]/dispdiagcd", sDispDiagCD);
  143. }else{
  144. messageBox("[" + sDetlSetCD + "] 진단코드는 이미", "E006");
  145. continue;
  146. }*/
  147. }
  148. model.removeNodeset("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist");
  149. model.refresh();
  150. }
  151. /**
  152. * @desc : SET폴더 삭제시 해당 진단 데이터 삭제
  153. * @
  154. * @param :
  155. * @return :
  156. * @---------------------------------------------------
  157. */
  158. function fClrGridData(){
  159. model.removeNodeset(sETCPRMSPRCPSETDETLLIST_PATH);
  160. model.refresh();
  161. }
  162. /**
  163. * @desc : 마우스 오른쪽 버튼 팝업창
  164. * @
  165. * @param :
  166. * @return :
  167. * @---------------------------------------------------
  168. */
  169. function fMouseRghtBtnPopup(){
  170. if(event.button == 3){
  171. if(grd_etcprmsprcpdetl.isCell(event.target) && grd_etcprmsprcpdetl.mouseRow >= grd_etcprmsprcpdetl.fixedRows){
  172. window.setPopupMenu(true, "/root/hidden/menu/menu", "label", "func", false); //팝업창 셋팅
  173. }
  174. }else{
  175. window.setPopupMenu(false);
  176. }
  177. }
  178. /**
  179. * @desc : 약속SET 과색인 조회
  180. * @
  181. * @param :
  182. * @return :
  183. * @---------------------------------------------------
  184. */
  185. function fReqPrmsDeptIndxList(){
  186. submit("TRMMB00701");
  187. }