SMMNE03900.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. /*
  2. 응급실 CPCR 기록지 기준자료 관리(SMMNE03800.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var prcpNodeCPCR = "/root/main/cpcrbasecode/mediation/mediationlist";
  7. var prcpNode = "/root/prcp/prcplist";
  8. var prcpSubCntNode = "/root/main/prcp/prcplist";
  9. var prcpSubNode = "/root/main/prcp";
  10. var prcpnmCol = 2;
  11. /**
  12. * @group :
  13. * @ver : 2007.07.21
  14. * @by : 양천덕
  15. * @---------------------------------------------------
  16. * @type : function
  17. * @access : public
  18. * @desc : 기준자료별 상태 변환
  19. * @param :
  20. * @return :
  21. * @---------------------------------------------------
  22. */
  23. function fStatChnge(chgPath, chgRow, chgCol ){
  24. if( chgRow == "0"){
  25. return;
  26. } else {
  27. if(chgCol == "1"){
  28. if(model.getValue(chgPath+"["+chgRow+"]/default") == "Y"){
  29. messageBox("해당 Item은 기본 설정 아이템입니다.", "E");
  30. model.setValue(chgPath+"["+chgRow+"]/useyn" , "Y");
  31. return;
  32. }
  33. if(model.getValue(chgPath+"["+chgRow+"]/statflag") == "I"){
  34. model.setValue(chgPath+"["+chgRow+"]/statflag", "");
  35. }else if(model.getValue(chgPath+"["+chgRow+"]/statflag") == "S" && model.getValue(chgPath+"["+chgRow+"]/basecodeflag") == "J" ){
  36. model.setValue(chgPath+"["+chgRow+"]/statflag", "U");
  37. }else if(model.getValue(chgPath+"["+chgRow+"]/statflag") == "S" && model.getValue(chgPath+"["+chgRow+"]/basecodeflag") == "S" ){
  38. model.setValue(chgPath+"["+chgRow+"]/statflag", "D");
  39. }else if(model.getValue(chgPath+"["+chgRow+"]/statflag") == "D"){
  40. model.setValue(chgPath+"["+chgRow+"]/statflag", "S");
  41. }else if(model.getValue(chgPath+"["+chgRow+"]/statflag") == ""){
  42. model.setValue(chgPath+"["+chgRow+"]/statflag", "I");
  43. }
  44. }
  45. }
  46. }
  47. /**
  48. * @group :
  49. * @ver : 2007.07.21
  50. * @by : 양천덕
  51. * @---------------------------------------------------
  52. * @type : function
  53. * @access : public
  54. * @desc : 타부서 데이타 셋팅
  55. * @param :
  56. * @return :
  57. * @---------------------------------------------------
  58. */
  59. function fDifDataSet(addPath, setPath, addRow, addRows, setRow, pCode ){
  60. var checkyn = "N";
  61. for(i=0 ; i< addRows ; i ++){
  62. if( model.getValue(setPath+"["+ setRow +"]/recitem") == model.getValue(addPath+"["+ i +"]/recitem") ){
  63. checkyn = "Y";
  64. }
  65. }
  66. var addRow ="";
  67. if( checkyn == "Y"){
  68. messageBox("이미 Setting 되어있는 item입니다.", "I");
  69. return;
  70. } else {
  71. if(pCode == "P"){
  72. datagrid1.addRow();
  73. addRow = datagrid1.row;
  74. }
  75. if(pCode == "M"){
  76. datagrid3.addRow();
  77. addRow = datagrid3.row;
  78. }
  79. if(pCode == "T"){
  80. datagrid2.addRow();
  81. addRow = datagrid2.row;
  82. }
  83. model.setValue(addPath+"["+ addRow +"]/useyn" , "Y");
  84. model.setValue(addPath+"["+ addRow +"]/recitem" , model.getValue(setPath+"["+ setRow +"]/recitem"));
  85. model.setValue(addPath+"["+ addRow +"]/recitemflag" , pCode);
  86. model.setValue(addPath+"["+ addRow +"]/recitemno" , model.getValue(setPath+"["+ setRow +"]/recitemno"));
  87. if(model.getValue("/root/main/cond/deptcd") == model.getValue("/root/srcdeptcd") ){
  88. model.setValue(addPath+"["+ addRow +"]/basecodeflag" , "J");
  89. } else {
  90. model.setValue(addPath+"["+ addRow +"]/basecodeflag" , "S");
  91. }
  92. if(model.getValue(addPath+"["+ addRow +"]/basecodeflag") == "J"){
  93. model.setValue(addPath+"["+ addRow +"]/statflag" , "U");
  94. } else {
  95. model.setValue(addPath+"["+ addRow +"]/statflag" , "I");
  96. }
  97. }
  98. }
  99. /**
  100. * @group :
  101. * @ver : 2007.07.21
  102. * @by : 양천덕
  103. * @---------------------------------------------------
  104. * @type : function
  105. * @access : public
  106. * @desc : 항목별 기준자료 저장
  107. * @param :
  108. * @return :
  109. * @---------------------------------------------------
  110. */
  111. function fCpcrSetCodeSave(pPath, pRows, pGridnm){
  112. if(pGridnm == "datagrid1"){
  113. model.makeValue("/root/send/datalist", datagrid1.getUpdateDataAll("i"));
  114. } else if(pGridnm == "datagrid3"){
  115. model.makeValue("/root/send/datalist", datagrid3.getUpdateDataAll("i"));
  116. } else if(pGridnm == "datagrid2"){
  117. model.makeValue("/root/send/datalist", datagrid2.getUpdateDataAll("i"));
  118. }
  119. fSaveOptionData();
  120. submit("TXMNE04001");
  121. model.refresh();
  122. }
  123. /**
  124. * @group :
  125. * @ver : 2007.07.21
  126. * @by : 양천덕
  127. * @---------------------------------------------------
  128. * @type : function
  129. * @access : public
  130. * @desc : 항목별 기준자료 저장, 수정 결과 조회 조건 값 설정
  131. * @param :
  132. * @return :
  133. * @---------------------------------------------------
  134. */
  135. function fSaveOptionData(){
  136. model.removenode("/root/send/cond");
  137. model.makeValue("/root/send/cond", "deptcd▩"
  138. + model.getValue("/root/srcdeptcd")+"▩");
  139. }
  140. /**
  141. * @group :
  142. * @ver : 2007.07.21
  143. * @by : 양천덕
  144. * @---------------------------------------------------
  145. * @type : function
  146. * @access : public
  147. * @desc : 항목별 기준자료 조회 조건 값 설정
  148. * @param :
  149. * @return :
  150. * @---------------------------------------------------
  151. */
  152. function fSrcOptionData(){
  153. model.removenode("/root/send/cond");
  154. model.makeValue("/root/send/cond", "deptcd▩"
  155. + model.getValue("/root/main/cond/deptcd")+"▩");
  156. }
  157. /**
  158. * @group :
  159. * @ver : 2007.07.21
  160. * @by : 양천덕
  161. * @---------------------------------------------------
  162. * @type : function
  163. * @access : public
  164. * @desc : 항목별 기준자료 조회 조건 값 설정
  165. * @param :
  166. * @return :
  167. * @---------------------------------------------------
  168. */
  169. function fSrcData(pFlag){
  170. fSrcOptionData();
  171. submit("TRMNE04001");
  172. if(pFlag == "I"){
  173. submit("TXMNE04001");
  174. }
  175. }