SMRWC02400_급여기준코드관리.xrw 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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>기준코드관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <codeinfo>
  11. <codelist>
  12. <cdid/>
  13. <cdnm/>
  14. <detldesc/>
  15. <cntlcd1/>
  16. <cntlcd2/>
  17. <grupcdid/>
  18. </codelist>
  19. </codeinfo>
  20. </main>
  21. <send>
  22. <reqdata>
  23. <grupcdid/>
  24. <srcd/>
  25. </reqdata>
  26. </send>
  27. <senddata>
  28. <execdata>
  29. <codelist/>
  30. </execdata>
  31. </senddata>
  32. <popdata>
  33. <cdgrupid/>
  34. </popdata>
  35. <init/>
  36. </root>
  37. </instance>
  38. <script type="javascript" ev:event="xforms-ready">
  39. <![CDATA[
  40. model.refresh();
  41. ]]>
  42. </script>
  43. <script type="javascript" ev:event="xforms-model-destruct">
  44. <![CDATA[
  45. //window.close();
  46. ]]>
  47. </script>
  48. <submission id="TRRWC02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/codeinfo"/>
  49. <submission id="TXRWC02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/senddata/execdata" resultref="/root/hidden"/>
  50. </model>
  51. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  53. <script type="javascript" src="../../../ast/tumorelctweb/js/combolist.js"/>
  54. <script type="javascript">
  55. <![CDATA[
  56. function readfunc(){ // 해당 조건에 대한 사용자 권한내역을 조회한다.
  57. if (model.getValue("/root/send/reqdata/grupcdid") == ""){
  58. messageBox("구분코드를 선택한 후 조회하시기 바랍니다.", "E999", "");
  59. return;
  60. }
  61. model.removeNodeset("/root/main/codeinfo/codelist");
  62. btn_save.disabled = false;
  63. if (submit("TRRWC02201")){
  64. }
  65. model.refresh();
  66. }
  67. function datacheck(){
  68. var scdid1 = "";
  69. var scdid2 = "";
  70. for (var i = 1; i < datagrid1.rows; i ++){
  71. if (model.getValue("/root/main/codeinfo/codelist[" + i + "]/cdid") == ""){
  72. messageBox("코드는 필수 입력항목입니다.", "E999", "");
  73. return false;
  74. }
  75. if (model.getValue("/root/main/codeinfo/codelist[" + i + "]/cdnm") == ""){
  76. messageBox("코드명은 필수 입력항목입니다.", "E999", "");
  77. return false;
  78. }
  79. scdid1 = model.getValue("/root/main/codeinfo/codelist[" + i + "]/cdid");
  80. var k = i + 1;
  81. for (var j = k; j < datagrid1.rows; j++){
  82. scdid2 = model.getValue("/root/main/codeinfo/codelist[" + j + "]/cdid");
  83. if (i != j){
  84. if (scdid1 == scdid2){
  85. messageBox(j + "번째에서 중복된 자료가 존재합니다", "E999", "");
  86. return false;
  87. }
  88. }
  89. }
  90. }
  91. return true;
  92. }
  93. function ExecData(){
  94. var update = getGridUpdateData(datagrid1);
  95. model.setValue("/root/senddata/execdata/codelist", update);
  96. if (submit("TXRWC02201")){
  97. readfunc();
  98. }
  99. }
  100. function isDate(str) { // 날짜 형식에 대한 적합여부 체크
  101. if (str == "") return true; // 빈건 체크안함
  102. if (trim(str) == "") return true; // 빈건 체크안함
  103. if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
  104. if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
  105. var yy = new Number(str.substring(0, 4));
  106. var mm = new Number(str.substring(4, 6)) - 1;
  107. var dd = new Number(str.substring(6, 8));
  108. var date = new Date(yy, mm, dd);
  109. //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
  110. if (yy != date.getFullYear() ||
  111. mm != date.getMonth() ||
  112. dd != date.getDate()) {
  113. return false; // 존재하지 않는 날짜
  114. }
  115. return true; // 존재하는 날짜
  116. }
  117. function trim(data){ // 문자에 대한 TRIM 작업
  118. return data.replace(/(^\s*)|(\s*$)/g, "");
  119. }
  120. ]]>
  121. </script>
  122. </xhtml:head>
  123. <xhtml:body pagewidth="885px" pageheight="580px" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  124. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:252px; height:14px; ">기준코드관리</caption>
  125. <shape id="rectangle1" appearance="roundrect" style="left:3px; top:18px; width:867px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  126. <caption id="caption11" class="search_name" visibility="hidden" style="left:444px; top:26px; width:94px; height:17px; ">코드명검색:</caption>
  127. <input id="input13" ref="/root/send/reqdata/srcd" class="input_search" visibility="hidden" style="left:546px; top:25px; width:109px; height:19px; "/>
  128. <button id="btn_sea" class="btn1_letter2" style="left:797px; top:24px; width:56px; height:22px; ">
  129. <caption>조회</caption>
  130. <script type="javascript" ev:event="DOMActivate">
  131. <![CDATA[
  132. readfunc();
  133. ]]>
  134. </script>
  135. </button>
  136. <line id="line6" style="x1:687px; y1:24px; x2:687px; y2:46px; border-color:#ffe4bb; border-left-style:solid; "/>
  137. <line id="line7" class="line_1" style="x1:3px; y1:81px; x2:868px; y2:81px; "/>
  138. <datagrid id="datagrid1" nodeset="/root/main/codeinfo/codelist" autoresize="true" caption="코드^코드명^코드상세정보^구분1^구분2^caption1" colsep="^" colwidth="101, 198, 324, 96, 105, 39" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:3px; top:85px; width:867px; height:450px; ">
  139. <col disabled="true" ref="cdid" type="input" maxlength="10" style="text-align:center; "/>
  140. <col ref="cdnm" type="input" style="text-align:left; "/>
  141. <col ref="detldesc" type="input"/>
  142. <col ref="cntlcd1" type="input"/>
  143. <col ref="cntlcd2" type="input"/>
  144. <col ref="grupcdid" visibility="hidden"/>
  145. <script type="javascript" ev:event="xforms-value-changed">
  146. <![CDATA[
  147. /*
  148. var scol = datagrid1.col;
  149. datagrid1.col = scol;
  150. datagrid1.dispatch("onentercell");
  151. datagrid1.editCell();
  152. */
  153. ]]>
  154. </script>
  155. <script type="javascript" ev:event="onaftersort">
  156. <![CDATA[
  157. datagrid1.gridToInstance();
  158. ]]>
  159. </script>
  160. </datagrid>
  161. <caption id="caption4" class="tit_2" style="left:3px; top:65px; width:113px; height:13px; ">코드별 상세정보</caption>
  162. <button id="btn_grdadd" class="btn2_letter3" style="left:759px; top:61px; width:53px; height:19px; ">
  163. <caption>행추가</caption>
  164. <script type="javascript" ev:event="DOMActivate">
  165. <![CDATA[
  166. if (model.getValue("/root/send/reqdata/grupcdid") == ""){
  167. messageBox("구분코드를 선택한 후 작업하시기 바랍니다.", "E999", "");
  168. return;
  169. }
  170. datagrid1.addRow();
  171. var irow = datagrid1.row;
  172. model.setValue("/root/main/codeinfo/codelist[" + irow + "]/grupcdid", model.getValue("/root/send/reqdata/grupcdid"));
  173. //model.setValue("/root/main/codeinfo/codelist[" + irow + "]/useyn", "Y");
  174. model.setFocus("datagrid1");
  175. datagrid1.row = irow;
  176. datagrid1.col = 1;
  177. datagrid1.dispatch("onentercell");
  178. datagrid1.editCell();
  179. datagrid1.refresh();
  180. ]]>
  181. </script>
  182. </button>
  183. <button id="btn_grddel" class="btn2_letter3" style="left:814px; top:61px; width:53px; height:19px; ">
  184. <caption>행삭제</caption>
  185. <script type="javascript" ev:event="DOMActivate">
  186. <![CDATA[
  187. datagrid1.deleteRow(datagrid1.row);
  188. ]]>
  189. </script>
  190. </button>
  191. <button id="button27" class="btn2_letter3" visibility="hidden" style="left:704px; top:61px; width:53px; height:19px; ">
  192. <caption>행복사</caption>
  193. </button>
  194. <button id="btn_save" class="btn4_letter2" style="left:816px; top:540px; width:56px; height:22px; ">
  195. <caption>저장</caption>
  196. <script type="javascript" ev:event="DOMActivate">
  197. <![CDATA[
  198. if (datacheck() == false){
  199. return;
  200. }
  201. ExecData();
  202. ]]>
  203. </script>
  204. </button>
  205. <line id="line1" class="line_3" style="x1:3px; y1:536px; x2:868px; y2:536px; "/>
  206. <caption id="caption2" class="search_name" style="left:24px; top:26px; width:63px; height:17px; ">구분:</caption>
  207. <select1 id="combo1" ref="/root/send/reqdata/grupcdid" appearance="minimal" style="left:86px; top:25px; width:339px; height:19px; ">
  208. <choices>
  209. <item>
  210. <label>급여지급일자</label>
  211. <value>M0005</value>
  212. </item>
  213. <item>
  214. <label>연말정산기준정보</label>
  215. <value>M0012</value>
  216. </item>
  217. <item>
  218. <label>연말정산공제 등록기간</label>
  219. <value>M0016</value>
  220. </item>
  221. <item>
  222. <label>직종에 대한 매핑정보</label>
  223. <value>M0101</value>
  224. </item>
  225. <item>
  226. <label>직급에 대한 매핑정보</label>
  227. <value>M0102</value>
  228. </item>
  229. <item>
  230. <label>단일기준 급여항목</label>
  231. <value>M0103</value>
  232. </item>
  233. <item>
  234. <label>급여정액항목</label>
  235. <value>M0104</value>
  236. </item>
  237. <item>
  238. <label>가족수당정액</label>
  239. <value>M0105</value>
  240. </item>
  241. </choices>
  242. <script type="javascript" ev:event="xforms-value-changed">
  243. <![CDATA[
  244. btn_grdadd.disabled = false;
  245. btn_grddel.disabled = false;
  246. btn_save.disabled = false;
  247. readfunc();
  248. ]]>
  249. </script>
  250. </select1>
  251. </xhtml:body>
  252. </xhtml:html>