SMMNP00750_삽관류 리스트 관리.xrw 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>회복실 코드 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <chklist>
  12. <cdid/>
  13. <cdnm/>
  14. <sortseq/>
  15. <supcdid/>
  16. <valifromdd/>
  17. <valitodd/>
  18. <lastupdtrnm/>
  19. <lastupdtdt/>
  20. <lastupdtrid/>
  21. <cdgrupid/>
  22. </chklist>
  23. </list>
  24. </main>
  25. <send>
  26. <listdata/>
  27. </send>
  28. <init>
  29. </init>
  30. <hidden>
  31. </hidden>
  32. <temp/>
  33. </root>
  34. </instance>
  35. <script type="javascript" ev:event="xforms-ready">
  36. <![CDATA[
  37. fInitialize();
  38. ]]>
  39. </script>
  40. <submission id="TRMNP00750" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list/chklist"/>
  41. <submission id="TXMNP00750" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/listdata" resultref="/root/main/list/chklist"/>
  42. </model>
  43. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  44. <script type="javascript">
  45. <![CDATA[
  46. function fInitialize(){
  47. model.removenode("/root/send");
  48. //model.makeValue("/root/send/temp","temp");
  49. model.makeValue("/root/send/cdgrupid","250");
  50. submit("TRMNP00750");
  51. }
  52. function fClickRowAddBtn(){
  53. grd_intublist.addRow(); // 입력할 행 추가.
  54. var cur_row = grd_intublist.row; // 추가된 행 번호 가져오기
  55. var cnt_row = grd_intublist.rows; // 현재 행의 갯수 가져오기
  56. sGridPath = "/root/main/list/chklist"
  57. // //줄 추가시 기본세팅
  58. model.setValue(sGridPath+"["+cur_row+"]/cdgrupid", "250" );
  59. grd_intublist.refresh();
  60. grd_intublist.row = cur_row;
  61. grd_intublist.select(cur_row, 2) = true;
  62. grd_intublist.editcell();
  63. }
  64. function fClickDeleteBtn(){
  65. var cur_row = grd_intublist.row; // 행 번호 가져오기
  66. var iStatus = grd_intublist.rowstatus(cur_row);
  67. if(cur_row <= 0 || cur_row =="undefined") {
  68. alert("삭제할 행을 선택하시기 바랍니다...");
  69. return;
  70. }
  71. if (iStatus == 1 || iStatus == 3){ // 새로 삽입된 행이면
  72. grd_intublist.deleteitem(cur_row);
  73. }else if (iStatus == 4){ // 삭제로 표시된 행이면
  74. grd_intublist.removestatus(cur_row, "delete");
  75. grd_intublist.deleteitem(cur_row);
  76. }else{
  77. grd_intublist.addStatus(cur_row, "delete");
  78. grd_intublist.deleteitem(cur_row);
  79. }
  80. }
  81. function fOnClickSaveBtn(){
  82. grd_intublist.refresh();
  83. var cnt_row = grd_intublist.rows; // 현재 행의 갯수 가져오기
  84. for (var row = 1 ; row < cnt_row ; row++){
  85. if( "" == model.getValue("/root/main/list/chklist["+row+"]/cdnm"))
  86. {
  87. alert("["+ row +"] 행 항목명에 빈값을 저장할 수 없습니다");
  88. return;
  89. }
  90. }
  91. model.removenode("/root/send");
  92. model.makeValue("/root/send/listdata" , grd_intublist.getUpdateData());
  93. if ( submit("TXMNP00750") ) {
  94. grd_intublist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  95. model.setValue("/root/send/listdata","");
  96. }
  97. btn_search.dispatch("DOMActivate");
  98. }
  99. function fGridValueChanged(){
  100. // var cur_row = grd_intublist.row; // 추가된 행 번호 가져오기
  101. // var cur_cel = grd_intublist.col;
  102. // var cnt_row = grd_intublist.rows; // 현재 행의 갯수 가져오기
  103. // var stat = grd_intublist.colstatus(0);
  104. // var addcdid = model.getValue("/root/main/list/chklist["+cur_row+"]/cdid");
  105. //
  106. // if(cur_cel == 1){
  107. // for( row = 1; row < cnt_row-1; row++){
  108. // if(addcdid == model.getValue("/root/main/list/chklist["+row+"]/cdid")){
  109. // messageBox("같은 항목코드는 입력하실 수 없습니다. ","I000");
  110. // model.setValue("/root/main/list/chklist["+cur_row+"]/cdid" , "");
  111. // grd_intublist.refresh();
  112. // grd_intublist.select(cur_row, 1) = true;
  113. // grd_intublist.editcell();
  114. //grd_intublist.rowstatus(cur_row) = 0;
  115. // return;
  116. // }
  117. //
  118. // }
  119. //
  120. // }
  121. }
  122. ]]>
  123. </script>
  124. </xhtml:head>
  125. <xhtml:body pagewidth="610" pageheight="800" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  126. <group id="group1" style="left:0px; top:0px; width:590px; height:13px; ">
  127. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:212px; height:14px; ">회복간호기록 삽관류 Check List</caption>
  128. </group>
  129. <group id="group3" scroll="auto" style="left:5px; top:15px; width:590px; height:745px; ">
  130. <group id="group2" style="left:-16px; top:10px; width:601px; height:35px; vertical-align:top; ">
  131. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:18px; top:0px; width:580px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  132. <line id="line13" style="x1:526px; y1:7px; x2:526px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  133. <button id="btn_search" class="btn1_letter2" style="left:462px; top:7px; width:56px; height:22px; ">
  134. <caption>조회</caption>
  135. <script type="javascript" ev:event="DOMActivate">
  136. <![CDATA[
  137. fInitialize();
  138. ]]>
  139. </script>
  140. </button>
  141. </group>
  142. <caption id="caption20" class="tit_2" style="left:6px; top:62px; width:136px; height:14px; ">삽관류 항목</caption>
  143. <line id="line8" class="line_1" style="x1:0px; y1:75px; x2:585px; y2:75px; "/>
  144. <line id="line7" class="line_3" style="x1:0px; y1:741px; x2:585px; y2:741; "/>
  145. <button id="button8" class="btn2_letter3" style="left:115px; top:54px; width:53px; height:19px; ">
  146. <caption>행추가</caption>
  147. <script type="javascript" ev:event="DOMActivate">
  148. <![CDATA[
  149. fClickRowAddBtn();
  150. ]]>
  151. </script>
  152. </button>
  153. <button id="button9" class="btn2_letter3" style="left:172px; top:54px; width:53px; height:19px; ">
  154. <caption>행삭제</caption>
  155. <script type="javascript" ev:event="DOMActivate">
  156. <![CDATA[
  157. fClickDeleteBtn();
  158. ]]>
  159. </script>
  160. </button>
  161. <datagrid id="grd_intublist" nodeset="/root/main/list/chklist" visibility="visible" caption="항목코드^항목명^순서^위치^유효시작일^유효종료일^lastupdtrid^cdgrupid" colsep="^" colwidth="56, 256, 69, 0, 91, 81, 0, 0, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:80px; width:585px; height:650px; ">
  162. <col ref="cdid"/>
  163. <col ref="cdnm" type="input" style="text-align:center; "/>
  164. <col ref="sortseq" type="input" style="text-align:center; "/>
  165. <col ref="supcdid" type="combo" visibility="hidden" style="text-align:center; "/>
  166. <col ref="valifromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  167. <col ref="valitodd" format="yyyy-mm-dd" style="text-align:center; "/>
  168. <col ref="lastupdtrnm" visibility="hidden"/>
  169. <col ref="lastupdtdt" visibility="hidden"/>
  170. <col ref="cdgrupid" visibility="hidden"/>
  171. <script type="javascript" ev:event="xforms-value-changed">
  172. <![CDATA[
  173. fGridValueChanged();
  174. ]]>
  175. </script>
  176. </datagrid>
  177. </group>
  178. <button id="button2" class="btn4_letter2" style="left:522px; top:32px; width:56px; height:22px; ">
  179. <caption>저장</caption>
  180. <script type="javascript" ev:event="DOMActivate">
  181. <![CDATA[
  182. fOnClickSaveBtn();
  183. ]]>
  184. </script>
  185. </button>
  186. </xhtml:body>
  187. </xhtml:html>