SMRPD07000_연차자료생성(비정규직).xrw 16 KB

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