123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>학생봉사자명단 및 현황조회</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <cond>
- <flag/>
- <from/>
- <to/>
- <hosinhosoutflag/>
- <empactflag/>
- </cond>
- <empvoluntr>
- <empvoluntrlist>
- <flag/>
- <psn/>
- <servcnt/>
- <servtm/>
- <percent/>
- <unitinstcd/>
- <unitinstnm/>
- <unitcd/>
- <unitdeptnm/>
- <dutplcedeptcd/>
- <dutplcedeptnm/>
- <emplno/>
- <actdeptnm/>
- <emplnm/>
- </empvoluntrlist>
- </empvoluntr>
- </main>
- <init>
- <hosinhosoutflag/>
- <empactflag/>
- </init>
- <send>
- <reqdata/>
- </send>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //grd_studvoluntrlist.fixedcellcheckbox(0,1) = "true";
- fInit();
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRAAA03401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/empvoluntr"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
- </xhtml:head>
- <script type="javascript">
- <![CDATA[
- /**========================================================================================================================================
- * 초기화
- =========================================================================================================================================*/
- function fInit() {
- model.removeNodeset("/root/main/empvoluntr");
- var currentDate = getCurrentDate();
- model.setValue("/root/main/cond/from" ,currentDate.substr(0, 6));
- model.setValue("/root/main/cond/to" ,currentDate.substr(0, 6));
- cap_fromdd.visible = false;
- cmb_hosinhosoutflag.visible = false;
- cmb_empactflag.visible = false;
-
- addComboItem("cmb_hosinhosoutflag","전체","%","above");
- addComboItem("cmb_empactflag","전체","%","above");
- model.setValue("/root/main/cond/flag", "1");
- model.setValue("/root/main/cond/hosinhosoutflag","%");
- model.setValue("/root/main/cond/empactflag","%");
- zbcfGetCodeList(new Array("A0509", "A0508"),new Array("/root/init/hosinhosoutflag", "/root/init/empactflag"),true);
-
- //추가-20090624-kys
- rdo_emp.dispatch("xforms-value-changed");
-
- model.refresh();
- }
-
-
- /**========================================================================================================================================
- * 엑셀저장 버튼 클릭시
- =========================================================================================================================================*/
- function fExcel() {
- if (grd_emp.rows <= 1) {
- messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
- return;
- }
- if(model.getValue("/root/main/cond/flag") =='1')
- {
- var fileName = window.fileDialog("save", ",", false, "교직원자원봉사자부서별통계", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- }
- else if(model.getValue("/root/main/cond/flag") =='2')
- {
- var fileName = window.fileDialog("save", ",", false, "교직원자원봉사자봉사처별통계", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- }
- else if(model.getValue("/root/main/cond/flag") =='3')
- {
- var fileName = window.fileDialog("save", ",", false, "교직원자원봉사자개인별통계", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- }
- if (fileName != ""){
- grd_emp.saveExcel(fileName, "SheetName", false, false, "", "", false);
- }
- }//fExcel END
-
-
- /**========================================================================================================================================
- * 조회버튼클릭시
- =========================================================================================================================================*/
- function fempVoluntr() {
- var from = model.getValue("/root/main/cond/from") + "01";
- var to = model.getValue("/root/main/cond/to") + "01";
- var dateintval=getDateInterval(from,to);
- //alert(dateintval);
- if(dateintval>365)
- {
- messageBox("조회기간은 최대1년까지 할 수 있습니다.","I");
- return;
- }
-
- if (model.getValue("/root/main/cond/from") > model.getValue("/root/main/cond/to")) {
- messageBox("올바른 조회기간을","C001");
- model.setFocus("ipt_from");
- return false;
- }
- if (model.getValue("/root/main/cond/from") == "" ) {
- messageBox("시작월는 ","I003");
- model.setFocus("ipt_from");
- return false;
- }
- if (model.getValue("/root/main/cond/from").length != 6 ) {
- messageBox("올바른 시작월를","C001");
- model.setFocus("ipt_from");
- return false;
- }
- if (model.getValue("/root/main/cond/to") == "" ) {
- messageBox("종료월는 ","I003");
- model.setFocus("ipt_to");
- return false;
- }
- if (model.getValue("/root/main/cond/to").length != 6 ) {
- messageBox("올바른 종료월를","C001");
- model.setFocus("ipt_to");
- return false;
- }
- model.removeNodeset("/root/main/empvoluntr");
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- model.makeValue("/root/send/reqdata/from",model.getValue("/root/main/cond/from")+"01");
- model.makeValue("/root/send/reqdata/to",model.getValue("/root/main/cond/to")+"31");
-
- submit("TRAAA03401");
-
- if(model.getValue("/root/main/cond/flag")=='1' || model.getValue("/root/main/cond/flag")=='2') //부서별/봉사처별일때
- {
- //if(model.getValue("/root/main/empvoluntr/empvoluntrlist/flag") !='') //조회된 결과가 있을때
- //alert("getNodesetCount(/root/main/empvoluntr/empvoluntrlist) : " + getNodesetCount("/root/main/empvoluntr/empvoluntrlist"));
- if(getNodesetCount("/root/main/empvoluntr/empvoluntrlist") > 0) //변경-kys-20090624
- {
- var empRows = grd_emp.rows ;
- grd_emp.addRow(empRows, false);
-
- if(model.getValue("/root/main/cond/flag")=='1'){
- grd_emp.valueMatrix(empRows, grd_emp.colRef("unitinstnm")) = "합계";
- }else if(model.getValue("/root/main/cond/flag")=='2'){
- grd_emp.valueMatrix(empRows, grd_emp.colRef("actdeptnm")) = "합계";
- }
- //합계Row
- var sPsn = 0 ; //실인원 count
- var sServcnt =0; //봉사횟수 count
- var sServtm =0; //봉사시간 count
- for(i=1;i<empRows;i++)
- {
- sPsn = sPsn + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/psn"));
- sServcnt = sServcnt + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servcnt"));
- sServtm = sServtm + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servtm"));
- }
- grd_emp.valueMatrix(empRows, grd_emp.colRef("psn")) = sPsn;
- grd_emp.valueMatrix(empRows, grd_emp.colRef("servcnt")) = sServcnt;
- grd_emp.valueMatrix(empRows, grd_emp.colRef("servtm")) = sServtm;
-
- //백분율Col[참여인원]
- for(i=1;i<empRows+1;i++)
- {
- percent = model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/psn")/sPsn *100 ; //백분율
- percent = Math.round(percent*10) /10;
- grd_emp.valueMatrix(i, grd_emp.colRef("percent")) = percent+"%";
- }
- }
- }
- else if(model.getValue("/root/main/cond/flag")=='3') //개인별일때
- {
- //if(model.getValue("/root/main/empvoluntr/empvoluntrlist/flag") != '') //조회결과가 있을때
- //alert("getNodesetCount(/root/main/empvoluntr/empvoluntrlist) : " + getNodesetCount("/root/main/empvoluntr/empvoluntrlist"));
- if(getNodesetCount("/root/main/empvoluntr/empvoluntrlist") > 0) //변경-kys-20090624
- {
- var empRows = grd_emp.rows;
- grd_emp.addRow(empRows, false);
- grd_emp.valueMatrix(empRows, grd_emp.colRef("unitinstnm")) = "합계";
- //합계Row
- var sServcnt = 0; //봉사횟수count
- var sServtm = 0; //봉사시간count
-
- for(i=1;i<empRows;i++)
- {
- sServcnt = sServcnt + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servcnt"));
- sServtm = sServtm + eval(model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servtm"));
- }
- grd_emp.valueMatrix(empRows, grd_emp.colRef("servcnt")) = sServcnt;
- grd_emp.valueMatrix(empRows, grd_emp.colRef("servtm")) = sServtm;
-
- //백분율Col[봉사시간]
- for(i=1;i<empRows+1;i++)
- {
- percent = model.getValue("/root/main/empvoluntr/empvoluntrlist["+i+"]/servcnt")/sServcnt*100;
- percent = Math.round(percent*10)/10;
- grd_emp.valueMatrix(i, grd_emp.colRef("percent")) = percent +"%";
- }
- }
- }
-
-
- model.refresh();
- }
-
-
- /**========================================================================================================================================
- * 초기화버튼클릭시
- =========================================================================================================================================*/
- function fReset(){
- var btn = messageBox("초기화를 ", "Q004");
-
- if (btn == '6') {
- model.removeNodeset("/root/main/empvoluntr");
- model.resetInstanceNode("/root/main/cond");
-
- var currentDate = getCurrentDate();
- model.setValue("/root/main/cond/from" ,currentDate.substr(0, 6));
- model.setValue("/root/main/cond/to" ,currentDate.substr(0, 6));
- cap_fromdd.visible = false;
- cmb_hosinhosoutflag.visible = false;
- cmb_empactflag.visible = false;
- model.setValue("/root/main/cond/flag", "1");
- model.setValue("/root/main/cond/hosinhosoutflag","%");
- model.setValue("/root/main/cond/empactflag","%");
-
- model.refresh();
- } else if (btn == '7') {
- return;
- }
- }//fReset END
- ]]>
- </script>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:815px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:299px; height:14px; ">교직원자원봉사자 부서별/봉사처별/개인별 통계</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:825px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:820px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:820px; height:35px; "/>
- <button id="button1" class="btn1_letter2" navindex="6" style="left:753px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fempVoluntr();
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:742px; y1:7px; x2:742px; y2:29px; "/>
- <caption id="cap1" style="left:275px; top:11px; width:25px; height:20px; text-align:center; ">~</caption>
- <select1 id="cmb_hosinhosoutflag" ref="/root/main/cond/hosinhosoutflag" navindex="4" appearance="minimal" style="left:515px; top:11px; width:70px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/hosinhosoutflag/A0509">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="cmb_empactflag" ref="/root/main/cond/empactflag" navindex="5" appearance="minimal" style="left:595px; top:11px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/empactflag/A0508">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <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; "/>
- <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; ">
- <choices>
- <item>
- <label>부서별</label>
- <value>1</value>
- </item>
- <item>
- <label>봉사처별</label>
- <value>2</value>
- </item>
- <item>
- <label>개인별</label>
- <value>3</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(rdo_emp.value == '3')
- {
- grd_emp.colHidden(5) = true; //봉사처
- grd_emp.colHidden(6) = false; //소속기관
- grd_emp.colHidden(7) = false; //소속부서
- grd_emp.colHidden(8) = false; //근무부서
- grd_emp.colHidden(9) = false; //교직원명
- grd_emp.colHidden(10) = true; //참여인원(실인원)
- cap_fromdd.visible = true;
- cmb_hosinhosoutflag.visible = true;
- cmb_empactflag.visible = true;
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
-
- fempVoluntr();
- }
- else if(rdo_emp.value == '1')
- {
- grd_emp.colHidden(5) = true; //봉사처
- grd_emp.colHidden(6) = false; //소속기관
- grd_emp.colHidden(7) = false; //소속부서
- grd_emp.colHidden(8) = false; //근무부서
- grd_emp.colHidden(9) = true; //교직원명
- grd_emp.colHidden(10) = false; //참여인원(실인원)
- cap_fromdd.visible = false;
- cmb_hosinhosoutflag.visible = false;
- cmb_empactflag.visible = false;
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
-
- fempVoluntr();
- }
- else
- {
- grd_emp.colHidden(5) = false; //봉사처
- grd_emp.colHidden(6) = true; //소속기관
- grd_emp.colHidden(7) = true; //소속부서
- grd_emp.colHidden(8) = true; //근무부서
- grd_emp.colHidden(9) = true; //교직원명
- grd_emp.colHidden(10) = false; //참여인원(실인원)
- cap_fromdd.visible = false;
- cmb_hosinhosoutflag.visible = false;
- cmb_empactflag.visible = false;
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
-
- fempVoluntr();
- }
- ]]>
- </script>
- </select1>
- <caption id="cap_fromdd" class="search_name" style="left:426px; top:11px; width:106px; height:17px; ">봉사구분 :</caption>
- <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; "/>
- </group>
- <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; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExcel();
- ]]>
- </script>
- </button>
- <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; ">
- <col ref="unitinstcd" style="text-align:center; "/>
- <col ref="unitcd" style="text-align:center; "/>
- <col ref="dutplcedeptcd" style="text-align:center; "/>
- <col ref="emplno" style="text-align:center; "/>
- <col ref="actdeptnm" style="text-align:center; "/>
- <col ref="unitinstnm" style="text-align:center; "/>
- <col ref="unitdeptnm" style="text-align:center; "/>
- <col ref="dutplcedeptnm" style="text-align:center; "/>
- <col ref="emplnm" style="text-align:center; "/>
- <col ref="psn" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="servcnt" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="servtm" style="text-align:center; "/>
- <col ref="percent" format="yyyy-mm-dd" style="text-align:center; "/>
- </datagrid>
- </group>
- <group id="group5" scroll="auto" style="left:0px; top:757px; width:820px; height:27px; ">
- <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:820px; y2:0px; "/>
- </group>
- <caption id="caption1" class="tit_2" style="left:5px; top:71px; width:309px; height:14px; ">교직원자원봉사자 통계</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:86px; x2:820px; y2:86px; "/>
- <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; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fReset();
- //조회
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|