SMAAA03700_자원봉사자연령별통계.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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. <search>
  11. <fromdd/>
  12. <actdeptcd/>
  13. </search>
  14. <voluntractage>
  15. <voluntractageinfo>
  16. <actdeptcd/>
  17. <voluntractdwcd/>
  18. <voluntractteamcd/>
  19. <twenty/>
  20. <thirty/>
  21. <forty/>
  22. <fifty/>
  23. <sixty/>
  24. <etc/>
  25. <total/>
  26. </voluntractageinfo>
  27. </voluntractage>
  28. </main>
  29. <init>
  30. <vacatflagcd>
  31. </vacatflagcd>
  32. <actdeptcd/>
  33. <voluntractteamcd/>
  34. </init>
  35. <send>
  36. <reqdata/>
  37. </send>
  38. <hidden>
  39. <init>
  40. <comcd/>
  41. </init>
  42. </hidden>
  43. </root>
  44. </instance>
  45. <script type="javascript" ev:event="xforms-ready">
  46. <![CDATA[
  47. //grd_studvoluntrlist.fixedcellcheckbox(0,1) = "true";
  48. fInit();
  49. ]]>
  50. </script>
  51. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  52. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
  53. <submission id="TRZBP00102" mediatype="application/x-www-form-urlencoded" method="post"/>
  54. <submission id="TRAAA03701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/voluntractage"/>
  55. </model>
  56. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  61. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  62. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  63. </xhtml:head>
  64. <script type="javascript">
  65. <![CDATA[
  66. //초기화
  67. function fInit() {
  68. zbcfGetCodeList(new Array("A0503","A0359","A0360"),new Array("/root/hidden/init/comcd","/root/hidden/init/comcd","/root/hidden/init/comcd"));
  69. var CurrentDate=getCurrentDate();
  70. model.makeValue("/root/main/search/fromdd",CurrentDate);
  71. addComboItem("cmb_actdeptcd","","","above");
  72. model.removeNodeset("/root/main/voluntractage");
  73. model.refresh();
  74. }
  75. //통계조회
  76. function fVoluntrStatReq()
  77. {
  78. model.removeNodeset("/root/send/reqdata");
  79. model.makeNode("/root/send/reqdata");
  80. var actdeptcd=model.getValue("/root/main/search/actdeptcd");
  81. var fromdd=model.getValue("/root/main/search/fromdd");
  82. var todd=model.getValue("/root/main/search/todd");
  83. if(isNull(actdeptcd))
  84. {
  85. model.makeValue("/root/send/reqdata/actdeptcd","%");
  86. }
  87. else
  88. {
  89. model.makeValue("/root/send/reqdata/actdeptcd",actdeptcd);
  90. }
  91. if(isNull(fromdd))
  92. {
  93. messageBox("조회일자는","I003");
  94. return;
  95. }
  96. else
  97. {
  98. model.makeValue("/root/send/reqdata/fromdd",fromdd);
  99. }
  100. //model.copyNode("/root/send/reqdata","/root/main/search");
  101. submit("TRAAA03701");
  102. var i=grd_voluntractageinfo.rows-grd_voluntractageinfo.fixedRows;
  103. if(i!='0')
  104. {
  105. // 마지막 행의 숫자 값을 변수에 담는다.
  106. var total=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/total");
  107. var twenty=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/twenty");
  108. var thirty=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/thirty");
  109. var forty=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/forty");
  110. var fifty=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/fifty");
  111. var sixty=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/sixty");
  112. var etc=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/etc");
  113. //grd_voluntractageinfo.addRow(); //행추가
  114. var twentyper=twenty/total*100;
  115. var thirtyper=thirty/total*100;
  116. var fortyper=forty/total*100;
  117. var fiftyper=fifty/total*100;
  118. var sixtyper=sixty/total*100;
  119. var etcper=etc/total*100;
  120. var totalper=total/total*100;
  121. //grd_voluntractageinfo.addItem();
  122. //grd_voluntractageinfo.addRow();
  123. var j=i+1;
  124. // 백분율 데이터 마지막에 추가 함
  125. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/actdeptcd","백분율(%)");
  126. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/voluntractdwcd","백분율(%)");
  127. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/twenty",twentyper);
  128. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/thirty",thirtyper);
  129. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/forty",fortyper);
  130. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/fifty",fiftyper);
  131. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/sixty",sixtyper);
  132. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/etc",etcper);
  133. model.makeValue("/root/main/voluntractage/voluntractageinfo"+"["+j+"]/total",totalper);
  134. }
  135. else
  136. {
  137. return;
  138. }
  139. model.refresh();
  140. var idxRows=grd_voluntractageinfo.rows;
  141. if(idxRows!='0')
  142. {
  143. for(i=1;i<=idxRows;i++)
  144. {
  145. //grd_voluntractteaminfo.cellStyle("background-color",3,2, 3, 5) = "#ccffcc";
  146. var actdeptcd=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/actdeptcd");
  147. var voluntractdwcd=model.getValue("/root/main/voluntractage/voluntractageinfo"+"["+i+"]/voluntractdwcd");
  148. if(voluntractdwcd=="소계")
  149. {
  150. grd_voluntractageinfo.cellStyle("background-color",i+1,2, i+1, 9) = "#ccffcc";
  151. }
  152. else if(actdeptcd=="합계")
  153. {
  154. grd_voluntractageinfo.cellStyle("background-color",i+1,1, i+1, 9) = "#ccffff";
  155. }
  156. else if(actdeptcd=="백분율(%)")
  157. {
  158. grd_voluntractageinfo.cellStyle("background-color",i+1,1, i+1, 9) = "#fccccc";
  159. }
  160. else
  161. {
  162. grd_voluntractageinfo.cellStyle("background-color",i+1,0, i+1, 9) = "#ffffff";
  163. }
  164. }
  165. }
  166. model.refresh();
  167. }
  168. // 초기화 함수
  169. function fResetVoluntrAgeStat()
  170. {
  171. var btn=messageBox("초기화를","Q004");
  172. if(btn=="6")
  173. {
  174. model.removeNodeset("/root/main/voluntractage");
  175. }
  176. else
  177. {
  178. return;
  179. }
  180. model.refresh();
  181. }
  182. //엑셀저장 버튼 클릭시
  183. function fExcelVoluntrAgeStat()
  184. {
  185. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  186. if (fileName != "")
  187. {
  188. grd_voluntractageinfo.saveExcel(fileName, "SheetName", false, false, "", "", false);
  189. }
  190. }
  191. ]]>
  192. </script>
  193. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  194. <group id="group1" style="left:0px; top:0px; width:815px; height:13px; ">
  195. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:207px; height:14px; ">자원봉사자통계</caption>
  196. </group>
  197. <group id="group3" scroll="auto" style="left:0px; top:13px; width:825px; height:744px; ">
  198. <group id="grp_sea" style="left:0px; top:10px; width:820px; height:35px; vertical-align:top; ">
  199. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:820px; height:35px; "/>
  200. <button id="button1" class="btn1_letter2" style="left:753px; top:7px; width:56px; height:22px; ">
  201. <caption>조회</caption>
  202. <script type="javascript" ev:event="DOMActivate">
  203. <![CDATA[
  204. fVoluntrStatReq();
  205. ]]>
  206. </script>
  207. </button>
  208. <line id="line13" class="line_4" style="x1:742px; y1:7px; x2:742px; y2:29px; "/>
  209. <caption id="caption3" class="search_name" style="left:20px; top:10px; width:94px; height:17px; ">조회일자 :</caption>
  210. <input id="ipt_year" ref="/root/main/search/fromdd" class="input_default" inputtype="date" format="yyyy-mm-dd" appearance="minimal" style="left:114px; top:9px; width:86px; height:19px; "/>
  211. <caption id="caption2" class="search_name" style="left:325px; top:10px; width:94px; height:17px; ">활동그룹 :</caption>
  212. <select1 id="cmb_actdeptcd" ref="/root/main/search/actdeptcd" appearance="minimal" style="left:420px; top:10px; width:100px; height:19px; ">
  213. <choices>
  214. <itemset nodeset="/root/hidden/init/comcd/A0503">
  215. <label ref="cdnm"/>
  216. <value ref="cdid"/>
  217. </itemset>
  218. </choices>
  219. <script type="javascript" ev:event="xforms-value-changed">
  220. <![CDATA[
  221. fVoluntrStatReq();
  222. ]]>
  223. </script>
  224. </select1>
  225. </group>
  226. <button id="button3" class="btn2_letter4" disable.background-image="../../../com/commonweb/images/dis_btn2_letter4.gif" style="left:748px; top:51px; width:64px; height:19px; background-image:../../../com/commonweb/images/btn2_letter4.gif; ">
  227. <caption>엑셀저장</caption>
  228. <script type="javascript" ev:event="DOMActivate">
  229. <![CDATA[
  230. fExcelVoluntrAgeStat();
  231. ]]>
  232. </script>
  233. </button>
  234. <switch id="swt_studstats" style="left:0px; top:77px; width:820px; height:663px; border-style:solid; ">
  235. <case id="case_sch" selected="true">
  236. <datagrid id="grd_voluntractageinfo" nodeset="/root/main/voluntractage/voluntractageinfo" caption="활동그룹^활동요일/시간대^20대^30대^40대^50대^60대^기타^합계^합계|활동그룹^활동요일/시간대^20대^30대^40대^50대^60대^기타^합계^합계" colsep="^" colwidth="130, 104, 80, 80, 80, 85, 79, 80, 79" dataheight="25" extendlastcol="scroll" frozencols="7" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:0px; width:815px; height:660px; ">
  237. <col ref="actdeptcd" style="text-align:center; "/>
  238. <col ref="voluntractdwcd" style="text-align:center; "/>
  239. <col ref="twenty" format="#.99" style="text-align:center; "/>
  240. <col ref="thirty" format="#.99" style="text-align:center; "/>
  241. <col ref="forty" format="#.99" style="text-align:center; "/>
  242. <col ref="fifty" format="#.99" style="text-align:center; "/>
  243. <col ref="sixty" format="#.99" style="text-align:center; "/>
  244. <col ref="etc" format="#.99" style="text-align:center; "/>
  245. <col ref="total" format="#.99" style="text-align:center; "/>
  246. </datagrid>
  247. </case>
  248. </switch>
  249. </group>
  250. <group id="group5" scroll="auto" style="left:0px; top:757px; width:820px; height:27px; ">
  251. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:820px; y2:0px; "/>
  252. </group>
  253. <caption id="caption1" class="tit_2" style="left:5px; top:71px; width:309px; height:14px; ">자원봉사자 연령별 통계</caption>
  254. <line id="line1" class="line_1" style="x1:0px; y1:86px; x2:820px; y2:86px; "/>
  255. <button id="button10" class="btn4_letter3" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:743px; top:760px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  256. <caption>초기화</caption>
  257. <script type="javascript" ev:event="DOMActivate">
  258. <![CDATA[
  259. fResetVoluntrAgeStat();
  260. ]]>
  261. </script>
  262. </button>
  263. </xhtml:body>
  264. </xhtml:html>