SMSDT06800_사회사업수가실적.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMSDT06800.사회사업 수가실적.xrw
  4. * 설 명 : 사회사업 수가실적
  5. * 작 성 자 : 박성호
  6. * 작 성 일 : 2008.11.20
  7. * 수정이력 :
  8. * 기 타 :
  9. -->
  10. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  11. <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">
  12. <xhtml:head>
  13. <xhtml:title>사회사업 수가실적</xhtml:title>
  14. <model id="model1">
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <main>
  18. <calcinfo>
  19. <calclist>
  20. <cdnm/>
  21. <cnt3/>
  22. <psnno3/>
  23. <cnt4/>
  24. <psnno4/>
  25. <cnt5/>
  26. <psnno5/>
  27. <cnt6/>
  28. <psnno6/>
  29. <cnt7/>
  30. <psnno7/>
  31. <cnt8/>
  32. <psnno8/>
  33. <cnt9/>
  34. <psnno9/>
  35. <cnt10/>
  36. <psnno10/>
  37. <cnt11/>
  38. <psnno11/>
  39. <cnt12/>
  40. <psnno12/>
  41. <cnt1/>
  42. <psnno1/>
  43. <cnt2/>
  44. <psnno2/>
  45. <totcnt/>
  46. <totpsnno/>
  47. <bfcnt/>
  48. <bfpsnno/>
  49. <cntrate/>
  50. <psnnorate/>
  51. <befcompare/>
  52. </calclist>
  53. </calcinfo>
  54. <cond>
  55. <entryy/>
  56. </cond>
  57. </main>
  58. <send>
  59. <reqdata>
  60. </reqdata>
  61. </send>
  62. <init/>
  63. <hidden/>
  64. </root>
  65. </instance>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  72. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  73. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  74. <script type="javascript" ev:event="xforms-ready">
  75. <![CDATA[
  76. fInit();
  77. ]]>
  78. </script>
  79. <submission id="TRSDT06801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/calcinfo"/>
  80. <bind id="cntrate" ref="/root/main/calcinfo/calclist/cntrate" calculate="../totcnt - ../bfcnt"/>
  81. <bind id="psnnorate" ref="/root/main/calcinfo/calclist/psnnorate" calculate="../totpsnno - ../bfpsnno"/>
  82. </model>
  83. <script type="javascript">
  84. <![CDATA[
  85. /**========================================================================================================================================
  86. * 조회기간 그리드초기화
  87. =========================================================================================================================================*/
  88. function fInit(){
  89. model.removeNodeset("/root/main/calcinfo/calclist");
  90. var currentDate = getCurrentDate();
  91. var currentYear = currentDate.substring(0, 4);
  92. model.setValue("/root/main/cond/entryy" ,currentYear);
  93. ipt_entryy.visible = true;
  94. // 그리드초기화
  95. model.removeNodeset(grd_calclist.nodeset);
  96. model.refresh();
  97. }
  98. /**========================================================================================================================================
  99. * 조회
  100. =========================================================================================================================================*/
  101. function fGetCalcInfo(){
  102. /*
  103. var currentDate = getCurrentDate();
  104. var currentYear = currentDate.substring(0, 4);
  105. var entryy = model.getValue("/root/main/cond/entryy");
  106. model.setValue("/root/main/cond/entryy" ,currentYear);
  107. */
  108. var entryy = model.getValue("/root/main/cond/entryy");
  109. if(entryy ==""){
  110. messageBox("조회년도를","C001" );
  111. model.removeNodeset(grd_calclist.nodeset);
  112. model.refresh();
  113. return;
  114. }
  115. ipt_entryy.visible = true;
  116. model.removeNodeset("/root/send/reqdata");
  117. model.makeNode("/root/send/reqdata");
  118. model.copyNode("/root/send/reqdata", "/root/main/cond");
  119. model.refresh();
  120. submit("TRSDT06801");
  121. fStat();
  122. }
  123. /**========================================================================================================================================
  124. * 전년대비실적비교 계산
  125. =========================================================================================================================================*/
  126. function fStat() {
  127. //데이터가없을때 return
  128. if (model.instances(0).selectNodes("/root/main/calcinfo/calclist").length == 0){
  129. return;
  130. }
  131. //전년대비실적비교계산
  132. if(grd_calclist.rows - grd_calclist.fixedRows >1){
  133. var sStat = 0;
  134. var insRow = grd_calclist.rows;
  135. grd_calclist.addRow(insRow, false);
  136. grd_calclist.valueMatrix(insRow, grd_calclist.colRef("cdnm") ) = "전년대비실적비교";
  137. for(var i= grd_calclist.colRef("cnt1"); i<= grd_calclist.colRef("totpsnno"); i++){
  138. var bfResult = eval(grd_calclist.valueMatrix(insRow -1 , i));
  139. var sSum = eval(grd_calclist.valueMatrix(insRow-2, i));
  140. sStat = eval(sSum)- eval(bfResult) ;
  141. grd_calclist.valueMatrix(insRow, i ) = eval(sStat);
  142. }
  143. grd_calclist.valueMatrix(insRow-1, grd_calclist.colRef("cntrate")) = "";
  144. grd_calclist.valueMatrix(insRow, grd_calclist.colRef("cntrate")) = "";
  145. grd_calclist.valueMatrix(insRow-1, grd_calclist.colRef("psnnorate")) = "";
  146. grd_calclist.valueMatrix(insRow, grd_calclist.colRef("psnnorate")) = "";
  147. }
  148. }
  149. /**========================================================================================================================================
  150. * 엑셀저장 버튼 클릭시
  151. =========================================================================================================================================*/
  152. function fExcel() {
  153. if (grd_calclist.rows <= 1) {
  154. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  155. return;
  156. }
  157. var fileName = window.fileDialog("save", ",", false, "사회사업 수가실적실적", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  158. if (fileName != ""){
  159. grd_calclist.saveExcel(fileName, "SheetName", false, false, "", "", false);
  160. }
  161. }
  162. ]]>
  163. </script>
  164. </xhtml:head>
  165. <xhtml:body guideline="1,1195;1,1191;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  166. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  167. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:264px; height:14px; ">사회사업 수가실적</caption>
  168. </group>
  169. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  170. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  171. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  172. <caption>초기화</caption>
  173. <script type="javascript" ev:event="DOMActivate">
  174. <![CDATA[
  175. fInit();
  176. ]]>
  177. </script>
  178. </button>
  179. </group>
  180. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:737px; ">
  181. <caption id="caption21" class="tit_2" style="left:0px; top:55px; width:266px; height:14px; ">사회사업 수가실적</caption>
  182. <line id="line1" class="line_1" style="x1:0px; y1:73px; x2:1190px; y2:72px; "/>
  183. <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  184. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  185. <button id="button2" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  186. <caption>조회</caption>
  187. <script type="javascript" ev:event="DOMActivate">
  188. <![CDATA[
  189. fGetCalcInfo();
  190. ]]>
  191. </script>
  192. </button>
  193. <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  194. <caption id="caption1" class="search_name" style="left:25px; top:10px; width:100px; height:17px; ">사업년도 :</caption>
  195. <input id="ipt_entryy" ref="/root/main/cond/entryy" class="input_search" inputtype="date" format="yyyy" style="left:120px; top:10px; width:58px; height:19px; "/>
  196. </group>
  197. <button id="btn_excel" class="btn2_letter4" style="left:1126px; top:50px; width:64px; height:19px; ">
  198. <caption>엑셀저장</caption>
  199. <script type="javascript" ev:event="DOMActivate">
  200. <![CDATA[
  201. fExcel();
  202. ]]>
  203. </script>
  204. </button>
  205. <datagrid id="grd_calclist" nodeset="/root/main/calcinfo/calclist" class="datagrid2" autoresize="true" caption="구분^1월^1월^2월^2월^3월^3월^4월^4월^5월^5월^6월^6월^7월^7월^8월^8월^9월^9월^10월^10월^11월^11월^12월^12월^합계^합계^ 전기간실적^ 전기간실적^전기간대비실적비교^전기간대비실적비교^장소^장소^장소^장소명^장소^담당자|구분^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^장소^장소^장소^장소명^장소^담당자|구분^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^건수^금액^장소^장소^장소^장소명^장소^담당자" colsep="^" colwidth="190, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 60, 60, 80, 80, 80, 80" dataheight="25" fixedcols="1" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:75px; width:1190px; height:659px; ">
  206. <col ref="cdnm" style="text-align:left; "/>
  207. <col ref="cnt1" style="text-align:center; "/>
  208. <col ref="psnno1" format="(-)#,###" style="text-align:center; "/>
  209. <col ref="cnt2" style="text-align:center; "/>
  210. <col ref="psnno2" format="(-)#,###" style="text-align:center; "/>
  211. <col ref="cnt3" style="text-align:center; "/>
  212. <col ref="psnno3" format="(-)#,###" style="text-align:center; "/>
  213. <col ref="cnt4" style="text-align:center; "/>
  214. <col ref="psnno4" format="(-)#,###" style="text-align:center; "/>
  215. <col ref="cnt5" style="text-align:center; "/>
  216. <col ref="psnno5" format="(-)#,###" style="text-align:center; "/>
  217. <col ref="cnt6" style="text-align:center; "/>
  218. <col ref="psnno6" format="(-)#,###" style="text-align:center; "/>
  219. <col ref="cnt7" style="text-align:center; "/>
  220. <col ref="psnno7" format="(-)#,###" style="text-align:center; "/>
  221. <col ref="cnt8" style="text-align:center; "/>
  222. <col ref="psnno8" format="(-)#,###" style="text-align:center; "/>
  223. <col ref="cnt9" style="text-align:center; "/>
  224. <col ref="psnno9" format="(-)#,###" style="text-align:center; "/>
  225. <col ref="cnt10" style="text-align:center; "/>
  226. <col ref="psnno10" format="(-)#,###" style="text-align:center; "/>
  227. <col ref="cnt11" style="text-align:center; "/>
  228. <col ref="psnno11" format="(-)#,###" style="text-align:center; "/>
  229. <col ref="cnt12" style="text-align:center; "/>
  230. <col ref="psnno12" format="(-)#,###" style="text-align:center; "/>
  231. <col ref="totcnt" style="text-align:center; "/>
  232. <col ref="totpsnno" format="(-)#,###" style="text-align:center; "/>
  233. <col ref="bfcnt" style="text-align:center; "/>
  234. <col ref="bfpsnno" format="(-)#,###" style="text-align:center; "/>
  235. <col ref="cntrate" style="text-align:center; "/>
  236. <col ref="psnnorate" format="(-)#,###" style="text-align:center; "/>
  237. </datagrid>
  238. </group>
  239. </xhtml:body>
  240. </xhtml:html>