SPZSU10103_사용자부서선택조회.xrw 18 KB

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