SMLAF00500_사용자목록관리.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLAF00500_사용자목록관리.xrw
  4. * 설 명 : 사용자목록관리 화면
  5. * 설 계 자 : 한음미
  6. * 작 성 자 : 한음미
  7. * 작 성 일 : 2007.11.07
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>사용자목록관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <deptlist>
  20. <deptflag/>
  21. <dutdeptcd/>
  22. <unitnm/>
  23. </deptlist>
  24. <userlist>
  25. <choi/>
  26. <userid/>
  27. <usernm/>
  28. </userlist>
  29. <choilist>
  30. <choi/>
  31. <posdeptcd/>
  32. <dutdeptcd/>
  33. <userid/>
  34. <usernm/>
  35. <deptflag/>
  36. <exist/>
  37. </choilist>
  38. </main>
  39. <send>
  40. <use/>
  41. </send>
  42. <init>
  43. </init>
  44. <hidden>
  45. </hidden>
  46. </root>
  47. </instance>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. fExeInitialize();
  51. ]]>
  52. </script>
  53. <submission id="TRLAF00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/deptlist"/>
  54. <submission id="TRLAF00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/usercdlist"/>
  55. <submission id="TXLAF00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/choilist"/>
  56. <submission id="TRLAF00502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/choilist"/>
  57. <submission id="TXLAF00502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/choilist"/>
  58. </model>
  59. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  63. <script type="javascript" src="../../../lis/commonweb/js/LZZ001.js"/>
  64. <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
  65. <script type="javascript" src="../../../lis/commonweb/js/LAZ001.js"/>
  66. <script type="javascript">
  67. <![CDATA[
  68. /* @group : 사용자목록관리
  69. * @ver : 2007.11.07 (CMCDEV-0001)
  70. * @by : 한음미
  71. * @-----------------------------------
  72. * @type : function
  73. * @access : public
  74. * @desc : 화면 초기값 Function
  75. */
  76. function fExeInitialize(){
  77. model.removeNodeset("/root/send");
  78. model.removeNodeset("/root/main/deptlist"); // 부서목록 초기화
  79. model.removeNodeset("/root/main/userlist"); // 전체사용자목록 초기화
  80. model.removeNodeset("/root/main/choilist"); // 사용자목록 초기화
  81. model.makeValue("/root/send/useyn", "1");
  82. submit("TRLAF00401"); // 부서목록 리스트 보이기
  83. submit("TRLAF00501"); // 전체사용자목록 리스트 보이기
  84. model.refresh();
  85. }
  86. /* @group : 사용자목록관리
  87. * @ver : 2007.11.07 (CMCDEV-0001)
  88. * @by : 한음미
  89. * @-----------------------------------
  90. * @type : function
  91. * @access : public
  92. * @desc : 사용자목록에서 저장 전에 취소시 체크박스 해제할때 사라지는 Function
  93. */
  94. function fExeUnUserList() {
  95. var sNode = "/root/main/choilist";
  96. //-----------------------------------------------------------------------------------------------------------
  97. if(grd_choilist.row > 0 && grd_choilist.isCell(event.target) && grd_choilist.row >= grd_choilist.fixedRows) {
  98. //---------------------------------------------------------------------
  99. if (model.getValue(sNode+"["+ grd_choilist.row +"]/choi") == "false") {
  100. if (model.getValue(sNode+"["+ grd_choilist.row +"]/exist") != "Y") {
  101. model.setValue("/root/main/userlist["+ grd_userlist.row +"][userid='"+model.getValue(sNode+"["+ grd_choilist.row +"]/userid") +"']/choi", "false");
  102. grd_choilist.deleteItem(grd_choilist.row);
  103. }
  104. }
  105. }
  106. }
  107. /* @group : 사용자목록관리
  108. * @ver : 2007.11.07 (CMCDEV-0001)
  109. * @by : 한음미
  110. * @-----------------------------------
  111. * @type : function
  112. * @access : public
  113. * @desc : 전체사용자목록에서 사용자목록으로 데이터 가져오는 Function
  114. */
  115. function fExeChoiUserList() {
  116. var iNo = 0;
  117. var sDeptNode = "/root/main/deptlist";
  118. var sUserNode = "/root/main/userlist";
  119. var sChoiNode = "/root/main/choilist";
  120. var iChoiNo = 0;
  121. //-------------------------------------------------------------------------
  122. if (model.getValue(sDeptNode+"["+ grd_deptlist.row +"]/dutdeptcd") != "") {
  123. //-----------------------------------------------------------------------
  124. if(model.getValue(sUserNode+"["+ grd_userlist.row +"]/choi") == "true") {
  125. //------------------------------------------------------------------------------------------------------
  126. iNo = grd_choilist.findRow(model.getValue(sUserNode+"["+ grd_userlist.row +"]/userid"),1,4,false,false);
  127. if (iNo < 0 ) {
  128. grd_choilist.addRow();
  129. iChoiNo = Number(getNodesetCount(sChoiNode));
  130. model.setValue(sChoiNode+"["+ iChoiNo +"]/choi", "true");
  131. model.setValue(sChoiNode+"["+ iChoiNo +"]/posdeptcd", model.getValue("/root/main/deptlist["+ grd_deptlist.row +"]/deptflag"));
  132. model.setValue(sChoiNode+"["+ iChoiNo +"]/dutdeptcd", model.getValue("/root/main/deptlist["+ grd_deptlist.row +"]/dutdeptcd"));
  133. model.setValue(sChoiNode+"["+ iChoiNo +"]/userid", model.getValue("/root/main/userlist["+ grd_userlist.row +"]/userid"));
  134. model.setValue(sChoiNode+"["+ iChoiNo +"]/usernm", model.getValue("/root/main/userlist["+ grd_userlist.row +"]/usernm"));
  135. grd_choilist.toprow = grd_choilist.rows-1;
  136. } else {
  137. messageBox("데이터가","E006");
  138. model.setValue(sUserNode+"["+ grd_userlist.row +"]/choi", "false");
  139. }
  140. }
  141. } else {
  142. messageBox("부서코드를","C002");
  143. model.setValue(sUserNode+"["+ grd_userlist.row +"]/choi", "false");
  144. }
  145. }
  146. /* @group : 사용자목록관리
  147. * @ver : 2007.11.07 (CMCDEV-0001)
  148. * @by : 한음미
  149. * @-----------------------------------
  150. * @type : function
  151. * @access : public
  152. * @desc : 사용자목록에서 저장되는 Function
  153. */
  154. function fSaveUserDept() {
  155. var sNode = "/root/main/choilist";
  156. var iFindNo = 0;
  157. /*
  158. //----------------------------------
  159. if(!getGridUpdateData(grd_choilist))
  160. {
  161. messageBox("저장할 데이터를","C002");
  162. return ;
  163. }
  164. */
  165. iFindNo = grd_choilist.findRow("true", 1, 1, false, false);
  166. if (Number(iFindNo) <= 0) {
  167. messageBox("저장할 사용자정보가 없습니다!", "I007");
  168. return false;
  169. }
  170. //----------------------------------------------------
  171. for(var iNo=1; iNo <= getNodesetCount(sNode); iNo++) {
  172. if (model.getValue(sNode+"["+iNo+"]/choi") == "true") { // 체크박스에 체크가 되어있고
  173. if (model.getValue(sNode+"["+iNo+"]/exist") != "Y") {
  174. grd_choilist.addStatus(iNo,"insert");
  175. }
  176. }
  177. }
  178. //------------------------------------------------------------------
  179. model.makeValue("/root/send/choilist",grd_choilist.getUpdateData());
  180. if (submit("TXLAF00501")) { // 저장버튼 function
  181. submit("TRLAF00502");
  182. //---------------------------------------------------
  183. for(var iNo=1; iNo < getNodesetCount(sNode); iNo++) {
  184. model.setValue(sNode+"["+iNo+"]/choi", "false");
  185. }
  186. //------------------------------------------------------------------------
  187. for (var iNum=1; iNum <= getNodesetCount("/root/main/userlist"); iNum++) {
  188. model.setValue("/root/main/userlist["+ iNum +"]/choi", "false");
  189. }
  190. }
  191. }
  192. /* @group : 사용자목록관리
  193. * @ver : 2007.11.07 (CMCDEV-0001)
  194. * @by : 한음미
  195. * @-----------------------------------
  196. * @type : function
  197. * @access : public
  198. * @desc : 사용자목록 취소 Function
  199. */
  200. function fDeleteUserList(){
  201. var sNode = "/root/main/choilist";
  202. var iFindNo = 0;
  203. /*
  204. if(!getGridUpdateData(grd_choilist))
  205. {
  206. messageBox("취소할 데이터를","C002");
  207. return ;
  208. }
  209. */
  210. grd_choilist.clearStatus();
  211. //---------------------------------------------------------
  212. iFindNo = grd_choilist.findRow("true", 1, 1, false, false);
  213. if (Number(iFindNo) <= 0) {
  214. messageBox("취소할 사용자정보가 없습니다!", "I007");
  215. return false;
  216. }
  217. //------------------------------------------------------
  218. for (var iRow=1;iRow <= getNodesetCount(sNode);iRow++) {
  219. if (model.getValue("/root/main/choilist["+ iRow +"]/choi") == "true") {
  220. if (model.getValue("/root/main/choilist["+ iRow +"]/exist") == "Y") {
  221. grd_choilist.addStatus(iRow,"update");
  222. }
  223. }
  224. }
  225. //-------------------------------------------------------------------
  226. model.makeValue("/root/send/choilist", grd_choilist.getUpdateData());
  227. if (submit("TXLAF00502")) { // 선택 사용자코드 데이터 중 불필요한것 삭제
  228. submit("TRLAF00502");
  229. //--------------------------------------------------------
  230. for (var iNum=1; iNum <= getNodesetCount(sNode); iNum++) {
  231. model.setValue(sNode+"["+ iNum +"]/choi", "false");
  232. }
  233. //------------------------------------------------------------------------
  234. for (var iNum=1; iNum <= getNodesetCount("/root/main/userlist"); iNum++) {
  235. model.setValue("/root/main/userlist["+ iNum +"]/choi", "false");
  236. }
  237. }
  238. }
  239. /* @group : 사용자목록관리
  240. * @ver : 2007.11.07 (CMCDEV-0001)
  241. * @by : 한음미
  242. * @-----------------------------------
  243. * @type : function
  244. * @access : public
  245. * @desc : 부서목록에서 클릭시 사용자목록으로 보여지는 Function
  246. */
  247. function fExeDeptUserList() {
  248. var sDeptNode = "/root/main/deptlist";
  249. //-----------------------------------------------------------------------------------------------------------
  250. if(grd_deptlist.row > 0 && grd_deptlist.isCell(event.target) && grd_deptlist.row >= grd_deptlist.fixedRows) {
  251. caption8.text = model.getValue(sDeptNode+"["+ grd_deptlist.row +"]/unitnm") + " 사용자목록";
  252. model.makeValue("/root/send/dutdeptcd", model.getValue(sDeptNode+"["+ grd_deptlist.row +"]/dutdeptcd"));
  253. model.makeValue("/root/send/posdeptcd", model.getValue(sDeptNode+"["+ grd_deptlist.row +"]/deptflag"));
  254. submit("TRLAF00502"); // 사용자목록 보여주는 조회 function
  255. }
  256. //------------------------------------------------------------------------
  257. for (var iNum=1; iNum <= getNodesetCount("/root/main/userlist"); iNum++) {
  258. model.setValue("/root/main/userlist["+ iNum +"]/choi", "false");
  259. }
  260. }
  261. ]]>
  262. </script>
  263. </xhtml:head>
  264. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  265. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  266. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">사용자목록관리</caption>
  267. </group>
  268. <group id="grp_biz" scroll="auto" style="left:0px; top:35px; width:1195px; height:744px; ">
  269. <line id="line12" class="line_1" style="x1:0px; y1:25px; x2:385px; y2:25px; "/>
  270. <caption id="caption3" class="tit_2" style="left:5px; top:10px; width:95px; height:14px; ">부서목록</caption>
  271. <line id="line2" class="line_1" style="x1:390px; y1:25px; x2:720px; y2:25px; "/>
  272. <caption id="caption5" class="tit_2" style="left:395px; top:10px; width:108px; height:13px; ">전체사용자목록</caption>
  273. <datagrid id="grd_deptlist" nodeset="/root/main/deptlist" autoresize="true" caption="부서구분코드^부서코드^부서명" colsep="^" colwidth="90, 101, 150" dataheight="23" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:30px; width:385px; height:690px; ">
  274. <col ref="deptflag" style="text-align:center; "/>
  275. <col ref="dutdeptcd" style="text-align:center; "/>
  276. <col ref="unitnm" style="text-align:center; "/>
  277. <script type="javascript" ev:event="onclick">
  278. <![CDATA[
  279. fExeDeptUserList();
  280. ]]>
  281. </script>
  282. <script type="javascript" ev:event="onaftersort">
  283. <![CDATA[
  284. grd_deptlist.gridToInstance();
  285. ]]>
  286. </script>
  287. </datagrid>
  288. <datagrid id="grd_userlist" nodeset="/root/main/userlist" caption="선택^사용자ID^사용자명" colsep="^" colwidth="34, 105, 148" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:390px; top:30px; width:330px; height:690px; ">
  289. <col ref="choi" type="checkbox"/>
  290. <col ref="userid" style="text-align:center; "/>
  291. <col ref="usernm" style="text-align:center; "/>
  292. <script type="javascript" ev:event="xforms-select">
  293. <![CDATA[
  294. fExeChoiUserList();
  295. ]]>
  296. </script>
  297. <script type="javascript" ev:event="onaftersort">
  298. <![CDATA[
  299. grd_userlist.gridToInstance();
  300. ]]>
  301. </script>
  302. </datagrid>
  303. <datagrid id="grd_choilist" nodeset="/root/main/choilist" caption="선택^과코드^부서코드^사용자ID^사용자명^부서구분^존재" colsep="^" colwidth="34, 0, 100, 120, 153, 0, 0" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:725px; top:30px; width:450px; height:690px; ">
  304. <col ref="choi" type="checkbox"/>
  305. <col ref="posdeptcd"/>
  306. <col ref="dutdeptcd" style="text-align:center; "/>
  307. <col ref="userid" style="text-align:center; "/>
  308. <col ref="usernm" style="text-align:center; "/>
  309. <col ref="deptflag"/>
  310. <col ref="exist"/>
  311. <script type="javascript" ev:event="onclick">
  312. <![CDATA[
  313. fExeUnUserList();
  314. ]]>
  315. </script>
  316. <script type="javascript" ev:event="onaftersort">
  317. <![CDATA[
  318. grd_choilist.gridToInstance();
  319. ]]>
  320. </script>
  321. </datagrid>
  322. <caption id="caption8" class="tit_2" style="left:730px; top:10px; width:445px; height:13px; ">사용자목록</caption>
  323. <line id="line3" class="line_1" style="x1:725px; y1:25px; x2:1175px; y2:25px; "/>
  324. </group>
  325. <group id="grp_btn" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  326. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1175px; y2:25px; "/>
  327. <button id="btn_save" class="btn4_letter2" style="left:1118px; top:3px; width:56px; height:22px; ">
  328. <caption>저장</caption>
  329. <script type="javascript" ev:event="DOMActivate">
  330. <![CDATA[
  331. fSaveUserDept();
  332. ]]>
  333. </script>
  334. </button>
  335. <button id="button1" class="btn4_letter2" style="left:1059px; top:3px; width:56px; height:22px; ">
  336. <caption>취소</caption>
  337. <script type="javascript" ev:event="DOMActivate">
  338. <![CDATA[
  339. fDeleteUserList();
  340. ]]>
  341. </script>
  342. </button>
  343. </group>
  344. </xhtml:body>
  345. </xhtml:html>