SMAYA04500_교육마일리지적립내역조회.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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. <empnm/>
  12. <refflag>1</refflag>
  13. <tottm/>
  14. <intvl/>
  15. <retire/>
  16. </cond>
  17. <educmileuselist>
  18. <educmileuselistinfo>
  19. <usedd/>
  20. <usetm/>
  21. <rem/>
  22. <status/>
  23. </educmileuselistinfo>
  24. </educmileuselist>
  25. <educmilesavelist>
  26. <educmilesavelistinfo>
  27. <chk/>
  28. <name/>
  29. <deptnm/>
  30. <jobresp/>
  31. <brthdate/>
  32. <baptnm/>
  33. <totsavetm/>
  34. <totusetm/>
  35. <rmndamt/>
  36. <rmndtm/>
  37. <empno/>
  38. <status/>
  39. </educmilesavelistinfo>
  40. </educmilesavelist>
  41. <rCSV/>
  42. </main>
  43. <send>
  44. <reqdata/>
  45. <savedata/>
  46. </send>
  47. <init>
  48. <chkdata/>
  49. </init>
  50. <hidden/>
  51. <temp/>
  52. </root>
  53. </instance>
  54. <script type="javascript" ev:event="xforms-ready">
  55. <![CDATA[
  56. fInit();
  57. fReset();
  58. ]]>
  59. </script>
  60. <submission id="TRAYA04501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/educmilesavelist"/>
  61. <submission id="TXAYA04501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root"/>
  62. </model>
  63. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  66. <script type="javascript">
  67. <![CDATA[
  68. //화면 오픈시..
  69. function fInit(){
  70. grd_educmilesavelist.fixedcellcheckbox(0, 1) = true;
  71. if(rdo_refflag.value == "1"){
  72. rdo_intvl.disabled = true;
  73. }
  74. model.setFocus("ipt_empnm");
  75. }//fInit END
  76. //마일리지 적립내역 조회
  77. function fEducMile(){
  78. if (ipt_empnm.currentText.length > 0 && ipt_empnm.currentText.length < 2) {
  79. messageBox("대상자명은 2글자 이상으로 해주십시요!","E999","");
  80. model.setFocus("ipt_empnm");
  81. return;
  82. }
  83. submit("TRAYA04501");
  84. }//fEducMile END
  85. //마일리지 사용내역 저장버튼 클릭시
  86. function fEducMileSave(){
  87. //저장할 마일리지 사용내역 데이터를 동적으로 만든것
  88. var chkdata = "empno"
  89. + "▦usedd"
  90. + "▦usetm"
  91. + "▦rem"
  92. + "▩" ;
  93. var idxRow = grd_educmilesavelist.rows;
  94. var usetm = model.getValue("/root/main/educmileuselist/educmileuselistinfo/usetm");
  95. var cnt = 0;
  96. //먼저 체크여부를 확인
  97. for(var i=1; i < idxRow; i++){
  98. var chk = model.getValue("/root/main/educmilesavelist/educmilesavelistinfo["+ i +"]/chk")
  99. if (chk == "1"){
  100. cnt++;
  101. }
  102. }//for END
  103. //체크된 데이터가 없을시 메시지 출력
  104. if(cnt == 0){
  105. messageBox("처리할 직원을", "C002");
  106. return;
  107. }//cnt END
  108. //사용시간 입력란이 공백일 경우 메시지 출력
  109. if(usetm == ""){
  110. messageBox("사용시간을" , "C001");
  111. model.setFocus("ipt_usetm");
  112. return;
  113. }
  114. for(var i=1; i < idxRow; i++) {
  115. var chkFlag = model.getValue("/root/main/educmilesavelist/educmilesavelistinfo[" + i + "]/chk");
  116. var rmndtm = model.getValue("/root/main/educmilesavelist/educmilesavelistinfo[" + i + "]/rmndtm");
  117. if(chkFlag == "1") { //체크된 값만 저장되도록 데이터 생성
  118. //사용시간 입력란에 문자가 입력되면 메시지 출력
  119. if(isNaN(usetm) == true){
  120. messageBox("사용시간을 숫자로" , "C001");
  121. fReset();
  122. model.setFocus("ipt_usetm");
  123. return;
  124. }
  125. //조회된 잔고보다 입력된 사용시간이 클 경우 메시지 출력
  126. if(parseInt(usetm * 60) > parseInt(rmndtm)){
  127. messageBox("잔고가 부족한 직원이 있습니다. 다시" , "C002");
  128. return
  129. }
  130. //var husetm = model.getValue("/root/main/mileusespec/mileusespecinfo/husetm");
  131. var husetm = model.getValue("/root/main/educmileuselist/educmileuselistinfo/usetm");
  132. //alert(husetm);
  133. if(husetm == 0){
  134. messageBox("사용시간을 0보다 크게 입력하십시오 " , "E");
  135. return
  136. }
  137. chkdata +=
  138. model.getValue("/root/main/educmilesavelist/educmilesavelistinfo[" + i + "]/empno")
  139. + "▦" + model.getValue("/root/main/educmileuselist/educmileuselistinfo/usedd")
  140. + "▦" + model.getValue("/root/main/educmileuselist/educmileuselistinfo/usetm")
  141. + "▦" + model.getValue("/root/main/educmileuselist/educmileuselistinfo/rem")
  142. + "▩" ;
  143. }//chkFlag END
  144. }//for END
  145. // alert(chkdata);
  146. model.removeNodeset("/root/send/savedata");
  147. model.makeNode("/root/send/savedata");
  148. model.makeValue("/root/init/chkdata",chkdata);
  149. model.copyNode("/root/send/savedata", "/root/init");
  150. if(usetm != "" && cnt > 0){
  151. if(submit("TXAYA04501", false) == true) {
  152. messageBox("자료 저장이" , "I002");
  153. fReset();
  154. fEducMile();
  155. model.refresh();
  156. model.setFocus("ipt_usetm");
  157. }//if END
  158. }//if END
  159. }//fEducMileSave END
  160. //마일리지 사용내역 부분 초기화 버튼 누를시
  161. function fReset() {
  162. model.resetInstanceNode("/root/main/educmileuselist/educmileuselistinfo");
  163. var CurrentDate = getCurrentDate();
  164. model.setValue("/root/main/educmileuselist/educmileuselistinfo/usedd", CurrentDate);
  165. model.refresh();
  166. }// fReset END
  167. //마일리지 적립내역 리스트 출력
  168. function fPreview(){
  169. exeReportPreview("RPAYA04501", "XMLSTR");
  170. }//fPreview END
  171. ]]>
  172. </script>
  173. </xhtml:head>
  174. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  175. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  176. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:240px; height:14px; ">교육마일리지 적립내역조회</caption>
  177. </group>
  178. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  179. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  180. </group>
  181. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  182. <caption id="caption21" class="tit_2" style="left:0px; top:55px; width:190px; height:14px; ">마일리지 적립내역리스트</caption>
  183. <line id="line1" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:74px; "/>
  184. <group id="group4" style="left:0px; top:5px; width:1194px; height:40px; vertical-align:top; ">
  185. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  186. <caption id="caption25" class="search_name" style="left:20px; top:10px; width:86px; height:17px; ">교직원명 :</caption>
  187. <button id="button1" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  188. <caption>조회</caption>
  189. <script type="javascript" ev:event="DOMActivate">
  190. <![CDATA[
  191. fEducMile();
  192. model.refresh();
  193. ]]>
  194. </script>
  195. </button>
  196. <line id="line14" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
  197. <input id="ipt_empnm" ref="/root/main/cond/empnm" class="input_default" imemode="hangul" style="left:118px; top:9px; width:107px; height:19px; "/>
  198. <caption id="caption1" class="search_name" style="left:270px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
  199. <select1 id="rdo_refflag" ref="/root/main/cond/refflag" overflow="visible" appearance="full" cols="3" style="left:370px; top:9px; width:220px; height:20px; border-style:none; ">
  200. <choices>
  201. <item>
  202. <label>전체</label>
  203. <value>1</value>
  204. </item>
  205. <item>
  206. <label>총적립시간</label>
  207. <value>2</value>
  208. </item>
  209. <item>
  210. <label>총사용시간</label>
  211. <value>3</value>
  212. </item>
  213. </choices>
  214. <script type="javascript" ev:event="onclick">
  215. <![CDATA[
  216. if(rdo_refflag.value == "1"){
  217. ipt_tottm.value = "";
  218. rdo_intvl.value = "";
  219. }
  220. if(rdo_refflag.value == "2" || rdo_refflag.value == "3") {
  221. rdo_intvl.disabled = false;
  222. rdo_intvl.select(0);
  223. }else{
  224. rdo_intvl.disabled = true;
  225. }
  226. ]]>
  227. </script>
  228. </select1>
  229. <input id="ipt_tottm" ref="/root/main/cond/tottm" class="input_default" imemode="hangul" style="left:595px; top:9px; width:107px; height:19px; "/>
  230. <select1 id="rdo_intvl" ref="/root/main/cond/intvl" overflow="visible" appearance="full" cols="2" style="left:715px; top:10px; width:100px; height:20px; border-style:none; ">
  231. <choices>
  232. <item>
  233. <label>이상</label>
  234. <value>1</value>
  235. </item>
  236. <item>
  237. <label>이하</label>
  238. <value>2</value>
  239. </item>
  240. </choices>
  241. </select1>
  242. <select id="checkbox1" ref="/root/main/cond/retire" overflow="visible" appearance="full" style="left:825px; top:10px; width:100px; height:20px; border-style:none; ">
  243. <choices>
  244. <item>
  245. <label>퇴사자포함</label>
  246. <value>Y</value>
  247. </item>
  248. </choices>
  249. </select>
  250. </group>
  251. <datagrid id="grd_educmilesavelist" nodeset="/root/main/educmilesavelist/educmilesavelistinfo" caption="^성명^사번^부서명^직책^생년월일^세례명^총적립시간^총사용시간^잔고^분단위잔고^사원번호" colsep="^" colwidth="29, 100, 100, 140, 100, 120, 130, 130, 130, 130, 30, 30" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:78px; width:1195px; height:580px; ">
  252. <col checkvalue="1,0" ref="chk" type="checkbox"/>
  253. <col ref="name" type="inputbutton" style="text-align:center; "/>
  254. <col ref="empno" style="text-align:center; "/>
  255. <col ref="deptnm" style="text-align:center; "/>
  256. <col ref="jobresp" style="text-align:center; "/>
  257. <col ref="brthdate" format="yyyy-mm-dd" style="text-align:center; "/>
  258. <col ref="baptnm" style="text-align:center; "/>
  259. <col ref="totsavetm" style="text-align:center; "/>
  260. <col ref="totusetm" style="text-align:center; "/>
  261. <col ref="rmndamt" style="text-align:center; "/>
  262. <col ref="rmndtm" visibility="hidden"/>
  263. <col ref="empno" visibility="hidden"/>
  264. <script type="javascript" ev:event="onbuttonclick">
  265. <![CDATA[
  266. var sCol = grd_educmilesavelist.col;
  267. var idxRow = grd_educmilesavelist.row;
  268. if( idxRow < 1) return ;
  269. if (sCol == grd_educmilesavelist.colRef("name") ){ //성명 버튼 클릭시
  270. var emplno = model.getValue("/root/main/educmilesavelist/educmilesavelistinfo[" + idxRow + "]/empno");
  271. model.makeValue("/root/temp/emplno", emplno);
  272. modal("SMAYA04600", 1,100, 100, "SMAYA04600", "/root/temp", "/root/main/cond");
  273. }
  274. ]]>
  275. </script>
  276. </datagrid>
  277. <group id="group9" style="left:0px; top:665px; width:1185px; height:60px; ">
  278. <caption id="caption13" class="tit_2" style="left:8px; top:5px; width:152px; height:14px; font-family:돋움; vertical-align:middle; ">마일리지사용내역</caption>
  279. <button id="button15" class="btn5_letter3" style="left:925px; top:0px; width:53px; height:19px; ">
  280. <caption>초기화</caption>
  281. <script type="javascript" ev:event="DOMActivate">
  282. <![CDATA[
  283. fReset();
  284. model.setFocus("ipt_usetm");
  285. ]]>
  286. </script>
  287. </button>
  288. <caption id="caption15" class="cell_1" style="left:196px; top:29px; width:67px; height:23px; vertical-align:middle; ">사용시간</caption>
  289. <line id="line12" class="line_1" style="x1:0px; y1:23px; x2:980px; y2:23px; "/>
  290. <button id="button3" class="btn5_letter2" style="left:880px; top:0px; width:42px; height:19px; ">
  291. <caption>저장</caption>
  292. <script type="javascript" ev:event="DOMActivate">
  293. <![CDATA[
  294. fEducMileSave();
  295. ]]>
  296. </script>
  297. </button>
  298. <caption id="caption8" class="cell_1" style="left:1px; top:29px; width:67px; height:23px; vertical-align:middle; ">사용일자</caption>
  299. <line id="line3" class="line_3" style="x1:1px; y1:54px; x2:980px; y2:54px; "/>
  300. <caption id="caption2" class="cell_1" style="left:380px; top:29px; width:67px; height:23px; vertical-align:middle; ">비고</caption>
  301. <input id="ipt_usetm" ref="/root/main/educmileuselist/educmileuselistinfo/usetm" class="input_default" format="9999" style="left:266px; top:30px; width:110px; height:19px; "/>
  302. <input id="input4" ref="/root/main/educmileuselist/educmileuselistinfo/rem" class="input_default" style="left:450px; top:31px; width:530px; height:19px; "/>
  303. <input id="input7" ref="/root/main/educmileuselist/educmileuselistinfo/usedd" class="input_default" navindex="13" inputtype="date" style="left:71px; top:31px; width:120px; height:19px; "/>
  304. </group>
  305. <button id="button83" class="btn3_letter10" style="left:994px; top:49px; width:152px; height:22px; ">
  306. <caption>마일리지사용내역조회</caption>
  307. <script type="javascript" ev:event="DOMActivate">
  308. <![CDATA[
  309. modal("SMAYA04400",1,100,100);
  310. //modal("SMAYA04400",null,null,null, "SMAYA04400", "/root/actsource", "/root/main/actsource");
  311. ]]>
  312. </script>
  313. </button>
  314. <button id="button10" class="btn2_letter2" style="left:1151px; top:50px; width:42px; height:19px; ">
  315. <caption>출력</caption>
  316. <script type="javascript" ev:event="DOMActivate">
  317. <![CDATA[
  318. fPreview();
  319. ]]>
  320. </script>
  321. </button>
  322. </group>
  323. </xhtml:body>
  324. </xhtml:html>