SPAEB00010_공통코드관리.xrw 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <codelist>
  11. <item>
  12. <cdid/>
  13. <cdnm/>
  14. <detldesc/>
  15. <useyn/>
  16. <dispseq/>
  17. <cntlyn1/>
  18. <cntlcd1/>
  19. <grupcdid/>
  20. <suppdeptcd/>
  21. </item>
  22. </codelist>
  23. </main>
  24. <send>
  25. <globalinstance>
  26. <instance1/>
  27. </globalinstance>
  28. <srch>
  29. <grupcdid/>
  30. </srch>
  31. <req/>
  32. <windowloadinstance>SPAEB00010</windowloadinstance>
  33. </send>
  34. <init>
  35. <cmb_info>
  36. <cditem>
  37. <grupcdid/>
  38. <grupcdnm/>
  39. </cditem>
  40. </cmb_info>
  41. </init>
  42. <hidden>
  43. </hidden>
  44. <init2>
  45. <baseinfo>
  46. <emplinfo/>
  47. </baseinfo>
  48. </init2>
  49. </root>
  50. </instance>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. aezfSetSuppDeptcd();
  54. var openerid = model.getValue("/root/send/windowloadinstance");
  55. model.removenode("/root/main/codelist");
  56. astGetComboList( new Array("E0002"), new Array("/root/init2/baseinfo/emplinfo") );
  57. submit("TRAAA00001", false);
  58. submit("TRAEB00011");
  59. ]]>
  60. </script>
  61. <submission id="TRAEB00011" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/globalinstance/instance1" replace="instance" resultref="/root/init/cmb_info"/>
  62. <submission id="TRAEB00010" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/codelist"/>
  63. <submission id="TXAEB00010" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden"/>
  64. <submission id="TRAAA00001"/>
  65. </model>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  68. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  70. <script type="javascript" src="../../../ast/examcureweb/js/combolist.js"/>
  71. </xhtml:head>
  72. <xhtml:body pagewidth="731" pageheight="555" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  73. <group id="group3" scroll="auto" style="left:8px; top:0px; width:700px; height:550px; ">
  74. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:4px; top:21px; width:690px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  75. <caption id="caption1" class="tit_2" style="left:0px; top:4px; width:145px; height:14px; ">공통코드관리</caption>
  76. <line id="line1" class="line_1" style="x1:0px; y1:85px; x2:700px; y2:85px; "/>
  77. <group id="group1" scroll="auto" style="left:0px; top:523px; width:700; height:27px; ">
  78. <button id="btn_confirm" class="btn4_letter2" style="left:512px; top:5px; width:56px; height:22px; ">
  79. <caption>저장</caption>
  80. <script type="javascript" ev:event="DOMActivate">
  81. <![CDATA[
  82. // if ( model.getValue("/root/send/srch/grupcdid") == "" ) {
  83. // messageBox("[그룹코드]는 조회필수항목입니다.","I999");
  84. // return;
  85. // }
  86. var auth_id = getUserInfo("userid");
  87. var dev_id = auth_id.substr(0,3);
  88. // 2011.06.21 권한 공통코드(E0002)로 관리
  89. var idx_cncl = 0;
  90. var cnclidCnt = getNodesetCount("/root/init2/baseinfo/emplinfo/E0002");
  91. for( var i = 1 ; i<= cnclidCnt ; i++){
  92. if( model.getValue("/root/init2/baseinfo/emplinfo/E0002["+ i +"]/cdid") == auth_id ){
  93. idx_cncl++;
  94. }
  95. }
  96. if ( idx_cncl != 0 || dev_id == "DEV" || dev_id == "AST" ) {
  97. }else {
  98. messageBox("저장/수정/삭제권한은 전산실 관리자에게만 부여합니다.","I999");
  99. return;
  100. }
  101. if ( messageBox("", "Q002") == 6 ) {
  102. var update = getGridUpdateData(grd_codelist);
  103. if (update == "" ) {
  104. messageBox("업데이트 정보가 없습니다.", "I");
  105. }
  106. else {
  107. model.setValue("/root/send/req", update);
  108. submit("TXAEB00010");
  109. }
  110. }
  111. model.reset();
  112. submit("TRAEB00011");
  113. submit("TRAEB00010");
  114. ]]>
  115. </script>
  116. </button>
  117. <button id="btn_cancel" class="btn4_letter2" style="left:569px; top:5px; width:56px; height:22px; ">
  118. <caption>닫기</caption>
  119. <script type="javascript" ev:event="DOMActivate">
  120. <![CDATA[
  121. window.close();
  122. ]]>
  123. </script>
  124. </button>
  125. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:700; y2:0px; "/>
  126. </group>
  127. <caption id="caption2" class="search_name" style="left:17px; top:30px; width:99px; height:17px; ">그룹코드 :</caption>
  128. <button id="btn_sea" class="btn1_letter2" style="left:625px; top:28px; width:56px; height:22px; ">
  129. <caption>조회</caption>
  130. <script type="javascript" ev:event="DOMActivate">
  131. <![CDATA[
  132. if( submit("TRAEB00010") ){
  133. grd_codelist.clearStatus();
  134. }
  135. ]]>
  136. </script>
  137. </button>
  138. <datagrid id="grd_codelist" nodeset="/root/main/codelist/item" autoresize="true" caption="코드^코드명^설명^사용여부^순번^제어여부1^제어코드1^그룹코드^부서코드^" colsep="^" colwidth="71, 143, 183, 58, 35, 65, 65, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:0px; top:90px; width:700px; height:430px; ">
  139. <col ref="cdid" type="input"/>
  140. <col ref="cdnm" type="input"/>
  141. <col ref="detldesc" type="input" style="text-align:left; "/>
  142. <col ref="useyn" type="input"/>
  143. <col ref="dispseq" type="input" style="text-align:center; "/>
  144. <col ref="cntlyn1" type="input"/>
  145. <col ref="cntlcd1" type="input"/>
  146. <col ref="grupcdid" type="input"/>
  147. <col ref="suppdeptcd" visibility="hidden"/>
  148. <script type="javascript" ev:event="onbuttonclick">
  149. <![CDATA[
  150. var colidx = grd_codelist.col;
  151. if( grd_codelist.colAttribute(colidx, "ref") == "detldesc" ){
  152. model.makeValue("/root/hidden/checkseq","23");
  153. var chkroom = "";
  154. chkroom = model.getValue("/root/main/codelist/item["+ grd_codelist.row +"]/detldesc");
  155. window.load( "SPAEA02301_코드조회.xrw","modal","code", "left:100px; top:150px; width:530px; height:380px;min:hidden;max:hidden;resize:false;" );
  156. if( chkroom != model.getValue("/root/main/codelist/item["+ grd_codelist.row +"]/detldesc") ){
  157. grd_codelist.addStatus(grd_codelist.row,"update");
  158. }
  159. }
  160. ]]>
  161. </script>
  162. </datagrid>
  163. <select1 id="combo1" ref="/root/send/srch/grupcdid" appearance="minimal" style="left:110px; top:30px; width:100px; height:19px; ">
  164. <choices>
  165. <itemset nodeset="/root/init/cmb_info/cditem">
  166. <label ref="grupcdnm"/>
  167. <value ref="grupcdid"/>
  168. </itemset>
  169. </choices>
  170. <script type="javascript" ev:event="xforms-value-changed">
  171. <![CDATA[
  172. // 2011.05.09 코드가 E0001일 경우 섦
  173. if( model.getValue("/root/send/srch/grupcdid") == "E0001" ){
  174. grd_codelist.colType(3) = "inputbutton";
  175. }else{
  176. grd_codelist.colType(3) = "input";
  177. }
  178. submit("TRAEB00010");
  179. ]]>
  180. </script>
  181. </select1>
  182. <button id="btn_grddel" class="btn2_letter3" style="left:640px; top:65px; width:53px; height:19px; ">
  183. <caption>행삭제</caption>
  184. <script type="javascript" ev:event="DOMActivate">
  185. <![CDATA[
  186. deleteSelectedRows(grd_codelist, true);
  187. ]]>
  188. </script>
  189. </button>
  190. <button id="btn_grdadd" class="btn2_letter3" style="left:584px; top:65px; width:53px; height:19px; ">
  191. <caption>행추가</caption>
  192. <script type="javascript" ev:event="DOMActivate">
  193. <![CDATA[
  194. var grupcdid = model.getValue("/root/send/srch/grupcdid");
  195. var suppdeptcd = model.getValue("/root/send/globalinstance/instance1");
  196. grd_codelist.addRow();
  197. var row = grd_codelist.row;
  198. model.setValue("/root/main/codelist/item["+row+"]/grupcdid", grupcdid);
  199. model.setValue("/root/main/codelist/item["+row+"]/suppdeptcd",suppdeptcd);
  200. model.refresh();
  201. ]]>
  202. </script>
  203. </button>
  204. </group>
  205. <button id="button1" class="btn4_letter3" style="left:635px; top:528px; width:68px; height:22px; ">
  206. <caption>초기화</caption>
  207. <script type="javascript" ev:event="DOMActivate">
  208. <![CDATA[
  209. if ( messageBox("초기화하시겠습니까?", "Q") == 6) {
  210. model.reset();
  211. model.removenode("/root/main/codelist");
  212. model.refresh();
  213. }
  214. ]]>
  215. </script>
  216. </button>
  217. </xhtml:body>
  218. </xhtml:html>