SPMRI04000_통합기록SuperUser관리.xrw 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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>통합조회 SuperUser관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <datalist>
  11. <datainfo>
  12. <userid/>
  13. <username/>
  14. <seq/>
  15. <valifromdd/>
  16. <valitodd/>
  17. <valifromdt/>
  18. <valitodt/>
  19. <usercomment/>
  20. <endflag/>
  21. </datainfo>
  22. </datalist>
  23. <userinfo>
  24. <userid/>
  25. <valifromdt/>
  26. <valitodt/>
  27. <usercomment/>
  28. <status>i</status>
  29. <type>
  30. <A/>
  31. </type>
  32. </userinfo>
  33. </main>
  34. <send>
  35. <savedata/>
  36. <save/>
  37. <endshowyn/>
  38. </send>
  39. <hidden>
  40. </hidden>
  41. <temp>
  42. <datalist/>
  43. <userinfo>
  44. <useryn/>
  45. </userinfo>
  46. </temp>
  47. </root>
  48. </instance>
  49. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  50. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  54. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  55. <script type="javascript" ev:event="xforms-ready">
  56. <![CDATA[
  57. fInit();
  58. ]]>
  59. </script>
  60. <script type="javascript">
  61. <![CDATA[
  62. function fInit(){
  63. fInitUserValue();
  64. fGetHardCDList("N", 5662, 0 , "/root/hidden/permituser");
  65. fSearch();
  66. }
  67. function fInitUserValue(){
  68. model.setValue("/root/main/userinfo/userid","");
  69. model.setValue("/root/main/userinfo/valifromdt",getCurrentDate()+getCurrentTime().substring(0,4));
  70. model.setValue("/root/main/userinfo/valitodt","999912312359");
  71. model.setValue("/root/main/userinfo/usercomment","");
  72. model.refresh();
  73. }
  74. function fSearch(){
  75. submit("TRMRI04000");
  76. fDataGridReSet();
  77. }
  78. function fUserSave(){
  79. model.copyNode("/root/send/save", "/root/main/userinfo");
  80. if(fCheckedSuperUserYN()){
  81. if(fCheckedPermitUser()){
  82. if(!isNull(model.getValue("/root/main/userinfo/userid"))){
  83. if(submit("TXMRI04001")){
  84. fDataGridReSet();
  85. fInitUserValue();
  86. }
  87. }
  88. }
  89. }
  90. model.resetInstanceNode("/root/send/save");
  91. model.refresh();
  92. }
  93. function fEndFlagSave(){
  94. if(fCheckedPermitUser()){
  95. model.setValue("/root/send/savedata", grd_userlist.getUpdateData());
  96. if(submit("TXMRI04000")){
  97. fDataGridReSet();
  98. fInitUserValue();
  99. model.setValue("/root/send/savedata", "");
  100. model.refresh();
  101. }
  102. }
  103. }
  104. function fDataGridReSet(){
  105. copyNodesetType("/root/main/datalist","/root/temp/datalist", "replace");
  106. grd_userlist.rebuild();
  107. grd_userlist.refresh();
  108. }
  109. function fCheckedSuperUserYN(){
  110. var flag = true;
  111. if(submit("TRMRI04001")){
  112. if(model.getValue("/root/temp/userinfo/useryn") == "Y"){
  113. messageBox("이미 SuperUser로 지정되어 있습니다.","E999");
  114. flag = false;
  115. }
  116. }else{
  117. flag = false;
  118. }
  119. return flag;
  120. }
  121. function fCheckedPermitUser(){
  122. var flag = true;
  123. if(isNull(model.getValue("/root/hidden/permituser/hardcd[hardcd = '"+getUserId()+"']/hardcd"))){
  124. messageBox("지정된 사용자만 저장이 가능합니다.","E999");
  125. flag = false;
  126. }
  127. return flag;
  128. }
  129. ]]>
  130. </script>
  131. <submission id="TRMRI04000" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/endshowyn" resultref="/root/temp/datalist"/>
  132. <submission id="TRMRI04001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/userinfo"/>
  133. <submission id="TXMRI04000" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/datalist"/>
  134. <submission id="TXMRI04001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/datalist"/>
  135. </model>
  136. </xhtml:head>
  137. <xhtml:body pagewidth="805" pageheight="610" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  138. <group id="group3" scroll="auto" style="left:0px; top:0px; width:785px; height:540px; ">
  139. <line id="line1" class="line_1" style="x1:0px; y1:118px; x2:770px; y2:118px; "/>
  140. <button id="btn_search" class="btn1_letter2" style="left:655px; top:95px; width:56px; height:22px; ">
  141. <caption>조회</caption>
  142. <script type="javascript" ev:event="DOMActivate">
  143. <![CDATA[
  144. fSearch();
  145. ]]>
  146. </script>
  147. </button>
  148. <datagrid id="grd_userlist" nodeset="/root/main/datalist/datainfo" caption="Type^사번^이름^seq^적용시작^적용종료^비고^종료" colsep="^" colwidth="40, 70, 70, 0, 120, 120, 300, 0" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:125px; width:770px; height:415px; ">
  149. <col ref="type" type="combo" style="text-align:center; ">
  150. <choices>
  151. <item>
  152. <label>A</label>
  153. <value>A</value>
  154. </item>
  155. <item>
  156. <label>B</label>
  157. <value>B</value>
  158. </item>
  159. </choices>
  160. </col>
  161. <col ref="userid" style="text-align:center; "/>
  162. <col ref="username" style="text-align:center; "/>
  163. <col ref="seq" visibility="hidden"/>
  164. <col ref="valifromdt" type="inputdate" format="yyyy-mm-dd hh:mm" style="text-align:center; "/>
  165. <col ref="valitodt" type="inputdate" format="yyyy-mm-dd hh:mm" style="text-align:center; "/>
  166. <col ref="usercomment" type="input" style="margin-left:5; "/>
  167. <col ref="endflag" type="checkbox" visibility="hidden"/>
  168. <script type="javascript" ev:event="onendedit">
  169. <![CDATA[
  170. if(isDataCell()){
  171. var row = grd_userlist.row;
  172. var col = grd_userlist.col;
  173. var tempValiFromdt = model.getValue("/root/temp/datalist/datainfo["+ row +"]/valifromdt");
  174. var tempValiTodt = model.getValue("/root/temp/datalist/datainfo["+ row +"]/valitodt");
  175. var tempUserComment = model.getValue("/root/temp/datalist/datainfo["+ row +"]/usercomment");
  176. var orgValiFromdt = model.getValue("/root/main/datalist/datainfo["+ row +"]/valifromdt");
  177. var orgValiTodt = model.getValue("/root/main/datalist/datainfo["+ row +"]/valitodt");
  178. var orgUserComment = model.getValue("/root/main/datalist/datainfo["+ row +"]/usercomment");
  179. if(((tempValiFromdt == orgValiFromdt) && (tempValiTodt == orgValiTodt)) && (tempUserComment == orgUserComment)){
  180. grd_userlist.removeStatus(row, "delete");
  181. grd_userlist.removeStatus(row, "update");
  182. }
  183. }
  184. ]]>
  185. </script>
  186. </datagrid>
  187. <button id="button1" class="btn1_letter2" style="left:715px; top:15px; width:56px; height:22px; ">
  188. <caption>저장</caption>
  189. <script type="javascript" ev:event="DOMActivate">
  190. <![CDATA[
  191. fUserSave();
  192. ]]>
  193. </script>
  194. </button>
  195. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:735px; height:14px; ">통합조회 SuperUser관리</caption>
  196. <group id="group1" style="left:0px; top:40px; width:770px; height:55px; ">
  197. <caption id="caption2" class="cell_1" style="left:0px; top:5px; width:95px; height:20px; ">사번</caption>
  198. <caption id="caption3" class="cell_1" style="left:205px; top:5px; width:95px; height:20px; ">적용시작일자</caption>
  199. <caption id="caption4" class="cell_1" style="left:430px; top:5px; width:95px; height:20px; ">적용종료일자</caption>
  200. <caption id="caption5" class="cell_1" style="left:0px; top:30px; width:95px; height:20px; ">비고</caption>
  201. <input id="input1" ref="/root/main/userinfo/userid" style="left:100px; top:5px; width:100px; height:20px; "/>
  202. <input id="input2" ref="/root/main/userinfo/valifromdt" inputtype="date" format="yyyy-mm-dd hh:nn" style="left:305px; top:5px; width:120px; height:19px; "/>
  203. <input id="input3" ref="/root/main/userinfo/valitodt" inputtype="date" format="yyyy-mm-dd hh:nn" style="left:530px; top:5px; width:120px; height:19px; "/>
  204. <input id="input4" ref="/root/main/userinfo/usercomment" style="left:100px; top:30px; width:550px; height:19px; "/>
  205. </group>
  206. <line id="line2" class="line_1" style="x1:0px; y1:38px; x2:770px; y2:38px; "/>
  207. <button id="button2" class="btn1_letter2" style="left:715px; top:95px; width:56px; height:22px; ">
  208. <caption>저장</caption>
  209. <script type="javascript" ev:event="DOMActivate">
  210. <![CDATA[
  211. fEndFlagSave();
  212. ]]>
  213. </script>
  214. </button>
  215. <select id="checkbox1" ref="/root/send/endshowyn" visibility="visible" overflow="visible" appearance="full" style="left:530px; top:98px; width:125px; height:20px; border-style:none; ">
  216. <choices>
  217. <item>
  218. <label>종료된 사용자 조회</label>
  219. <value>Y</value>
  220. </item>
  221. </choices>
  222. </select>
  223. <caption id="caption6" class="tit_2" style="left:0px; top:20px; width:100px; height:14px; ">사용자 등록</caption>
  224. <caption id="caption7" class="tit_2" style="left:0px; top:100px; width:162px; height:14px; ">사용자 조회 및 종료관리</caption>
  225. </group>
  226. <caption id="caption8" style="left:5px; top:550px; width:173px; height:28px; ">
  227. <![CDATA[TYPE A : 일반 SUPER USER
  228. TYPE B : 심사실 SUPER USER]]>
  229. </caption>
  230. </xhtml:body>
  231. </xhtml:html>