SPPMC02600_사용자정보조회.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet ype="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. <selectuserlist>
  13. <list/>
  14. </selectuserlist>
  15. </list>
  16. <item>
  17. <temp/>
  18. </item>
  19. <temp>
  20. <param/>
  21. <flag/>
  22. <searchitem/>
  23. <prfshipflagcd/>
  24. <dutplceinstcd/>
  25. <history/>
  26. </temp>
  27. <list2>
  28. <selectuserlist>
  29. <list/>
  30. </selectuserlist>
  31. </list2>
  32. </main>
  33. <send>
  34. <searchitem/>
  35. <flag/>
  36. <searchitem_dutplce/>
  37. <flag_dutplce/>
  38. <searchitem_dutplceinst/>
  39. <prfshipflagcd/>
  40. <dutplceinstcd/>
  41. </send>
  42. <init>
  43. <searchitem/>
  44. <flag>
  45. <lable>사용자명</lable>
  46. <value>usernm</value>
  47. </flag>
  48. <deptflag>
  49. <lable>근무지명</lable>
  50. <value>dutplcenm</value>
  51. </deptflag>
  52. <searchitem_dutplce/>
  53. <namesearch/>
  54. <flag>
  55. <lable>사용자ID</lable>
  56. <value>userid</value>
  57. </flag>
  58. <deptflag>
  59. <lable>근무지코드</lable>
  60. <value>dutplcecd</value>
  61. </deptflag>
  62. </init>
  63. <temp/>
  64. </root>
  65. </instance>
  66. <submission id="TRPMC02699" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  67. </model>
  68. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  70. <script type="javascript" ev:event="xforms-ready">
  71. <![CDATA[
  72. fInitialize();
  73. if (checkOpener()){
  74. rdo_user.select(1);
  75. var userid = opener.javascript.getParameter("SPPMC02600_userid");
  76. if( userid != '' && userid != '' ){
  77. model.setValue("/root/init/searchitem", opener.javascript.getParameter("SPPMC02600_userid"));
  78. model.refresh();
  79. btn_search.dispatch("DOMActivate");
  80. }
  81. }
  82. ]]>
  83. </script>
  84. <script type="javascript">
  85. <![CDATA[
  86. /*
  87. 초기화 작업을 합니다.
  88. */
  89. function fInitialize(){
  90. model.removeNodeset("/root/main/list/userlist");
  91. rdo_dutplce.select(0);
  92. rdo_user.select(0);
  93. var iflag = model.getValue("/root/main/temp/flag");
  94. var isearchitem = model.getValue("/root/main/temp/searchitem");
  95. var prfshipflagcd = model.getValue("/root/main/temp/prfshipflagcd");
  96. var dutplceinstcd = model.getValue("/root/main/temp/dutplceinstcd");
  97. if(prfshipflagcd!=""){
  98. model.setValue("/root/send/prfshipflagcd", prfshipflagcd);
  99. }
  100. if(dutplceinstcd!=""){
  101. model.setValue("/root/send/dutplceinstcd", dutplceinstcd);
  102. }
  103. if (iflag != "" && isearchitem != ""){
  104. model.setValue("/root/send/flag", model.getValue("/root/main/temp/flag"));
  105. model.setValue("/root/send/searchitem", model.getValue("/root/main/temp/searchitem"));
  106. submit("TRPMC02699");
  107. if(grd_userlist.rows > 1 && grd_userlist.rows == 2){
  108. // var iParam = model.getValue("/root/main/list/userlist["+iRow+"]");
  109. var nodelist = instance1.selectNodes("/root/main/list/userlist[1]");
  110. var rCVS = getNodeListCSV(nodelist);
  111. if ( checkOpener() ) {
  112. opener.javascript.setParameter("SPZSU10103_", rCVS);
  113. } else {
  114. var rtn = messageBox("상위화면을 찾을 수", "E001");
  115. }
  116. }
  117. }
  118. model.refresh();
  119. }
  120. /*
  121. 버튼 컨트롤들을 클릭했을때 공통으로 타는 함수입니다.
  122. control : "search" 는 조회 버튼 클릭
  123. "init"은 신규 버튼 클릭
  124. "save"는 저장 버튼 클릭
  125. grid : 그리드 컨트롤을 넘겨줍니다.
  126. param : 기타 param을 넘겨줍니다.
  127. */
  128. function fClicked(control, grid, param){
  129. if ("search" == control){
  130. fSearchClick(grid, param);
  131. model.resetInstanceNode("/root/send");
  132. } else if ("init" == control){
  133. model.reset();
  134. } else {
  135. messageBox("처리를 수행","E002");
  136. }
  137. model.refresh();
  138. }
  139. /*
  140. 조회버튼 클릭 타는 함수입니다.
  141. grid.explorerbar = "sortshow" sort설정합니다.
  142. ipt_usercdnm_flag는 검색조건의 사용자코드 or 사용자명입니다.
  143. rdo_user은 사용자코드 or 사용자명 선택 라디오 버튼입니다.
  144. submit을 날립니다.
  145. */
  146. function fSearchClick(grid, param){
  147. model.removeNodeset("/root/main/list/userlist");
  148. grid.rebuild();
  149. model.resetInstanceNode("/root/send");
  150. model.setValue("/root/send/searchitem", ipt_search_item.currentText);
  151. model.setValue("/root/send/searchitem_dutplce", ipt_dutplcecd.currentText);
  152. var prfshipflagcd = model.getValue("/root/main/temp/prfshipflagcd");
  153. var dutplceinstcd = model.getValue("/root/main/temp/dutplceinstcd");
  154. model.setValue("/root/send/prfshipflagcd", prfshipflagcd);
  155. model.setValue("/root/send/flag", rdo_user.value);
  156. model.setValue("/root/send/flag_dutplce", rdo_dutplce.value);
  157. model.setValue("/root/send/dutplceinstcd", dutplceinstcd);
  158. if(model.getValue("/root/main/temp/param") == "_OneS_DD"){
  159. model.setValue("/root/send/searchitem_dutplceinst", model.getValue("/root/main/temp/param"))
  160. }
  161. submit("TRPMC02699");
  162. }
  163. function fResetNode(node, destinationelement){
  164. // model.setValue(node + "/" + destinationelement, "");
  165. alert(model.elementName("/root/main/item"));
  166. }
  167. /*
  168. model.getValue(); 를 함수로 만들었습니다.
  169. param1 : node는 grid의 xPath입니다.
  170. param2 : row는 grid에서 선택한 row값입니다.
  171. param3 : element는 getvalue할 해당 element 명입니다.
  172. 해당 getvalue값을 return 해줍니다.
  173. return 하지 않으면 해당값을 가져올 수 없습니다.
  174. */
  175. function fGetValue(node, row, element) {
  176. var rtnValue = model.getValue(node + "[" + row + "]/" + element);
  177. return rtnValue;
  178. }
  179. /*
  180. model.setValue();를 함수로 만들었습니다.
  181. param1 : node는 setvalue할 컨트롤의 xPath입니다.
  182. param2 : destinationelement는 setvalue할 element명 입니다.
  183. param3 : sourceelement는 setvalue할 값입니다.
  184. */
  185. function fSetValue(node, destinationelement, sourceelement) {
  186. model.setValue(node + "/" + destinationelement, sourceelement);
  187. }
  188. ]]>
  189. </script>
  190. </xhtml:head>
  191. <xhtml:body pagewidth="670" pageheight="440" guideline="470;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  192. <group id="group5" scroll="auto" style="left:5px; top:13px; width:635px; height:387px; ">
  193. <group id="group2" style="left:0px; top:2px; width:635px; height:60px; vertical-align:top; ">
  194. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:633px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  195. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:117px; height:17px; ">검색조건 :</caption>
  196. <line id="line1" style="x1:550px; y1:8px; x2:550px; y2:51px; border-color:#ffe4bb; border-left-style:solid; "/>
  197. <button id="btn_search" class="btn1_letter2" style="left:565px; top:19px; width:56px; height:22px; ">
  198. <caption>조회</caption>
  199. <script type="javascript" ev:event="DOMActivate">
  200. <![CDATA[
  201. if(ipt_search_item.currentText == "" && ipt_dutplcecd.currentText == ""){
  202. messageBox("검색어를 1자이상 ", "C001");
  203. } else {
  204. var param = ipt_search_item.currentText;
  205. fClicked("search", grd_userlist);
  206. }
  207. ]]>
  208. </script>
  209. </button>
  210. <input id="ipt_search_item" ref="/root/init/searchitem" class="input_s_essential" style="left:330px; top:34px; width:122px; height:19px; ">
  211. <script type="javascript" ev:event="onkeypress">
  212. <![CDATA[
  213. if("13" == event.keyCode){
  214. btn_search.dispatch("DOMActivate");
  215. }
  216. ]]>
  217. </script>
  218. </input>
  219. <select1 id="rdo_user" ref="/root/init" class="s" appearance="full" cellspacing="24" cols="2" overflow="visible" style="left:116px; top:34px; width:13px; height:13px; background-color:transparent; border-style:none; ">
  220. <choices>
  221. <itemset nodeset="/root/init/flag">
  222. <label ref="lable"/>
  223. <value ref="value"/>
  224. </itemset>
  225. </choices>
  226. </select1>
  227. <input id="ipt_dutplcecd" ref="/root/init/searchitem_dutplce" class="input_s_essential" style="left:330px; top:8px; width:122px; height:19px; ">
  228. <script type="javascript" ev:event="onkeypress">
  229. <![CDATA[
  230. if("13" == event.keyCode){
  231. btn_search.dispatch("DOMActivate");
  232. }
  233. ]]>
  234. </script>
  235. </input>
  236. <select1 id="rdo_dutplce" ref="/root/init/deptflag" class="s" appearance="full" cellspacing="24" cols="2" overflow="visible" style="left:116px; top:8px; width:13px; height:13px; background-color:transparent; border-style:none; ">
  237. <choices>
  238. <itemset nodeset="/root/init/deptflag">
  239. <label ref="lable"/>
  240. <value ref="value"/>
  241. </itemset>
  242. </choices>
  243. </select1>
  244. <select id="chk_namesearch" ref="/root/init/namesearch" visibility="hidden" overflow="visible" appearance="full" style="left:15px; top:30px; width:100px; height:20px; border-style:none; ">
  245. <choices>
  246. <item>
  247. <label>"명"검색</label>
  248. <value>name</value>
  249. </item>
  250. </choices>
  251. <script type="javascript" ev:event="xforms-select">
  252. <![CDATA[
  253. rdo_dutplce.select(1);
  254. rdo_user.select(1);
  255. ]]>
  256. </script>
  257. </select>
  258. </group>
  259. <caption id="caption9" class="tit_2" style="left:0px; top:69px; width:111px; height:13px; vertical-align:middle; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">사용자조회</caption>
  260. <line id="line12" class="line_1" style="x1:0px; y1:83px; x2:633px; y2:83px; "/>
  261. <datagrid id="grd_userlist" nodeset="/root/main/list/userlist" caption="사용자ID^사용자명^주민번호^소속기관^소속부서^근무지기관^근무지" colwidth="60, 60, 116, 100, 100, 100, 90" dataheight="25" explorerbar="sort" extendlastcol="scroll" frozencols="4" frozenrows="false" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="32" style="left:0px; top:89px; width:633px; height:291px; ">
  262. <col ref="userid"/>
  263. <col ref="usernm"/>
  264. <col ref="rrgstno"/>
  265. <col ref="posinstnm"/>
  266. <col ref="posdeptnm"/>
  267. <col ref="dutplceinstnm"/>
  268. <col ref="dutplcenm"/>
  269. <script type="javascript" ev:event="ondblclick">
  270. <![CDATA[
  271. if ( checkOpener() ) {
  272. btn_confirm.dispatch("DOMActivate");
  273. } else {
  274. messageBox("상위화면이 변경되어 데이터를 가져올 수", "I004");
  275. }
  276. ]]>
  277. </script>
  278. </datagrid>
  279. </group>
  280. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:603px; height:13px; ">사용자조회</caption>
  281. <group id="group3" scroll="auto" style="left:515px; top:404px; width:125px; height:22px; ">
  282. <button id="btn_confirm" class="btn4_letter2" style="left:10px; top:0px; width:56px; height:22px; ">
  283. <caption>확인</caption>
  284. <script type="javascript" ev:event="DOMActivate">
  285. <![CDATA[
  286. if(checkOpener()){
  287. row = grd_userlist.row;
  288. if( row > 0 ){
  289. if( getNodesetCount("/root/main/list/userlist") > 0 ){
  290. opener.model.copyNode("/root/main/userinfo", grd_userlist.getNode( row ));
  291. opener.model.makeNode("/root/main/popupendflag");
  292. opener.model.setValue("/root/main/popupendflag", "ok");
  293. opener.model.refresh();
  294. window.close();
  295. }
  296. }
  297. }else{
  298. messageBox("상위화면이 변경되어 데이터를 가져올 수", "I004");
  299. }
  300. ]]>
  301. </script>
  302. </button>
  303. <button id="btn_cancel" class="btn4_letter2" style="left:69px; top:0px; width:56px; height:22px; ">
  304. <caption>취소</caption>
  305. <script type="javascript" ev:event="DOMActivate">
  306. <![CDATA[
  307. window.close();
  308. ]]>
  309. </script>
  310. </button>
  311. </group>
  312. </xhtml:body>
  313. </xhtml:html>