SPMNZ00100_사용자조회.xrw 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <userlist/>
  12. </list>
  13. <item>
  14. <temp/>
  15. </item>
  16. </main>
  17. <send>
  18. <searchitem/>
  19. <flag/>
  20. <instcd/>
  21. <searchdd/>
  22. </send>
  23. <init>
  24. <searchitem/>
  25. <flag>
  26. <lable>사용자ID</lable>
  27. <value>userid</value>
  28. </flag>
  29. <flag>
  30. <lable>사용자명</lable>
  31. <value>usernm</value>
  32. </flag>
  33. </init>
  34. <popinfo>
  35. <refinfo>
  36. <serchitem/>
  37. </refinfo>
  38. </popinfo>
  39. <HideData>
  40. <searchdd/>
  41. </HideData>
  42. </root>
  43. </instance>
  44. <script type="javascript" ev:event="xforms-ready">
  45. <![CDATA[
  46. fInitialize();
  47. ]]>
  48. </script>
  49. <submission id="TRMNZ00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  50. </model>
  51. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  52. <script type="javascript">
  53. <![CDATA[
  54. /*
  55. 초기화 작업을 합니다.
  56. */
  57. function fInitialize(){
  58. var sSearchdd = opener.javascript.getParameter("SPMNZ001_SendData_Searchdd");
  59. if(sSearchdd != "" && sSearchdd != null && sSearchdd != "undefined"){
  60. model.setValue("/root/HideData/searchdd", sSearchdd);
  61. opener.javascript.setParameter("SPMNZ001_SendData_Searchdd", "");
  62. }
  63. // model.removeNodeset("/root/main/list/userlist");
  64. radio1.select(1);
  65. // ipt_search_item.currentText = SearchItem;
  66. model.refresh();
  67. }
  68. /*
  69. 버튼 컨트롤들을 클릭했을때 공통으로 타는 함수입니다.
  70. control : "search" 는 조회 버튼 클릭
  71. "init"은 신규 버튼 클릭
  72. "save"는 저장 버튼 클릭
  73. grid : 그리드 컨트롤을 넘겨줍니다.
  74. param : 기타 param을 넘겨줍니다.
  75. */
  76. function fClicked(control, grid, param){
  77. if ("search" == control){
  78. fSearchClick(grid, param);
  79. model.resetInstanceNode("/root/send");
  80. } else if ("init" == control){
  81. model.reset();
  82. } else {
  83. messageBox("처리를 수행","E002");
  84. }
  85. model.refresh();
  86. }
  87. /*
  88. 조회버튼 클릭 타는 함수입니다.
  89. grid.explorerbar = "sortshow" sort설정합니다.
  90. ipt_usercdnm_flag는 검색조건의 사용자코드 or 사용자명입니다.
  91. radio1은 사용자코드 or 사용자명 선택 라디오 버튼입니다.
  92. submit을 날립니다.
  93. .
  94. */
  95. function fSearchClick(grid,param){
  96. var isearchitem = ipt_search_item.value;
  97. grid.explorerbar = "sortshow";
  98. model.removeNodeset("/root/main/list/userlist");
  99. grid.rebuild();
  100. model.resetInstanceNode("/root/send");
  101. model.setValue("/root/send/searchitem", ipt_search_item.currentText);
  102. model.setValue("/root/send/flag", radio1.value);
  103. model.setValue("/root/send/searchdd", model.getValue("/root/HideData/searchdd"));
  104. submit("TRMNZ00100");
  105. }
  106. function fResetNode(node, destinationelement){
  107. // model.setValue(node + "/" + destinationelement, "");
  108. alert(model.elementName("/root/main/item"));
  109. }
  110. /*
  111. model.getValue(); 를 함수로 만들었습니다.
  112. param1 : node는 grid의 xPath입니다.
  113. param2 : row는 grid에서 선택한 row값입니다.
  114. param3 : element는 getvalue할 해당 element 명입니다.
  115. 해당 getvalue값을 return 해줍니다.
  116. return 하지 않으면 해당값을 가져올 수 없습니다.
  117. */
  118. function fGetValue(node, row, element) {
  119. var rtnValue = model.getValue(node + "[" + row + "]/" + element);
  120. return rtnValue;
  121. }
  122. /*
  123. model.setValue();를 함수로 만들었습니다.
  124. param1 : node는 setvalue할 컨트롤의 xPath입니다.
  125. param2 : destinationelement는 setvalue할 element명 입니다.
  126. param3 : sourceelement는 setvalue할 값입니다.
  127. */
  128. function fSetValue(node, destinationelement, sourceelement) {
  129. model.setValue(node + "/" + destinationelement, sourceelement);
  130. }
  131. function fDblclick(pRow) {
  132. var iParam="";
  133. var iNode = "/root/main/list/userlist";
  134. var iParam_userid = fGetValue(iNode, pRow, "userid");
  135. var iParam_usernm = fGetValue(iNode, pRow, "usernm");
  136. var iParam_posinstnm = fGetValue(iNode, pRow, "posinstnm");
  137. var iParam_posinstcd = fGetValue(iNode, pRow, "posinstcd");
  138. var iParam_posdeptnm = fGetValue(iNode, pRow, "posdeptnm");
  139. var iParam_posdeptcd = fGetValue(iNode, pRow, "posdeptcd");
  140. iParam = iParam_userid +"|"+iParam_usernm +"|"
  141. + iParam_posinstcd +"|"+iParam_posinstnm +"|"
  142. + iParam_posdeptcd +"|"+iParam_posdeptnm;
  143. // alert(iParam);
  144. if ( checkOpener() ) {
  145. opener.javascript.setParameter("SendData", iParam);
  146. window.close();
  147. }
  148. }
  149. ]]>
  150. </script>
  151. </xhtml:head>
  152. <xhtml:body pagewidth="605" pageheight="435" style="border-color:#c7a3cf; ">
  153. <group id="group5" scroll="auto" style="left:0px; top:13px; width:605px; height:420px; border-color:#c7a3cf; border-style:solid; ">
  154. <group id="group2" style="left:0px; top:10px; width:603px; height:35px; vertical-align:top; ">
  155. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:603px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  156. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:117px; height:17px; ">검색조건</caption>
  157. <line id="line1" style="x1:525px; y1:7px; x2:525px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  158. <button id="btn_search" class="btn1_letter2" style="left:534px; top:7px; width:56px; height:22px; ">
  159. <caption>조회</caption>
  160. <script type="javascript" ev:event="DOMActivate">
  161. <![CDATA[
  162. var param = ipt_search_item.currentText;
  163. // alert(ipt_search_item.attribute("ref"));
  164. fClicked("search", grd_userlist);
  165. ]]>
  166. </script>
  167. </button>
  168. <input id="ipt_search_item" ref="/root/init/searchitem" class="input_s_essential" style="left:295px; top:8px; width:122px; height:19px; ">
  169. <script type="javascript" ev:event="onkeypress">
  170. <![CDATA[
  171. if(event.keyCode == 13){
  172. var param = ipt_search_item.currentText;
  173. // alert(ipt_search_item.attribute("ref"));
  174. fClicked("search", grd_userlist);
  175. }
  176. ]]>
  177. </script>
  178. </input>
  179. <select1 id="radio1" ref="/root/init" class="s" appearance="full" cols="2" overflow="visible" style="left:141px; top:10px; width:13px; height:13px; background-color:transparent; border-style:none; ">
  180. <choices>
  181. <itemset nodeset="/root/init/flag">
  182. <label ref="lable"/>
  183. <value ref="value"/>
  184. </itemset>
  185. </choices>
  186. </select1>
  187. </group>
  188. <caption id="caption9" class="tit_2" style="left:0px; top:57px; width:111px; height:14px; vertical-align:middle; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">사용자조회</caption>
  189. <line id="line12" class="line_1" style="x1:0px; y1:72px; x2:603px; y2:73px; "/>
  190. <datagrid id="grd_userlist" nodeset="/root/main/list/userlist" caption="사용자ID^사용자명^소속기관명^소속부서명^소속기관코드^소속부서코드" colwidth="100, 100, 158, 206, 0, 0" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" style="left:0px; top:75px; width:603px; height:343px; ">
  191. <col ref="userid"/>
  192. <col ref="usernm"/>
  193. <col ref="posinstnm"/>
  194. <col ref="posdeptnm"/>
  195. <col ref="posinstcd"/>
  196. <col ref="posdeptcd"/>
  197. <script type="javascript" ev:event="ondblclick">
  198. <![CDATA[
  199. var iRow = grd_userlist.row;
  200. fDblclick(iRow);
  201. ]]>
  202. </script>
  203. </datagrid>
  204. </group>
  205. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:603px; height:13px; ">사용자조회</caption>
  206. </xhtml:body>
  207. </xhtml:html>