SMAAA02000_학생자원봉사자명단 및 현황조회.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  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. <year/>
  12. <vacflag/>
  13. </cond>
  14. <studvoluntr>
  15. <studvoluntrlist>
  16. <chk/>
  17. <servyy/>
  18. <vacatflag/>
  19. <actfromdd/>
  20. <acttodd/>
  21. <voluntrnm/>
  22. <brthdd/>
  23. <sex/>
  24. <actdeptcd/>
  25. <schnm/>
  26. <servtm/>
  27. <hometel/>
  28. <mpphontel/>
  29. <voluntrid/>
  30. <deptnm/>
  31. <year1/>
  32. <month1/>
  33. <day1/>
  34. <cdval/>
  35. </studvoluntrlist>
  36. </studvoluntr>
  37. <aaa>
  38. <report>
  39. <systeminstnm/>
  40. </report>
  41. </aaa>
  42. </main>
  43. <init>
  44. <sex/>
  45. <vacatflagcd>
  46. </vacatflagcd>
  47. <actdeptcd/>
  48. </init>
  49. <send>
  50. <reqdata/>
  51. </send>
  52. <hidden>
  53. </hidden>
  54. </root>
  55. </instance>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. //grd_studvoluntrlist.fixedcellcheckbox(0,1) = "true";
  59. fInit();
  60. ]]>
  61. </script>
  62. <submission id="TRAAA02001" ref="/root/send/reqdata" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/studvoluntrlist"/>
  63. <submission id="TRZBC00101" method="post" mediatype="application/x-www-form-urlencoded"/>
  64. </model>
  65. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  70. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  71. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  72. </xhtml:head>
  73. <script type="javascript">
  74. <![CDATA[
  75. //초기화
  76. function fInit() {
  77. model.removeNodeset("/root/main/studvoluntr/studvoluntrlist");
  78. var sYear = getCurrentDate().substr(0,4);
  79. model.setValue("/root/main/cond/year", sYear);
  80. addComboItem("cmb_vacatflagcd","전체","%","above");
  81. model.setValue("/root/main/cond/vacflag","%");
  82. grd_studvoluntrlist.fixedcellcheckbox(0,1)=true; //체크박스 위에 전체 선택 하는 콤보 셋팅
  83. zbcfGetCodeList(new Array("A0366","P0313","A0503"),new Array("/root/init/vacatflagcd","/root/init/sex","/root/init/actdeptcd"),true);
  84. var systeminstnm = getUserInfo("systeminstnm");
  85. model.setValue("/root/main/aaa/report/systeminstnm", systeminstnm);
  86. model.refresh();
  87. }
  88. //엑셀저장 버튼 클릭시
  89. function fExcel() {
  90. if (grd_studvoluntrlist.rows <= 1) {
  91. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  92. return;
  93. }
  94. var fileName = window.fileDialog("save", ",", false, "학생자원봉사자 명단", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  95. if (fileName != ""){
  96. grd_studvoluntrlist.saveExcel(fileName, "SheetName", false, false, "", "", false);
  97. }
  98. }//fExcel END
  99. //조회버튼클릭시
  100. function fStudVoluntrlist() {
  101. if (model.getValue("/root/main/cond/year") == "" ) {
  102. messageBox("조회년도는 ","I003");
  103. model.setFocus("ipt_year");
  104. return false;
  105. }
  106. model.removeNodeset("/root/main/studvoluntr");
  107. //model.makeNode("/root/main/studvoluntr/studvoluntrlist");
  108. model.removenode("/root/send");
  109. model.makeNode("/root/send/reqdata");
  110. model.copyNode("/root/send/reqdata", "/root/main/cond");
  111. submit("TRAAA02001");
  112. var idxRow = grd_studvoluntrlist.rows-1; //전체 9
  113. for(i=1;i<=idxRow;i++) // 그리드에 체크된 개수만큼 for문 돌려서 값을 체크한다.
  114. {
  115. var brthdd1 =model.getValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/brthdd");
  116. var year1 = brthdd1.substr(0,4);
  117. var month1 = brthdd1.substr(4,2);
  118. var day1 = brthdd1.substr(6,2);
  119. model.makeNode("/root/main/studvoluntr/studvoluntrlist["+i+"]/year1");
  120. model.makeNode("/root/main/studvoluntr/studvoluntrlist["+i+"]/month1");
  121. model.makeNode("/root/main/studvoluntr/studvoluntrlist["+i+"]/day1");
  122. model.setValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/year1", year1);
  123. model.setValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/month1", month1);
  124. model.setValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/day1", day1);
  125. }
  126. }
  127. ]]>
  128. </script>
  129. <xhtml:body guideline="1,1194;2,824;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  130. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  131. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:207px; height:14px; ">학생자원봉사자명단 및 현황조회</caption>
  132. </group>
  133. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  134. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  135. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  136. <button id="button1" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  137. <caption>조회</caption>
  138. <script type="javascript" ev:event="DOMActivate">
  139. <![CDATA[
  140. fStudVoluntrlist();
  141. ]]>
  142. </script>
  143. </button>
  144. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  145. <caption id="caption3" class="search_name" style="left:20px; top:10px; width:94px; height:17px; ">조회년도 :</caption>
  146. <select1 id="cmb_vacatflagcd" ref="/root/main/cond/vacflag" class="combo_search" appearance="minimal" style="left:354px; top:9px; width:85px; height:19px; ">
  147. <choices>
  148. <itemset nodeset="/root/init/vacatflagcd/A0366">
  149. <label ref="cdnm"/>
  150. <value ref="cdid"/>
  151. </itemset>
  152. </choices>
  153. </select1>
  154. <input id="ipt_year" ref="/root/main/cond/year" class="input_default" appearance="minimal" style="left:114px; top:9px; width:86px; height:19px; "/>
  155. <caption id="caption2" class="search_name" style="left:260px; top:10px; width:90px; height:17px; ">방학구분 :</caption>
  156. </group>
  157. <datagrid id="grd_studvoluntrlist" nodeset="/root/main/studvoluntr/studvoluntrlist" autoresize="true" caption="^년도^방학구분^시작일^종료일^성명^생년월일^성별^활동부서^학교명^활동시간누계^전화(자택)^휴대번호^voluntrid^활동부서명^year1^month1^day1^cdval" colwidth="44, 61, 70, 95, 95, 95, 95, 70, 135, 110, 80, 105, 105, 100, 100, 100, 100, 100, 100" dataheight="25" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" colsep="^" style="left:0px; top:76px; width:1194px; height:665px; ">
  158. <col ref="chk" type="checkbox" checkvalue="1,0"/>
  159. <col ref="servyy" style="text-align:center; "/>
  160. <col ref="vacatflag" type="combo" disabled="true" style="text-align:center; ">
  161. <choices>
  162. <itemset nodeset="/root/init/vacatflagcd/A0366">
  163. <label ref="cdnm"/>
  164. <value ref="cdid"/>
  165. </itemset>
  166. </choices>
  167. </col>
  168. <col ref="actfromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  169. <col ref="acttodd" format="yyyy-mm-dd" style="text-align:center; "/>
  170. <col ref="voluntrnm" style="text-align:left; "/>
  171. <col ref="brthdd" format="yyyy-mm-dd" style="text-align:center; "/>
  172. <col ref="sex" type="combo" disabled="true" style="text-align:center; ">
  173. <choices>
  174. <itemset nodeset="/root/init/sex/P0313">
  175. <label ref="cdnm"/>
  176. <value ref="cdid"/>
  177. </itemset>
  178. </choices>
  179. </col>
  180. <col ref="actdeptcd" type="combo" disabled="true" style="text-align:left; ">
  181. <choices>
  182. <itemset nodeset="/root/init/actdeptcd/A0503">
  183. <label ref="cdnm"/>
  184. <value ref="cdid"/>
  185. </itemset>
  186. </choices>
  187. </col>
  188. <col ref="schnm" style="text-align:left; "/>
  189. <col ref="servtm" style="text-align:center; "/>
  190. <col ref="hometel" style="text-align:left; "/>
  191. <col ref="mpphontel" style="text-align:left; "/>
  192. <col ref="voluntrid" visibility="hidden"/>
  193. <col ref="deptnm" visibility="hidden"/>
  194. <col ref="year1" visibility="hidden"/>
  195. <col ref="month1" visibility="hidden"/>
  196. <col ref="day1" visibility="hidden"/>
  197. <col ref="cdval" visibility="hidden"/>
  198. </datagrid>
  199. <button id="button3" class="btn2_letter4" disable.background-image="../../../com/commonweb/images/dis_btn2_letter4.gif" style="left:1117px; top:51px; width:64px; height:19px; background-image:../../../com/commonweb/images/btn2_letter4.gif; ">
  200. <caption>엑셀저장</caption>
  201. <script type="javascript" ev:event="DOMActivate">
  202. <![CDATA[
  203. fExcel();
  204. ]]>
  205. </script>
  206. </button>
  207. </group>
  208. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  209. <button id="button95" class="btn6_letter4" style="left:0px; top:3px; width:80px; height:22px; ">
  210. <caption>명찰출력</caption>
  211. <script type="javascript" ev:event="DOMActivate">
  212. <![CDATA[
  213. fchk();
  214. function fchk() {
  215. var idxRow = grd_studvoluntrlist.rows; //data+1
  216. var idxRows = grd_studvoluntrlist.fixedRows; //1
  217. var chkCount = 0;
  218. var NodeCnt =0;
  219. for(i=1;i<=idxRow-idxRows;i++) // 그리드에 체크된 개수만큼 for문 돌려서 값을 체크한다.
  220. {
  221. var chkFlag=model.getValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/chk"); //값이 있으면 1 없으면 null
  222. if(chkFlag=='1')
  223. {
  224. /*
  225. var NodeCnt=eval(getNodesetCount("/root/hidden/studvoluntr/studvoluntrlist"))+1; //선택된 자원봉사자 갯수를 셈
  226. //eva 사용[X] + 1 = 01, eval사용[O] + 1 = 1 (eval은 객체의 value값을 얻어올수 있다.alert(obj.value))
  227. // alert(NodeCnt);
  228. model.makeNode("/root/hidden/studvoluntr/studvoluntrlist["+NodeCnt+"]");
  229. model.copyNode("/root/hidden/studvoluntr/studvoluntrlist["+NodeCnt+"]","/root/main/studvoluntr/studvoluntrlist["+i+"]");
  230. // 체크가 된 봉사자 갯수만큼 해당 값 복사해서 넘긴다.
  231. */
  232. var NodeCnt = NodeCnt +1;
  233. model.makeNode("/root/hidden/studvoluntr/studvoluntrlist["+NodeCnt+"]");
  234. model.copyNode("/root/hidden/studvoluntr/studvoluntrlist["+NodeCnt+"]","/root/main/studvoluntr/studvoluntrlist["+i+"]");
  235. chkCount=chkCount+1;
  236. // 체크된 봉사자 갯수를 세서 없을 때는 메시지 처리 한다.
  237. }
  238. }
  239. if(chkCount=='0')
  240. {
  241. messageBox("명찰 출력할 자원봉사자를 선택하십시오.","I");
  242. return;
  243. }
  244. fPreview();
  245. }
  246. function fPreview(){
  247. /*
  248. var rid = "RPAAA02001"; // 레포트명
  249. var dataType = "XMLSTR"; // 연계방법(XMLSTR/ XMLFILE/ XML)
  250. var paramsXPath = "/root/hidden/studvoluntr"; // 매개변수필드 XPath [미리보기 그리드]
  251. var submitId = ""; // SubmitID
  252. var print = ""; // 출력여부(true, false)
  253. var printDialog = ""; // 인쇄 창 보임 여부(true, false)
  254. var fileType = ""; // 저장타입(xls/ pdf/ hml/rtf/ html/ bmp/ txt/ xml )
  255. var fileName = ""; // 파일명(c:\report\레포트명.저장타입)
  256. var fileDialog = ""; // 파일 저장 창 보임여부(0 : 숨김[기본]/1 : 보임)
  257. var closeYn = ""; // 미리보기창닫기여부(출력 후 true로 설정한 경우 미리보기 화면 닫기)
  258. var monNo = ""; // 모니터 번호
  259. var parentObjId = ""; // 부모객체명(미리 생성한 부모 객체명, 해당 부모 객체에 레포트 데이터를 생성한다.)
  260. var printPaperBin = ""; // 트레이번호
  261. var userService = ""; // 데이터 소스
  262. var showButton = ""; // 툴바버튼보임여부(visible, hidden)
  263. var printCount = ""; // 프린트장수(1, 2,..)
  264. var zoomRate = ""; // 미리보기뷰어 비율(0, 50,...)
  265. var printOption = ""; // 출력시 선택 옵션
  266. var dataXPath = ""; // 데이터 XPath
  267. var mainDataXPath = ""; // 메인리포트 반복XPath
  268. var subDataXPath = ""; // 서브리포트1 반복Xpath
  269. exeReportPreview(rid, dataType, paramsXPath, submitId, print, printDialog, fileType, fileName, fileDialog, closeYn, monNo, parentObjId, printPaperBin, userService, showButton, printCount, zoomRate, printOption, dataXPath, mainDataXPath, subDataXPath);
  270. */
  271. exeReportPreview("RPAAA02001", "XMLSTR","/root/hidden/studvoluntr"); //미리보기
  272. model.removeNodeset("/root/hidden/studvoluntr"); //그리드미리보기하려고
  273. model.makeNode("/root/hidden/studvoluntr");
  274. model.refresh();
  275. }//fPreview END
  276. ]]>
  277. </script>
  278. </button>
  279. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  280. <button id="button2" class="btn6_letter4" visibility="hidden" style="left:83px; top:3px; width:80px; height:22px; ">
  281. <caption>활동일지</caption>
  282. <script type="javascript" ev:event="DOMActivate">
  283. <![CDATA[ //2명이상
  284. fchk();
  285. function fchk() {
  286. var idxRow = grd_studvoluntrlist.rows; //전체 9
  287. var idxRows = grd_studvoluntrlist.fixedRows; //1 실제data는 8개 [9-1]
  288. var chkCount = 0;
  289. for(i=1;i<=idxRow-idxRows;i++) // 그리드에 체크된 개수만큼 for문 돌려서 값을 체크한다.
  290. {
  291. var chkFlag=model.getValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/chk"); //값이 있으면 1 없으면 null
  292. if(chkFlag=='1')
  293. {
  294. var NodeCnt=eval(getNodesetCount("/root/hidden/studvoluntr/studvoluntrlist"))+1; //선택된 자원봉사자 갯수를 셈
  295. //eva 사용[X] + 1 = 01, eval사용[O] + 1 = 1 (eval은 객체의 value값을 얻어올수 있다.alert(obj.value))
  296. model.makeNode("/root/hidden/studvoluntr/studvoluntrlist["+NodeCnt+"]");
  297. model.copyNode("/root/hidden/studvoluntr/studvoluntrlist["+NodeCnt+"]","/root/main/studvoluntr/studvoluntrlist["+i+"]");
  298. // 체크가 된 봉사자 갯수만큼 해당 값 복사해서 넘긴다.
  299. chkCount=chkCount+1;
  300. // 체크된 봉사자 갯수를 세서 없을 때는 메시지 처리 한다.
  301. }
  302. }
  303. if(chkCount=='0')
  304. {
  305. messageBox("활동일지를 출력할 자원봉사자를 선택하십시오.","I");
  306. return;
  307. }
  308. fPreview();
  309. }
  310. function fPreview(){
  311. exeReportPreview("RPAAA02002", "XMLSTR");
  312. model.removeNodeset("/root/hidden/studvoluntr"); //그리드미리보기하려고
  313. model.makeNode("/root/hidden/studvoluntr");
  314. }//fPreview END
  315. ]]>
  316. </script>
  317. </button>
  318. <button id="button4" class="btn3_letter4" style="left:82px; top:3px; width:80px; height:22px; ">
  319. <caption>SMS전송</caption>
  320. <script type="javascript" ev:event="onclick">
  321. <![CDATA[
  322. model.removeNodeset("/root/hidden/voluntrspec");
  323. var idxRow = grd_studvoluntrlist.rows;
  324. var idxRows = grd_studvoluntrlist.fixedRows;
  325. var chkCount=0;
  326. for(i=1;i<=idxRow-idxRows;i++) // 그리드에 체크된 개수만큼 for문 돌려서 값을 체크한다.
  327. {
  328. var chkFlag=model.getValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/chk");
  329. if(chkFlag=='1')
  330. {
  331. var NodeCnt=eval(getNodesetCount("/root/hidden/voluntrspec/voluntrspecinfo"))+1;
  332. // 비어있는 hidden노드에 1을 더해 count개수 1를 만든다.
  333. model.makeNode("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]");
  334. //hidden노드에 첫번째 행을 만든뒤, 체크된 자원봉사자 정보 hidden에 넘겨준다.
  335. model.makeValue("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]/chk",model.getValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/chk"));
  336. model.makeValue("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]/pid",model.getValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/voluntrid"));
  337. model.makeValue("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]/recvrnm",model.getValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/voluntrnm"));
  338. model.makeValue("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]/recvrtelno",model.getValue("/root/main/studvoluntr/studvoluntrlist["+i+"]/mpphontel"));
  339. // 체크가 된 봉사자 갯수만큼 해당 값 복사해서 넘긴다.
  340. chkCount=chkCount+1;
  341. }
  342. }
  343. if(chkCount=='0')
  344. {
  345. messageBox("SMS를 전송할 자원봉사자를 선택하십시오.","I");
  346. return;
  347. }
  348. modal("SPAAA03400", "1","150", "150", "SPAAA03400", "/root/hidden/voluntrspec", " /root/main/recvrlist");
  349. // /root/hidden/voluntrspec 경로에 담긴 정보 팝업창의 /root/main/sendmsg 노드로 보냄
  350. // model.removeNodeset("/root/hidden/voluntrspec");
  351. // model.makeNode("/root/hidden/voluntrspec");
  352. model.refresh();
  353. ]]>
  354. </script>
  355. </button>
  356. </group>
  357. <caption id="caption1" class="tit_2" style="left:5px; top:71px; width:209px; height:14px; ">학생자원봉사자명단</caption>
  358. <line id="line1" class="line_1" style="x1:0px; y1:86px; x2:1194px; y2:86px; "/>
  359. </xhtml:body>
  360. </xhtml:html>