SMRPD02400_연차자료생성.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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. <main>
  10. <list>
  11. <yearnolist>
  12. <emplno/>
  13. <emplnm/>
  14. <dutplcedeptcd/>
  15. <deptnm/>
  16. <createyn/>
  17. <genryearno/>
  18. <useyearno/>
  19. <olmtspreyearno/>
  20. <spreyearno/>
  21. <genrhealholi/>
  22. <usehealholi/>
  23. <sprehealholi/>
  24. <yearno/>
  25. </yearnolist>
  26. </list>
  27. <rslt>
  28. <rsltlist/>
  29. </rslt>
  30. </main>
  31. <send>
  32. <retrparams>
  33. <instcd/>
  34. <yearno/>
  35. <emplno/>
  36. <emplnm/>
  37. <idflag>I</idflag>
  38. <newyn/>
  39. </retrparams>
  40. </send>
  41. <init/>
  42. <temp/>
  43. </root>
  44. </instance>
  45. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  49. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  50. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  51. <submission id="TRRPD02401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/list"/>
  52. <submission id="TXRPD02401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/rslt"/>
  53. <submission id="TXRPD02402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/rslt"/>
  54. </model>
  55. <script type="javascript" ev:event="xforms-ready">
  56. <![CDATA[
  57. fInitialize();
  58. ]]>
  59. </script>
  60. <script type="javascript">
  61. <![CDATA[
  62. function fInitialize()
  63. {
  64. model.removenode("/root/main/list/yearnolist");
  65. model.setValue("/root/send/retrparams/yearno", getCurrentDate().substr(0, 4));
  66. // misfComboComCdListMulti("Z0007","cmb_instcd");
  67. misfComboInstCdListMulti("cmb_instcd",ipt_yearno.value+getCurrentDate().substr(4, 4),"","N");
  68. misfMsterDetailSet(grd_yearnolist, null, "TRRPD02401", "Y");
  69. model.setValue("/root/send/retrparams/instcd", getUserInfo("dutplceinstcd"));
  70. model.refresh();
  71. }
  72. function fRetrieve()
  73. {
  74. if(model.getValue("/root/send/retrparams/yearno") == "" || model.getValue("/root/send/retrparams/yearno").length != 4)
  75. {
  76. messageBox("작업년도를", "C001");
  77. return;
  78. }
  79. submit("TRRPD02401");
  80. var sYn = "";
  81. for(var i=grd_yearnolist.fixedRows; i<grd_yearnolist.rows; i++)
  82. {
  83. sYn = grd_yearnolist.valueMatrix(i, grd_yearnolist.colRef("createyn"));
  84. if(sYn == "Y")
  85. {
  86. grd_yearnolist.cellStyle("color", i, grd_yearnolist.colRef("createyn")) = "#FF0000";
  87. }
  88. else
  89. {
  90. grd_yearnolist.cellStyle("color", i, grd_yearnolist.colRef("createyn")) = "#000000";
  91. }
  92. }
  93. }
  94. ]]>
  95. </script>
  96. </xhtml:head>
  97. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  98. <group id="group1" style="left:0px; top:0px; width:1195; height:13px; ">
  99. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">연차자료생성</caption>
  100. </group>
  101. <group id="group3" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  102. <group id="group2" style="left:0px; top:10px; width:1195px; height:36px; vertical-align:top; ">
  103. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:35px; "/>
  104. <caption id="caption2" class="search_name" style="left:275px; top:9px; width:112px; height:17px; ">작업년도 :</caption>
  105. <line id="line13" class="line_4" style="top:7; x1:1110px; y1:7px; x2:1110px; y2:29px; border-left-style:solid; "/>
  106. <caption id="caption3" class="search_name" style="left:488px; top:9px; width:106px; height:17px; ">사원번호 :</caption>
  107. <input id="ipt_yearno" ref="/root/send/retrparams/yearno" class="input_s_essential" inputtype="date" format="yyyy" style="left:363px; top:8px; width:100px; height:19px; text-align:center; ">
  108. <script type="javascript" ev:event="xforms-value-changed">
  109. <![CDATA[
  110. var instcd = cmb_instcd.value;
  111. if( getStringLength(ipt_yearno.value) == "4" ) {
  112. if( getCurrentDate().substr(0, 4) == ipt_yearno.value ) {
  113. misfComboInstCdListMulti("cmb_instcd",getCurrentDate().substr(0, 8),"","N");
  114. }
  115. else {
  116. misfComboInstCdListMulti("cmb_instcd",ipt_yearno.value+"1231","","Y");
  117. }
  118. cmb_instcd.value = instcd;
  119. model.refresh();
  120. }
  121. ]]>
  122. </script>
  123. </input>
  124. <input id="ipt_emplno" ref="/root/send/retrparams/emplno" class="input_search" style="left:576px; top:8px; width:70px; height:19px; text-align:center; ">
  125. <script type="javascript" ev:event="onkeypress">
  126. <![CDATA[
  127. if(event.keyCode == 13)
  128. {
  129. if(ipt_emplno.value == ipt_emplno.currentText) return;
  130. ipt_emplno.value = ipt_emplno.currentText;
  131. rpbfValidationCheck("EMPLNO", "emplno,emplnm");
  132. model.refresh();
  133. }
  134. ]]>
  135. </script>
  136. <script type="javascript" ev:event="xforms-value-changed">
  137. <![CDATA[
  138. rpbfValidationCheck("EMPLNO", "emplno,emplnm");
  139. model.refresh();
  140. ]]>
  141. </script>
  142. </input>
  143. <button id="btn_emplhelp" class="icon_search" style="left:649px; top:8px; width:16px; height:16px; ">
  144. <caption/>
  145. <script type="javascript" ev:event="DOMActivate">
  146. <![CDATA[
  147. rpbfOpenPopUpList("SPRPB00101", ipt_emplno, "emplno,emplnm", "", "N");
  148. model.refresh();
  149. ]]>
  150. </script>
  151. </button>
  152. <input id="ipt_emplnm" ref="/root/send/retrparams/emplnm" class="input_search" style="left:667px; top:8px; width:140px; height:19px; ">
  153. <script type="javascript" ev:event="onkeypress">
  154. <![CDATA[
  155. if(event.keyCode == 13)
  156. {
  157. if(ipt_emplnm.value == ipt_emplnm.currentText) return;
  158. ipt_emplnm.value = ipt_emplnm.currentText;
  159. rpbfValidationCheck("EMPLNM", "emplno,emplnm");
  160. model.refresh();
  161. }
  162. ]]>
  163. </script>
  164. <script type="javascript" ev:event="xforms-value-changed">
  165. <![CDATA[
  166. rpbfValidationCheck("EMPLNM", "emplno,emplnm");
  167. model.refresh();
  168. ]]>
  169. </script>
  170. </input>
  171. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:7px; width:56px; height:22px; ">
  172. <caption>조회</caption>
  173. <script type="javascript" ev:event="DOMActivate">
  174. <![CDATA[
  175. fRetrieve();
  176. ]]>
  177. </script>
  178. </button>
  179. <select1 id="cmb_instcd" ref="/root/send/retrparams/instcd" class="combo_search" navindex="1" appearance="minimal" style="left:100px; top:8px; width:145px; height:19px; ">
  180. <choices>
  181. <itemset>
  182. <label/>
  183. <value/>
  184. </itemset>
  185. </choices>
  186. </select1>
  187. <caption id="caption7" class="search_name" style="left:10px; top:9px; width:86px; height:17px; ">근무기관 :</caption>
  188. <select1 id="radio1" ref="/root/send/retrparams/idflag" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:929px; top:9px; width:121px; height:20px; border-style:none; ">
  189. <choices>
  190. <item>
  191. <label>생성</label>
  192. <value>I</value>
  193. </item>
  194. <item>
  195. <label>삭제</label>
  196. <value>D</value>
  197. </item>
  198. </choices>
  199. <script type="javascript" ev:event="xforms-value-changed">
  200. <![CDATA[
  201. if(model.getValue("/root/send/retrparams/idflag") == "I")
  202. {
  203. btn_createyearno.attribute("text") = "연차생성";
  204. }
  205. else
  206. {
  207. btn_createyearno.attribute("text") = "연차삭제";
  208. }
  209. ]]>
  210. </script>
  211. </select1>
  212. <caption id="caption1" class="search_name" style="left:840px; top:9px; width:91px; height:17px; ">생성구분 :</caption>
  213. </group>
  214. <line id="line7" class="line_1" style="left:0; x1:0px; y1:70px; x2:1195px; y2:70px; "/>
  215. <caption id="caption25" class="tit_2" style="left:5px; top:55px; width:151px; height:13px; ">연차자료개별등록</caption>
  216. <datagrid id="grd_yearnolist" nodeset="/root/main/list/yearnolist" caption="사원번호^성명^부서코드^부서명^생성여부^발생연차^사용연차^잔여연차^소정근로율^총일수^분자(일수)^분모(일수)^년도" colsep="^" colwidth="100, 110, 128, 290, 40, 85, 85, 85, 85, 85, 85, 85, 100" dataheight="25" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:75px; width:1195px; height:659px; ">
  217. <col disabled="true" ref="emplno" type="inputbutton" style="text-align:center; "/>
  218. <col ref="emplnm" type="output"/>
  219. <col ref="dutplcedeptcd" type="inputbutton" maxlength="10" style="text-align:center; "/>
  220. <col ref="deptnm" type="output"/>
  221. <col ref="createyn" visibility="hidden" style="text-align:center; "/>
  222. <col ref="genryearno" type="input" format="###.0" style="text-align:right; padding-right:10; "/>
  223. <col ref="useyearno" type="input" format="###.0" style="text-align:right; padding-right:10; "/>
  224. <col ref="spreyearno" style="text-align:right; padding-right:10; "/>
  225. <col ref="olmtspreyearno" visibility="visible" style="text-align:right; padding-right:10; "/>
  226. <col ref="genrhealholi" visibility="hidden" style="left:1077px; top:23px; width:80px; height:23px; text-align:right; padding-right:10; "/>
  227. <col ref="usehealholi" visibility="visible" style="text-align:right; padding-right:10; "/>
  228. <col ref="sprehealholi" visibility="visible" style="text-align:right; padding-right:10; "/>
  229. <col ref="yearno" type="input" visibility="hidden" style="text-align:right; padding-right:10; "/>
  230. <script type="javascript" ev:event="onendedit">
  231. <![CDATA[
  232. if(grd_yearnolist.col == grd_yearnolist.colRef("emplno"))
  233. {
  234. rpbfValidationCheck("EMPLNO", "emplno,emplnm");
  235. model.refresh();
  236. }
  237. else if(grd_yearnolist.col == grd_yearnolist.colRef("emplnm"))
  238. {
  239. rpbfValidationCheck("EMPLNM", "emplno,emplnm");
  240. model.refresh();
  241. }
  242. /*
  243. else if(grd_yearnolist.col == grd_yearnolist.colRef("dutplcedeptcd"))
  244. {
  245. misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
  246. model.refresh();
  247. }
  248. else if(grd_yearnolist.col == grd_yearnolist.colRef("deptnm"))
  249. {
  250. misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
  251. model.refresh();
  252. }
  253. */
  254. ]]>
  255. </script>
  256. <script type="javascript" ev:event="xforms-value-changed">
  257. <![CDATA[
  258. if(grd_yearnolist.col == grd_yearnolist.colRef("emplno"))
  259. {
  260. rpbfValidationCheck("EMPLNO", "emplno,emplnm");
  261. //model.refresh();
  262. }
  263. else if(grd_yearnolist.col == grd_yearnolist.colRef("emplnm"))
  264. {
  265. rpbfValidationCheck("EMPLNM", "emplno,emplnm");
  266. //model.refresh();
  267. }
  268. /*
  269. else if(grd_yearnolist.col == grd_yearnolist.colRef("dutplcedeptcd"))
  270. {
  271. misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
  272. //model.refresh();
  273. }
  274. else if(grd_yearnolist.col == grd_yearnolist.colRef("deptnm"))
  275. {
  276. misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
  277. //model.refresh();
  278. }
  279. */
  280. var genryearno = parseFloat(model.getValue("/root/main/list/yearnolist[" + grd_yearnolist.row + "]/genryearno"));
  281. var useyearno = parseFloat(model.getValue("/root/main/list/yearnolist[" + grd_yearnolist.row + "]/useyearno"));
  282. if (isNaN(genryearno) || genryearno == null || genryearno == ""){
  283. genryearno = 0;
  284. }
  285. if (isNaN(useyearno) || useyearno == null || useyearno == ""){
  286. useyearno = 0;
  287. }
  288. //alert(genryearno + "==" + useyearno + "==" + grd_yearnolist.row);
  289. var spreyearno = genryearno - useyearno;
  290. model.setValue("/root/main/list/yearnolist[" + grd_yearnolist.row + "]/spreyearno", spreyearno);
  291. model.refresh();
  292. ]]>
  293. </script>
  294. <script type="javascript" ev:event="onbuttonclick">
  295. <![CDATA[
  296. if(grd_yearnolist.col == grd_yearnolist.colRef("emplno"))
  297. {
  298. rpbfOpenPopUpList("SPRPB00101", grd_yearnolist, "emplno,emplnm", "", "N");
  299. model.refresh();
  300. }
  301. else if(grd_yearnolist.col == grd_yearnolist.colRef("dutplcedeptcd"))
  302. {
  303. misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
  304. model.refresh();
  305. }
  306. ]]>
  307. </script>
  308. <script type="javascript" ev:event="onaftersort">
  309. <![CDATA[
  310. grd_yearnolist.gridToInstance();
  311. ]]>
  312. </script>
  313. </datagrid>
  314. <button id="btn_addrow" class="btn2_letter3" style="left:1019px; top:50px; width:53px; height:19px; ">
  315. <caption>행추가</caption>
  316. <script type="javascript" ev:event="DOMActivate">
  317. <![CDATA[
  318. misfGridIUD(grd_yearnolist, "A");
  319. ]]>
  320. </script>
  321. </button>
  322. <button id="btn_delrow" class="btn2_letter3" style="left:1074px; top:50px; width:53px; height:19px; ">
  323. <caption>행삭제</caption>
  324. <script type="javascript" ev:event="DOMActivate">
  325. <![CDATA[
  326. misfGridIUD(grd_yearnolist, "D");
  327. ]]>
  328. </script>
  329. </button>
  330. <button id="btn_saveexcel" class="btn2_letter4" style="left:1129px; top:50px; width:64px; height:19px; ">
  331. <caption>엑셀저장</caption>
  332. <script type="javascript" ev:event="DOMActivate">
  333. <![CDATA[
  334. misfSaveExcel(grd_yearnolist);
  335. ]]>
  336. </script>
  337. </button>
  338. </group>
  339. <group id="group4" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  340. <line id="line75" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  341. <button id="btn_createyearno" class="btn4_letter4" style="left:1050px; top:3px; width:80px; height:22px; ">
  342. <caption>연차생성</caption>
  343. <script type="javascript" ev:event="DOMActivate">
  344. <![CDATA[
  345. var sYearNo = model.getValue("/root/send/retrparams/yearno");
  346. var sIdFlag = model.getValue("/root/send/retrparams/idflag");
  347. var sEmplNo = model.getValue("/root/send/retrparams/emplno");
  348. var sEmplNm = model.getValue("/root/send/retrparams/emplnm");
  349. var sMsg = " [ " + sYearNo + " ] 년 ";
  350. if(sEmplNo != "")
  351. {
  352. sMsg = sMsg + " [ " + sEmplNm + " ] 님의 ";
  353. }
  354. var dlgRslt = "";
  355. if(model.getValue("/root/send/retrparams/idflag") == "I")
  356. {
  357. dlgRslt = messageBox(sMsg + " 년차를 생성 하시겠습니까?", "Q999");
  358. }
  359. else
  360. {
  361. messageBox(" 년차를 삭제하시면 기존의 [ 사용 현황 ] 및 [ 잔여 현황 ] 이 삭제가 됩니다.", "E999");
  362. dlgRslt = messageBox(sMsg + "년차 정보를 삭제 하시겠습니까?", "Q999");
  363. }
  364. if(dlgRslt != 6) return;
  365. model.setValue("/root/send/retrparams/newyn", "N");
  366. submit("TXRPD02401");
  367. if(model.getValue("/root/main/rslt/rsltlist/errormsg") !="")
  368. {
  369. messageBox(model.getValue("/root/main/rslt/rsltlist/errormsg"), "I999");
  370. fRetrieve();
  371. }
  372. ]]>
  373. </script>
  374. </button>
  375. <button id="btn_save" class="btn4_letter2" style="left:1132px; top:3px; width:56px; height:22px; ">
  376. <caption>저장</caption>
  377. <script type="javascript" ev:event="DOMActivate">
  378. <![CDATA[
  379. misfSave("TXRPD02402");
  380. ]]>
  381. </script>
  382. </button>
  383. </group>
  384. </xhtml:body>
  385. </xhtml:html>