SMRPS06000_부서트레이닝관리자등록.xrw 12 KB

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