SMRPS06300_훈련등록및조회.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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>SMRPS06300_훈련등록및조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <grid>
  11. <depttraining/>
  12. </grid>
  13. </main>
  14. <send>
  15. <search>
  16. <emplno/>
  17. <emplnm/>
  18. <tnemplnm/>
  19. <adminyn>N</adminyn>
  20. <tnemplno/>
  21. <trainingfrom/>
  22. <trainingto/>
  23. <useremplno/>
  24. <tremplno/>
  25. <trrgstyn/>
  26. <instcd/>
  27. </search>
  28. </send>
  29. <init>
  30. <trinerlist>
  31. <dutteamcd/>
  32. <emplno/>
  33. <adminyn/>
  34. <instcd/>
  35. </trinerlist>
  36. </init>
  37. <temp>
  38. </temp>
  39. <deptadmin>
  40. <emplno/>
  41. <emplnm/>
  42. </deptadmin>
  43. <trainerlist>
  44. <tremplno/>
  45. <tremplnm/>
  46. </trainerlist>
  47. </root>
  48. </instance>
  49. <script type="javascript" ev:event="xforms-ready">
  50. <![CDATA[
  51. model.setValue("/root/send/search/useremplno", getUserInfo("userid"));
  52. submit("TRRPS06000");
  53. if( model.getValue("/root/init/trinerlist/emplno") != '' ) {
  54. // user정보조회
  55. model.setValue("/root/send/search/emplno", getUserInfo("userid"));
  56. model.setValue("/root/send/search/emplnm", getUserInfo("usernm"));
  57. model.setValue("/root/send/search/tremplno",ipt_tremplno.value);
  58. fTraineeList();
  59. }
  60. else {
  61. // user정보조회
  62. model.setValue("/root/send/search/tnemplno", getUserInfo("userid"));
  63. model.setValue("/root/send/search/tnemplnm", getUserInfo("usernm"));
  64. submit("TRRPS06300");
  65. model.refresh();
  66. model.setValue("/root/send/search/emplno",model.getValue("/root/trainerlist/tremplno"));
  67. model.setValue("/root/send/search/emplnm",model.getValue("/root/trainerlist/tremplnm"));
  68. model.setValue("/root/send/search/instcd",model.getValue("/root/trainerlist/instcd"));
  69. model.setValue("/root/send/search/tremplno",ipt_tremplno.value);
  70. model.refresh();
  71. }
  72. fCheckAuth(); // 권한 체크해서 구분 flag 값 변경
  73. misfGridInit(grd_depttraining);
  74. misfMsterDetailSet(grd_depttraining,null, "TRRPS06301" ,"Y");
  75. model.removenode("/root/main/grid/depttraining");
  76. grd_depttraining.selectionMode = "byrow";
  77. model.refresh();
  78. ]]>
  79. </script>
  80. <submission id="TRRPS06000" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/init/trinerlist"/>
  81. <submission id="TRRPS06201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/deptadmin"/>
  82. <submission id="TRRPS06300" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/trainerlist"/>
  83. <submission id="TRRPS06301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/grid/depttraining"/>
  84. <submission id="TXRPS06301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/grid/depttraining" resultref="/root/temp"/>
  85. </model>
  86. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  88. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  90. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  91. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  92. <script type="javascript" src="../../../mis/educationmngtweb/js/RPS001.js"/>
  93. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  94. <script type="javascript">
  95. <![CDATA[
  96. function fTraineeList() {
  97. submit("TRRPS06201");
  98. }
  99. function fCheckAuth() { // 인사팀이면 모든 부분 활성화, 트레이너이면 트레이니 콤보박스로 보여지도록 하고, 트레이니이면 모두 비활성화
  100. if( model.getValue("/root/init/trinerlist/dutteamcd") == '4020500000' ) {
  101. ipt_tremplno.disabled = false;
  102. btn_tremplsearch.disabled = false;
  103. ipt_tremplnm.disabled = false;
  104. ipt_tnemplnm.visible = false;
  105. cmb_tnemplnm.visible = true;
  106. ipt_tnemplnm.disabled = false;
  107. }
  108. else if ( model.getValue("/root/init/trinerlist/adminyn") == 'N' ) {
  109. grd_depttraining.colHidden(grd_depttraining.colRef("tremplno")) = true;
  110. grd_depttraining.colHidden(grd_depttraining.colRef("tremplnm")) = true;
  111. grd_depttraining.colDisabled(grd_depttraining.colRef("trainingdd")) = true;
  112. grd_depttraining.colDisabled(grd_depttraining.colRef("trainingfromtm")) = true;
  113. grd_depttraining.colDisabled(grd_depttraining.colRef("trainingtotm")) = true;
  114. grd_depttraining.colDisabled(grd_depttraining.colRef("trainingplce")) = true;
  115. grd_depttraining.colDisabled(grd_depttraining.colRef("trainingcnt")) = true;
  116. grd_depttraining.colDisabled(grd_depttraining.colRef("tnvalu")) = true;
  117. btn_add.disabled = true;
  118. btn_del.disabled = true;
  119. ipt_tremplno.disabled = true;
  120. btn_tremplsearch.disabled = true;
  121. ipt_tremplnm.disabled = true;
  122. cmb_tnemplnm.visible = true;
  123. }
  124. else {
  125. grd_depttraining.colHidden(grd_depttraining.colRef("tnemplno"))= true;
  126. grd_depttraining.colHidden(grd_depttraining.colRef("tnemplnm"))= true;
  127. grd_depttraining.colHidden(grd_depttraining.colRef("trvalu"))= true;
  128. grd_depttraining.colHidden(grd_depttraining.colRef("trrgstyn"))= true;
  129. ipt_tremplno.disabled = true;
  130. btn_tremplsearch.disabled = true;
  131. ipt_tremplnm.disabled = true;
  132. ipt_tnemplnm.visible = true;
  133. cmb_tnemplnm.visible = false;
  134. ipt_tnemplnm.disabled = true;
  135. }
  136. model.refresh();
  137. }
  138. ]]>
  139. </script>
  140. </xhtml:head>
  141. <xhtml:body style="margin-left:8; margin-right:8; ">
  142. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  143. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">훈련등록 및 조회</caption>
  144. </group>
  145. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  146. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  147. <button id="btn_search" class="btn1_letter2" style="left:1118px; top:30px; width:56px; height:22px; ">
  148. <caption>조회</caption>
  149. <script type="javascript" ev:event="DOMActivate">
  150. <![CDATA[
  151. if(!isRequiredControls("ipt_tremplno")) return;
  152. submit("TRRPS06301");
  153. ]]>
  154. </script>
  155. </button>
  156. <line id="line13" class="line_4" style="x1:1100px; y1:16px; x2:1100px; y2:64px; "/>
  157. <line id="line8" class="line_1" style="x1:0px; y1:95px; x2:1195px; y2:95px; "/>
  158. <caption id="caption20" class="tit_2" style="left:5px; top:81px; width:169px; height:13px; ">훈련내역</caption>
  159. <button id="btn_del" class="btn2_letter3" style="left:1139px; top:74px; width:53px; height:19px; ">
  160. <caption>행삭제</caption>
  161. <script type="javascript" ev:event="DOMActivate">
  162. <![CDATA[
  163. misfGridIUD(grd_depttraining, "D");
  164. model.refresh();
  165. ]]>
  166. </script>
  167. </button>
  168. <button id="btn_add" class="btn2_letter3" style="left:1084px; top:74px; width:53px; height:19px; ">
  169. <caption>행추가</caption>
  170. <script type="javascript" ev:event="DOMActivate">
  171. <![CDATA[
  172. if(!isRequiredControls("ipt_tremplno")) return;
  173. if(!isRequiredControls("ipt_tnemplno")) return;
  174. grd_depttraining.addRow();
  175. grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("tremplno")) = ipt_tremplno.value;
  176. grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("tremplnm")) = ipt_tremplnm.value;
  177. grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("tnemplno")) = ipt_tnemplno.value;
  178. grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("tnemplnm")) = ipt_tnemplnm.value;
  179. grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("tryn")) = (model.getValue("/root/init/trinerlist/adminyn")=='N' ? "Y" : "N") ;
  180. grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("instcd")) = getUserInfo("dutplceinstcd");
  181. model.refresh();
  182. ]]>
  183. </script>
  184. </button>
  185. <datagrid id="grd_depttraining" nodeset="/root/main/grid/depttraining" caption="트레이니^트레이니^훈련일자^Gap(일)^훈련시간^훈련시간^총시간&#xA;(분)^훈련장소^훈련내용^평가(트레이니)^등록일시^담당 트레이너^담당 트레이너^평가(트레이너)^등록^등록일시^트레이너여부^기관|트레이니^트레이니^훈련일자^Gap(일)^From^To^총시간&#xA;(분)^훈련장소^훈련내용^평가(트레이니)^등록일시^담당 트레이너^담당 트레이너^평가(트레이너)^등록^등록일시^트레이너여부^기관" colsep="^" colwidth="80, 70, 100, 60, 60, 60, 50, 100, 100, 200, 100, 90, 70, 200, 40, 100, 50, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" selectionmode="byrow" style="left:0px; top:100px; width:1194px; height:620px; ">
  186. <col class="input_search" ref="tnemplno" _key="true" style="text-align:center; "/>
  187. <col class="input_search" ref="tnemplnm" _key="true" style="text-align:center; "/>
  188. <col class="input_s_essential" ref="trainingdd" type="inputdate" format="yyyy-mm-dd" _key="true" style="text-align:center; "/>
  189. <col class="input_search" ref="gap" style="text-align:center; "/>
  190. <col class="input_s_essential" ref="trainingfromtm" type="input" format="hh:nn" style="text-align:center; "/>
  191. <col class="input_s_essential" ref="trainingtotm" type="input" format="hh:nn" style="text-align:center; "/>
  192. <col class="input_search" ref="totalmnt" style="text-align:center; "/>
  193. <col class="input_s_essential" ref="trainingplce" type="input"/>
  194. <col class="combo_s_essential" ref="trainingcnt" type="combo">
  195. <choices>
  196. <itemset>
  197. <label/>
  198. <value/>
  199. </itemset>
  200. </choices>
  201. </col>
  202. <col class="input_s_essential" ref="tnvalu" type="input" maxlength="100" style="text-align:center; "/>
  203. <col class="input_search" ref="tnrgstdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  204. <col class="input_search" ref="tremplno" style="text-align:center; "/>
  205. <col class="input_search" ref="tremplnm" style="text-align:center; "/>
  206. <col class="input_essential" ref="trvalu" type="input" maxlength="100" style="text-align:center; "/>
  207. <col class="input_essential" checkvalue="Y,N" ref="trrgstyn" type="checkbox" style="text-align:center; "/>
  208. <col class="input_search" ref="trrgstdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  209. <col ref="tryn" visibility="hidden"/>
  210. <col ref="instcd" visibility="hidden"/>
  211. <script type="javascript" ev:event="xforms-value-changed">
  212. <![CDATA[
  213. var fromtm = grd_depttraining.valueMatrix(grd_depttraining.row, grd_depttraining.colRef("trainingfromtm"));
  214. var totm = grd_depttraining.valueMatrix(grd_depttraining.row, grd_depttraining.colRef("trainingtotm"));
  215. var col_tnvalu = grd_depttraining.colRef("tnvalu");
  216. var col_trvalu = grd_depttraining.colRef("trvalu");
  217. var col_trainingplce = grd_depttraining.colRef("trainingplce");
  218. var col_trainingcnt = grd_depttraining.colRef("trainingcnt");
  219. var col_trrgstyn = grd_depttraining.colRef("trrgstyn");
  220. var col_trainingdd = grd_depttraining.colRef("trainingdd");
  221. var fromdd = grd_depttraining.valueMatrix(grd_depttraining.row-1,grd_depttraining.colRef("trainingdd")) ;
  222. var todd = grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("trainingdd"));
  223. if( fromtm != '' && totm != '' ) {
  224. var totalsec = getTimeInterval(fromtm,totm); // dateHelper.js 에 있는 함수. 시간차이를 초단위로 반환
  225. grd_depttraining.valueMatrix(grd_depttraining.row, grd_depttraining.colRef("totalmnt")) = parseInt(totalsec / 60);
  226. }
  227. if ( col_tnvalu == grd_depttraining.col && grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("tnvalu")) != '' ) {
  228. grd_depttraining.valueMatrix(grd_depttraining.row, grd_depttraining.colRef("tnrgstdt")) = getCurrentDateTime();
  229. }
  230. else if ( col_trainingplce == grd_depttraining.col && grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("trainingplce")) != '' ) {
  231. grd_depttraining.valueMatrix(grd_depttraining.row, grd_depttraining.colRef("tnrgstdt")) = getCurrentDateTime();
  232. }
  233. else if ( col_trainingcnt == grd_depttraining.col && grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("trainingcnt")) != '' ) {
  234. grd_depttraining.valueMatrix(grd_depttraining.row, grd_depttraining.colRef("tnrgstdt")) = getCurrentDateTime();
  235. }
  236. if ( col_trvalu == grd_depttraining.col && grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("trvalu")) != '' ) {
  237. grd_depttraining.valueMatrix(grd_depttraining.row, grd_depttraining.colRef("trrgstdt")) = getCurrentDateTime();
  238. }
  239. if( col_trrgstyn == grd_depttraining.col && grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("trvalu")) == '' ) {
  240. // 평가를 입력하지 않고 등록만 체크하면 메세지를 띄운다.
  241. messageBox("평가를 입력해 주세요.","I999");
  242. grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("trrgstyn")) = "N" ;
  243. }
  244. if( col_trainingdd == grd_depttraining.col && grd_depttraining.row > grd_depttraining.fixedRows ) {
  245. // 이전훈련일자와 현재 훈련일자의 차이를 gap에 넣어준다.
  246. grd_depttraining.valueMatrix(grd_depttraining.row,grd_depttraining.colRef("gap")) = getDateInterval(fromdd, todd); // dateHelper.js 에 있는 함수. 날짜차이를 보여줌
  247. }
  248. model.refresh();
  249. ]]>
  250. </script>
  251. </datagrid>
  252. <button id="btn_saveexcel" class="btn2_letter4" style="left:1015px; top:74px; width:64px; height:19px; ">
  253. <caption>엑셀저장</caption>
  254. <script type="javascript" ev:event="DOMActivate">
  255. <![CDATA[
  256. misfSaveExcel(grd_depttraining);
  257. ]]>
  258. </script>
  259. </button>
  260. <input id="input1" ref="/root/send/search/useremplno" navindex="20" visibility="hidden" style="left:445px; top:40px; width:81px; height:19px; text-align:center; "/>
  261. <caption id="caption1" class="search_name" style="left:565px; top:43px; width:148px; height:17px; ">트레이너 확인여부 :</caption>
  262. <select1 id="rdo_trrgstyn" ref="/root/send/search/trrgstyn" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:711px; top:43px; width:275px; height:20px; border-style:none; ">
  263. <choices>
  264. <item>
  265. <label>전체</label>
  266. <value/>
  267. </item>
  268. <item>
  269. <label>평가 등록전</label>
  270. <value>N</value>
  271. </item>
  272. <item>
  273. <label>평가 등록완료</label>
  274. <value>Y</value>
  275. </item>
  276. </choices>
  277. </select1>
  278. <input id="ipt_trainingfrom" ref="/root/send/search/trainingfrom" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:713px; top:18px; width:105px; height:19px; text-align:center; ">
  279. <script type="javascript" ev:event="xforms-value-changed">
  280. <![CDATA[
  281. ]]>
  282. </script>
  283. </input>
  284. <input id="ipt_trainingto" ref="/root/send/search/trainingto" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:839px; top:18px; width:105px; height:19px; text-align:center; ">
  285. <script type="javascript" ev:event="xforms-value-changed">
  286. <![CDATA[
  287. ]]>
  288. </script>
  289. </input>
  290. <caption id="caption3" style="left:820px; top:18px; width:18px; height:20px; text-align:center; ">~</caption>
  291. <caption id="caption2" class="search_name" style="left:565px; top:18px; width:146px; height:17px; ">훈 련 기 간 :</caption>
  292. <input id="ipt_tnemplnm" ref="/root/send/search/tnemplnm" class="input_s_essential" navindex="21" style="left:314px; top:43px; width:116px; height:19px; text-align:center; "/>
  293. <input id="ipt_tnemplno" ref="/root/send/search/tnemplno" class="input_s_essential" disabled="true" navindex="20" style="left:196px; top:43px; width:116px; height:19px; text-align:center; "/>
  294. <select1 id="cmb_tnemplnm" ref="/root/deptadmin" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:314px; top:43px; width:116px; height:19px; text-align:center; ">
  295. <choices>
  296. <itemset nodeset="/root/deptadmin">
  297. <label ref="emplnm"/>
  298. <value ref="emplno"/>
  299. </itemset>
  300. </choices>
  301. <script type="javascript" ev:event="xforms-value-changed">
  302. <![CDATA[
  303. model.setValue("/root/send/search/tnemplno",cmb_tnemplnm.value);
  304. model.setValue("/root/send/search/tnemplnm",cmb_tnemplnm.label);
  305. model.refresh();
  306. ]]>
  307. </script>
  308. </select1>
  309. <caption id="cap_tnemplno" class="search_name" style="left:50px; top:43px; width:143px; height:17px; ">트레이니 사원번호 :</caption>
  310. <input id="ipt_tremplnm" ref="/root/send/search/emplnm" class="input_s_essential" navindex="21" style="left:324px; top:18px; width:106px; height:19px; text-align:center; ">
  311. <script type="javascript" ev:event="xforms-value-changed">
  312. <![CDATA[
  313. var recv_list = "emplno,emplnm";
  314. rpbfValidationCheck("tremplno", recv_list);
  315. model.refresh();
  316. ]]>
  317. </script>
  318. </input>
  319. <input id="ipt_tremplno" ref="/root/send/search/emplno" class="input_s_essential" navindex="20" style="left:196px; top:18px; width:106px; height:19px; text-align:center; ">
  320. <script type="javascript" ev:event="xforms-value-changed">
  321. <![CDATA[
  322. var recv_list = "emplno,emplnm";
  323. rpbfValidationCheck("tremplno", recv_list);
  324. model.refresh();
  325. ]]>
  326. </script>
  327. </input>
  328. <button id="btn_tremplsearch" class="icon_search" style="left:305px; top:20px; width:16px; height:16px; ">
  329. <caption/>
  330. <script type="javascript" ev:event="DOMActivate">
  331. <![CDATA[
  332. var recv_list = "emplno,emplnm";
  333. rpbfOpenPopUpList("SPRPB00101", ipt_tremplno, recv_list,"","N","Y");
  334. model.setValue("/root/send/search/tremplno",ipt_tremplno.value);
  335. fTraineeList();
  336. model.refresh();
  337. ]]>
  338. </script>
  339. </button>
  340. <caption id="cap_tremplno" class="search_name" style="left:50px; top:19px; width:143px; height:17px; ">트레이너 사원번호 :</caption>
  341. </group>
  342. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  343. <button id="btn_save" class="btn4_letter2" style="left:1139px; top:3px; width:56px; height:22px; ">
  344. <caption>저장</caption>
  345. <script type="javascript" ev:event="DOMActivate">
  346. <![CDATA[
  347. if( checkKeyColumn("grd_depttraining") == false) return;
  348. if(misfSave("TXRPS06301")) {
  349. btn_search.dispatch("DOMActivate");
  350. }
  351. ]]>
  352. </script>
  353. </button>
  354. </group>
  355. </xhtml:body>
  356. </xhtml:html>