SMLLF02400_기초코드관리.xrw 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF02400.xrw
  4. * 설 명 : 기초코드 관리
  5. * 설 계 자 : 서승현
  6. * 작 성 자 : 서승현
  7. * 작 성 일 : 2008.11.02
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>
  18. <main>
  19. <itemlist>
  20. <chk/>
  21. <seq/>
  22. <basecd/>
  23. <basecdnm/>
  24. <basecdid/>
  25. <basecdidnm/>
  26. <basecd2/>
  27. <basecddesc/>
  28. </itemlist>
  29. </main>
  30. <init>
  31. </init>
  32. <hidden>
  33. </hidden>
  34. <send>
  35. <basecdid>-</basecdid>
  36. <searchtext/>
  37. <searchflag>1</searchflag>
  38. <itemlist/>
  39. <codeflag/>
  40. <sendflag>Y</sendflag>
  41. </send>
  42. </root>
  43. </instance>
  44. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  45. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  46. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/LB0129"/>
  47. <submission id="TRLQF00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/itemlist"/>
  48. <submission id="TXLQF00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/itemlist"/>
  49. <script type="javascript" ev:event="xforms-ready">
  50. <![CDATA[
  51. fSetInit();
  52. ]]>
  53. </script>
  54. </model>
  55. <script type="javascript">
  56. <![CDATA[
  57. function fSetInit(){
  58. model.setValue("/root/send/codeflag", "0129|0130|"); // 0102= 중분류 // 0104 대분류 // 0000 userdeptflagcd
  59. model.setValue("/root/send/basecdid", getUserId());
  60. submit("TRLZZ00101");
  61. model.setValue("/root/send/basecdid", "-"); //조회구분 초기화
  62. //개발자이면 삭제버튼 활성화
  63. if(model.getValue("/root/init/LB0130/cd") != ""){
  64. btn_del.disabled = false;
  65. }
  66. model.removeNodeset("/root/main/testlist");
  67. //grd_itemList.rebuild();
  68. model.refresh();
  69. }
  70. //저장 데이터 확인
  71. function checkGridUpdate(grid){
  72. var iData = grid.getUpdateDataXml("insert");
  73. var uData = grid.getUpdateDataXml("update");
  74. var dData = grid.getUpdateDataXml("delete");
  75. if (iData=="" && uData=="" && dData=="") return false;
  76. else{
  77. return true;
  78. }
  79. }
  80. //조회버튼
  81. function fGetItemList(){
  82. var basecdid = model.getValue("/root/send/basecdid");
  83. var basecdidnm = cbo_searchFlag.label;
  84. if( basecdid == "00"){
  85. alert("조회구분을 선택하세요!!");
  86. }else{
  87. model.makeValue("/root/send/basecdidnm", basecdidnm);
  88. submit("TRLQF00801");
  89. }
  90. }
  91. //키이벤트
  92. function fKeyEvent(){
  93. if(event.keyCode == "13"){
  94. if(event.target =="ipt_search"){
  95. model.setValue("/root/send/searchtext", ipt_search.currentText);
  96. fGetItemList();
  97. }
  98. }
  99. }
  100. ]]>
  101. </script>
  102. </xhtml:head>
  103. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  104. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  105. <line id="line1" class="line_1" style="x1:0px; y1:71px; x2:1194px; y2:71px; "/>
  106. <datagrid id="grd_itemList" nodeset="/root/main/itemlist" class="datagrid2" autoresize="true" caption="^구분(5)&#xA;basecdid^구분명(50)&#xA;basecdidnm^구분(20)&#xA;basecd^구분(3)&#xA;basecd2^구분명(100)&#xA;basecdnm^구분명(120)&#xA;basecddesc^조회순서" colsep="^" colwidth="25, 70, 200, 100, 100, 320, 320, 50" dataheight="25" defaultrows="1" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:5px; top:75px; width:1189px; height:647px; ">
  107. <col checkvalue="true,false" ref="chk" type="checkbox" visibility="hidden"/>
  108. <col disabled="true" ref="basecdid" type="input"/>
  109. <col ref="basecdidnm" type="input"/>
  110. <col disabled="true" ref="basecd" type="input"/>
  111. <col disabled="true" ref="basecd2" type="input"/>
  112. <col ref="basecdnm" type="input"/>
  113. <col ref="basecddesc" type="input"/>
  114. <col ref="seq" type="input"/>
  115. </datagrid>
  116. <caption id="caption2" class="tit_2" style="left:5px; top:56px; width:173px; height:14px; ">기초코드상세내역</caption>
  117. <button id="btn_add" class="btn2_letter3" disabled="false" visibility="visible" style="left:1075px; top:50px; width:53px; height:19px; ">
  118. <caption>행추가</caption>
  119. <script type="javascript" ev:event="DOMActivate">
  120. <![CDATA[
  121. grd_itemList.additem();
  122. model.setValue("/root/main/itemlist[" + (grd_itemList.rows - 1)+ "]/basecdid", cbo_searchFlag.value);
  123. model.setValue("/root/main/itemlist[" + (grd_itemList.rows - 1)+ "]/seq", parseInt(model.getValue("/root/main/itemlist[" + (grd_itemList.rows - 2)+ "]/seq")) + 1);
  124. model.setValue("/root/main/itemlist[" + (grd_itemList.rows - 1)+ "]/basecdnm", "-");
  125. model.setValue("/root/main/itemlist[" + (grd_itemList.rows - 1)+ "]/basecd2", "-");
  126. model.setValue("/root/main/itemlist[" + (grd_itemList.rows - 1)+ "]/basecddesc", "-");
  127. model.setValue("/root/main/itemlist[" + (grd_itemList.rows - 1)+ "]/basecdidnm", "-");
  128. model.setValue("/root/main/itemlist[" + (grd_itemList.rows - 1)+ "]/basecd", "-");
  129. grd_itemList.bottomRow = grd_itemList.rows;
  130. ]]>
  131. </script>
  132. </button>
  133. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  134. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  135. <button id="button1" class="btn1_letter2" style="left:1115px; top:7px; width:56px; height:22px; ">
  136. <caption>검색</caption>
  137. <script type="javascript" ev:event="DOMActivate">
  138. <![CDATA[
  139. fGetItemList();
  140. ]]>
  141. </script>
  142. </button>
  143. <select1 id="cbo_searchFlag" ref="/root/send/basecdid" class="combo_search" appearance="minimal" style="left:115px; top:9px; width:157px; height:19px; ">
  144. <choices>
  145. <itemset nodeset="/root/init/LB0129">
  146. <label ref="nm"/>
  147. <value ref="cd"/>
  148. </itemset>
  149. </choices>
  150. <script type="javascript" ev:event="xforms-select">
  151. <![CDATA[
  152. model.removeNodeset("/root/main/itemlist");
  153. grd_itemList.rebuild();
  154. fGetItemList();
  155. ]]>
  156. </script>
  157. </select1>
  158. <input id="ipt_search" ref="/root/send/searchtext" class="input_s_button" visibility="hidden" inputtype="button" style="left:510px; top:10px; width:140px; height:19px; ">
  159. <script type="javascript" ev:event="onkeypress">
  160. <![CDATA[
  161. fKeyEvent();
  162. ]]>
  163. </script>
  164. </input>
  165. <caption id="caption25" class="search_name" style="left:25px; top:9px; width:87px; height:17px; ">조회구분 :</caption>
  166. <line id="line2" class="line_4" style="x1:1100px; y1:5px; x2:1100px; y2:27px; "/>
  167. <caption id="caption1" class="search_name" visibility="hidden" style="left:295px; top:10px; width:90px; height:17px; ">검색구분 :</caption>
  168. <select1 id="combo1" ref="/root/send/searchflag" class="combo_search" visibility="hidden" appearance="minimal" style="left:390px; top:10px; width:117px; height:19px; ">
  169. <choices>
  170. <item>
  171. <label>항목코드</label>
  172. <value>1</value>
  173. </item>
  174. <item>
  175. <label>항목명</label>
  176. <value>2</value>
  177. </item>
  178. </choices>
  179. </select1>
  180. </group>
  181. <button id="btn_del" class="btn2_letter3" disabled="true" visibility="visible" style="left:1135px; top:50px; width:53px; height:19px; ">
  182. <caption>행삭제</caption>
  183. <script type="javascript" ev:event="DOMActivate">
  184. <![CDATA[
  185. grd_itemList.rowStatus(grd_itemList.row) = 4; //멀티업데이트 시 Delete로 설정 //0:new, 1:insert, 2:update, 3:insert&new, 4:delete
  186. ]]>
  187. </script>
  188. </button>
  189. </group>
  190. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  191. <button id="button5" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  192. <caption>초기화</caption>
  193. <script type="javascript" ev:event="onclick">
  194. <![CDATA[
  195. window.reload();
  196. ]]>
  197. </script>
  198. </button>
  199. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  200. <button id="btn_exec" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  201. <caption>저장</caption>
  202. <script type="javascript" ev:event="DOMActivate">
  203. <![CDATA[
  204. if(messageBox("", "Q002")==6){
  205. if(!checkGridUpdate(grd_itemList)){
  206. alert("저장할 자료가 존재하지 않습니다.");
  207. return;
  208. }
  209. model.setValue("/root/send/itemlist" , grd_itemList.getUpdateData());
  210. if ( submit("TXLQF00801") ) {
  211. grd_itemList.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  212. fGetItemList();
  213. }
  214. }
  215. ]]>
  216. </script>
  217. </button>
  218. </group>
  219. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  220. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">기초코드 관리</caption>
  221. </group>
  222. </xhtml:body>
  223. </xhtml:html>