SPADB63500_사용자부서선택조회.xrw 14 KB

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