123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>년차 자료 생성</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <list>
- <yearnolist>
- <emplno/>
- <emplnm/>
- <dutplcedeptcd/>
- <deptnm/>
- <createyn/>
- <genryearno/>
- <useyearno/>
- <olmtspreyearno/>
- <spreyearno/>
- <genrhealholi/>
- <usehealholi/>
- <sprehealholi/>
- <yearno/>
- </yearnolist>
- </list>
- <rslt>
- <rsltlist/>
- </rslt>
- </main>
- <send>
- <retrparams>
- <instcd/>
- <yearno/>
- <emplno/>
- <emplnm/>
- <idflag>I</idflag>
- <newyn/>
- </retrparams>
- </send>
- <init/>
- <temp/>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
- <submission id="TRRPD02401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/list"/>
- <submission id="TXRPD02401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/rslt"/>
- <submission id="TXRPD02402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/rslt"/>
- </model>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function fInitialize()
- {
- model.removenode("/root/main/list/yearnolist");
- model.setValue("/root/send/retrparams/yearno", getCurrentDate().substr(0, 4));
- // misfComboComCdListMulti("Z0007","cmb_instcd");
- misfComboInstCdListMulti("cmb_instcd",ipt_yearno.value+getCurrentDate().substr(4, 4),"","N");
-
- misfMsterDetailSet(grd_yearnolist, null, "TRRPD02401", "Y");
- model.setValue("/root/send/retrparams/instcd", getUserInfo("dutplceinstcd"));
-
- model.refresh();
- }
-
- function fRetrieve()
- {
- if(model.getValue("/root/send/retrparams/yearno") == "" || model.getValue("/root/send/retrparams/yearno").length != 4)
- {
- messageBox("작업년도를", "C001");
- return;
- }
- submit("TRRPD02401");
-
- var sYn = "";
- for(var i=grd_yearnolist.fixedRows; i<grd_yearnolist.rows; i++)
- {
- sYn = grd_yearnolist.valueMatrix(i, grd_yearnolist.colRef("createyn"));
-
- if(sYn == "Y")
- {
- grd_yearnolist.cellStyle("color", i, grd_yearnolist.colRef("createyn")) = "#FF0000";
- }
- else
- {
- grd_yearnolist.cellStyle("color", i, grd_yearnolist.colRef("createyn")) = "#000000";
- }
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">연차자료생성</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
- <group id="group2" style="left:0px; top:10px; width:1195px; height:36px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:35px; "/>
- <caption id="caption2" class="search_name" style="left:275px; top:9px; width:112px; height:17px; ">작업년도 :</caption>
- <line id="line13" class="line_4" style="top:7; x1:1110px; y1:7px; x2:1110px; y2:29px; border-left-style:solid; "/>
- <caption id="caption3" class="search_name" style="left:488px; top:9px; width:106px; height:17px; ">사원번호 :</caption>
- <input id="ipt_yearno" ref="/root/send/retrparams/yearno" class="input_s_essential" inputtype="date" format="yyyy" style="left:363px; top:8px; width:100px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var instcd = cmb_instcd.value;
- if( getStringLength(ipt_yearno.value) == "4" ) {
- if( getCurrentDate().substr(0, 4) == ipt_yearno.value ) {
- misfComboInstCdListMulti("cmb_instcd",getCurrentDate().substr(0, 8),"","N");
- }
- else {
- misfComboInstCdListMulti("cmb_instcd",ipt_yearno.value+"1231","","Y");
- }
- cmb_instcd.value = instcd;
- model.refresh();
- }
- ]]>
- </script>
- </input>
- <input id="ipt_emplno" ref="/root/send/retrparams/emplno" class="input_search" style="left:576px; top:8px; width:70px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == 13)
- {
- if(ipt_emplno.value == ipt_emplno.currentText) return;
-
- ipt_emplno.value = ipt_emplno.currentText;
- rpbfValidationCheck("EMPLNO", "emplno,emplnm");
-
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- rpbfValidationCheck("EMPLNO", "emplno,emplnm");
- model.refresh();
- ]]>
- </script>
- </input>
- <button id="btn_emplhelp" class="icon_search" style="left:649px; top:8px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- rpbfOpenPopUpList("SPRPB00101", ipt_emplno, "emplno,emplnm", "", "N");
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_emplnm" ref="/root/send/retrparams/emplnm" class="input_search" style="left:667px; top:8px; width:140px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == 13)
- {
- if(ipt_emplnm.value == ipt_emplnm.currentText) return;
-
- ipt_emplnm.value = ipt_emplnm.currentText;
- rpbfValidationCheck("EMPLNM", "emplno,emplnm");
-
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- rpbfValidationCheck("EMPLNM", "emplno,emplnm");
- model.refresh();
- ]]>
- </script>
- </input>
- <button id="btn_search" class="btn1_letter2" style="left:1125px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fRetrieve();
- ]]>
- </script>
- </button>
- <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; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption7" class="search_name" style="left:10px; top:9px; width:86px; height:17px; ">근무기관 :</caption>
- <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; ">
- <choices>
- <item>
- <label>생성</label>
- <value>I</value>
- </item>
- <item>
- <label>삭제</label>
- <value>D</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(model.getValue("/root/send/retrparams/idflag") == "I")
- {
- btn_createyearno.attribute("text") = "연차생성";
- }
- else
- {
- btn_createyearno.attribute("text") = "연차삭제";
- }
- ]]>
- </script>
- </select1>
- <caption id="caption1" class="search_name" style="left:840px; top:9px; width:91px; height:17px; ">생성구분 :</caption>
- </group>
- <line id="line7" class="line_1" style="left:0; x1:0px; y1:70px; x2:1195px; y2:70px; "/>
- <caption id="caption25" class="tit_2" style="left:5px; top:55px; width:151px; height:13px; ">연차자료개별등록</caption>
- <datagrid id="grd_yearnolist" nodeset="/root/main/list/yearnolist" caption="사원번호^성명^부서코드^부서명^생성여부^발생연차^사용연차^잔여연차^소정근로율^총일수^분자(일수)^분모(일수)^년도" colsep="^" colwidth="100, 110, 128, 290, 40, 85, 85, 85, 85, 85, 85, 85, 100" dataheight="25" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:75px; width:1195px; height:659px; ">
- <col disabled="true" ref="emplno" type="inputbutton" style="text-align:center; "/>
- <col ref="emplnm" type="output"/>
- <col ref="dutplcedeptcd" type="inputbutton" maxlength="10" style="text-align:center; "/>
- <col ref="deptnm" type="output"/>
- <col ref="createyn" visibility="hidden" style="text-align:center; "/>
- <col ref="genryearno" type="input" format="###.0" style="text-align:right; padding-right:10; "/>
- <col ref="useyearno" type="input" format="###.0" style="text-align:right; padding-right:10; "/>
- <col ref="spreyearno" style="text-align:right; padding-right:10; "/>
- <col ref="olmtspreyearno" visibility="visible" style="text-align:right; padding-right:10; "/>
- <col ref="genrhealholi" visibility="hidden" style="left:1077px; top:23px; width:80px; height:23px; text-align:right; padding-right:10; "/>
- <col ref="usehealholi" visibility="visible" style="text-align:right; padding-right:10; "/>
- <col ref="sprehealholi" visibility="visible" style="text-align:right; padding-right:10; "/>
- <col ref="yearno" type="input" visibility="hidden" style="text-align:right; padding-right:10; "/>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- if(grd_yearnolist.col == grd_yearnolist.colRef("emplno"))
- {
- rpbfValidationCheck("EMPLNO", "emplno,emplnm");
- model.refresh();
- }
- else if(grd_yearnolist.col == grd_yearnolist.colRef("emplnm"))
- {
- rpbfValidationCheck("EMPLNM", "emplno,emplnm");
- model.refresh();
- }
- /*
- else if(grd_yearnolist.col == grd_yearnolist.colRef("dutplcedeptcd"))
- {
- misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
- model.refresh();
- }
- else if(grd_yearnolist.col == grd_yearnolist.colRef("deptnm"))
- {
- misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
- model.refresh();
- }
- */
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(grd_yearnolist.col == grd_yearnolist.colRef("emplno"))
- {
- rpbfValidationCheck("EMPLNO", "emplno,emplnm");
- //model.refresh();
- }
- else if(grd_yearnolist.col == grd_yearnolist.colRef("emplnm"))
- {
- rpbfValidationCheck("EMPLNM", "emplno,emplnm");
- //model.refresh();
- }
- /*
- else if(grd_yearnolist.col == grd_yearnolist.colRef("dutplcedeptcd"))
- {
- misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
- //model.refresh();
- }
- else if(grd_yearnolist.col == grd_yearnolist.colRef("deptnm"))
- {
- misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
- //model.refresh();
- }
- */
- var genryearno = parseFloat(model.getValue("/root/main/list/yearnolist[" + grd_yearnolist.row + "]/genryearno"));
- var useyearno = parseFloat(model.getValue("/root/main/list/yearnolist[" + grd_yearnolist.row + "]/useyearno"));
- if (isNaN(genryearno) || genryearno == null || genryearno == ""){
- genryearno = 0;
- }
- if (isNaN(useyearno) || useyearno == null || useyearno == ""){
- useyearno = 0;
- }
- //alert(genryearno + "==" + useyearno + "==" + grd_yearnolist.row);
- var spreyearno = genryearno - useyearno;
- model.setValue("/root/main/list/yearnolist[" + grd_yearnolist.row + "]/spreyearno", spreyearno);
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- if(grd_yearnolist.col == grd_yearnolist.colRef("emplno"))
- {
- rpbfOpenPopUpList("SPRPB00101", grd_yearnolist, "emplno,emplnm", "", "N");
- model.refresh();
- }
- else if(grd_yearnolist.col == grd_yearnolist.colRef("dutplcedeptcd"))
- {
- misfValidationCheck("02", "", "dutplcedeptcd,deptnm" );
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_yearnolist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <button id="btn_addrow" class="btn2_letter3" style="left:1019px; top:50px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_yearnolist, "A");
- ]]>
- </script>
- </button>
- <button id="btn_delrow" class="btn2_letter3" style="left:1074px; top:50px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_yearnolist, "D");
- ]]>
- </script>
- </button>
- <button id="btn_saveexcel" class="btn2_letter4" style="left:1129px; top:50px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_yearnolist);
- ]]>
- </script>
- </button>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
- <line id="line75" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
- <button id="btn_createyearno" class="btn4_letter4" style="left:1050px; top:3px; width:80px; height:22px; ">
- <caption>연차생성</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var sYearNo = model.getValue("/root/send/retrparams/yearno");
- var sIdFlag = model.getValue("/root/send/retrparams/idflag");
- var sEmplNo = model.getValue("/root/send/retrparams/emplno");
- var sEmplNm = model.getValue("/root/send/retrparams/emplnm");
-
- var sMsg = " [ " + sYearNo + " ] 년 ";
-
- if(sEmplNo != "")
- {
- sMsg = sMsg + " [ " + sEmplNm + " ] 님의 ";
- }
-
- var dlgRslt = "";
- if(model.getValue("/root/send/retrparams/idflag") == "I")
- {
- dlgRslt = messageBox(sMsg + " 년차를 생성 하시겠습니까?", "Q999");
- }
- else
- {
- messageBox(" 년차를 삭제하시면 기존의 [ 사용 현황 ] 및 [ 잔여 현황 ] 이 삭제가 됩니다.", "E999");
- dlgRslt = messageBox(sMsg + "년차 정보를 삭제 하시겠습니까?", "Q999");
- }
-
- if(dlgRslt != 6) return;
-
- model.setValue("/root/send/retrparams/newyn", "N");
- submit("TXRPD02401");
-
- if(model.getValue("/root/main/rslt/rsltlist/errormsg") !="")
- {
- messageBox(model.getValue("/root/main/rslt/rsltlist/errormsg"), "I999");
- fRetrieve();
- }
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:1132px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSave("TXRPD02402");
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|