SMMNP00301_사용자조회.xrw 10 KB

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