SMAAA03400_교직원봉사자통계.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  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. <cond>
  11. <flag/>
  12. <from/>
  13. <to/>
  14. <hosinhosoutflag/>
  15. <empactflag/>
  16. </cond>
  17. <empvoluntr>
  18. <empvoluntrlist>
  19. <flag/>
  20. <psn/>
  21. <servcnt/>
  22. <servtm/>
  23. <percent/>
  24. <unitinstcd/>
  25. <unitinstnm/>
  26. <unitcd/>
  27. <unitdeptnm/>
  28. <dutplcedeptcd/>
  29. <dutplcedeptnm/>
  30. <emplno/>
  31. <actdeptnm/>
  32. <emplnm/>
  33. </empvoluntrlist>
  34. </empvoluntr>
  35. </main>
  36. <init>
  37. <hosinhosoutflag/>
  38. <empactflag/>
  39. </init>
  40. <send>
  41. <reqdata/>
  42. </send>
  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="TRAAA03401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/empvoluntr"/>
  53. </model>
  54. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  56. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  59. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  60. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  61. </xhtml:head>
  62. <script type="javascript">
  63. <![CDATA[
  64. /**========================================================================================================================================
  65. * 초기화
  66. =========================================================================================================================================*/
  67. function fInit() {
  68. model.removeNodeset("/root/main/empvoluntr");
  69. var currentDate = getCurrentDate();
  70. model.setValue("/root/main/cond/from" ,currentDate.substr(0, 6));
  71. model.setValue("/root/main/cond/to" ,currentDate.substr(0, 6));
  72. cap_fromdd.visible = false;
  73. cmb_hosinhosoutflag.visible = false;
  74. cmb_empactflag.visible = false;
  75. addComboItem("cmb_hosinhosoutflag","전체","%","above");
  76. addComboItem("cmb_empactflag","전체","%","above");
  77. model.setValue("/root/main/cond/flag", "1");
  78. model.setValue("/root/main/cond/hosinhosoutflag","%");
  79. model.setValue("/root/main/cond/empactflag","%");
  80. zbcfGetCodeList(new Array("A0509", "A0508"),new Array("/root/init/hosinhosoutflag", "/root/init/empactflag"),true);
  81. //추가-20090624-kys
  82. rdo_emp.dispatch("xforms-value-changed");
  83. model.refresh();
  84. }
  85. /**========================================================================================================================================
  86. * 엑셀저장 버튼 클릭시
  87. =========================================================================================================================================*/
  88. function fExcel() {
  89. if (grd_emp.rows <= 1) {
  90. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  91. return;
  92. }
  93. if(model.getValue("/root/main/cond/flag") =='1')
  94. {
  95. var fileName = window.fileDialog("save", ",", false, "교직원자원봉사자부서별통계", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  96. }
  97. else if(model.getValue("/root/main/cond/flag") =='2')
  98. {
  99. var fileName = window.fileDialog("save", ",", false, "교직원자원봉사자봉사처별통계", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  100. }
  101. else if(model.getValue("/root/main/cond/flag") =='3')
  102. {
  103. var fileName = window.fileDialog("save", ",", false, "교직원자원봉사자개인별통계", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  104. }
  105. if (fileName != ""){
  106. grd_emp.saveExcel(fileName, "SheetName", false, false, "", "", false);
  107. }
  108. }//fExcel END
  109. /**========================================================================================================================================
  110. * 조회버튼클릭시
  111. =========================================================================================================================================*/
  112. function fempVoluntr() {
  113. var from = model.getValue("/root/main/cond/from") + "01";
  114. var to = model.getValue("/root/main/cond/to") + "01";
  115. var dateintval=getDateInterval(from,to);
  116. //alert(dateintval);
  117. if(dateintval>365)
  118. {
  119. messageBox("조회기간은 최대1년까지 할 수 있습니다.","I");
  120. return;
  121. }
  122. if (model.getValue("/root/main/cond/from") > model.getValue("/root/main/cond/to")) {
  123. messageBox("올바른 조회기간을","C001");
  124. model.setFocus("ipt_from");
  125. return false;
  126. }
  127. if (model.getValue("/root/main/cond/from") == "" ) {
  128. messageBox("시작월는 ","I003");
  129. model.setFocus("ipt_from");
  130. return false;
  131. }
  132. if (model.getValue("/root/main/cond/from").length != 6 ) {
  133. messageBox("올바른 시작월를","C001");
  134. model.setFocus("ipt_from");
  135. return false;
  136. }
  137. if (model.getValue("/root/main/cond/to") == "" ) {
  138. messageBox("종료월는 ","I003");
  139. model.setFocus("ipt_to");
  140. return false;
  141. }
  142. if (model.getValue("/root/main/cond/to").length != 6 ) {
  143. messageBox("올바른 종료월를","C001");
  144. model.setFocus("ipt_to");
  145. return false;
  146. }
  147. model.removeNodeset("/root/main/empvoluntr");
  148. model.removenode("/root/send");
  149. model.makeNode("/root/send/reqdata");
  150. model.copyNode("/root/send/reqdata", "/root/main/cond");
  151. model.makeValue("/root/send/reqdata/from",model.getValue("/root/main/cond/from")+"01");
  152. model.makeValue("/root/send/reqdata/to",model.getValue("/root/main/cond/to")+"31");
  153. submit("TRAAA03401");
  154. if(model.getValue("/root/main/cond/flag")=='1' || model.getValue("/root/main/cond/flag")=='2') //부서별/봉사처별일때
  155. {
  156. //if(model.getValue("/root/main/empvoluntr/empvoluntrlist/flag") !='') //조회된 결과가 있을때
  157. //alert("getNodesetCount(/root/main/empvoluntr/empvoluntrlist) : " + getNodesetCount("/root/main/empvoluntr/empvoluntrlist"));
  158. if(getNodesetCount("/root/main/empvoluntr/empvoluntrlist") > 0) //변경-kys-20090624
  159. {
  160. var empRows = grd_emp.rows ;
  161. grd_emp.addRow(empRows, false);
  162. if(model.getValue("/root/main/cond/flag")=='1'){
  163. grd_emp.valueMatrix(empRows, grd_emp.colRef("unitinstnm")) = "합계";
  164. }else if(model.getValue("/root/main/cond/flag")=='2'){
  165. grd_emp.valueMatrix(empRows, grd_emp.colRef("actdeptnm")) = "합계";
  166. }
  167. //합계Row
  168. var sPsn = 0 ; //실인원 count
  169. var sServcnt =0; //봉사횟수 count
  170. var sServtm =0; //봉사시간 count
  171. for(i=1;i<empRows;i++)
  172. {
  173. sPsn = sPsn + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/psn"));
  174. sServcnt = sServcnt + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servcnt"));
  175. sServtm = sServtm + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servtm"));
  176. }
  177. grd_emp.valueMatrix(empRows, grd_emp.colRef("psn")) = sPsn;
  178. grd_emp.valueMatrix(empRows, grd_emp.colRef("servcnt")) = sServcnt;
  179. grd_emp.valueMatrix(empRows, grd_emp.colRef("servtm")) = sServtm;
  180. //백분율Col[참여인원]
  181. for(i=1;i<empRows+1;i++)
  182. {
  183. percent = model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/psn")/sPsn *100 ; //백분율
  184. percent = Math.round(percent*10) /10;
  185. grd_emp.valueMatrix(i, grd_emp.colRef("percent")) = percent+"%";
  186. }
  187. }
  188. }
  189. else if(model.getValue("/root/main/cond/flag")=='3') //개인별일때
  190. {
  191. //if(model.getValue("/root/main/empvoluntr/empvoluntrlist/flag") != '') //조회결과가 있을때
  192. //alert("getNodesetCount(/root/main/empvoluntr/empvoluntrlist) : " + getNodesetCount("/root/main/empvoluntr/empvoluntrlist"));
  193. if(getNodesetCount("/root/main/empvoluntr/empvoluntrlist") > 0) //변경-kys-20090624
  194. {
  195. var empRows = grd_emp.rows;
  196. grd_emp.addRow(empRows, false);
  197. grd_emp.valueMatrix(empRows, grd_emp.colRef("unitinstnm")) = "합계";
  198. //합계Row
  199. var sServcnt = 0; //봉사횟수count
  200. var sServtm = 0; //봉사시간count
  201. for(i=1;i<empRows;i++)
  202. {
  203. sServcnt = sServcnt + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servcnt"));
  204. sServtm = sServtm + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servtm"));
  205. }
  206. grd_emp.valueMatrix(empRows, grd_emp.colRef("servcnt")) = sServcnt;
  207. grd_emp.valueMatrix(empRows, grd_emp.colRef("servtm")) = sServtm;
  208. //백분율Col[봉사시간]
  209. for(i=1;i<empRows+1;i++)
  210. {
  211. percent = model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servcnt")/sServcnt*100;
  212. percent = Math.round(percent*10)/10;
  213. grd_emp.valueMatrix(i, grd_emp.colRef("percent")) = percent +"%";
  214. }
  215. }
  216. }
  217. model.refresh();
  218. }
  219. /**========================================================================================================================================
  220. * 초기화버튼클릭시
  221. =========================================================================================================================================*/
  222. function fReset(){
  223. var btn = messageBox("초기화를 ", "Q004");
  224. if (btn == '6') {
  225. model.removeNodeset("/root/main/empvoluntr");
  226. model.resetInstanceNode("/root/main/cond");
  227. var currentDate = getCurrentDate();
  228. model.setValue("/root/main/cond/from" ,currentDate.substr(0, 6));
  229. model.setValue("/root/main/cond/to" ,currentDate.substr(0, 6));
  230. cap_fromdd.visible = false;
  231. cmb_hosinhosoutflag.visible = false;
  232. cmb_empactflag.visible = false;
  233. model.setValue("/root/main/cond/flag", "1");
  234. model.setValue("/root/main/cond/hosinhosoutflag","%");
  235. model.setValue("/root/main/cond/empactflag","%");
  236. model.refresh();
  237. } else if (btn == '7') {
  238. return;
  239. }
  240. }//fReset END
  241. ]]>
  242. </script>
  243. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  244. <group id="group1" style="left:0px; top:0px; width:815px; height:13px; ">
  245. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:299px; height:14px; ">교직원자원봉사자 부서별/봉사처별/개인별 통계</caption>
  246. </group>
  247. <group id="group3" scroll="auto" style="left:0px; top:13px; width:825px; height:744px; ">
  248. <group id="grp_sea" style="left:0px; top:10px; width:820px; height:35px; vertical-align:top; ">
  249. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:820px; height:35px; "/>
  250. <button id="button1" class="btn1_letter2" navindex="6" style="left:753px; top:7px; width:56px; height:22px; ">
  251. <caption>조회</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. fempVoluntr();
  255. ]]>
  256. </script>
  257. </button>
  258. <line id="line13" class="line_4" style="x1:742px; y1:7px; x2:742px; y2:29px; "/>
  259. <caption id="cap1" style="left:275px; top:11px; width:25px; height:20px; text-align:center; ">~</caption>
  260. <select1 id="cmb_hosinhosoutflag" ref="/root/main/cond/hosinhosoutflag" navindex="4" appearance="minimal" style="left:515px; top:11px; width:70px; height:19px; ">
  261. <choices>
  262. <itemset nodeset="/root/init/hosinhosoutflag/A0509">
  263. <label ref="cdnm"/>
  264. <value ref="cdid"/>
  265. </itemset>
  266. </choices>
  267. </select1>
  268. <select1 id="cmb_empactflag" ref="/root/main/cond/empactflag" navindex="5" appearance="minimal" style="left:595px; top:11px; width:100px; height:19px; ">
  269. <choices>
  270. <itemset nodeset="/root/init/empactflag/A0508">
  271. <label ref="cdnm"/>
  272. <value ref="cdid"/>
  273. </itemset>
  274. </choices>
  275. </select1>
  276. <input id="ipt_from" ref="/root/main/cond/from" class="input_search" navindex="2" inputtype="date" format="yyyy-mm" style="left:206px; top:11px; width:70px; height:19px; "/>
  277. <select1 id="rdo_emp" ref="/root/main/cond/flag" navindex="1" appearance="full" cols="3" overflow="visible" style="left:21px; top:11px; width:184px; height:20px; border-style:none; ">
  278. <choices>
  279. <item>
  280. <label>부서별</label>
  281. <value>1</value>
  282. </item>
  283. <item>
  284. <label>봉사처별</label>
  285. <value>2</value>
  286. </item>
  287. <item>
  288. <label>개인별</label>
  289. <value>3</value>
  290. </item>
  291. </choices>
  292. <script type="javascript" ev:event="xforms-value-changed">
  293. <![CDATA[
  294. if(rdo_emp.value == '3')
  295. {
  296. grd_emp.colHidden(5) = true; //봉사처
  297. grd_emp.colHidden(6) = false; //소속기관
  298. grd_emp.colHidden(7) = false; //소속부서
  299. grd_emp.colHidden(8) = false; //근무부서
  300. grd_emp.colHidden(9) = false; //교직원명
  301. grd_emp.colHidden(10) = true; //참여인원(실인원)
  302. cap_fromdd.visible = true;
  303. cmb_hosinhosoutflag.visible = true;
  304. cmb_empactflag.visible = true;
  305. model.removeNodeset("/root/send/reqdata");
  306. model.makeNode("/root/send/reqdata");
  307. model.copyNode("/root/send/reqdata", "/root/main/cond");
  308. fempVoluntr();
  309. }
  310. else if(rdo_emp.value == '1')
  311. {
  312. grd_emp.colHidden(5) = true; //봉사처
  313. grd_emp.colHidden(6) = false; //소속기관
  314. grd_emp.colHidden(7) = false; //소속부서
  315. grd_emp.colHidden(8) = false; //근무부서
  316. grd_emp.colHidden(9) = true; //교직원명
  317. grd_emp.colHidden(10) = false; //참여인원(실인원)
  318. cap_fromdd.visible = false;
  319. cmb_hosinhosoutflag.visible = false;
  320. cmb_empactflag.visible = false;
  321. model.removeNodeset("/root/send/reqdata");
  322. model.makeNode("/root/send/reqdata");
  323. model.copyNode("/root/send/reqdata", "/root/main/cond");
  324. fempVoluntr();
  325. }
  326. else
  327. {
  328. grd_emp.colHidden(5) = false; //봉사처
  329. grd_emp.colHidden(6) = true; //소속기관
  330. grd_emp.colHidden(7) = true; //소속부서
  331. grd_emp.colHidden(8) = true; //근무부서
  332. grd_emp.colHidden(9) = true; //교직원명
  333. grd_emp.colHidden(10) = false; //참여인원(실인원)
  334. cap_fromdd.visible = false;
  335. cmb_hosinhosoutflag.visible = false;
  336. cmb_empactflag.visible = false;
  337. model.removeNodeset("/root/send/reqdata");
  338. model.makeNode("/root/send/reqdata");
  339. model.copyNode("/root/send/reqdata", "/root/main/cond");
  340. fempVoluntr();
  341. }
  342. ]]>
  343. </script>
  344. </select1>
  345. <caption id="cap_fromdd" class="search_name" style="left:426px; top:11px; width:106px; height:17px; ">봉사구분 :</caption>
  346. <input id="ipt_to" ref="/root/main/cond/to" class="input_search" navindex="3" inputtype="date" format="yyyy-mm" style="left:299px; top:11px; width:70px; height:19px; "/>
  347. </group>
  348. <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; ">
  349. <caption>엑셀저장</caption>
  350. <script type="javascript" ev:event="DOMActivate">
  351. <![CDATA[
  352. fExcel();
  353. ]]>
  354. </script>
  355. </button>
  356. <datagrid id="grd_emp" nodeset="/root/main/empvoluntr/empvoluntrlist" autoresize="true" caption="소속기관코드^소속부서코드^근무부서코드^사번^봉사처^소속기관^소속부서^근무부서^교직원명^참여인원(실인원)^봉사횟수^봉사시간^백분율" colsep="^" colwidth="0, 0, 0, 0, 115, 115, 115, 115, 87, 111, 90, 90, 159" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:76px; width:820px; height:664px; ">
  357. <col ref="unitinstcd" style="text-align:center; "/>
  358. <col ref="unitcd" style="text-align:center; "/>
  359. <col ref="dutplcedeptcd" style="text-align:center; "/>
  360. <col ref="emplno" style="text-align:center; "/>
  361. <col ref="actdeptnm" style="text-align:center; "/>
  362. <col ref="unitinstnm" style="text-align:center; "/>
  363. <col ref="unitdeptnm" style="text-align:center; "/>
  364. <col ref="dutplcedeptnm" style="text-align:center; "/>
  365. <col ref="emplnm" style="text-align:center; "/>
  366. <col ref="psn" format="yyyy-mm-dd" style="text-align:center; "/>
  367. <col ref="servcnt" format="yyyy-mm-dd" style="text-align:center; "/>
  368. <col ref="servtm" style="text-align:center; "/>
  369. <col ref="percent" format="yyyy-mm-dd" style="text-align:center; "/>
  370. </datagrid>
  371. </group>
  372. <group id="group5" scroll="auto" style="left:0px; top:757px; width:820px; height:27px; ">
  373. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:820px; y2:0px; "/>
  374. </group>
  375. <caption id="caption1" class="tit_2" style="left:5px; top:71px; width:309px; height:14px; ">교직원자원봉사자 통계</caption>
  376. <line id="line1" class="line_1" style="x1:0px; y1:86px; x2:820px; y2:86px; "/>
  377. <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; ">
  378. <caption>초기화</caption>
  379. <script type="javascript" ev:event="DOMActivate">
  380. <![CDATA[
  381. fReset();
  382. //조회
  383. ]]>
  384. </script>
  385. </button>
  386. </xhtml:body>
  387. </xhtml:html>