SPAAA02100_특별활동처리.xrw 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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. <spcsource>
  14. <voluntrid/>
  15. <servkind/>
  16. <specactteam/>
  17. <actfromdd/>
  18. <acttodd/>
  19. <status/>
  20. <reflag/>
  21. </spcsource>
  22. <returnsts>
  23. <statusinfo>
  24. <restatus/>
  25. <voluntrid/>
  26. <actstatflag/>
  27. <restatusdd/>
  28. </statusinfo>
  29. </returnsts>
  30. </main>
  31. <init>
  32. </init>
  33. <hidden>
  34. <init>
  35. <comcd/>
  36. </init>
  37. </hidden>
  38. </root>
  39. </instance>
  40. <script type="javascript" ev:event="xforms-ready">
  41. <![CDATA[
  42. fInit();
  43. ]]>
  44. </script>
  45. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  46. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
  47. <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  48. <submission id="TXAAA02101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/returnsts"/>
  49. </model>
  50. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  55. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  56. </xhtml:head>
  57. <script type="javascript">
  58. <![CDATA[
  59. // 초기값
  60. function fInit()
  61. {
  62. zbcfGetCodeList( new Array("A0516"),new Array("/root/hidden/init/comcd")); // 관계코드 설정
  63. //zbcfGetKindCodeList(new Array("A0516"), new Array("A0506"),new Array("/root/hidden/init/comcd"),true,'','');
  64. model.refresh();
  65. }
  66. //확인
  67. function fSendParam()
  68. {
  69. var servkind=model.getValue("/root/main/spcsource/servkind"); //봉사구분
  70. var specactteam=model.getValue("/root/main/spcsource/specactteam"); //특별활동팀
  71. var actfromdd=model.getValue("/root/main/spcsource/actfromdd"); //휴가시작일
  72. var acttodd=model.getValue("/root/main/spcsource/acttodd"); //휴가종료일
  73. if(servkind=="")
  74. {
  75. messageBox("봉사구분은","I003");
  76. return;
  77. }
  78. if(specactteam=='')
  79. {
  80. messageBox("특별활동팀은","I003");
  81. model.setFocus("cmb_specactteam");
  82. return;
  83. }
  84. if(actfromdd=="")
  85. {
  86. messageBox("활동시작일자는","I003");
  87. model.setFocus("ipt_actfromdd");
  88. return;
  89. }
  90. if(acttodd=='')
  91. {
  92. messageBox("활동종료일자는","I003");
  93. model.setFocus("ipt_acttodd");
  94. return;
  95. }
  96. if(acttodd<actfromdd)
  97. {
  98. messageBox("활동 종료일자보다 작은 활동 시작일자를 입력하십시요","I");
  99. return;
  100. }
  101. model.removeNodeset("/root/send/savedata");
  102. model.makeNode("/root/send/savedata");
  103. model.copyNode("/root/send/savedata","/root/main/spcsource");
  104. if(submit("TXAAA02101")==true)
  105. {
  106. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="N") // 특별활동 구간이 겹칠 때
  107. {
  108. messageBox("특별활동 구간이","E006");
  109. return;
  110. }
  111. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="L")
  112. {
  113. messageBox("특별활동 시작일자 전의 출결내역이 존재합니다. 수정할 수 ","I004");
  114. return;
  115. }
  116. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="K")
  117. {
  118. messageBox("특별활동 종료일자 후의 출결내역이 존재합니다. 수정할 수 ","I004");
  119. return;
  120. }
  121. else
  122. {
  123. messageBox("특별활동 처리가","I002");
  124. opener.model.makeValue("/root/spcsource/status","u");
  125. // 자원봉사자 신상등록 화면의 status에 u를 저장
  126. opener.model.makeValue("/root/spcsource/reflag","c");
  127. // 처리가 완료되었다는 의미의 플래그 c반환
  128. opener.model.refresh();
  129. window.close();
  130. }
  131. }
  132. }
  133. function fDelSpecActTeam()
  134. {
  135. var btn=messageBox("특별활동내역을","Q001");
  136. if(btn=='6')
  137. {
  138. if(model.getValue("/root/main/spcsource/status")=="i") //등록창에서 삭제 버튼을 눌렀을 때
  139. {
  140. messageBox("삭제할 특별활동 내역이","I004");
  141. return;
  142. }
  143. model.makeValue("/root/main/spcsource/status","d"); //상태값에 d저장
  144. model.removeNodeset("/root/send/savedata");
  145. model.makeNode("/root/send/savedata");
  146. model.copyNode("/root/send/savedata","/root/main/spcsource");
  147. if(submit("TXAAA02101")==true)
  148. {
  149. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="F") // 출결정보 존재하면
  150. {
  151. messageBox("해당기간에 출결처리한 내역이 존재합니다. 삭제할 수 ","I004");
  152. }
  153. else
  154. {
  155. messageBox("특별활동내역 삭제가","I002");
  156. opener.model.makeValue("/root/spcsource/reflag","c");
  157. // 처리가 완료되었다는 의미의 플래그 c반환
  158. opener.model.refresh();
  159. window.close();
  160. }
  161. }
  162. else
  163. {
  164. model.makeValue("/root/main/holisource/status","u");
  165. return;
  166. }
  167. }
  168. else if(btn=='7')
  169. {
  170. return;
  171. }
  172. }
  173. ]]>
  174. </script>
  175. <xhtml:body pagewidth="480" pageheight="110" guideline="1,500;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  176. <group id="grp_btn" scroll="auto" style="left:0px; top:66px; width:449px; height:27px; ">
  177. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:448px; y2:0px; "/>
  178. <button id="btn_confirm" class="btn4_letter2" style="left:332px; top:3px; width:56px; height:22px; ">
  179. <caption>삭제</caption>
  180. <script type="javascript" ev:event="DOMActivate">
  181. <![CDATA[
  182. fDelSpecActTeam();
  183. ]]>
  184. </script>
  185. </button>
  186. <button id="btn_cancel" class="btn4_letter2" style="left:391px; top:3px; width:56px; height:22px; ">
  187. <caption>취소</caption>
  188. <script type="javascript" ev:event="DOMActivate">
  189. <![CDATA[
  190. //opener.javascript.setParameter("flag", "N");
  191. opener.model.makeValue("/root/spcsource/status","r"); //취소를 뜻하는 r 플래그 저장
  192. model.close();
  193. ]]>
  194. </script>
  195. </button>
  196. <button id="button1" class="btn4_letter2" navindex="4" style="left:273px; top:3px; width:56px; height:22px; ">
  197. <caption>저장</caption>
  198. <script type="javascript" ev:event="DOMActivate">
  199. <![CDATA[
  200. fSendParam();
  201. //model.close();
  202. ]]>
  203. </script>
  204. </button>
  205. </group>
  206. <group id="group1" scroll="auto" style="left:0px; top:3px; width:450px; height:55px; ">
  207. <line id="line8" class="line_2" style="x1:0px; y1:22px; x2:443px; y2:22px; "/>
  208. <caption id="caption6" class="cell_1" style="left:0px; top:24px; width:85px; height:23px; vertical-align:middle; ">활동시작일자</caption>
  209. <caption id="caption8" class="cell_1" style="left:220px; top:24px; width:85px; height:23px; vertical-align:middle; ">활동종료일자</caption>
  210. <input id="ipt_actfromdd" ref="/root/main/spcsource/actfromdd" class="input_default" disabled="false" navindex="2" inputtype="date" style="left:88px; top:26px; width:120px; height:19px; "/>
  211. <input id="ipt_acttodd" ref="/root/main/spcsource/acttodd" class="input_default" disabled="false" navindex="3" inputtype="date" style="left:310px; top:26px; width:120px; height:19px; "/>
  212. <line id="line2" class="line_2" style="x1:0px; y1:48px; x2:443px; y2:48px; "/>
  213. <select1 id="cmb_specactteam" ref="/root/main/spcsource/specactteam" class="combo_default" navindex="1" appearance="minimal" style="left:88px; top:2px; width:132px; height:19px; ">
  214. <choices>
  215. <itemset nodeset="/root/hidden/init/comcd/A0516">
  216. <label ref="cdnm"/>
  217. <value ref="cdid"/>
  218. </itemset>
  219. </choices>
  220. </select1>
  221. <caption id="caption1" class="cell_1" style="left:0px; top:0px; width:85px; height:23px; vertical-align:middle; ">특별활동</caption>
  222. </group>
  223. </xhtml:body>
  224. </xhtml:html>