SMMNP04610_수술실권한관리.xrw 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. <emplist>
  11. <chkflag/>
  12. <empid/>
  13. <empnm/>
  14. <usrlevel/>
  15. </emplist>
  16. </main>
  17. <init>
  18. </init>
  19. <send>
  20. <reqdata/>
  21. <savedata/>
  22. </send>
  23. <temp>
  24. <userid/>
  25. <usernm/>
  26. <chkcncl/>
  27. </temp>
  28. </root>
  29. </instance>
  30. <script type="javascript" ev:event="xforms-ready">
  31. <![CDATA[
  32. grd_emplist.fixedcellcheckbox(0,1) = true;
  33. model.removeNodeset("/root/main/emplist");
  34. submit("TRMNP04611");
  35. ]]>
  36. </script>
  37. <submission id="TRMNP04611" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/main/emplist"/>
  38. <script type="javascript" ev:event="xforms-close">
  39. <![CDATA[
  40. model.setValue("/root/temp/chkcncl", "C");
  41. ]]>
  42. </script>
  43. <submission id="TXMNP04611" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/emplist"/>
  44. </model>
  45. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  47. </xhtml:head>
  48. <xhtml:body pagewidth="320" pageheight="320" guideline="2,343;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  49. <group id="group3" scroll="auto" style="left:0px; top:0px; width:300px; height:300px; ">
  50. <caption id="caption1" class="tit_2" style="left:5px; top:16px; width:145px; height:13px; ">권한 리스트</caption>
  51. <line id="line1" class="line_1" style="x1:0px; y1:31px; x2:300px; y2:31px; "/>
  52. <datagrid id="grd_emplist" nodeset="/root/main/emplist" class="grd_agtplcelist" autoresize="true" caption="^사원번호^이름^권한" colsep="^" colwidth="30, 90, 88, 50" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="never" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:36px; width:300px; height:264px; ">
  53. <col ref="chkflag" type="checkbox"/>
  54. <col ref="empid" type="input" style="text-align:center; "/>
  55. <col imemode="hangul" ref="empnm" type="input" style="text-align:center; "/>
  56. <col ref="usrlevel" type="combo" style="text-align:center; ">
  57. <choices>
  58. <item>
  59. <label>관리자</label>
  60. <value>M</value>
  61. </item>
  62. <item>
  63. <label>업무담당</label>
  64. <value>C</value>
  65. </item>
  66. </choices>
  67. </col>
  68. <script type="javascript" ev:event="onendedit">
  69. <![CDATA[
  70. var iRow = grd_emplist.row;
  71. var userid = model.getValue("/root/main/emplist[" + iRow + "]/empid");
  72. var usernm = model.getValue("/root/main/emplist[" + iRow + "]/empnm");
  73. var olduserid = model.getValue("/root/temp/userid");
  74. var oldusernm = model.getValue("/root/temp/usernm");
  75. if( ( userid != "" )||( usernm != "" ) ) {
  76. if( userid != olduserid ) {
  77. setParameter("userid", userid);
  78. setParameter("usernm", "");
  79. modal("SMMNP04620" ,"", "450", "200", "SMMNP04620", "", "");
  80. if( model.getValue("/root/temp/chkcncl") == "C" ) {
  81. return;
  82. }else {
  83. model.setValue("/root/main/emplist[" + iRow + "]/empid", model.getValue("/root/temp/userid"));
  84. model.setValue("/root/main/emplist[" + iRow + "]/empnm", model.getValue("/root/temp/usernm"));
  85. model.resetInstanceNode("/root/temp");
  86. model.refresh();
  87. }
  88. }else if( usernm != oldusernm ) {
  89. setParameter("userid", "");
  90. setParameter("usernm", usernm);
  91. modal("SMMNP04620" ,"", "450", "200", "SMMNP04620", "", "");
  92. if( model.getValue("/root/temp/chkcncl") == "C" ) {
  93. return;
  94. }else {
  95. model.setValue("/root/main/emplist[" + iRow + "]/empid", model.getValue("/root/temp/userid"));
  96. model.setValue("/root/main/emplist[" + iRow + "]/empnm", model.getValue("/root/temp/usernm"));
  97. model.resetInstanceNode("/root/temp");
  98. model.refresh();
  99. }
  100. }
  101. if( (model.getValue("/root/main/emplist[" + iRow + "]/empid") != "")&&(model.getValue("/root/main/emplist[" + iRow + "]/empnm") != "") ) {
  102. model.setValue("/root/main/emplist[" + iRow + "]/chkflag", "true");
  103. }else {
  104. model.setValue("/root/main/emplist[" + iRow + "]/chkflag", "false");
  105. }
  106. }
  107. ]]>
  108. </script>
  109. <script type="javascript" ev:event="onentercell">
  110. <![CDATA[
  111. var iRow = grd_emplist.row;
  112. model.setValue("/root/temp/userid", model.getValue("/root/main/emplist[" + iRow + "]/empid"));
  113. model.setValue("/root/temp/usernm", model.getValue("/root/main/emplist[" + iRow + "]/empnm"));
  114. ]]>
  115. </script>
  116. </datagrid>
  117. <button id="button9" class="btn2_letter3" style="left:153px; top:10px; width:53px; height:19px; ">
  118. <caption>행추가</caption>
  119. <script type="javascript" ev:event="DOMActivate">
  120. <![CDATA[
  121. grd_emplist.addRow();
  122. ]]>
  123. </script>
  124. </button>
  125. <button id="button1" class="btn2_letter2" style="left:208px; top:10px; width:42px; height:19px; ">
  126. <caption>저장</caption>
  127. <script type="javascript" ev:event="DOMActivate">
  128. <![CDATA[
  129. var iRows = -1;
  130. var chkflag;
  131. var cnt = 0;
  132. iRows = grd_emplist.rows;
  133. for( var i = 0; i < iRows; i++ ) {
  134. chkflag = model.getValue("/root/main/emplist["+i+"]/chkflag");
  135. if( chkflag == "true" ) {
  136. if( model.getValue("/root/main/emplist["+i+"]/usrlevel") == "" ) {
  137. messageBox("권한설정을 ", "C002");
  138. return;
  139. }
  140. cnt += 1;
  141. }
  142. }
  143. if( cnt > 0 ) {
  144. model.setValue("/root/send/savedata", grd_emplist.getUpdateData());
  145. model.resetInstanceNode("/root/main/emplist");
  146. submit("TXMNP04611");
  147. }else {
  148. messageBox("선택한것이", "I004");
  149. }
  150. ]]>
  151. </script>
  152. </button>
  153. <button id="button2" class="btn2_letter2" style="left:253px; top:10px; width:42px; height:19px; ">
  154. <caption>삭제</caption>
  155. <script type="javascript" ev:event="DOMActivate">
  156. <![CDATA[
  157. var iRows = -1;
  158. var chkflag, empid, empnm, usrlevel;
  159. var cnt = 0;
  160. iRows = grd_emplist.rows;
  161. var empDelList = "m▦rownum▦chkflag▦empid▦empnm▦usrlevel";
  162. for( var i = 0; i < iRows; i++ ) {
  163. chkflag = model.getValue("/root/main/emplist"+"["+i+"]/chkflag");
  164. empid = model.getValue("/root/main/emplist"+"["+i+"]/empid");
  165. empnm = model.getValue("/root/main/emplist"+"["+i+"]/empnm");
  166. usrlevel = model.getValue("/root/main/emplist"+"["+i+"]/usrlevel");
  167. if( chkflag == "true" ) {
  168. empDelList = empDelList + "▩" + "d" + "▦" + i + "▦" + chkflag + "▦" + empid + "▦" + empnm + "▦" + usrlevel;
  169. cnt += 1;
  170. }
  171. }
  172. if( cnt > 0 ) {
  173. model.setValue("/root/send/savedata", empDelList);
  174. model.resetInstanceNode("/root/main/emplist");
  175. submit("TXMNP04611");
  176. }else {
  177. messageBox("선택한것이", "I004");
  178. }
  179. ]]>
  180. </script>
  181. </button>
  182. </group>
  183. </xhtml:body>
  184. </xhtml:html>