SMRPS06200_부서트레이니등록.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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>SMRPS06200_부서트레이니등록</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <grid>
  11. <deptadmin/>
  12. <loadexcel/>
  13. </grid>
  14. </main>
  15. <send>
  16. <search>
  17. <tremplno/>
  18. <tremplnm/>
  19. <useremplno/>
  20. <adminyn>N</adminyn>
  21. <emplno/>
  22. <emplnm/>
  23. </search>
  24. <save>
  25. </save>
  26. </send>
  27. <init>
  28. </init>
  29. <temp>
  30. </temp>
  31. </root>
  32. </instance>
  33. <script type="javascript" ev:event="xforms-ready">
  34. <![CDATA[
  35. model.setValue("/root/send/search/useremplno", getUserInfo("userid"));
  36. submit("TRRPS06000");
  37. fCheckAuth(); // 권한 체크해서 구분 flag 값 변경
  38. // user정보조회
  39. model.setValue("/root/send/search/tremplno", getUserInfo("userid"));
  40. model.setValue("/root/send/search/tremplnm", getUserInfo("usernm"));
  41. misfGridInit(grd_deptadmin);
  42. misfMsterDetailSet(grd_deptadmin,null, "TRRPS06201" ,"Y");
  43. model.removenode("/root/main/grid/deptadmin");
  44. grd_deptadmin.selectionMode = "byrow";
  45. model.refresh();
  46. ]]>
  47. </script>
  48. <submission id="TRRPS06000" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/init/trinerlist"/>
  49. <submission id="TRRPS06201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/grid/deptadmin"/>
  50. <submission id="TXRPS06201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/grid/deptadmin" resultref="/root/temp"/>
  51. </model>
  52. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  56. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  57. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  58. <script type="javascript" src="../../../mis/educationmngtweb/js/RPS001.js"/>
  59. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  60. <script type="javascript">
  61. <![CDATA[
  62. function fCheckAuth() {// 근무team이 인사팀이면 구분 활성화시키고, 자신이 총관리자이면 트레이너에 체크하고 비활성화시킨다.
  63. if( model.getValue("/root/init/trinerlist/dutteamcd") == '4020500000' ) {
  64. ipt_emplno.disabled = false;
  65. btn_emplsearch.disabled = false;
  66. ipt_emplnm.disabled = false;
  67. btn_save.disabled = false;
  68. btn_search.disabled = false;
  69. }
  70. else if ( model.getValue("/root/init/trinerlist/adminyn") == 'N' ) {
  71. ipt_emplno.disabled = true;
  72. btn_emplsearch.disabled = true;
  73. ipt_emplnm.disabled = true;
  74. btn_save.disabled = false;
  75. btn_search.disabled = false;
  76. }
  77. else if ( model.getValue("/root/init/trinerlist/adminyn") == 'Y' ) {
  78. ipt_emplno.disabled = false;
  79. btn_emplsearch.disabled = false;
  80. ipt_emplnm.disabled = false;
  81. btn_save.disabled = false;
  82. btn_search.disabled = false;
  83. }
  84. else {
  85. ipt_emplno.disabled = true;
  86. btn_emplsearch.disabled = true;
  87. ipt_emplnm.disabled = true;
  88. btn_save.disabled = true;
  89. btn_search.disabled = true;
  90. messageBox("트레이너만 등록가능합니다.", "C999");
  91. }
  92. model.refresh();
  93. }
  94. function fLoadExcel() {
  95. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  96. grd_loadexcel.loadExcel(fileName);
  97. grd_loadexcel.rebuild();
  98. var sEmplno = "";
  99. var iRowIdx = -1;
  100. for(var i=1; i<grd_loadexcel.rows; i++)
  101. {
  102. sEmplno = grd_loadexcel.valueMatrix(i, grd_loadexcel.colRef("emplno"));
  103. if(sEmplno == "") continue;
  104. iRowIdx = grd_deptadmin.findRow(sEmplno, 0, grd_deptadmin.colRef("emplno"));
  105. if(iRowIdx != -1) {
  106. continue;
  107. }
  108. else {
  109. grd_deptadmin.addRow(false);
  110. model.setValue(grd_deptadmin.nodeset + "[" + grd_deptadmin.row + "]/emplno", sEmplno);
  111. model.setValue(grd_deptadmin.nodeset + "[" + grd_deptadmin.row + "]/tremplno", ipt_emplno.value);
  112. }
  113. }
  114. model.refresh();
  115. }
  116. ]]>
  117. </script>
  118. </xhtml:head>
  119. <xhtml:body style="margin-left:8; margin-right:8; ">
  120. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  121. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">부서트레이니등록</caption>
  122. </group>
  123. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  124. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  125. <button id="btn_search" class="btn1_letter2" style="left:1118px; top:17px; width:56px; height:22px; ">
  126. <caption>조회</caption>
  127. <script type="javascript" ev:event="DOMActivate">
  128. <![CDATA[
  129. if(!isRequiredControls("ipt_emplno")) return;
  130. submit("TRRPS06201");
  131. ]]>
  132. </script>
  133. </button>
  134. <line id="line13" class="line_4" style="x1:1100px; y1:16px; x2:1100px; y2:38px; "/>
  135. <line id="line8" class="line_1" style="x1:0px; y1:73px; x2:1195px; y2:73px; "/>
  136. <caption id="caption20" class="tit_2" style="left:5px; top:59px; width:169px; height:14px; ">트레이니 List</caption>
  137. <button id="btn_del" class="btn2_letter3" style="left:1002px; top:52px; width:53px; height:19px; ">
  138. <caption>행삭제</caption>
  139. <script type="javascript" ev:event="DOMActivate">
  140. <![CDATA[
  141. if(!isRequiredControls("ipt_emplno")) return;
  142. misfGridIUD(grd_deptadmin, "D");
  143. model.refresh();
  144. ]]>
  145. </script>
  146. </button>
  147. <button id="btn_add" class="btn2_letter3" style="left:947px; top:52px; width:53px; height:19px; ">
  148. <caption>행추가</caption>
  149. <script type="javascript" ev:event="DOMActivate">
  150. <![CDATA[
  151. if(!isRequiredControls("ipt_emplno")) return;
  152. grd_deptadmin.addRow();
  153. grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("tremplno")) = ipt_emplno.value;
  154. model.refresh();
  155. ]]>
  156. </script>
  157. </button>
  158. <button id="btn_loadexcel" class="btn2_letter4" style="left:1062px; top:52px; width:64px; height:19px; ">
  159. <caption>엑셀입력</caption>
  160. <script type="javascript" ev:event="DOMActivate">
  161. <![CDATA[
  162. fLoadExcel();
  163. ]]>
  164. </script>
  165. </button>
  166. <datagrid id="grd_deptadmin" nodeset="/root/main/grid/deptadmin" caption="사원번호^이름^소속(팀) 코드^소속(팀)^근무부서코드^근무부서^변경전사번^기관^직종코드^직종^트레이너 사번" colsep="^" colwidth="130, 125, 100, 200, 100, 200, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" selectionmode="byrow" style="left:0px; top:78px; width:1194px; height:642px; ">
  167. <col ref="emplno" type="inputbutton" _key="true" style="text-align:center; "/>
  168. <col ref="emplnm" style="text-align:center; "/>
  169. <col ref="teamcd" style="text-align:center; "/>
  170. <col ref="teamnm" style="text-align:center; "/>
  171. <col ref="dutunitcd" style="text-align:center; "/>
  172. <col ref="dutunitnm" style="text-align:center; "/>
  173. <col ref="oldemplno" visibility="hidden" style="text-align:center; "/>
  174. <col ref="instcd" visibility="hidden"/>
  175. <col ref="jobkindcd" visibility="hidden"/>
  176. <col ref="jobkindnm" style="text-align:center; "/>
  177. <col ref="tremplno" visibility="hidden"/>
  178. <script type="javascript" ev:event="onbuttonclick">
  179. <![CDATA[
  180. var curdate = getCurrentDate().substr(0,4);
  181. if(grd_deptadmin.col == grd_deptadmin.colRef("emplno") ) {
  182. rpbfOpenPopUpList("SPRPB00101", grd_deptadmin, "emplno,emplnm,teamcd,teamnm,dutunitcd,dutunitnm,instcd,jobkindcd,jobkindnm", "", "N");
  183. if( grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("emplno"))
  184. == grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("tremplno")) ) {
  185. messageBox("본인을 트레이니로 지정할수 없습니다.","I999");
  186. grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("emplno")) = '';
  187. grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("emplnm")) = '';
  188. grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("teamnm")) = '';
  189. grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("dutunitnm")) = '';
  190. grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("jobkindnm")) = '';
  191. return;
  192. }
  193. }
  194. model.refresh();
  195. ]]>
  196. </script>
  197. </datagrid>
  198. <button id="btn_saveexcel" class="btn2_letter4" style="left:1128px; top:52px; width:64px; height:19px; ">
  199. <caption>엑셀저장</caption>
  200. <script type="javascript" ev:event="DOMActivate">
  201. <![CDATA[
  202. misfSaveExcel(grd_deptadmin);
  203. ]]>
  204. </script>
  205. </button>
  206. <datagrid id="grd_loadexcel" nodeset="/root/main/grid/loadexcel" visibility="hidden" caption="사번" colsep="^" colwidth="80" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:1070px; top:135px; width:120px; height:96px; ">
  207. <col ref="emplno" style="text-align:center; "/>
  208. </datagrid>
  209. <input id="ipt_emplnm" ref="/root/send/search/tremplnm" class="input_search" navindex="21" style="left:324px; top:18px; width:125px; height:19px; text-align:center; ">
  210. <script type="javascript" ev:event="xforms-value-changed">
  211. <![CDATA[
  212. var recv_list ="emplno,emplnm";
  213. rpbfValidationCheck("EMPLNM", recv_list);
  214. model.setValue("/root/send/search/tremplno",model.getValue("/root/send/search/emplno"));
  215. model.setValue("/root/send/search/tremplnm",model.getValue("/root/send/search/emplnm"));
  216. model.refresh();
  217. ]]>
  218. </script>
  219. </input>
  220. <caption id="cap_emplno" class="search_name" style="left:28px; top:19px; width:143px; height:17px; ">트레이너 사원번호 :</caption>
  221. <input id="ipt_emplno" ref="/root/send/search/tremplno" class="input_search" navindex="20" style="left:174px; top:18px; width:125px; height:19px; text-align:center; ">
  222. <script type="javascript" ev:event="xforms-value-changed">
  223. <![CDATA[
  224. var recv_list = "emplno,emplnm";
  225. rpbfValidationCheck("EMPLNO", recv_list);
  226. model.setValue("/root/send/search/tremplno",model.getValue("/root/send/search/emplno"));
  227. model.setValue("/root/send/search/tremplnm",model.getValue("/root/send/search/emplnm"));
  228. model.refresh();
  229. ]]>
  230. </script>
  231. </input>
  232. <button id="btn_emplsearch" class="icon_search" style="left:303px; top:19px; width:16px; height:16px; ">
  233. <caption/>
  234. <script type="javascript" ev:event="DOMActivate">
  235. <![CDATA[
  236. var recv_list = "emplno,emplnm";
  237. rpbfOpenPopUpList("SPRPB00101", ipt_emplno, recv_list,"", "", "N");
  238. model.setValue("/root/send/search/tremplno",model.getValue("/root/send/search/emplno"));
  239. model.setValue("/root/send/search/tremplnm",model.getValue("/root/send/search/emplnm"));
  240. model.refresh();
  241. ]]>
  242. </script>
  243. </button>
  244. </group>
  245. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  246. <button id="btn_save" class="btn4_letter2" style="left:1139px; top:3px; width:56px; height:22px; ">
  247. <caption>저장</caption>
  248. <script type="javascript" ev:event="DOMActivate">
  249. <![CDATA[
  250. if( checkKeyColumn("grd_deptadmin") == false) return;
  251. if(misfSave("TXRPS06201")) {
  252. btn_search.dispatch("DOMActivate");
  253. }
  254. ]]>
  255. </script>
  256. </button>
  257. </group>
  258. </xhtml:body>
  259. </xhtml:html>