SPAAA03000_봉사활동처리.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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. <send>
  10. <savedata/>
  11. </send>
  12. <main>
  13. <actsource>
  14. <servkind/>
  15. <actdeptcd/>
  16. <actdeptdetlnm/>
  17. <voluntractdwcd/>
  18. <voluntractteamcd/>
  19. <actfromdd/>
  20. <acttodd/>
  21. <voluntrid/>
  22. <actrgstseqno/>
  23. <status/>
  24. <reflag/>
  25. <specactteam/>
  26. <joinorgdd/>
  27. <actdivscd/>
  28. </actsource>
  29. <returnsts>
  30. <statusinfo>
  31. <restatus/>
  32. <voluntrid/>
  33. <actstatflag/>
  34. <restatusdd/>
  35. </statusinfo>
  36. </returnsts>
  37. </main>
  38. <init>
  39. </init>
  40. <hidden>
  41. <init>
  42. <comcd/>
  43. <comcd1/>
  44. </init>
  45. </hidden>
  46. </root>
  47. </instance>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. fInit();
  51. ]]>
  52. </script>
  53. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  54. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
  55. <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  56. <submission id="TXAAA03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/returnsts"/>
  57. </model>
  58. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  63. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  64. </xhtml:head>
  65. <script type="javascript">
  66. <![CDATA[
  67. // 초기값
  68. function fInit()
  69. {
  70. zbcfGetCodeList( new Array("A0653","A0503","A0359","A0360", "A0507","A0654"),new Array("/root/hidden/init/comcd","/root/hidden/init/comcd","/root/hidden/init/comcd","/root/hidden/init/comcd","/root/hidden/init/comcd","/root/hidden/init/comcd")); // 관계코드 설정
  71. //zbcfGetKindCodeList(new Array("A0018"), new Array("A0507"),new Array("/root/hidden/init/comcd1"),true,'','');
  72. if(model.getValue("/root/main/actsource/status")=="i")
  73. { // 활동상태가 i일때 99991231 기본값으로 셋팅
  74. model.makeValue("/root/main/actsource/acttodd","99991231");
  75. }
  76. model.refresh();
  77. }
  78. //확인
  79. function fSendParam()
  80. {
  81. var actdeptcd=model.getValue("/root/main/actsource/actdeptcd"); //활동부서
  82. var voluntractdwcd=model.getValue("/root/main/actsource/voluntractdwcd"); //소속팀
  83. var voluntractteamcd=model.getValue("/root/main/actsource/voluntractteamcd"); //소속팀
  84. var actfromdd=model.getValue("/root/main/actsource/actfromdd"); //활동시작일
  85. var acttodd=model.getValue("/root/main/actsource/acttodd"); //활동종료일
  86. var servkind=model.getValue("/root/main/actsource/servkind"); //봉사 구분
  87. var joinorgdd=model.getValue("/root/main/actsource/joinorgdd"); // 입단일
  88. var actdivscd = model.getValue("/root/main/actsource/actdivscd"); // 입단일
  89. //model.makeValue("/root/main/actsource/specactteam","%"); //활동기간 체크시 sql에서 특별활동팀이 아닐때는 전체를 조회하기 위한 %
  90. if(isNull(servkind))
  91. {
  92. //저장시 봉사 구분이 비어있으면
  93. messageBox("봉사구분은","I003");
  94. model.setFocus("cmb_servkind");
  95. return;
  96. }
  97. if(actdeptcd=='')
  98. {
  99. messageBox("활동부서는","I003");
  100. model.setFocus("cmb_actdeptcd");
  101. return ;
  102. }
  103. if(voluntractdwcd==''||voluntractteamcd=="")
  104. {
  105. messageBox("소속팀은","I003");
  106. model.setFocus("cmb_voluntractdwcd");
  107. return ;
  108. }
  109. if(actfromdd=='')
  110. {
  111. messageBox("활동시작일자는","I003");
  112. model.setFocus("ipt_actfromdd");
  113. return ;
  114. }
  115. if(acttodd=='')
  116. {
  117. messageBox("활동종료일자는","I003");
  118. model.setFocus("ipt_acttodd");
  119. return ;
  120. }
  121. if(actfromdd>acttodd) //for문을 돌면서 활동종료일보다 활동 시작일이 큰 데이터가 있는지 체크하여 메시지 처리한다.
  122. {
  123. messageBox("활동 시작일자는 활동종료일자보다 클 수","I004");
  124. model.setFocus("ipt_actfromdd");
  125. return ;
  126. }
  127. if(actfromdd<joinorgdd)
  128. {
  129. messageBox("입단일자보다 큰 활동시작일자를 입력해 주십시요.","I");
  130. model.setFocus("ipt_actfromdd");
  131. return ;
  132. }
  133. model.removeNodeset("/root/send/savedata");
  134. model.makeNode("/root/send/savedata");
  135. model.copyNode("/root/send/savedata","/root/main/actsource");
  136. if(submit("TXAAA03001")==true)
  137. {
  138. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="N") // 특별활동 구간이 겹칠 때
  139. {
  140. messageBox("활동 구간이","E006");
  141. return;
  142. }
  143. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="L")
  144. {
  145. messageBox("활동 시작일자 전의 출결내역이 존재합니다. 수정할 수 ","I004");
  146. return;
  147. }
  148. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="K")
  149. {
  150. messageBox("활동 종료일자 후의 출결내역이 존재합니다. 수정할 수 ","I004");
  151. return;
  152. }
  153. else
  154. {
  155. messageBox("활동 처리가","I002");
  156. opener.model.makeValue("/root/actsource/status","u");
  157. // 자원봉사자 신상등록 화면의 status에 u를 저장
  158. opener.model.makeValue("/root/actsource/reflag","c");
  159. // 처리가 완료되었다는 의미의 플래그 c반환
  160. window.close();
  161. }
  162. }
  163. }
  164. function fDelActInfo()
  165. {
  166. var btn=messageBox("활동정보를","Q001");
  167. if(btn=='6')
  168. {
  169. if(model.getValue("/root/main/actsource/status")=="i") // 등록을 위해 팝업창을 열었을 경우에는 삭제할 수 없다.
  170. {
  171. messageBox("삭제할 봉사활동 처리 내역이","I004");
  172. return;
  173. }
  174. model.makeValue("/root/main/actsource/status","d"); //상태값에 d저장
  175. model.removeNodeset("/root/send/savedata");
  176. model.makeNode("/root/send/savedata");
  177. model.copyNode("/root/send/savedata","/root/main/actsource");
  178. if(submit("TXAAA03001")==true)
  179. {
  180. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="F") // 출결정보 존재하면
  181. {
  182. messageBox("해당기간에 출결처리한 내역이 존재합니다. 삭제할 수 ","I004");
  183. }
  184. else
  185. {
  186. messageBox("활동내역 삭제가","I002");
  187. opener.model.makeValue("/root/actsource/reflag","c");
  188. // 처리가 완료되었다는 의미의 플래그 c반환
  189. window.close();
  190. }
  191. }
  192. else
  193. {
  194. model.makeValue("/root/main/actsource/status","u");
  195. return;
  196. }
  197. }
  198. else if(btn=='7')
  199. {
  200. return;
  201. }
  202. }
  203. ]]>
  204. </script>
  205. <xhtml:body pagewidth="465" pageheight="132" guideline="1,500;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  206. <group id="grp_btn" scroll="auto" style="left:0px; top:105px; width:439px; height:27px; ">
  207. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:438px; y2:0px; "/>
  208. <button id="btn_confirm" class="btn4_letter2" style="left:322px; top:5px; width:56px; height:22px; ">
  209. <caption>삭제</caption>
  210. <script type="javascript" ev:event="DOMActivate">
  211. <![CDATA[
  212. fDelActInfo();
  213. ]]>
  214. </script>
  215. </button>
  216. <button id="btn_cancel" class="btn4_letter2" style="left:381px; top:5px; width:56px; height:22px; ">
  217. <caption>취소</caption>
  218. <script type="javascript" ev:event="DOMActivate">
  219. <![CDATA[
  220. //opener.javascript.setParameter("flag", "N");
  221. //opener.model.makeValue("/root/holisource/status","r"); //취소를 뜻하는 r 플래그 저장
  222. model.close();
  223. ]]>
  224. </script>
  225. </button>
  226. <button id="button1" class="btn4_letter2" style="left:263px; top:5px; width:56px; height:22px; ">
  227. <caption>저장</caption>
  228. <script type="javascript" ev:event="DOMActivate">
  229. <![CDATA[
  230. fSendParam();
  231. //model.close();
  232. ]]>
  233. </script>
  234. </button>
  235. </group>
  236. <group id="group1" scroll="auto" style="left:0px; top:0px; width:439px; height:105px; ">
  237. <line id="line8" class="line_2" style="x1:0px; y1:23px; x2:439px; y2:23px; "/>
  238. <line id="line1" class="line_2" style="x1:0px; y1:47px; x2:439px; y2:47px; "/>
  239. <caption id="caption5" class="cell_1" style="left:0px; top:1px; width:85px; height:23px; vertical-align:middle; ">봉사구분</caption>
  240. <input id="ipt_actdeptdetlnm" ref="/root/main/actsource/actdeptdetlnm" class="input_default" navindex="3" maxlength="10" style="left:317px; top:26px; width:120px; height:19px; "/>
  241. <select1 id="cmb_voluntractdwcd" ref="/root/main/actsource/voluntractdwcd" class="combo_default" navindex="4" appearance="minimal" style="left:87px; top:50px; width:140px; height:19px; ">
  242. <choices>
  243. <itemset nodeset="/root/hidden/init/comcd/A0359">
  244. <label ref="cdnm"/>
  245. <value ref="cdid"/>
  246. </itemset>
  247. </choices>
  248. </select1>
  249. <input id="ipt_actfromdd" ref="/root/main/actsource/actfromdd" class="input_default" disabled="false" navindex="6" inputtype="date" style="left:87px; top:74px; width:140px; height:19px; "/>
  250. <select1 id="cmb_voluntractteamcd" ref="/root/main/actsource/voluntractteamcd" class="combo_default" navindex="5" appearance="minimal" style="left:317px; top:50px; width:120px; height:19px; ">
  251. <choices>
  252. <itemset nodeset="/root/hidden/init/comcd/A0360">
  253. <label ref="cdnm"/>
  254. <value ref="cdid"/>
  255. </itemset>
  256. </choices>
  257. </select1>
  258. <line id="line2" class="line_2" style="x1:0px; y1:71px; x2:439px; y2:71px; "/>
  259. <caption id="caption2" class="cell_1" style="left:0px; top:73px; width:85px; height:23px; vertical-align:middle; ">활동시작일자</caption>
  260. <caption id="caption3" class="cell_1" style="left:230px; top:73px; width:85px; height:23px; vertical-align:middle; ">활동종료일자</caption>
  261. <select1 id="cmb_actdeptcd" ref="/root/main/actsource/actdeptcd" class="combo_default" navindex="2" appearance="minimal" style="left:87px; top:26px; width:140px; height:19px; ">
  262. <choices>
  263. <itemset nodeset="/root/hidden/init/comcd/A0503">
  264. <label ref="cdnm"/>
  265. <value ref="cdid"/>
  266. </itemset>
  267. </choices>
  268. </select1>
  269. <input id="ipt_acttodd" ref="/root/main/actsource/acttodd" class="input_default" disabled="false" navindex="7" inputtype="date" style="left:317px; top:74px; width:120px; height:19px; "/>
  270. <caption id="caption4" class="cell_1" style="left:230px; top:25px; width:85px; height:23px; vertical-align:middle; ">소속센터기타</caption>
  271. <select1 id="cmb_servkind" ref="/root/main/actsource/servkind" class="combo_default" navindex="1" appearance="minimal" style="left:87px; top:2px; width:140px; height:19px; ">
  272. <choices>
  273. <itemset nodeset="/root/hidden/init/comcd/A0507">
  274. <label ref="cdnm"/>
  275. <value ref="cdid"/>
  276. </itemset>
  277. </choices>
  278. </select1>
  279. <caption id="caption8" class="cell_1" style="left:0px; top:25px; width:85px; height:23px; vertical-align:middle; ">소속센터</caption>
  280. <caption id="caption6" class="cell_1" style="left:0px; top:49px; width:85px; height:23px; vertical-align:middle; ">활동요일</caption>
  281. <caption id="caption1" class="cell_1" style="left:230px; top:49px; width:85px; height:23px; vertical-align:middle; ">활동시간대</caption>
  282. <line id="line3" class="line_3" style="x1:0px; y1:95px; x2:439px; y2:95px; "/>
  283. <caption id="caption7" class="cell_1" style="left:230px; top:0px; width:85px; height:23px; vertical-align:middle; ">소속분야</caption>
  284. <select1 id="cmb_actdivscd" ref="/root/main/actsource/actdivscd" class="combo_default" navindex="5" appearance="minimal" style="left:316px; top:2px; width:120px; height:19px; ">
  285. <choices>
  286. <itemset nodeset="/root/hidden/init/comcd/A0654">
  287. <label ref="cdnm"/>
  288. <value ref="cdid"/>
  289. </itemset>
  290. </choices>
  291. </select1>
  292. </group>
  293. </xhtml:body>
  294. </xhtml:html>