SPAAA04000_바코드출결처리.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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. <cond>
  10. <voluntrid/>
  11. <cptvoluntrid/>
  12. <servdd/>
  13. <tretflag/>
  14. <educrcogtm/>
  15. <bizflag/>
  16. <educfestivseqno/>
  17. </cond>
  18. <main>
  19. <pridrinfo>
  20. <drinfo/>
  21. </pridrinfo>
  22. <voluntrattdabsninfo>
  23. <voluntrattdabsnlist>
  24. </voluntrattdabsnlist>
  25. </voluntrattdabsninfo>
  26. </main>
  27. <hidden>
  28. <calldryninfo>
  29. <calldryninfolist>
  30. <drid/>
  31. </calldryninfolist>
  32. </calldryninfo>
  33. </hidden>
  34. <send/>
  35. <init>
  36. <hardcd/>
  37. </init>
  38. <temp>
  39. <voluntrattdabsninfo>
  40. <voluntrattdabsnlist/>
  41. </voluntrattdabsninfo>
  42. </temp>
  43. </root>
  44. </instance>
  45. <script type="javascript" ev:event="xforms-ready">
  46. <![CDATA[
  47. fInit();
  48. ]]>
  49. </script>
  50. <script type="javascript" ev:event="xforms-close">
  51. <![CDATA[
  52. fCloseWindow();
  53. ]]>
  54. </script>
  55. <!-- 호출한의사인지 조회 -->
  56. <!-- 도착시간등록 -->
  57. <submission id="TXAAA04001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  58. <submission id="TXAAA04002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  59. </model>
  60. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  62. </xhtml:head>
  63. <script type="javascript">
  64. <![CDATA[
  65. function fInit(){
  66. //초기화
  67. model.removenode('/root/cond');
  68. model.makeValue('/root/cond/cptvoluntrid', '');
  69. model.makeValue('/root/cond/voluntrid', '');
  70. //캡션에 포커스가 선택된 상태로 보여지게
  71. setCaptionFocus(true);
  72. var tretflag = opener.javascript.getParameter("SPAAA00200_param_tretflag");
  73. model.makeValue("/root/cond/tretflag", tretflag);
  74. if(tretflag == "1"){ //봉사활동출결처리인 경우
  75. var servdd = opener.javascript.getParameter("SPAAA00200_param_servdd");
  76. model.makeValue('/root/cond/servdd', servdd);
  77. caption4.value = "봉사활동 출결처리자 리스트";
  78. }else if(tretflag == "2"){ //교육활동출결처리인 경우-20100419-kys-추가
  79. model.makeValue('/root/cond/servdd', opener.javascript.getParameter("SPAAA00300_param_servdd"));
  80. model.makeValue('/root/cond/educrcogtm', opener.javascript.getParameter("SPAAA00300_param_educrcogtm"));
  81. model.makeValue('/root/cond/bizflag', opener.javascript.getParameter("SPAAA00300_param_bizflag"));
  82. model.makeValue('/root/cond/educfestivseqno', opener.javascript.getParameter("SPAAA00300_param_educfestivseqno"));
  83. caption4.value = "교육행사 출결처리자 리스트";
  84. }
  85. model.refresh();
  86. }
  87. function fCloseWindow(){
  88. opener.javascript.setParameter("SPAAA04000_closeyn","Y");
  89. model.close();
  90. }
  91. //입력한 내용을 캡션에 보여지게함
  92. //keyStr : event.keyCode
  93. function fSetCaption(keyStr){
  94. model.setValue('/root/cond/cptvoluntrid', keyStr);
  95. model.setValue('/root/cond/voluntrid', keyStr);
  96. model.refresh();
  97. if(keyStr.length == 8){
  98. model.setFocus('btn_save');
  99. btn_save.dispatch('DOMActivate');
  100. }
  101. }
  102. //캡션 포커스 선택상태 변경
  103. function setCaptionFocus(isSelected, itemKd){
  104. if(isSelected){
  105. //입력대기 상태로 보여짐
  106. //capt_voluntrid.attribute("background-color") = '#ffffff'; //흰색
  107. //capt_voluntrid.attribute("border-color") = '#ffcc00';
  108. if(itemKd != 'input'){
  109. model.setFocus("ipt_voluntrid");
  110. }
  111. }else{
  112. //처리중 상태로 보여짐
  113. //capt_voluntrid.attribute("background-color") = '#ff0000'; //빨강
  114. //capt_voluntrid.attribute("border-color") = '#c0c0c0';
  115. }
  116. //실제포커스는 ipt_drid로 가게 할것
  117. }
  118. //봉사활동 출결 저장
  119. function fVoluntrAttdSave(){
  120. if(model.getValue("/root/cond/voluntrid") == ""){
  121. messageBox("봉사자 사번이 입력되지 않았습니다","E");
  122. finit2();
  123. model.refresh();
  124. return;
  125. }
  126. if(model.getValue("/root/cond/voluntrid").length != 8){
  127. messageBox("봉사자 사번이 유효하지 않습니다","E");
  128. finit2();
  129. model.refresh();
  130. return;
  131. }
  132. //setCaptionFocus(false);
  133. model.removeNodeset("/root/send/savedata");
  134. model.makeNode("/root/send/savedata");
  135. model.makeValue("/root/send/savedata/servdd", model.getValue("/root/cond/servdd"));
  136. model.makeValue("/root/send/savedata/voluntrid", model.getValue("/root/cond/voluntrid"));
  137. model.makeValue("/root/send/savedata/eachinstservtm", "3"); //서울성모만 적용..
  138. if(submit("TXAAA04001")==true){
  139. //messageBox("출결처리가","I002");
  140. //20100416-kys-이은지샘요청으로 추가-출결처리자 리스트 추가
  141. model.duplicate("/root/main/voluntrattdabsninfo", "/root/temp/voluntrattdabsninfo/voluntrattdabsnlist");
  142. grd_absnlist.refresh();
  143. finit2();
  144. }else{
  145. messageBox("출결처리 실패하였습니다.","E");
  146. finit2();
  147. }
  148. model.refresh();
  149. }
  150. //교육활동 출결 저장-20100419-kys-추가
  151. function fBarEducFestivAttdAbsnSave(){
  152. if(model.getValue("/root/cond/voluntrid") == ""){
  153. messageBox("봉사자 사번이 입력되지 않았습니다","E");
  154. finit2();
  155. model.refresh();
  156. return;
  157. }
  158. //setCaptionFocus(false);
  159. if(model.getValue("/root/cond/voluntrid").length != 8){
  160. messageBox("봉사자 사번이 유효하지 않습니다","E");
  161. finit2();
  162. model.refresh();
  163. return;
  164. }
  165. model.removeNodeset("/root/send/savedata");
  166. model.makeNode("/root/send/savedata");
  167. model.makeValue("/root/send/savedata/entrydd", model.getValue("/root/cond/servdd"));
  168. model.makeValue("/root/send/savedata/voluntrid", model.getValue("/root/cond/voluntrid"));
  169. model.makeValue("/root/send/savedata/educrcogtm", model.getValue("/root/cond/educrcogtm"));
  170. model.makeValue("/root/send/savedata/bizflag", model.getValue("/root/cond/bizflag"));
  171. model.makeValue("/root/send/savedata/educfestivseqno", model.getValue("/root/cond/educfestivseqno"));
  172. if(submit("TXAAA04002")==true){
  173. //messageBox("출결처리가","I002");
  174. //20100416-kys-이은지샘요청으로 추가-출결처리자 리스트 추가
  175. model.duplicate("/root/main/voluntrattdabsninfo", "/root/temp/voluntrattdabsninfo/voluntrattdabsnlist");
  176. grd_absnlist.refresh();
  177. finit2();
  178. }else{
  179. messageBox("출결처리 실패하였습니다.","E");
  180. finit2();
  181. }
  182. model.refresh();
  183. }
  184. function finit2(){ //화면 로딩후 초기화 함수.
  185. model.setValue('/root/cond/cptvoluntrid', '');
  186. model.setValue('/root/cond/voluntrid', '');
  187. setCaptionFocus(true);
  188. }
  189. ]]>
  190. </script>
  191. <xhtml:body pagewidth="360" pageheight="450" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  192. <group id="grp_sea" style="left:1px; top:0px; width:339px; height:435px; vertical-align:top; ">
  193. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:10px; top:40px; width:320px; height:60px; "/>
  194. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:90px; height:20px; ">출결등록</caption>
  195. <caption id="caption1" class="search_name" style="left:20px; top:50px; width:90px; height:17px; font-size:10pt; ">사 번 :</caption>
  196. <shape id="roundrect2" class="roundrect_example" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:95px; top:5px; width:235px; height:30px; "/>
  197. <caption id="caption2" class="cell_1" style="left:105px; top:9px; width:95px; height:20px; font-size:11pt; font-weight:bold; ">활동일자 :</caption>
  198. <input id="ipt_servdd" ref="/root/cond/servdd" class="input_essential" inputtype="date" style="left:205px; top:10px; width:115px; height:19px; "/>
  199. <input id="ipt_voluntrid" ref="/root/cond/voluntrid" navindex="1" visibility="visible" autonext="true" maxlength="8" pastemode="validchars" required="true" format="99999999" style="left:20px; top:70px; width:85px; height:19px; ">
  200. <script type="javascript" ev:event="xforms-value-changed">
  201. <![CDATA[
  202. fSetCaption(ipt_voluntrid.value);
  203. ]]>
  204. </script>
  205. <script type="javascript" ev:event="onkeyup">
  206. <![CDATA[
  207. fSetCaption(ipt_voluntrid.currentText);
  208. ]]>
  209. </script>
  210. <script type="javascript" ev:event="DOMFocusIn">
  211. <![CDATA[
  212. //setCaptionFocus(true, 'input');
  213. ]]>
  214. </script>
  215. <script type="javascript" ev:event="DOMFocusOut">
  216. <![CDATA[
  217. //setCaptionFocus(false);
  218. ]]>
  219. </script>
  220. <hint>
  221. <![CDATA[출결처리시 이곳에 포커스를 맞쳐 주세요.]]>
  222. </hint>
  223. </input>
  224. <caption id="capt_voluntrid" ref="/root/cond/cptvoluntrid" navindex="2" format="99999999" style="left:110px; top:50px; width:210px; height:40px; font-family:굴림체; font-size:24pt; font-weight:bold; color:#333399; text-align:center; vertical-align:middle; background-color:#ffffff; border-color:#c0c0c0; border-style:solid; ">
  225. <hint>
  226. <![CDATA[입력란에 봉사자사번을 입력하세요]]>
  227. </hint>
  228. <script type="javascript" ev:event="DOMFocusIn">
  229. <![CDATA[
  230. setCaptionFocus(true);
  231. ]]>
  232. </script>
  233. </caption>
  234. <caption id="caption4" class="tit_2" style="left:15px; top:150px; width:240px; height:13px; ">봉사활동 출결처리자 리스트</caption>
  235. <datagrid id="grd_absnlist" nodeset="/root/main/voluntrattdabsninfo/voluntrattdabsnlist" caption="봉사자ID^성명^세례명" colsep="^" mergecellsfixedrows="bycolrec" rowsep="|" style="left:10px; top:175px; width:315px; height:245px; ">
  236. <col ref="voluntrid" style="text-align:center; "/>
  237. <col ref="voluntrnm" style="text-align:center; "/>
  238. <col ref="baptnm" style="text-align:center; "/>
  239. </datagrid>
  240. <line id="line1" class="line_2" style="x1:15px; y1:141px; x2:325px; y2:141px; "/>
  241. </group>
  242. <button id="btn_save" class="btn4_letter2" navindex="3" style="left:210px; top:110px; width:56px; height:22px; ">
  243. <caption>등록</caption>
  244. <script type="javascript" ev:event="DOMActivate">
  245. <![CDATA[
  246. //setCaptionFocus(false);
  247. if(model.getValue("/root/cond/tretflag") == "1"){
  248. fVoluntrAttdSave(); //봉사활동 출결처리
  249. }else if(model.getValue("/root/cond/tretflag") == "2"){ //교육활동 출결처리
  250. fBarEducFestivAttdAbsnSave();
  251. }
  252. ]]>
  253. </script>
  254. </button>
  255. <button id="button2" class="btn4_letter2" style="left:275px; top:110px; width:56px; height:22px; ">
  256. <caption>닫기</caption>
  257. <script type="javascript" ev:event="DOMActivate">
  258. <![CDATA[
  259. fCloseWindow();
  260. ]]>
  261. </script>
  262. </button>
  263. <script type="javascript" ev:event="onkeyup">
  264. <![CDATA[
  265. if(event.keyCode == 27){//esc키를 눌렀을경우 창닫기
  266. fCloseWindow();
  267. }
  268. ]]>
  269. </script>
  270. </xhtml:body>
  271. </xhtml:html>