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

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