SMAYA04400_교육마일리지사용내역조회.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. <usefromdd/>
  12. <usetodd/>
  13. <empnm/>
  14. </cond>
  15. <mileusespec>
  16. <mileusespecinfo>
  17. <empnm/>
  18. <usedd/>
  19. <husetm/>
  20. <rem/>
  21. <empno/>
  22. <seqno/>
  23. <status/>
  24. </mileusespecinfo>
  25. </mileusespec>
  26. <educmileuselist>
  27. <educmileuseinfo>
  28. <empno/>
  29. <empnm/>
  30. <deptnm/>
  31. <jobresp/>
  32. <brthdd/>
  33. <baptnm/>
  34. <usedd/>
  35. <usetm/>
  36. <husetm/>
  37. <rem/>
  38. <seqno/>
  39. <status/>
  40. </educmileuseinfo>
  41. </educmileuselist>
  42. </main>
  43. <send>
  44. <savedata/>
  45. </send>
  46. <init>
  47. </init>
  48. <hidden>
  49. <reqdata>
  50. <empno/>
  51. </reqdata>
  52. </hidden>
  53. </root>
  54. </instance>
  55. <script type="javascript" ev:event="xforms-ready">
  56. <![CDATA[
  57. fInit();
  58. ]]>
  59. </script>
  60. <submission id="TRAYA04401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/educmileuselist"/>
  61. <submission id="TXAYA04401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/hidden"/>
  62. </model>
  63. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  65. <script type="javascript">
  66. <![CDATA[
  67. //화면오픈시
  68. function fInit(){
  69. //사용일자를 오늘 기준으로 세팅
  70. var CurrentDate = getCurrentDate();
  71. model.setValue("/root/main/cond/usefromdd", CurrentDate.substr(0, 6) + "01");
  72. model.setValue("/root/main/cond/usetodd", CurrentDate);
  73. model.setValue("/root/main/mileusespec/mileusespecinfo/status", "i");
  74. model.refresh();
  75. model.setFocus("ipt_empnm");
  76. }//fInit END
  77. //그리드 row 선택시 하단의 사용내역에 데이터 매핑
  78. function fGetMileUseList(){
  79. var idxRow = grd_educuselist.row;
  80. if( idxRow < 1) return ;
  81. model.copyNode("/root/main/mileusespec/mileusespecinfo", "/root/main/educmileuselist/educmileuseinfo[" + idxRow + "]");
  82. model.makeValue("/root/hidden/main/mileusespec/mileusespecinfo", model.getValue("/root/main/educmileuselist/educmileuseinfo[" + idxRow + "]"));
  83. var empno = model.getValue("/root/main/mileusespec/mileusespecinfo/empno");
  84. if (empno != "") { //수정
  85. var status = model.setValue("/root/main/mileusespec/mileusespecinfo/status", "u");
  86. model.refresh();
  87. }
  88. }//fGetCharityPayList END
  89. //마일리지 사용내역 조회
  90. function fMileUseRef(){
  91. if (ipt_empnm.currentText.length > 0 && ipt_empnm.currentText.length < 2) {
  92. messageBox("대상자명은 2글자 이상으로 해주십시요!","E999","");
  93. model.setFocus("ipt_empnm");
  94. return;
  95. }
  96. submit("TRAYA04401");
  97. }//fMileUseRef END
  98. //마일리지 사용내역 부분 초기화 버튼 누를시
  99. function fReset() {
  100. model.resetInstanceNode("/root/main/mileusespec/mileusespecinfo");
  101. model.setValue("/root/main/mileusespec/mileusespecinfo/status", "i");
  102. model.refresh();
  103. }// fReset END
  104. //엑셀저장 버튼 클릭시
  105. function fExcel() {
  106. if (grd_educuselist.rows <= 1) {
  107. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  108. return;
  109. }
  110. var fileName = window.fileDialog("save", ",", false, "마일리지 사용리스트", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  111. if (fileName != ""){
  112. grd_educuselist.saveExcel(fileName, "SheetName", false, false, "", "", false);
  113. }
  114. }//fExcel END
  115. ]]>
  116. </script>
  117. </xhtml:head>
  118. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  119. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  120. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:240px; height:14px; ">교육마일리지 사용내역조회</caption>
  121. </group>
  122. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  123. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  124. </group>
  125. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  126. <caption id="caption21" class="tit_2" style="left:0px; top:55px; width:190px; height:14px; ">마일리지 사용리스트</caption>
  127. <line id="line1" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:74px; "/>
  128. <group id="group4" style="left:0px; top:5px; width:1194px; height:40px; vertical-align:top; ">
  129. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  130. <caption id="caption22" class="search_no_b" style="left:225px; top:10px; width:12px; height:17px; ">~</caption>
  131. <caption id="caption25" class="search_name" style="left:20px; top:10px; width:86px; height:17px; ">사용일자 :</caption>
  132. <input id="input2" ref="/root/main/cond/usefromdd" class="input_default" navindex="13" inputtype="date" style="left:120px; top:10px; width:100px; height:19px; ">
  133. <script type="javascript" ev:event="xforms-value-changed">
  134. <![CDATA[
  135. var usefromdd = model.getValue("/root/main/cond/usefromdd");
  136. //model.setValue("/root/main/cond/usetodd", usefromdd);
  137. model.refresh();
  138. ]]>
  139. </script>
  140. </input>
  141. <input id="input3" ref="/root/main/cond/usetodd" class="input_default" navindex="13" inputtype="date" style="left:240px; top:10px; width:100px; height:19px; "/>
  142. <button id="button1" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  143. <caption>조회</caption>
  144. <script type="javascript" ev:event="DOMActivate">
  145. <![CDATA[
  146. fMileUseRef();
  147. ]]>
  148. </script>
  149. </button>
  150. <line id="line14" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
  151. <input id="ipt_empnm" ref="/root/main/cond/empnm" class="input_s_essential" imemode="hangul" style="left:548px; top:9px; width:107px; height:19px; "/>
  152. <caption id="caption2" class="search_name" style="left:450px; top:10px; width:86px; height:17px; ">교직원명 :</caption>
  153. </group>
  154. <datagrid id="grd_educuselist" nodeset="/root/main/educmileuselist/educmileuseinfo" caption="성명^사번^부서명^직책^생년월일^세례명^사용일자^사용시간^시간^비고^일련번호" colsep="^" colwidth="100, 100, 120, 100, 125, 110, 125, 100, 20, 330, 20" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:78px; width:1195px; height:585px; ">
  155. <col ref="empnm" style="text-align:center; "/>
  156. <col ref="empno" style="text-align:center; "/>
  157. <col ref="deptnm" style="text-align:center; "/>
  158. <col ref="jobresp" style="text-align:center; "/>
  159. <col ref="brthdd" format="yyyy-mm-dd" style="text-align:center; "/>
  160. <col ref="baptnm" style="text-align:center; "/>
  161. <col ref="usedd" format="yyyy-mm-dd" style="text-align:center; "/>
  162. <col ref="usetm" style="text-align:center; "/>
  163. <col ref="husetm" visibility="hidden"/>
  164. <col ref="rem"/>
  165. <col ref="seqno" visibility="hidden"/>
  166. <script type="javascript" ev:event="onclick">
  167. <![CDATA[
  168. //초기화 실행 후 그리드 빈공간 클릭시 데이터가 하단 인스턴스에 뿌려지는것 방지
  169. if(grd_educuselist.isCell(event.target) && grd_educuselist.mouseRow >= grd_educuselist.fixedrows) {
  170. fGetMileUseList();
  171. }
  172. ]]>
  173. </script>
  174. </datagrid>
  175. <group id="group9" style="left:0px; top:670px; width:1185px; height:60px; ">
  176. <caption id="caption13" class="tit_2" style="left:8px; top:5px; width:152px; height:14px; font-family:돋움; vertical-align:middle; ">마일리지사용내역</caption>
  177. <caption id="caption14" class="cell_1" style="left:0px; top:30px; width:67px; height:23px; vertical-align:middle; ">성명</caption>
  178. <button id="button15" class="btn5_letter3" style="left:1130px; top:3px; width:53px; height:19px; ">
  179. <caption>초기화</caption>
  180. <script type="javascript" ev:event="DOMActivate">
  181. <![CDATA[
  182. fReset();
  183. ]]>
  184. </script>
  185. </button>
  186. <caption id="caption15" class="cell_1" style="left:380px; top:30px; width:67px; height:23px; vertical-align:middle; ">사용시간</caption>
  187. <line id="line12" class="line_1" style="x1:0px; y1:24px; x2:1185px; y2:24px; "/>
  188. <button id="button7" class="btn5_letter2" style="left:1085px; top:3px; width:42px; height:19px; ">
  189. <caption>삭제</caption>
  190. <script type="javascript" ev:event="DOMActivate">
  191. <![CDATA[
  192. fMileUseDel();
  193. function fMileUseDel(){
  194. var status = model.getValue("/root/main/mileusespec/mileusespecinfo/status");
  195. if(status == "i"){
  196. messageBox("삭제할 마일리지 사용내역이","I004");
  197. }else{
  198. var btn = messageBox("마일리지 사용내역을","Q001");
  199. if(btn == "6"){
  200. model.removeNodeset("/root/send/savedata");
  201. model.makeNode("/root/send/savedata");
  202. model.setValue("/root/main/mileusespec/mileusespecinfo/status", "d");
  203. model.copyNode("/root/send/savedata", "/root/main/mileusespec/mileusespecinfo");
  204. submit("TXAYA04401");
  205. // model.refresh();
  206. fMileUseRef();
  207. fReset();
  208. } else if (btn == "7") {
  209. return;
  210. }//if~else END
  211. }
  212. }//fMileUseDel END
  213. ]]>
  214. </script>
  215. </button>
  216. <button id="button3" class="btn5_letter2" style="left:1040px; top:3px; width:42px; height:19px; ">
  217. <caption>저장</caption>
  218. <script type="javascript" ev:event="DOMActivate">
  219. <![CDATA[
  220. fUseSave();
  221. function fUseSave(){
  222. var status = model.getValue("/root/main/mileusespec/mileusespecinfo/status");
  223. if(status == "i"){
  224. messageBox("처리할 직원을" , "C002");
  225. return
  226. }//if END
  227. var husetm = model.getValue("/root/main/mileusespec/mileusespecinfo/husetm");
  228. if(husetm == 0){
  229. messageBox("사용시간을 0보다 크게 입력하십시오 " , "E");
  230. return
  231. }
  232. if(status == "u"){
  233. model.copyNode("/root/send/savedata", "/root/main/mileusespec/mileusespecinfo");
  234. if(submit("TXAYA04401", false) == true){
  235. var errdata = model.getValue("/root/hidden/reqdata/empno");
  236. if(errdata == ""){
  237. messageBox("자료 저장이", "I002");
  238. fReset();
  239. }else{
  240. messageBox("사용시간이 잔고시간보다 많아서 등록할 수" , "I004");
  241. model.setFocus("ipt_usetm");
  242. }
  243. }//submit if END
  244. fMileUseRef();
  245. }//status if END
  246. }//fUseSave END
  247. ]]>
  248. </script>
  249. </button>
  250. <caption id="caption8" class="cell_1" style="left:188px; top:30px; width:67px; height:23px; vertical-align:middle; ">사용일자</caption>
  251. <input id="ipt_usedd" ref="/root/main/mileusespec/mileusespecinfo/usedd" class="input_default" inputtype="date" format="yyyy-mm-dd" style="left:258px; top:32px; width:120px; height:19px; text-align:center; "/>
  252. <line id="line3" class="line_3" style="x1:0px; y1:55px; x2:1185px; y2:55px; "/>
  253. <output id="output2" ref="/root/main/mileusespec/mileusespecinfo/empnm" class="output_fix" style="left:63px; top:32px; width:120px; height:19px; text-align:center; "/>
  254. <caption id="caption1" class="cell_1" style="left:578px; top:30px; width:67px; height:23px; vertical-align:middle; ">비고</caption>
  255. <input id="ipt_usetm" ref="/root/main/mileusespec/mileusespecinfo/husetm" class="input_default" style="left:453px; top:32px; width:120px; height:19px; "/>
  256. <input id="input4" ref="/root/main/mileusespec/mileusespecinfo/rem" class="input_default" style="left:648px; top:32px; width:535px; height:19px; "/>
  257. <output id="output3" ref="/root/hidden/reqdata/empno" visibility="hidden" style="left:920px; top:3px; width:100px; height:19px; "/>
  258. </group>
  259. </group>
  260. <button id="btn_excel" class="btn2_letter4" style="left:1131px; top:64px; width:64px; height:19px; ">
  261. <caption>엑셀저장</caption>
  262. <script type="javascript" ev:event="DOMActivate">
  263. <![CDATA[
  264. fExcel();
  265. ]]>
  266. </script>
  267. </button>
  268. </xhtml:body>
  269. </xhtml:html>