SMAYA02200_결산관리.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. <cond>
  11. <entryy/>
  12. <fromdd/>
  13. <todd/>
  14. </cond>
  15. <itemexpendmmexpslist>
  16. <itemexpendmmexpslistinfo>
  17. <itemexpend/>
  18. <bugt/>
  19. <mmexps/>
  20. <expstot/>
  21. <bal/>
  22. </itemexpendmmexpslistinfo>
  23. </itemexpendmmexpslist>
  24. </main>
  25. <send/>
  26. <init>
  27. <settlemm/>
  28. </init>
  29. </root>
  30. </instance>
  31. <script type="javascript" ev:event="xforms-ready">
  32. <![CDATA[
  33. fInit();
  34. function fInit(){
  35. //현재시스템 년도에서 월-2 한 값으로 세팅
  36. var prestyear = getCurrentDate().toDate().getAddDate(-2, "M").getDateFormat();
  37. var prestyy = parseInt(prestyear.substr(0, 4));
  38. var prestmm = parseInt(prestyear.substr(4, 2));
  39. //비교할 년도
  40. var varyear = getCurrentDate().toDate().getAddDate(1, "Y").getDateFormat();
  41. var varyy = parseInt(varyear.substr(0, 4));
  42. if(prestyy < varyy){
  43. if(prestmm >= 2){
  44. var fentryy = prestyy.toString();
  45. model.setValue("/root/main/cond/entryy", fentryy);
  46. model.refresh();
  47. }else if(prestmm <= 3){
  48. var ventryy = getCurrentDate().substr(0, 4);
  49. model.setValue("/root/main/cond/entryy", ventryy);
  50. model.refresh();
  51. }
  52. }//if END
  53. //화면 오픈시 조회기간 세팅(월의 첫날짜와 마지막 날짜)
  54. var sDate = getNewDate();
  55. var CurrentDate = getCurrentDate();
  56. var lastDate = sDate.getFullYear();
  57. lastDate = lastDate.toString() + (( sDate.getMonth() + 1 > 9 ) ? sDate.getMonth() + 1 : "0" + (sDate.getMonth() + 1));
  58. lastDate = lastDate.toString() + sDate.getMonthDay();
  59. model.setValue("/root/main/cond/fromdd", CurrentDate.substr(0,6)+"01");
  60. model.setValue("/root/main/cond/todd", lastDate);
  61. var edate = model.getValue("/root/main/cond/todd");
  62. var todd = edate.substr(4, 2);
  63. if(edate != ""){
  64. if(todd == "10" || todd == "11" || todd == "12"){
  65. model.setValue("/root/init/settlemm", todd);
  66. }else{
  67. todd = edate.substr(5, 1);
  68. model.setValue("/root/init/settlemm", todd);
  69. }
  70. }
  71. model.refresh();
  72. }//fInit END
  73. ]]>
  74. </script>
  75. <submission id="TRAYA02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/itemexpendmmexpslist"/>
  76. <bind id="bind1" ref="/root/main/itemexpendmmexpslist/itemexpendmmexpslistinfo/bal" calculate="../bugt - ../expstot"/>
  77. </model>
  78. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  79. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  80. </xhtml:head>
  81. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  82. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  83. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:98px; height:14px; ">결산관리</caption>
  84. </group>
  85. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  86. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  87. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:775px; height:35px; "/>
  88. <line id="line13" class="line_4" style="x1:685px; y1:7px; x2:685px; y2:29px; "/>
  89. <button id="button4" class="btn1_letter2" style="left:700px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  90. <caption>조회</caption>
  91. <script type="javascript" ev:event="onclick">
  92. <![CDATA[
  93. fDateCheck();
  94. function fDateCheck(){
  95. var fromdd = model.getValue("/root/main/cond/fromdd");
  96. var todd = model.getValue("/root/main/cond/todd");
  97. //사업년도 유효시작일 세팅(당해년도 3월 1일)
  98. var nowYear = model.getValue("/root/main/cond/entryy") + "0301";
  99. var lastDay = "28";
  100. //다음해가 윤년인지 아닌지를 확인하기 위해 가져온 년도
  101. // var fuYear = getCurrentDate().toDate().getAddDate(1, "Y").getDateFormat().substr(0, 4);
  102. var fuYear = parseInt(model.getValue("/root/main/cond/entryy"));
  103. var fYear = fuYear + 1;
  104. //윤년계산
  105. if( (0 == (fYear % 4) && 0 != (fYear %100)) || 0 == fYear % 400 ){
  106. lastDay = "29";
  107. }else{
  108. lastDay = "28"
  109. }
  110. //사업년도 유효종료일 세팅(차년도 2월말)
  111. var afterYear = fYear.toString() + "02" + lastDay;
  112. if((nowYear > fromdd) || (todd > afterYear)){
  113. messageBox("입력한 사업년도내 기간 이외에는 입력할 수", "I004");
  114. model.setFocus("ipt_fromdd");
  115. return;
  116. }else{
  117. submit("TRAYA02201");
  118. }
  119. grd_itemexpendlist.subtotal("sum", -1, 1, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#e1ffff;", 0, "합계", true);
  120. grd_itemexpendlist.subtotal("sum", -1, 2, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#e1ffff;", 0, "합계", true);
  121. grd_itemexpendlist.subtotal("sum", -1, 3, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#e1ffff;", 0, "합계", true);
  122. grd_itemexpendlist.subtotal("sum", -1, 4, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#e1ffff;", 0, "합계", true);
  123. }//fDateCheck END
  124. ]]>
  125. </script>
  126. </button>
  127. <caption id="caption10" class="search_name" style="left:25px; top:10px; width:91px; height:17px; ">사업년도 :</caption>
  128. <caption id="caption12" class="search_name" style="left:310px; top:10px; width:91px; height:17px; ">결산기간 :</caption>
  129. <caption id="caption5" class="search_no_b" style="left:505px; top:9px; width:12px; height:17px; ">~</caption>
  130. <input id="ipt_todd" ref="/root/main/cond/todd" class="input_search" navindex="2" inputtype="date" style="left:525px; top:9px; width:95px; height:19px; ">
  131. <script type="javascript" ev:event="xforms-value-changed">
  132. <![CDATA[
  133. fLastDate();
  134. function fLastDate(){
  135. //종료일자 변경선택시 결산월 변경 출력
  136. var edate = model.getValue("/root/main/cond/todd");
  137. var todd = edate.substr(4, 2);
  138. if(edate != ""){
  139. if(todd == "10" || todd == "11" || todd == "12"){
  140. model.setValue("/root/init/settlemm", todd);
  141. }else{
  142. todd = edate.substr(5, 1);
  143. model.setValue("/root/init/settlemm", todd);
  144. }
  145. model.refresh();
  146. }
  147. }//fLastDate END
  148. ]]>
  149. </script>
  150. </input>
  151. <input id="ipt_entryy" ref="/root/main/cond/entryy" class="input_s_essential" maxlength="4" style="left:125px; top:9px; width:100px; height:19px; "/>
  152. <input id="ipt_fromdd" ref="/root/main/cond/fromdd" class="input_search" navindex="1" inputtype="date" style="left:405px; top:9px; width:95px; height:19px; ">
  153. <script type="javascript" ev:event="xforms-value-changed">
  154. <![CDATA[
  155. fDateSet();
  156. function fDateSet(){
  157. //시작일자 입력시 종료일자를 시작일자로 자동표시
  158. var sdate = model.getValue("/root/main/cond/fromdd");
  159. if(sdate != ""){
  160. //조회기간 설정시 선택한 시작기간에 속한 달의 마지막날로 세팅
  161. var eDate = sdate.toDate();
  162. var lastDate = sdate.toDate().getDateFormat().substr(0, 4);
  163. lastDate = lastDate.toString() + (( eDate.getMonth() + 1 > 9 ) ? eDate.getMonth() + 1 : "0" + (eDate.getMonth() + 1));
  164. lastDate = lastDate.toString() + eDate.getMonthDay();
  165. model.setValue("/root/main/cond/todd", lastDate);
  166. //시작일자에 의해 종료일자 세팅될시 결산월 출력
  167. var edate = model.getValue("/root/main/cond/todd");
  168. var todd = edate.substr(4, 2);
  169. if(edate != ""){
  170. if(todd == "10" || todd == "11" || todd == "12"){
  171. model.setValue("/root/init/settlemm", todd);
  172. }else{
  173. todd = edate.substr(5, 1);
  174. model.setValue("/root/init/settlemm", todd);
  175. }
  176. }
  177. model.refresh();
  178. }
  179. model.setFocus("ipt_todd");
  180. }//fDateSet END
  181. ]]>
  182. </script>
  183. </input>
  184. </group>
  185. <button id="button100" class="btn6_letter9" disable.background-image="../../../com/commonweb/images/dis_btn6_letter9.gif" style="left:635px; top:53px; width:140px; height:22px; background-image:../../../com/commonweb/images/btn6_letter9.gif; ">
  186. <caption>비목별 월지출내역서</caption>
  187. <script type="javascript" ev:event="onclick">
  188. <![CDATA[
  189. fPreview();
  190. function fPreview(){
  191. exeReportPreview("RPAYA02201", "XMLSTR");
  192. }//fPreview END
  193. ]]>
  194. </script>
  195. </button>
  196. <caption id="caption26" class="hand" style="left:460px; top:57px; width:75px; height:17px; vertical-align:middle; ">결산월 :</caption>
  197. <output id="opt_settlemm" ref="/root/init/settlemm" class="output_fix" style="left:540px; top:55px; width:55px; height:19px; text-align:center; "/>
  198. <caption id="caption2" class="hand" style="left:460px; top:57px; width:75px; height:17px; vertical-align:middle; ">결산월 :</caption>
  199. <caption id="caption3" style="left:600px; top:55px; width:25px; height:20px; ">월</caption>
  200. </group>
  201. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  202. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  203. </group>
  204. <caption id="caption1" class="tit_2" style="left:5px; top:76px; width:126px; height:13px; ">비목별 월지출내역</caption>
  205. <line id="line1" class="line_1" style="x1:0px; y1:92px; x2:775px; y2:92px; "/>
  206. <datagrid id="grd_itemexpendlist" nodeset="/root/main/itemexpendmmexpslist/itemexpendmmexpslistinfo" caption="비목^예산^월지출액^지출누계^잔액" colsep="^" colwidth="169, 148, 146, 146, 166" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" subtotalposition="below" style="left:0px; top:97px; width:775px; height:635px; ">
  207. <col ref="itemexpend" style="text-align:center; "/>
  208. <col ref="bugt" format="(-)#,###" style="text-align:right; "/>
  209. <col ref="mmexps" format="(-)#,###" style="text-align:right; "/>
  210. <col ref="expstot" format="(-)#,###" style="text-align:right; "/>
  211. <col ref="bal" format="(-)#,###" style="text-align:right; "/>
  212. </datagrid>
  213. </xhtml:body>
  214. </xhtml:html>