SPAAA02700_휴가처리.xrw 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. <send>
  10. <savedata/>
  11. </send>
  12. <main>
  13. <holisource>
  14. <voluntrid/>
  15. <holijobrespflag/>
  16. <fromdd/>
  17. <todd/>
  18. <holicd/>
  19. <jobrespcd/>
  20. <holijobrem/>
  21. <status/>
  22. <reflag/>
  23. </holisource>
  24. <returnsts>
  25. <statusinfo>
  26. <restatus/>
  27. <voluntrid/>
  28. <actstatflag/>
  29. <restatusdd/>
  30. </statusinfo>
  31. </returnsts>
  32. </main>
  33. <init>
  34. </init>
  35. <hidden>
  36. <init>
  37. <comcd/>
  38. </init>
  39. </hidden>
  40. </root>
  41. </instance>
  42. <script type="javascript" ev:event="xforms-ready">
  43. <![CDATA[
  44. fInit();
  45. ]]>
  46. </script>
  47. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  48. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
  49. <submission id="TXAAA02701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/returnsts"/>
  50. <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  51. </model>
  52. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  56. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  57. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  58. </xhtml:head>
  59. <script type="javascript">
  60. <![CDATA[
  61. // 초기값
  62. function fInit()
  63. {
  64. //bcfGetCodeList( new Array("A0506"),new Array("/root/hidden/init/comcd")); // 관계코드 설정
  65. zbcfGetKindCodeList(new Array("A0020"), new Array("A0506"),new Array("/root/hidden/init/comcd"),true,'','');
  66. //opener.model.removeNodeset("/root/main/holisource/status");
  67. // opener.model.refresh();
  68. model.refresh();
  69. }
  70. //확인
  71. function fSendParam()
  72. {
  73. var fromdd=model.getValue("/root/main/holisource/fromdd"); //휴가시작일
  74. var todd=model.getValue("/root/main/holisource/todd"); //휴가종료일
  75. var holicd=model.getValue("/root/main/holisource/holicd"); //휴가 구분
  76. if(model.getValue("/root/main/holisource/fromdd")=="")
  77. {
  78. //저장시 휴가시작일이나 휴가종료일이 비어있으면
  79. messageBox("휴가시작일은","I003");
  80. return;
  81. }
  82. if(model.getValue("/root/main/holisource/todd")=='')
  83. { //저장시 휴가시작일이나 휴가종료일이 비어있으면
  84. messageBox("휴가종료일은","I003");
  85. return;
  86. }
  87. if(todd<fromdd)
  88. { // 휴가 종료일이 휴가 시작일 보다 빠른 날짜로 선택시
  89. messageBox("휴가종료일이 시작일보다 작을 수","I004");
  90. return;
  91. }
  92. if(holicd='') //휴가 구분이 공백 일 때
  93. {
  94. messageBox("휴가구분은","I003");
  95. return;
  96. }
  97. model.removeNodeset("/root/send/savedata");
  98. model.makeNode("/root/send/savedata");
  99. model.copyNode("/root/send/savedata","/root/main/holisource");
  100. if(submit("TXAAA02701")==true)
  101. {
  102. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="H") // 휴가 구간이 겹칠 때
  103. {
  104. messageBox("휴가 구간이","E006");
  105. return;
  106. }
  107. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="B") // 출결 정보가 있는 기간을 벗어나 수정을 했을 때
  108. {
  109. var btn=messageBox("이전 휴가 기간내에 출결 내역이 존재합니다. 수정 ","S001");
  110. if(btn=='6')
  111. {
  112. model.makeValue("/root/main/holisource/reflag","B"); // 기간내에 휴가 출결 처리한 정보가 있어도 휴가 내역 수정 하겠다는 플래그 B저장
  113. model.copyNode("/root/send/savedata","/root/main/holisource");
  114. if(submit("TXAAA02701")==true)
  115. {
  116. messageBox("휴가 처리가","I002");
  117. //opener.model.makeValue("/root/holisource/status","u");
  118. opener.model.makeValue("/root/holisource/reflag","c");
  119. opener.model.refresh();
  120. window.close();
  121. return;
  122. }
  123. }
  124. else
  125. {
  126. model.makeValue("/root/main/holisource/status","u"); //?
  127. return;
  128. }
  129. }
  130. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="D") // 활동기간 정보가 존재 하지 않을 때
  131. {
  132. messageBox("활동기간 정보가","I004");
  133. return;
  134. }
  135. else
  136. {
  137. messageBox("휴가 처리가","I002");
  138. //opener.model.makeValue("/root/holisource/status","u");
  139. opener.model.makeValue("/root/holisource/reflag","c");
  140. opener.model.refresh();
  141. window.close();
  142. }
  143. }
  144. }
  145. function fDelHoli()
  146. {
  147. var btn=messageBox("휴가내역을","Q001");
  148. if(btn=='6')
  149. {
  150. if(model.getValue("/root/main/holisource/status")=="i") // 등록을 위해 팝업창을 열었을 경우에는 삭제할 수 없다.
  151. {
  152. messageBox("삭제할 휴가 처리 내역이","I004");
  153. return;
  154. }
  155. model.makeValue("/root/main/holisource/status","d"); //상태값에 d저장
  156. model.removeNodeset("/root/send/savedata");
  157. model.makeNode("/root/send/savedata");
  158. model.copyNode("/root/send/savedata","/root/main/holisource");
  159. if(submit("TXAAA02701")==true)
  160. {
  161. if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="F") // 휴가 구간이 겹칠 때
  162. {
  163. var btn=messageBox("해당기간에 출석처리한 정보가 있습니다.","Q001");
  164. if(btn=='6')
  165. {
  166. model.makeValue("/root/main/holisource/reflag","A"); // 휴가 출결 처리한 정보가 있어도 휴가 내역 삭제하겠다는 플래그 A저장
  167. model.copyNode("/root/send/savedata","/root/main/holisource");
  168. if(submit("TXAAA02701")==true)
  169. {
  170. messageBox("휴가 삭제가","I002");
  171. //opener.model.makeValue("/root/holisource/status","u");
  172. opener.model.makeValue("/root/holisource/reflag","c");
  173. opener.model.refresh();
  174. }
  175. }
  176. else
  177. {
  178. model.makeValue("/root/main/holisource/status","u");
  179. return;
  180. }
  181. }
  182. else
  183. {
  184. messageBox("휴가 삭제가","I002");
  185. //opener.model.makeValue("/root/holisource/status","u");
  186. opener.model.makeValue("/root/holisource/reflag","c");
  187. opener.model.refresh();
  188. }
  189. }
  190. window.close();
  191. }
  192. else if(btn=='7')
  193. {
  194. return;
  195. }
  196. }
  197. ]]>
  198. </script>
  199. <xhtml:body pagewidth="465" pageheight="132" guideline="1,500;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  200. <group id="grp_btn" scroll="auto" style="left:0px; top:105px; width:449px; height:27px; ">
  201. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:448px; y2:0px; "/>
  202. <button id="btn_confirm" class="btn4_letter2" style="left:332px; top:5px; width:56px; height:22px; ">
  203. <caption>삭제</caption>
  204. <script type="javascript" ev:event="DOMActivate">
  205. <![CDATA[
  206. fDelHoli();
  207. ]]>
  208. </script>
  209. </button>
  210. <button id="btn_cancel" class="btn4_letter2" style="left:391px; top:5px; width:56px; height:22px; ">
  211. <caption>취소</caption>
  212. <script type="javascript" ev:event="DOMActivate">
  213. <![CDATA[
  214. //opener.javascript.setParameter("flag", "N");
  215. //opener.model.makeValue("/root/holisource/status","r"); //취소를 뜻하는 r 플래그 저장
  216. model.close();
  217. ]]>
  218. </script>
  219. </button>
  220. <button id="button1" class="btn4_letter2" style="left:273px; top:5px; width:56px; height:22px; ">
  221. <caption>저장</caption>
  222. <script type="javascript" ev:event="DOMActivate">
  223. <![CDATA[
  224. fSendParam();
  225. //model.close();
  226. ]]>
  227. </script>
  228. </button>
  229. </group>
  230. <group id="group1" scroll="auto" style="left:0px; top:0px; width:449px; height:105px; ">
  231. <line id="line8" class="line_2" style="x1:0px; y1:22px; x2:448px; y2:22px; "/>
  232. <line id="line1" class="line_2" style="x1:0px; y1:46px; x2:448px; y2:46px; "/>
  233. <caption id="caption5" class="cell_1" style="left:0px; top:0px; width:85px; height:23px; vertical-align:middle; ">휴가시작일</caption>
  234. <caption id="caption6" class="cell_1" style="left:0px; top:24px; width:85px; height:23px; vertical-align:middle; ">구분</caption>
  235. <caption id="caption7" class="cell_1" style="left:0px; top:48px; width:85px; height:53px; vertical-align:middle; ">휴가사유</caption>
  236. <caption id="caption8" class="cell_1" style="left:210px; top:0px; width:85px; height:23px; vertical-align:middle; ">휴가종료일</caption>
  237. <input id="ipt_benfdd" ref="/root/main/holisource/fromdd" class="input_default" disabled="false" inputtype="date" style="left:88px; top:2px; width:120px; height:19px; "/>
  238. <select1 id="cmb_benfcd" ref="/root/main/holisource/holicd" class="combo_default" appearance="minimal" style="left:88px; top:25px; width:120px; height:19px; ">
  239. <choices>
  240. <itemset nodeset="/root/hidden/init/comcd/A0020A0506">
  241. <label ref="cdnm"/>
  242. <value ref="cdid"/>
  243. </itemset>
  244. </choices>
  245. </select1>
  246. <textarea id="tar_rem" ref="/root/main/holisource/holijobrem" maxlength="33" style="left:88px; top:48px; width:360px; height:53px; "/>
  247. <input id="input1" ref="/root/main/holisource/todd" class="input_default" disabled="false" inputtype="date" style="left:300px; top:2px; width:120px; height:19px; "/>
  248. </group>
  249. </xhtml:body>
  250. </xhtml:html>