SMZSA20800_화면제한자관리.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <scrnlist/>
  12. </list>
  13. <list_user>
  14. <userlist/>
  15. </list_user>
  16. </main>
  17. <send>
  18. <scrncd/>
  19. <scrnurl/>
  20. <scrnkind/>
  21. <denyuserlist/>
  22. <scrncd_temp/>
  23. <scrnurl_temp/>
  24. </send>
  25. <hide>
  26. <acntgruplist/>
  27. </hide>
  28. <init>
  29. <searchitem/>
  30. <flag>
  31. <lable>화면제한자명</lable>
  32. <value>acntgrupnm</value>
  33. </flag>
  34. <flag>
  35. <lable>화면제한자코드</lable>
  36. <value>acntgrupcd</value>
  37. </flag>
  38. <comcd/>
  39. </init>
  40. <agmenu>
  41. <label>화면제한자수정</label>
  42. <func>setacntgrup</func>
  43. </agmenu>
  44. <agmenu>
  45. <label>화면제한자삭제</label>
  46. <func>delacntgrup</func>
  47. </agmenu>
  48. <temp>_OneS_DD</temp>
  49. <hidden>
  50. <comcd/>
  51. </hidden>
  52. </root>
  53. </instance>
  54. <script type="javascript" ev:event="xforms-ready">
  55. <![CDATA[
  56. fInitComcd();
  57. fInitialize();
  58. ]]>
  59. </script>
  60. <submission id="TRZBC00101" method="post" replace="instance"/>
  61. <submission id="TRZSA20501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list">
  62. <script type="javascript" ev:event="xforms-submit-error">
  63. <![CDATA[
  64. ]]>
  65. </script>
  66. </submission>
  67. <submission id="TRZSA20800" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_user"/>
  68. <submission id="TXZSA20800" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_user"/>
  69. </model>
  70. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  72. <script type="javascript" src="../../../com/authinfoweb/js/ZSA001.js"/>
  73. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  74. <script type="javascript">
  75. <![CDATA[
  76. /**
  77. * @group :
  78. * @ver : 2006.12.20
  79. * @by : 이상준
  80. * @---------------------------------------------------
  81. * @type : function
  82. * @access : public
  83. * @desc : 화면조회
  84. * @return :
  85. * @---------------------------------------------------
  86. */
  87. function fbtnSearch()
  88. {
  89. submit("TRZSA20501");
  90. //grd_scrnlist.select(1, 3)=true;
  91. grd_scrnlist.row=1;
  92. }
  93. /**
  94. * @group :
  95. * @ver : 2006.12.20
  96. * @by : 이상준
  97. * @---------------------------------------------------
  98. * @type : function
  99. * @access : public
  100. * @desc : 공통코드 초기화
  101. * @return :
  102. * @---------------------------------------------------
  103. */
  104. function fInitComcd() {
  105. zbcfGetCodeList( new Array("Z0005"), new Array("/root/init/comcd"));
  106. //fInsertInstance("Z0005", "전체", "-");
  107. }
  108. /*
  109. 초기화 작업을 합니다.
  110. */
  111. function fInitialize(){
  112. model.removeNodeset("/root/main/list_user/userlist");
  113. model.resetInstanceNode("/root/temp/list");
  114. model.removeNodeset("/root/hide/usergruplist");
  115. model.removeNodeset("/root/main/list/scrnlist");
  116. model.resetInstanceNode("/root/send");
  117. model.setValue("/root/send/scrnkind", "xrw");
  118. //grd_acntitemlist.colhidden(6)=true;
  119. //grd_acntgruplist.colDisabled(2)=true;
  120. //combo1.select(0);
  121. //cmc_scrncd.select(0);
  122. model.refresh();
  123. }
  124. /*
  125. 버튼 컨트롤들을 클릭했을때 공통으로 타는 함수입니다.
  126. control : "search" 는 조회 버튼 클릭
  127. "init"은 신규 버튼 클릭
  128. "save"는 저장 버튼 클릭
  129. grid : 그리드 컨트롤을 넘겨줍니다.
  130. param : 기타 param을 넘겨줍니다.
  131. */
  132. function fClicked(control, grid, param){
  133. if ("search" == control){
  134. fSearchClick(grid, param);
  135. model.resetInstanceNode("/root/send");
  136. } else if ("init" == control){
  137. model.reset();
  138. } else if ("save" == control){
  139. fSaveClick(grid, param);
  140. } else if ("delete" == control){
  141. fDeleteClick(grid, param);
  142. }else {
  143. messageBox("처리를 수행","E002");
  144. }
  145. model.refresh();
  146. }
  147. /*
  148. 조회버튼 클릭 타는 함수입니다.
  149. grid.explorerbar = "sortshow" sort설정합니다.
  150. ipt_usercdnm_flag는 검색조건의 사용자코드 or 사용자명입니다.
  151. radio1은 사용자코드 or 사용자명 선택 라디오 버튼입니다.
  152. submit을 날립니다.
  153. .
  154. */
  155. function fSearchClick(grid,param){
  156. // window.setPopupMenu(true, "/root/menu/menu", "Label", "func", true);
  157. // window.showPopupMenu(true);
  158. grid.explorerbar = "sortshow";
  159. model.removeNodeset("/root/main/list_grup/acntgruplist");
  160. grid.rebuild();
  161. model.resetInstanceNode("/root/send");
  162. model.setValue("/root/send/searchitem", ipt_search_item.text);
  163. model.setValue("/root/send/flag", combo1.value);
  164. submit("TRZSA20200");
  165. }
  166. /*
  167. 저장 버튼 클릭시 사는 함수입니다.
  168. 사용자코드, 사용자명, 비밀번호, 적용시작일자, 적용종료일자는 필수 항목 입니다.
  169. 필수항목 모두 입력시 /root/main/item 노드를 send 노드로 복사합니다.
  170. submit을 날립니다.
  171. */
  172. function fSaveClick(grid, param){
  173. if("denyuserlist" == param){
  174. // alert("화면제한자항목을 저장합니다.");
  175. model.setValue("/root/send/denyuserlist", grid.getUpdateData());
  176. if ( submit("TXZSA20800") ) {
  177. grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  178. }
  179. }
  180. // model.copyNode("/root/send/item", "/root/hide/item");
  181. // submit("TXZSU10101");
  182. }
  183. function fDeleteClick(grid, param){
  184. if(param == "denyuserlist"){
  185. grid.addStatus(grid.row,"delete");
  186. model.setValue("/root/send/denyuserlist", grid.getUpdateData());
  187. if ( submit("TXZSA20800") ) {
  188. grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  189. //var jRow = grid.row;
  190. //grid.deleteItem(jRow);
  191. }
  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. function fSetRowValue(node, destinationelement, sourceelement, row) {
  220. model.setValue(node + "[" + row + "]/" + destinationelement, sourceelement);
  221. }
  222. function fCheckItem(iRow){
  223. }
  224. ]]>
  225. </script>
  226. </xhtml:head>
  227. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  228. <script type="javascript" ev:event="onmenu">
  229. <![CDATA[
  230. if(event.description == "delacntgrup")
  231. {
  232. btn_delete_acntgrup.dispatch("DOMActivate");
  233. }
  234. if(event.description == "setacntgrup")
  235. {
  236. var iRow = grd_acntgruplist.row;
  237. setParameter("SPZSA20201_", "");
  238. modal("SPZSA20201_사용자그룹변경", "", "200", "200", "SPZSA20201","/root/main/list_grup/acntgruplist["+iRow+"]/acntgrupcd", "/root/send/acntgrupcd");
  239. var iProperties = getParameter("SPZSA20201_");
  240. if(iProperties.length > 0 && iProperties != undefined){
  241. model.setValue("/root/main/list_grup/acntgruplist[" + iRow + "]/acntgrupnm", iProperties);
  242. //grd_acntgruplist.addStatus(iRow, "update");
  243. } else {
  244. messageBox("데이터를 저장", "E001");
  245. }
  246. }
  247. ]]>
  248. </script>
  249. <group id="grp_tle" style="left:0px; top:0px; width:1194px; height:13px; ">
  250. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">화면제한자관리</caption>
  251. </group>
  252. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  253. <group id="grp_sea" style="left:5px; top:10px; width:475px; height:60px; vertical-align:top; ">
  254. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:475px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  255. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:117px; height:17px; ">화면코드</caption>
  256. <line id="line1" style="x1:398px; y1:7px; x2:398px; y2:51px; border-color:#ffe4bb; border-left-style:solid; "/>
  257. <button id="btn_search" class="btn1_letter2" style="left:412px; top:19px; width:56px; height:22px; ">
  258. <caption>조회</caption>
  259. <script type="javascript" ev:event="DOMActivate">
  260. <![CDATA[
  261. fbtnSearch();
  262. ]]>
  263. </script>
  264. </button>
  265. <input id="ipt_scrnurl" ref="/root/send/scrnurl" class="input_search" imemode="hangul" style="left:126px; top:34px; width:184px; height:19px; ">
  266. <script type="javascript" ev:event="onkeypress">
  267. <![CDATA[
  268. if (event.keycode == 13)
  269. {
  270. ipt_scrnurl.value = ipt_scrnurl.currentText;
  271. fbtnSearch();
  272. }
  273. ]]>
  274. </script>
  275. </input>
  276. <input id="ipt_scrncd" ref="/root/send/scrncd" class="input_search" imemode="hangul" style="left:126px; top:8px; width:184px; height:19px; ">
  277. <script type="javascript" ev:event="onkeypress">
  278. <![CDATA[
  279. if (event.keycode == 13)
  280. {
  281. ipt_scrncd.value = ipt_scrncd.currentText;
  282. fbtnSearch();
  283. }
  284. ]]>
  285. </script>
  286. </input>
  287. <caption id="caption4" class="search_name" style="left:15px; top:35px; width:117px; height:17px; ">화면URL</caption>
  288. </group>
  289. <caption id="caption9" class="tit_2" style="left:5px; top:88px; width:111px; height:14px; vertical-align:middle; ">화면목록</caption>
  290. <line id="line12" class="line_1" style="x1:5px; y1:103px; x2:480px; y2:104px; "/>
  291. <datagrid id="grd_scrnlist" nodeset="/root/main/list/scrnlist" caption="화면코드^화면URL" colsep="^" colwidth="88, 310" dataheight="23" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:5px; top:107px; width:475px; height:630px; ">
  292. <col ref="scrncd"/>
  293. <col ref="scrnurl"/>
  294. <script type="javascript" ev:event="ondblclick">
  295. <![CDATA[
  296. var iRow = grd_scrnlist.row;
  297. var iNode = "/root/main/list/scrnlist";
  298. opt_scrncd.value = fGetValue(iNode, iRow, "scrncd");
  299. opt_scrnurl.value = fGetValue(iNode, iRow, "scrnurl");
  300. submit("TRZSA20800");
  301. //grd_scrnlist.select(1, 3)=true;
  302. grd_denyuserlist.row=1;
  303. ]]>
  304. </script>
  305. </datagrid>
  306. <button id="btn_delete_acntitem" class="btn2_letter2" style="left:1107px; top:55px; width:42px; height:19px; ">
  307. <caption>삭제</caption>
  308. <script type="javascript" ev:event="DOMActivate">
  309. <![CDATA[
  310. var rtn = messageBox(" 해당 화면제한자항목을 ", "Q001");
  311. if(rtn == 6){
  312. fClicked("delete", grd_denyuserlist, "denyuserlist");
  313. }
  314. ]]>
  315. </script>
  316. </button>
  317. <button id="btn_save_acntitem" class="btn5_letter2" style="left:1152px; top:55px; width:42px; height:19px; ">
  318. <caption>저장</caption>
  319. <script type="javascript" ev:event="DOMActivate">
  320. <![CDATA[
  321. fClicked("save", grd_denyuserlist, "denyuserlist");
  322. ]]>
  323. </script>
  324. </button>
  325. <caption id="caption3" class="tit_2" style="left:491px; top:61px; width:111px; height:13px; ">화면제한자항목</caption>
  326. <line id="line2" class="line_1" style="x1:491px; y1:76px; x2:1194px; y2:77px; "/>
  327. <button id="btn_reg" class="btn2_letter2" style="left:1062px; top:55px; width:41px; height:19px; ">
  328. <caption>등록</caption>
  329. <script type="javascript" ev:event="DOMActivate">
  330. <![CDATA[
  331. // grd_denyuserlist.addItem();
  332. var iRow = grd_denyuserlist.row;
  333. model.removeNodeset("/root/temp/list");
  334. clearParameter("SPZSU10103_");
  335. if(opt_scrncd.value == ""){
  336. model.alert("화면제한자을 선택하십시요!");
  337. } else {
  338. // modal("../../userdeptinfoweb/xrw/SPZSU10101", "", "200", "200", "SPZSU10101");
  339. //
  340. // var iProperties = getParameter("SPZSU10101_");
  341. // modal("../../userdeptinfoweb/xrw/SPZSU10103", "", "200", "200", "SPZSU10103","/root/temp","/root/main/temp");
  342. modal("../../userdeptinfoweb/xrw/SPZSU10103", "", "200", "200", "SPZSU10103");
  343. var iProperties = getParameter("SPZSU10103_");
  344. // alert(iProperties);
  345. // var iRow = grd_menuitemlist.row;
  346. if(iProperties.length > 0 && iProperties != "" && iProperties != undefined){
  347. var iNode = "/root/main/list_user/userlist";
  348. // var iNode = "/root/main/list_item";
  349. setCSVToNode("/root/temp", iProperties);
  350. // model.copyNode(iNode, "/root/main/list_item");
  351. var iNodesetCount = getNodesetCount("/root/temp/list");
  352. for(var i = 1; i <= iNodesetCount; i++){
  353. grd_denyuserlist.addItem();
  354. iRow = grd_denyuserlist.row;
  355. // alert(model.getValue("/root/temp/list["+i+"]/userid"));
  356. fSetRowValue(iNode, "scrncd", opt_scrncd.value, iRow);
  357. fSetRowValue(iNode, "userid", model.getValue("/root/temp/list["+i+"]/userid"), iRow);
  358. fSetRowValue(iNode, "usernm", model.getValue("/root/temp/list["+i+"]/usernm"), iRow);
  359. fSetRowValue(iNode, "dutplceinstnm", model.getValue("/root/temp/list["+i+"]/dutplceinstnm"), iRow);
  360. fSetRowValue(iNode, "dutplceinstcd", model.getValue("/root/temp/list["+i+"]/dutplceinstcd"), iRow);
  361. fSetRowValue(iNode, "dutplcenm", model.getValue("/root/temp/list["+i+"]/dutplcenm"), iRow);
  362. fSetRowValue(iNode, "dutplcecd", model.getValue("/root/temp/list["+i+"]/dutplcecd"), iRow);
  363. }
  364. // fSetRowValue(iNode, "acntgrupnm", opt_scrnurl.value, iRow);
  365. // fSetRowValue(iNode, "acntgrupcd", opt_scrncd.value, iRow);
  366. // fSetRowValue(iNode, "userid", iSplit_Value[0], iRow);
  367. // fSetRowValue(iNode, "usernm", iSplit_Value[1], iRow);
  368. // fSetRowValue(iNode, "dutplceinstcd", iSplit_Value[6], iRow);
  369. // fSetRowValue(iNode, "dutplceinstnm", iSplit_Value[7], iRow);
  370. // fSetRowValue(iNode, "dutplcecd", iSplit_Value[8], iRow);
  371. // fSetRowValue(iNode, "dutplcenm", iSplit_Value[9], iRow);
  372. var iStatus = grd_denyuserlist.rowstatus(iRow);
  373. if(iStatus=="0"){
  374. grd_denyuserlist.rowstatus(iRow) = "2";
  375. }
  376. } else {
  377. messageBox("데이터를 저장", "E001");
  378. // grd_denyuserlist.removeItem();
  379. }
  380. }
  381. ]]>
  382. </script>
  383. </button>
  384. <datagrid id="grd_denyuserlist" nodeset="/root/main/list_user/userlist" class="datagrid" caption="화면코드^사용자ID^사용자명^근무지기관명^근무지기관코드^근무지명^근무지코드^제한사유^최초등록자^최초등록일시^최종수정자^최종수정일시" colwidth="100, 100, 100, 138, 112, 150, 100, 177, 100, 125, 100, 125" dataheight="25" explorerbar="sort" extendlastcol="scroll" frozencols="1" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" style="left:490px; top:80px; width:703px; height:657px; ">
  385. <col ref="scrncd" visibility="hidden"/>
  386. <col ref="userid"/>
  387. <col ref="usernm"/>
  388. <col ref="dutplceinstnm"/>
  389. <col ref="dutplceinstcd" visibility="hidden"/>
  390. <col ref="dutplcenm"/>
  391. <col ref="dutplcecd"/>
  392. <col ref="reason" type="input"/>
  393. <col ref="fstrgstrid"/>
  394. <col ref="fstrgstdt" format="yyyy-mm-dd hh:nn:ss"/>
  395. <col ref="lastupdtrid"/>
  396. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss"/>
  397. </datagrid>
  398. <group id="group4" style="left:491px; top:10px; width:702px; height:45px; vertical-align:top; ">
  399. <caption id="caption11" class="cell_1" style="left:0px; top:20px; width:60px; height:19px; ">화면코드</caption>
  400. <output id="opt_scrncd" ref="/root/send/scrncd_temp" class="output_fix" style="left:63px; top:20px; width:97px; height:19px; "/>
  401. <output id="opt_scrnurl" ref="/root/send/scrnurl_temp" class="output_fix" style="left:301px; top:20px; width:394px; height:19px; "/>
  402. <caption id="caption12" class="tit_2" style="left:0px; top:0px; width:169px; height:14px; ">선택 화면</caption>
  403. <caption id="caption2" class="cell_1" style="left:163px; top:20px; width:135px; height:19px; ">화면 URL</caption>
  404. <line id="line7" class="line_1" style="x1:0px; y1:15px; x2:702px; y2:15px; "/>
  405. <line id="line8" class="line_3" style="x1:0px; y1:42px; x2:702px; y2:42px; "/>
  406. </group>
  407. <button id="btn_save_excel" class="btn2_letter4" style="left:960px; top:55px; width:64px; height:19px; ">
  408. <caption>엑셀저장</caption>
  409. <script type="javascript" ev:event="DOMActivate">
  410. <![CDATA[
  411. var fileName = window.fileDialog("save", ",", false, "사용자그룹", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  412. if (fileName != "")
  413. {
  414. grd_acntitemlist.saveExcel(fileName);
  415. }
  416. ]]>
  417. </script>
  418. </button>
  419. <button id="button1" class="btn2_letter4" style="left:893px; top:55px; width:64px; height:19px; ">
  420. <caption>엑셀입력</caption>
  421. <script type="javascript" ev:event="DOMActivate">
  422. <![CDATA[
  423. var fileName = window.fileDialog("save", ",", false, "사용자그룹", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  424. if (fileName != "")
  425. {
  426. grd_acntitemlist.saveExcel(fileName);
  427. }
  428. ]]>
  429. </script>
  430. </button>
  431. </group>
  432. </xhtml:body>
  433. </xhtml:html>