123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <?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>부서별 근무지 등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <deptdutplcelist>
- <unitcd/>
- <unitnm/>
- <dutplcedeptcd/>
- <dutplcedeptnm/>
- <cmt/>
- <instcd/>
- </deptdutplcelist>
- </main>
- <send>
- <search>
- <instcd/>
- <unitcd/>
- <unitnm/>
- </search>
- <savelist>
- <deptdutplcelist/>
- </savelist>
- </send>
- <init/>
- <temp/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- misfGridInit(grd_deptdutplcelist);
- misfMsterDetailSet(grd_deptdutplcelist,null,"TRRPB03001","Y");
- btn_save.disabled = !(checkAuth("X"));
- // 공통코드 바인딩 silver
- misfComboComCdListMulti("Z0007,Z0007","cmb_instcd,grd_deptdutplcelist.dutplceinst");
- //misfComboComCdList('Z0007', cmb_instcd);
- var instcd = getUserInfo("dutplceinstcd");
- cmb_instcd.value=instcd;
- var unitcd = getUserInfo("dutplcecd");
- var unitnm = getUserInfo("dutplcenm");
- ipt_unitcd.value=unitcd;
- ipt_unitnm.value=unitnm;
- btn_search.dispatch("DOMActivate");
-
-
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
- <script type="javascript">
- <![CDATA[
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
- model.removeNodeset("/root/main/deptdutplcelist");
- model.resetInstanceNode("/root/send");
- model.refresh();
- var instcd = getUserInfo("dutplceinstcd");
- cmb_instcd.value=instcd;
- }
- function fsaveCheckValue(){
- var iInsCnt = 0;
- var iDupCnt = 0;
- var bDel = false;
- var icolidx=grd_deptdutplcelist.colRef("instcd");
- var icolidx1=grd_deptdutplcelist.colRef("unitcd");
- var icolidx2=grd_deptdutplcelist.colRef("dutplcedeptcd");
-
- for(var i=0; i<grd_deptdutplcelist.rows; i++)
- {
- if(grd_deptdutplcelist.rowStatus(i) == 1 || grd_deptdutplcelist.rowStatus(i) == 3)
- {
- iInsCnt = i;
- break;
- }
- }
- for(var i=iInsCnt; i<grd_deptdutplcelist.rows; i++)
- {
- for(var j=1; j<i; j++)
- {
- if(grd_deptdutplcelist.valueMatrix(i, icolidx) == grd_deptdutplcelist.valueMatrix(j, icolidx) && grd_deptdutplcelist.valueMatrix(i, icolidx1) == grd_deptdutplcelist.valueMatrix(j, icolidx1) && grd_deptdutplcelist.valueMatrix(i, icolidx2) == grd_deptdutplcelist.valueMatrix(j, icolidx2))
- {
- if(grd_deptdutplcelist.rowStatus(i) == 1 || grd_deptdutplcelist.rowStatus(i) == 3)
- { var ret= messageBox("중복된 행을 삭제", "Q001");
- if (ret != 6) { // not OK
- bDel = false;
- return false;
- }else{
- grd_deptdutplcelist.deleteItem(i);
- iDupCnt++;
- bDel = true;
- }
- }
- }
- }
-
- if(bDel)
- {
- bDel = false;
- i--;
- }
- }
-
- if(iDupCnt > 0)
- {
- messageBox("[ " + iDupCnt + " ]" + " 건의 중복된 행이 삭제", "I001");
- }
-
- return true;
- }
- ]]>
- </script>
- <submission id="TRRPB03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/deptdutplcelist"/>
- <submission id="TXRPB03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savelist" resultref="/root/temp"/>
- </model>
- </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; "/>
- <caption id="cap_instcd" class="search_name" style="left:15px; top:19; width:86px; height:17px; ">기 관 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:1125px; top:16px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(!isRequiredControls("ipt_instcd"))return;
- submit("TRRPB03001");
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:1110px; y1:16px; x2:1110px; y2:38px; "/>
- <line id="line207" class="line_1" style="x1:0; y1:69; x2:1195; y2:69px; "/>
- <datagrid id="grd_deptdutplcelist" nodeset="/root/main/deptdutplcelist" caption="부서코드^부서명^근무지기관^근무지부서코드^근무지부서명^비고^기관^부서OLD^근무지기관OLD^근무지OLD" colsep="^" colwidth="129, 150, 142, 141, 200, 388, 31, 29, 31, 36" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:74px; width:1195px; height:660px; ">
- <col ref="unitcd" type="inputbutton"/>
- <col ref="unitnm"/>
- <col ref="dutplceinst" type="combo">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </col>
- <col ref="dutplcedeptcd" type="inputbutton"/>
- <col ref="dutplcedeptnm"/>
- <col ref="cmt" type="input"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="oldunitcd" visibility="hidden"/>
- <col ref="olddutplceinst" visibility="hidden"/>
- <col ref="olddutplcedeptcd" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- if (grd_deptdutplcelist.col == grd_deptdutplcelist.colRef("unitcd"))
- { //부서코드 버튼을 눌렀을 때
- misfOpenPopUpList("02", grd_deptdutplcelist, "", "unitcd,unitnm");
- }
- else if(grd_deptdutplcelist.col == grd_deptdutplcelist.colRef("dutplcedeptcd"))
- { //근무코드 버튼을 눌렀을 때
- var recv_list = "dutplcedeptcd,dutplcedeptnm";
- var instcd = grd_deptdutplcelist.valueMatrix(grd_deptdutplcelist.row, grd_deptdutplcelist.colRef("dutplceinst"));
- rpbfOpenDeptCdHelp(grd_deptdutplcelist,recv_list, instcd, "instcd");
- //misfOpenPopUpList("02", grd_deptdutplcelist, "", "dutplcedeptcd,dutplcedeptnm","dutplceinst");
- }
-
- model.refresh();
-
- ]]>
- </script>
- </datagrid>
- <caption id="caption1" class="search_name" style="left:250px; top:19px; width:99px; height:17px; ">부 서 :</caption>
- <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:18px; width:135px; height:19px; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_deptcdhelp" class="icon_search" style="left:409px; top:20px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var precv_list = "unitcd" + "," + "unitnm";
- //alert(precv_list);
- misfOpenPopUpList("02", ipt_unitcd, "", precv_list);
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_unitnm" ref="/root/send/search/unitnm" class="input_search" style="left:428px; top:18px; width:150px; height:19px; "/>
- <input id="ipt_unitcd" ref="/root/send/search/unitcd" class="input_search" style="left:335px; top:18px; width:70; height:19px; "/>
- <button id="btn_grddel" class="btn2_letter3" style="left:1142px; top:48px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_deptdutplcelist,"D");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_grdadd" class="btn2_letter3" style="left:1087px; top:48px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_deptdutplcelist, "A");
- var cur_row=grd_deptdutplcelist.row;
- grd_deptdutplcelist.valueMatrix(cur_row, grd_deptdutplcelist.colRef("instcd")) =cmb_instcd.value;
- ]]>
- </script>
- </button>
- <caption id="caption9" class="tit_2" style="left:5px; top:54px; width:170px; height:13px; ">부서별 근무지 내역</caption>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
- <line id="line11" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
- <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[
- var updtdata = getGridUpdateData(grd_deptdutplcelist);
- if (updtdata == "" ) {
- messageBox("변경된 데이터가","I004");
- return;
- }
- if(!fsaveCheckValue())return;
- misfSave("TXRPB03001");
- ]]>
- </script>
- </button>
- <button id="btn_clear" class="btn4_letter3" style="left:1069px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var updtdata = getGridUpdateData(grd_deptdutplcelist);
- if (updtdata != "" ) {
- var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
- if (ret != 6) { // not OK
- return;
- }
- }
- fInitialize();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|