123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554 |
- <?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>
- <searchpanel>
- <managerid/>
- <managernm/>
- <managedinstcd/>
- <manageddeptcd/>
- </searchpanel>
- <memberlistpanel>
- </memberlistpanel>
- <memberdutplcepanel/>
- </main>
- <hidden>
- <searchpanel>
- <managedinstlist/>
- <manageddeptlist/>
- </searchpanel>
- <instlist/>
- <result/>
- </hidden>
- <send>
- <data>
- <managerid/>
- <managedinstcd/>
- <manageddeptcd/>
- <memberid/>
- <updated/>
- </data>
- </send>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- var userid = getUserInfo("userid");
- var usernm = getUserInfo("usernm");
- var dutinstcd = getUserInfo("dutinstcd");
- var dutunitcd = getUserInfo("dutunitcd");
-
- model.setValue("/root/main/searchpanel/managerid", userid);
- model.setValue("/root/main/searchpanel/managernm", usernm);
- model.setValue("/root/send/data/managerid", userid);
- submit("TRZSU10201");
- var managedinstlist = instance1.selectNodes("/root/hidden/searchpanel/managedinstlist/managedinst");
- if(managedinstlist.length>0){
- var default_managedinstcd = model.getValue("/root/hidden/searchpanel/managedinstlist/managedinst[1]/managedinstcd");
- model.setValue("/root/main/searchpanel/managedinstcd", default_managedinstcd);
- model.setValue("/root/send/data/managedinstcd", default_managedinstcd);
- submit("TRZSU10202");
- var default_manageddeptcd = model.getValue("/root/hidden/searchpanel/manageddeptlist/manageddept[1]/manageddeptcd");
- model.setValue("/root/main/searchpanel/manageddeptcd", default_manageddeptcd);
- }else{
- messageBox("관리자가 아니므로 화면을 조작", "E001");
- body.disabled = true;
- }
-
- zbcfGetCodeList(new Array("Z0007"), new Array("/root/hidden/instlist"), true, new Array("cdnm"), new Array("asc"));
-
- model.refresh();
- ]]>
- </script>
- <submission id="TRZSU10201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/searchpanel/managedinstlist"/>
- <submission id="TRZSU10202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/searchpanel/manageddeptlist"/>
- <submission id="TRZSU10203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/memberlistpanel"/>
- <submission id="TRZSU10204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/memberdutplcepanel"/>
- <submission id="TRZBC00101"/>
- <submission id="TXZSU10117" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/result"/>
- </model>
- <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/dateHelper.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- </xhtml:head>
- <xhtml:body guideline="1,1194;2,770;2,771;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_tle" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">팀단위 근무지관리</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:36px; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:100px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:45px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line13" style="x1:1105px; y1:8px; x2:1105px; y2:36px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption33" class="search_name" style="left:5px; top:15px; width:96px; height:17px; ">팀장 ID :</caption>
- <input id="ipt_searchterm" ref="/root/main/searchpanel/managerid" class="input_s_essential" navindex="2" editable="false" imemode="hangul" style="left:89px; top:14px; width:100px; height:19px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1123px; top:12px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.removenode("/root/main/memberlistpanel");
- model.removenode("/root/main/memberdutplcepanel");
- model.makeNode("/root/main/memberlistpanel");
- model.makeNode("/root/main/memberdutplcepanel");
- var managedinstcd = model.getValue("/root/main/searchpanel/managedinstcd");
- var manageddeptcd = model.getValue("/root/main/searchpanel/manageddeptcd");
- model.setValue("/root/send/data/managedinstcd", managedinstcd);
- model.setValue("/root/send/data/manageddeptcd", manageddeptcd);
- submit("TRZSU10203");
- model.refresh();
- ]]>
- </script>
- </button>
- <select1 id="cmb_searchcondition" ref="/root/main/searchpanel/manageddeptcd" class="combo_default" navindex="1" appearance="minimal" style="left:745px; top:14px; width:160px; height:19px; ">
- <choices>
- <itemset nodeset="/root/hidden/searchpanel/manageddeptlist/manageddept">
- <label ref="manageddeptnm"/>
- <value ref="manageddeptcd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption1" class="search_name" style="left:200px; top:15px; width:96px; height:17px; ">팀장 이름 :</caption>
- <input id="input1" ref="/root/main/searchpanel/managernm" class="input_s_essential" navindex="2" editable="false" imemode="hangul" style="left:295px; top:14px; width:100px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption2" class="search_name" style="left:655px; top:15px; width:117px; height:17px; ">관리부서 :</caption>
- <caption id="caption4" class="search_name" style="left:400px; top:15px; width:117px; height:17px; ">관리기관 :</caption>
- <select1 id="combo1" ref="/root/main/searchpanel/managedinstcd" class="combo_default" navindex="1" appearance="minimal" style="left:490px; top:14px; width:160px; height:19px; ">
- <choices>
- <itemset nodeset="/root/hidden/searchpanel/managedinstlist/managedinst">
- <label ref="managedinstnm"/>
- <value ref="managedinstcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var managed_instcd = model.getValue("/root/main/searchpanel/managedinstcd");
- model.setValue("/root/send/data/managedinstcd", managed_instcd);
- submit("TRZSU10202");
- var default_manageddeptcd = model.getValue("/root/hidden/searchpanel/manageddeptlist/manageddept[1]/manageddeptcd");
- model.setValue("/root/main/searchpanel/manageddeptcd", default_manageddeptcd);
- model.refresh();
- ]]>
- </script>
- </select1>
- </group>
- <line id="line1" class="line_1" style="x1:0px; y1:113px; x2:245px; y2:113px; "/>
- <caption id="caption17" class="tit_2" style="left:0px; top:95px; width:160px; height:14px; ">팀원목록</caption>
- <button id="btn_create" class="btn2_letter5" navindex="57" style="left:960px; top:90px; width:75px; height:19px; ">
- <caption>근무지추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var row = grd_dutplcelist.row;
- if(row<1){
- messageBox("근무지마다 업무에 영향을 주는 추가속성이 존재하여 기존 근무지를 참조하여 추가해야 하므로 근무지를 선택하시기 바랍니다.", "E");
- return;
- }
- grd_dutplcelist.addRow();
- var create = grd_dutplcelist.rows-1;
- grd_dutplcelist.cellAttribute("disabled", create, grd_dutplcelist.colRef("fromdd")) = "false";
- grd_dutplcelist.cellAttribute("disabled", create, grd_dutplcelist.colRef("todd")) = "false";
- model.copyNode("/root/main/memberdutplcepanel/memberdutplce["+create+"]", "/root/main/memberdutplcepanel/memberdutplce["+row+"]");
- model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/action", "create");
- model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/dutplcecd", "");
- model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/dutplcenm", "");
- model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/maindutplceflag", "false");
- model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/fromdd", getCurrentDate());
- model.refresh();
-
- ]]>
- </script>
- </button>
- <line id="line4" class="line_3" style="x1:0px; y1:112px; x2:1195px; y2:112px; "/>
- <button id="btn_closing" class="btn2_letter5" navindex="58" style="left:1110px; top:90px; width:75px; height:19px; ">
- <caption>근무지마감</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_dutplcelist.row;
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action=="read"){
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = getCurrentDate();
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevtodd")) = getCurrentDate();
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "closing";
- grd_dutplcelist.rowStatus(row) = 2;
- grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("dutplceinstcd")) = "true";
- grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("dutplcecd")) = "true";
- grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("maindutplceflag")) = "true";
- grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("todd")) = "false";
- model.refresh();
- }else if(action=="closing"){
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("inittodd"));
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "read";
- grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("dutplceinstcd")) = "false";
- grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("dutplcecd")) = "false";
- grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("maindutplceflag")) = "false";
- grd_dutplcelist.rowStatus(row) = 0;
- model.refresh();
- }else{
- messageBox("근무지를 추가하거나 변경한 경우에는 마감할수 없습니다.", "E");
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_memberlist" nodeset="/root/main/memberlistpanel/member" caption="사용자ID^사용자명" colsep="^" colwidth="100, 127" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:117px; width:245px; height:618px; ">
- <col ref="memberid"/>
- <col ref="membernm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var row = grd_memberlist.row;
- if(row<1){
- return;
- }
- var memberid = grd_memberlist.valueMatrix(row, grd_memberlist.colRef("memberid"));
- model.setValue("/root/send/data/memberid", memberid);
- submit("TRZSU10204");
- for(var i=0; i<grd_dutplcelist.rows; i++){
- grd_dutplcelist.cellAttribute("disabled", i, grd_dutplcelist.colRef("maindutplceflag")) = "false";
- }
- model.refresh();
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_dutplcelist" nodeset="/root/main/memberdutplcepanel/memberdutplce" caption="action^근무지기관^이전근무지기관^초기근무지기관^근무지^근무지^이전근무지^이전근무지^초기근무지^초기근무지^시작일^이전시작일^기준시작일^종료일^이전종료일^기준종료일^직위^직종^휴대폰^이메일^주근무지" colsep="^" colwidth="54, 120, 100, 100, 110, 70, 100, 100, 100, 100, 85, 100, 100, 85, 100, 100, 70, 70, 110, 128, 54" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:249px; top:117px; width:944px; height:618px; ">
- <col ref="action" visibility="hidden"/>
- <col ref="dutplceinstcd" type="combo" style="left:66px; top:23px; width:120px; height:23px; ">
- <choices>
- <itemset nodeset="/root/hidden/instlist/Z0007">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var row = grd_dutplcelist.row;
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action=="closing"){
- messageBox("마감된 근무지기관은 변경할수 없습니다.", "E");
- return;
- }
- ]]>
- </script>
- </col>
- <col ref="prevdutplceinstcd" visibility="hidden"/>
- <col ref="initdutplceinstcd" visibility="hidden"/>
- <col disabled="false" ref="dutplcenm" type="inputbutton">
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var row = grd_dutplcelist.row;
- if(row<1){
- return;
- }
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action=="closing"){
- messageBox("마감된 근무지는 변경할수 없습니다.", "E");
- return;
- }
- var search_condition = "deptnm";
- var search_term = model.getValue("/root/main/sample1/deptcd");
- var receive_deptcd_path = "/root/main/memberdutplcepanel/memberdutplce["+row+"]/dutplcecd";
- var receive_deptnm_path = "/root/main/memberdutplcepanel/memberdutplce["+row+"]/dutplcenm";
- var standard_yn = null;
- var ord_deptflag = null;
-
- var prev_dutplceinstcd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplceinstcd"));
- var prev_dutplcecd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcecd"));
- var prev_dutplcenm = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcenm"));
-
- zbcfOpenAssignedInstDeptCodeList(prev_dutplceinstcd, search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag, new Array("deptcd", "depthngnm"));
-
- var next_dutplceinstcd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplceinstcd"));
- var next_dutplcecd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcecd"));
- var next_dutplcenm = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcenm"));
- if(prev_dutplceinstcd==next_dutplceinstcd&&prev_dutplcecd==next_dutplcecd){
- messageBox("근무지정보가 변경되지 않았습니다.", "E");
- return;
- }else{
- for(var i=1; i<grd_dutplcelist.rows; i++){
- if(i==row){
- continue;
- }
- var comp_dutplceinstcd = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("dutplceinstcd"));
- var comp_dutplcecd = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("dutplcecd"));
- if(next_dutplceinstcd==comp_dutplceinstcd&&next_dutplcecd==comp_dutplcecd){
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplceinstcd")) = prev_dutplceinstcd;
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcecd")) = prev_dutplcecd;
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcenm")) = prev_dutplcenm;
- messageBox("동일한 근무지 정보가 존재합니다.", "E");
- return;
- }
- }
- }
-
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action=="create"){
- grd_dutplcelist.rowStatus(row) = 1;
- }else if(action=="read"||action=="main"){
- grd_dutplcelist.rowStatus(row) = 2;
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "change";
- }
- model.refresh();
- ]]>
- </script>
- </col>
- <col ref="dutplcecd"/>
- <col ref="prevdutplcecd" visibility="hidden"/>
- <col ref="prevdutplcenm" visibility="hidden"/>
- <col ref="initdutplcecd" visibility="hidden"/>
- <col ref="initdutplcenm" visibility="hidden"/>
- <col disabled="true" ref="fromdd" type="inputdate"/>
- <col ref="prevfromdd" visibility="hidden"/>
- <col ref="initfromdd" visibility="hidden"/>
- <col disabled="true" ref="todd" type="inputdate"/>
- <col ref="prevtodd" visibility="hidden"/>
- <col ref="inittodd" visibility="hidden"/>
- <col ref="jobposnm"/>
- <col ref="jobkindnm"/>
- <col ref="mpphonno" style="left:600px; top:23px; width:110px; height:23px; "/>
- <col ref="email"/>
- <col ref="maindutplceflag" type="checkbox">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var row = grd_dutplcelist.row;
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action=="closing"){
- messageBox("마감된 근무지의 주근무지 여부는 변경할수 없습니다.", "E");
- return;
- }
-
- ]]>
- </script>
- </col>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var row = grd_dutplcelist.row;
- var col = grd_dutplcelist.col;
- if(col==grd_dutplcelist.colRef("dutplceinstcd")){
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action!="create"){
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "change";
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcecd")) ="";
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevdutplcecd")) = "";
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcenm")) = "";
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevdutplcenm")) = "";
- model.refresh();
- }
- }else if(col==grd_dutplcelist.colRef("maindutplceflag")){
- var maindutplceflag = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("maindutplceflag"));
- if(maindutplceflag == "true"){
- for(var i=1; i<grd_dutplcelist.rows; i++){
- if(row==i) {
- continue;
- }else{
- var comp_maindutplceflag = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("maindutplceflag"));
- if(comp_maindutplceflag=="true"){
- messageBox("주근무지는 한개만 존재합니다.", "E");
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("maindutplceflag")) = "false";
- return;
- }
- }
- }
- }
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action=="read"){
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "main";
- }
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action=="read"){
- grd_dutplcelist.rowStatus(row) = 0;
- }else if(action=="change"){
- grd_dutplcelist.rowStatus(row) = 2;
- }else if(action=="create"){
- grd_dutplcelist.rowStatus(row) = 1;
- }else if(action=="main"){
- grd_dutplcelist.rowStatus(row) = 2;
- }else{
- messageBox("조작관련 Error발생 업무담당자에게 문의하세요", "E");
- return;
- }
- }else if(col==grd_dutplcelist.colRef("fromdd")){
- var prev_fromdd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevfromdd"));
- var fromdd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd"));
- var todd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd"));
- var valid = isValidDateTime(fromdd, "YYYYMMDD");
- var currentdate = getCurrentDate();
- if(!valid){
- messageBox("시작일자의 날짜 포맷이 올바르지 않습니다.", "E");
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd")) = prev_fromdd;
- model.refresh();
- grd_dutplcelist.row= row;
- grd_dutplcelist.col= grd_dutplcelist.colRef("fromdd");
- model.setFocus("grd_dutplcelist");
- return;
- }else if(fromdd>todd){
- messageBox("시작일자는 종료일자보다 클수 없습니다.", "E");
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd")) = prev_fromdd;
- model.refresh();
- grd_dutplcelist.row= row;
- grd_dutplcelist.col= grd_dutplcelist.colRef("fromdd");
- model.setFocus("grd_dutplcelist");
- return;
- }else if(currentdate<fromdd){
- messageBox("시작일자는 현재일자를 포함해야 합니다.", "E");
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd")) = prev_fromdd;
- model.refresh();
- grd_dutplcelist.row= row;
- grd_dutplcelist.col= grd_dutplcelist.colRef("fromdd");
- model.setFocus("grd_dutplcelist");
- return;
- }else{
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevfromdd")) = fromdd;
- }
- }else if(col==grd_dutplcelist.colRef("todd")){
- var prev_todd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevtodd"));
- var fromdd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd"));
- var todd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd"));
- var valid = isValidDateTime(todd, "YYYYMMDD");
- var currentdate = getCurrentDate();
- if(!valid){
- messageBox("종료일자의 날짜 포맷이 올바르지 않습니다.", "E");
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = prev_todd;
- model.refresh();
- grd_dutplcelist.row= row;
- grd_dutplcelist.col= grd_dutplcelist.colRef("todd");
- model.setFocus("grd_dutplcelist");
- return;
- }else if(fromdd>todd){
- messageBox("시작일자는 종료일자보다 클수 없습니다.", "E");
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = prev_todd;
- model.refresh();
- grd_dutplcelist.row= row;
- grd_dutplcelist.col= grd_dutplcelist.colRef("todd");
- model.setFocus("grd_dutplcelist");
- return;
- }else if(currentdate>todd){
- messageBox("종료일자는 현재일자를 포함해야 합니다.", "E");
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = prev_todd;
- model.refresh();
- grd_dutplcelist.row= row;
- grd_dutplcelist.col= grd_dutplcelist.colRef("todd");
- model.setFocus("grd_dutplcelist");
- return;
- }else{
- grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevtodd")) = todd;
- }
- }
-
- ]]>
- </script>
- </datagrid>
- <line id="line2" class="line_1" style="x1:249px; y1:113px; x2:1193px; y2:113px; "/>
- <caption id="caption3" class="tit_2" style="left:250px; top:95px; width:125px; height:13px; ">팀원 근무지 목록</caption>
- <button id="button1" class="btn2_letter5" navindex="57" style="left:1035px; top:90px; width:75px; height:19px; ">
- <caption>근무지삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_dutplcelist.row;
- var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
- if(action=="create"){
- grd_dutplcelist.deleteRow(row);
- }else{
- messageBox("추가한 근무지만 삭제할수 있습니다.", "E");
- }
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
- <button id="btn_save" class="btn4_letter2" style="left:1135px; top:0px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var is_updated = false;
- var is_maindutplceflag_updated = false;
-
- for(var i=0; i<grd_dutplcelist.rows; i++){
-
- var action = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("action"));
- var maindutplceflag = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("maindutplceflag"));
- var row_status = grd_dutplcelist.rowStatus(i);
- if(maindutplceflag=="true"){
- is_maindutplceflag_updated = true;
- }
-
- if(row_status>0){
-
- if(!is_updated){
- is_updated = true;
- }
-
- var dutplceinstcd = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("dutplceinstcd"));
- var dutplcecd = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("dutplcecd"));
- if( dutplceinstcd==""){
- messageBox("근무지기관는 필수 입력 사항입니다.", "E");
- grd_dutplcelist.row = i;
- grd_dutplcelist.col = grd_dutplcelist.colRef("dutplceinstcd");
- model.setFocus("grd_dutplcelist");
- return;
- }else if( dutplcecd == "" ){
- messageBox("근무지는 필수 입력 사항입니다.", "E");
- grd_dutplcelist.row = i;
- grd_dutplcelist.col = grd_dutplcelist.colRef("dutplcecd");
- model.setFocus("grd_dutplcelist");
- return;
- }
- }
- }
- if(!is_updated){
- messageBox("갱신된 사항이 없습니다.", "E");
- return;
- }else if(!is_maindutplceflag_updated){
- messageBox("주근무지가 등록되지 않았습니다.", "E");
- return;
- }
- var updated = grd_dutplcelist.getUpdateData();
- model.setValue("/root/send/data/updated", updated);
- submit("TXZSU10117");
- model.refresh();
- var error_code = new Number(model.getValue("/root/hidden/result/errormessage/errorcode"));
- var error_message = model.getValue("/root/hidden/result/errormessage/errormessage")
- if(error_code<0){
- messageBox(error_message+"('"+error_code+"'), 업무담당자에게 문의하세요", "E");
- }else{
- var row = grd_memberlist.row;
- var memberid = grd_memberlist.valueMatrix(row, grd_memberlist.colRef("memberid"));
- model.setValue("/root/send/data/memberid", memberid);
- submit("TRZSU10204");
- for(var i=0; i<grd_dutplcelist.rows; i++){
- grd_dutplcelist.cellAttribute("disabled", i, grd_dutplcelist.colRef("maindutplceflag")) = "false";
- }
- model.refresh();
- messageBox(error_message, "I");
- }
- ]]>
- </script>
- </button>
- <button id="btn_init" class="btn4_letter3" style="left:1067px; top:0px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.removenode("/root/main/memberlistpanel");
- model.removenode("/root/main/memberdutplcepanel");
- model.makeNode("/root/main/memberlistpanel");
- model.makeNode("/root/main/memberdutplcepanel");
- model.refresh();
- ]]>
- </script>
- </button>
- <line id="line3" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|