123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>SMRPS06200_부서트레이니등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <grid>
- <deptadmin/>
- <loadexcel/>
- </grid>
- </main>
- <send>
- <search>
- <tremplno/>
- <tremplnm/>
- <useremplno/>
- <adminyn>N</adminyn>
- <emplno/>
- <emplnm/>
- </search>
- <save>
- </save>
- </send>
- <init>
- </init>
- <temp>
- </temp>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- model.setValue("/root/send/search/useremplno", getUserInfo("userid"));
- submit("TRRPS06000");
- fCheckAuth(); // 권한 체크해서 구분 flag 값 변경
-
- // user정보조회
- model.setValue("/root/send/search/tremplno", getUserInfo("userid"));
- model.setValue("/root/send/search/tremplnm", getUserInfo("usernm"));
-
- misfGridInit(grd_deptadmin);
- misfMsterDetailSet(grd_deptadmin,null, "TRRPS06201" ,"Y");
- model.removenode("/root/main/grid/deptadmin");
- grd_deptadmin.selectionMode = "byrow";
-
- model.refresh();
- ]]>
- </script>
- <submission id="TRRPS06000" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/init/trinerlist"/>
- <submission id="TRRPS06201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/grid/deptadmin"/>
- <submission id="TXRPS06201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/grid/deptadmin" resultref="/root/temp"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" src="../../../mis/educationmngtweb/js/RPS001.js"/>
- <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
- <script type="javascript">
- <![CDATA[
- function fCheckAuth() {// 근무team이 인사팀이면 구분 활성화시키고, 자신이 총관리자이면 트레이너에 체크하고 비활성화시킨다.
- if( model.getValue("/root/init/trinerlist/dutteamcd") == '4020500000' ) {
- ipt_emplno.disabled = false;
- btn_emplsearch.disabled = false;
- ipt_emplnm.disabled = false;
-
- btn_save.disabled = false;
- btn_search.disabled = false;
- }
- else if ( model.getValue("/root/init/trinerlist/adminyn") == 'N' ) {
- ipt_emplno.disabled = true;
- btn_emplsearch.disabled = true;
- ipt_emplnm.disabled = true;
-
- btn_save.disabled = false;
- btn_search.disabled = false;
- }
- else if ( model.getValue("/root/init/trinerlist/adminyn") == 'Y' ) {
- ipt_emplno.disabled = false;
- btn_emplsearch.disabled = false;
- ipt_emplnm.disabled = false;
-
- btn_save.disabled = false;
- btn_search.disabled = false;
- }
- else {
- ipt_emplno.disabled = true;
- btn_emplsearch.disabled = true;
- ipt_emplnm.disabled = true;
-
- btn_save.disabled = true;
- btn_search.disabled = true;
- messageBox("트레이너만 등록가능합니다.", "C999");
- }
- model.refresh();
- }
-
- function fLoadExcel() {
- var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- grd_loadexcel.loadExcel(fileName);
- grd_loadexcel.rebuild();
-
- var sEmplno = "";
- var iRowIdx = -1;
-
- for(var i=1; i<grd_loadexcel.rows; i++)
- {
- sEmplno = grd_loadexcel.valueMatrix(i, grd_loadexcel.colRef("emplno"));
-
- if(sEmplno == "") continue;
-
- iRowIdx = grd_deptadmin.findRow(sEmplno, 0, grd_deptadmin.colRef("emplno"));
-
- if(iRowIdx != -1) {
- continue;
- }
- else {
- grd_deptadmin.addRow(false);
-
- model.setValue(grd_deptadmin.nodeset + "[" + grd_deptadmin.row + "]/emplno", sEmplno);
- model.setValue(grd_deptadmin.nodeset + "[" + grd_deptadmin.row + "]/tremplno", ipt_emplno.value);
- }
- }
- model.refresh();
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-right:8; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">부서트레이니등록</caption>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1118px; top:17px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(!isRequiredControls("ipt_emplno")) return;
-
- submit("TRRPS06201");
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:1100px; y1:16px; x2:1100px; y2:38px; "/>
- <line id="line8" class="line_1" style="x1:0px; y1:73px; x2:1195px; y2:73px; "/>
- <caption id="caption20" class="tit_2" style="left:5px; top:59px; width:169px; height:14px; ">트레이니 List</caption>
- <button id="btn_del" class="btn2_letter3" style="left:1002px; top:52px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(!isRequiredControls("ipt_emplno")) return;
-
- misfGridIUD(grd_deptadmin, "D");
-
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_add" class="btn2_letter3" style="left:947px; top:52px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(!isRequiredControls("ipt_emplno")) return;
-
- grd_deptadmin.addRow();
- grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("tremplno")) = ipt_emplno.value;
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_loadexcel" class="btn2_letter4" style="left:1062px; top:52px; width:64px; height:19px; ">
- <caption>엑셀입력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fLoadExcel();
- ]]>
- </script>
- </button>
- <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; ">
- <col ref="emplno" type="inputbutton" _key="true" style="text-align:center; "/>
- <col ref="emplnm" style="text-align:center; "/>
- <col ref="teamcd" style="text-align:center; "/>
- <col ref="teamnm" style="text-align:center; "/>
- <col ref="dutunitcd" style="text-align:center; "/>
- <col ref="dutunitnm" style="text-align:center; "/>
- <col ref="oldemplno" visibility="hidden" style="text-align:center; "/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="jobkindcd" visibility="hidden"/>
- <col ref="jobkindnm" style="text-align:center; "/>
- <col ref="tremplno" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var curdate = getCurrentDate().substr(0,4);
-
- if(grd_deptadmin.col == grd_deptadmin.colRef("emplno") ) {
- rpbfOpenPopUpList("SPRPB00101", grd_deptadmin, "emplno,emplnm,teamcd,teamnm,dutunitcd,dutunitnm,instcd,jobkindcd,jobkindnm", "", "N");
-
- if( grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("emplno"))
- == grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("tremplno")) ) {
- messageBox("본인을 트레이니로 지정할수 없습니다.","I999");
- grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("emplno")) = '';
- grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("emplnm")) = '';
- grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("teamnm")) = '';
- grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("dutunitnm")) = '';
- grd_deptadmin.valueMatrix(grd_deptadmin.row,grd_deptadmin.colRef("jobkindnm")) = '';
- return;
- }
- }
- model.refresh();
- ]]>
- </script>
- </datagrid>
- <button id="btn_saveexcel" class="btn2_letter4" style="left:1128px; top:52px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_deptadmin);
- ]]>
- </script>
- </button>
- <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; ">
- <col ref="emplno" style="text-align:center; "/>
- </datagrid>
- <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; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var recv_list ="emplno,emplnm";
- rpbfValidationCheck("EMPLNM", recv_list);
- model.setValue("/root/send/search/tremplno",model.getValue("/root/send/search/emplno"));
- model.setValue("/root/send/search/tremplnm",model.getValue("/root/send/search/emplnm"));
- model.refresh();
- ]]>
- </script>
- </input>
- <caption id="cap_emplno" class="search_name" style="left:28px; top:19px; width:143px; height:17px; ">트레이너 사원번호 :</caption>
- <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; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var recv_list = "emplno,emplnm";
- rpbfValidationCheck("EMPLNO", recv_list);
- model.setValue("/root/send/search/tremplno",model.getValue("/root/send/search/emplno"));
- model.setValue("/root/send/search/tremplnm",model.getValue("/root/send/search/emplnm"));
- model.refresh();
- ]]>
- </script>
- </input>
- <button id="btn_emplsearch" class="icon_search" style="left:303px; top:19px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var recv_list = "emplno,emplnm";
- rpbfOpenPopUpList("SPRPB00101", ipt_emplno, recv_list,"", "", "N");
- model.setValue("/root/send/search/tremplno",model.getValue("/root/send/search/emplno"));
- model.setValue("/root/send/search/tremplnm",model.getValue("/root/send/search/emplnm"));
- model.refresh();
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
- <button id="btn_save" class="btn4_letter2" style="left:1139px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( checkKeyColumn("grd_deptadmin") == false) return;
-
- if(misfSave("TXRPS06201")) {
- btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|