123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLAF00500_사용자목록관리.xrw
- * 설 명 : 사용자목록관리 화면
- * 설 계 자 : 한음미
- * 작 성 자 : 한음미
- * 작 성 일 : 2007.11.07
- * 수정이력 :
- * 기 타 :
- -->
- <?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>
- <deptlist>
- <deptflag/>
- <dutdeptcd/>
- <unitnm/>
- </deptlist>
- <userlist>
- <choi/>
- <userid/>
- <usernm/>
- </userlist>
- <choilist>
- <choi/>
- <posdeptcd/>
- <dutdeptcd/>
- <userid/>
- <usernm/>
- <deptflag/>
- <exist/>
- </choilist>
- </main>
- <send>
- <use/>
- </send>
- <init>
- </init>
- <hidden>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fExeInitialize();
- ]]>
- </script>
- <submission id="TRLAF00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/deptlist"/>
- <submission id="TRLAF00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/usercdlist"/>
- <submission id="TXLAF00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/choilist"/>
- <submission id="TRLAF00502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/choilist"/>
- <submission id="TXLAF00502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/choilist"/>
- </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="../../../lis/commonweb/js/LZZ001.js"/>
- <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
- <script type="javascript" src="../../../lis/commonweb/js/LAZ001.js"/>
- <script type="javascript">
- <![CDATA[
- /* @group : 사용자목록관리
- * @ver : 2007.11.07 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기값 Function
- */
- function fExeInitialize(){
-
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/deptlist"); // 부서목록 초기화
- model.removeNodeset("/root/main/userlist"); // 전체사용자목록 초기화
- model.removeNodeset("/root/main/choilist"); // 사용자목록 초기화
- model.makeValue("/root/send/useyn", "1");
-
- submit("TRLAF00401"); // 부서목록 리스트 보이기
- submit("TRLAF00501"); // 전체사용자목록 리스트 보이기
-
- model.refresh();
- }
-
- /* @group : 사용자목록관리
- * @ver : 2007.11.07 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자목록에서 저장 전에 취소시 체크박스 해제할때 사라지는 Function
- */
- function fExeUnUserList() {
-
- var sNode = "/root/main/choilist";
-
-
- //-----------------------------------------------------------------------------------------------------------
- if(grd_choilist.row > 0 && grd_choilist.isCell(event.target) && grd_choilist.row >= grd_choilist.fixedRows) {
-
- //---------------------------------------------------------------------
- if (model.getValue(sNode+"["+ grd_choilist.row +"]/choi") == "false") {
- if (model.getValue(sNode+"["+ grd_choilist.row +"]/exist") != "Y") {
- model.setValue("/root/main/userlist["+ grd_userlist.row +"][userid='"+model.getValue(sNode+"["+ grd_choilist.row +"]/userid") +"']/choi", "false");
- grd_choilist.deleteItem(grd_choilist.row);
- }
- }
- }
- }
-
- /* @group : 사용자목록관리
- * @ver : 2007.11.07 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 전체사용자목록에서 사용자목록으로 데이터 가져오는 Function
- */
- function fExeChoiUserList() {
-
- var iNo = 0;
- var sDeptNode = "/root/main/deptlist";
- var sUserNode = "/root/main/userlist";
- var sChoiNode = "/root/main/choilist";
- var iChoiNo = 0;
-
-
- //-------------------------------------------------------------------------
- if (model.getValue(sDeptNode+"["+ grd_deptlist.row +"]/dutdeptcd") != "") {
-
- //-----------------------------------------------------------------------
- if(model.getValue(sUserNode+"["+ grd_userlist.row +"]/choi") == "true") {
-
- //------------------------------------------------------------------------------------------------------
- iNo = grd_choilist.findRow(model.getValue(sUserNode+"["+ grd_userlist.row +"]/userid"),1,4,false,false);
- if (iNo < 0 ) {
- grd_choilist.addRow();
- iChoiNo = Number(getNodesetCount(sChoiNode));
-
- model.setValue(sChoiNode+"["+ iChoiNo +"]/choi", "true");
- model.setValue(sChoiNode+"["+ iChoiNo +"]/posdeptcd", model.getValue("/root/main/deptlist["+ grd_deptlist.row +"]/deptflag"));
- model.setValue(sChoiNode+"["+ iChoiNo +"]/dutdeptcd", model.getValue("/root/main/deptlist["+ grd_deptlist.row +"]/dutdeptcd"));
- model.setValue(sChoiNode+"["+ iChoiNo +"]/userid", model.getValue("/root/main/userlist["+ grd_userlist.row +"]/userid"));
- model.setValue(sChoiNode+"["+ iChoiNo +"]/usernm", model.getValue("/root/main/userlist["+ grd_userlist.row +"]/usernm"));
- grd_choilist.toprow = grd_choilist.rows-1;
- } else {
- messageBox("데이터가","E006");
- model.setValue(sUserNode+"["+ grd_userlist.row +"]/choi", "false");
- }
- }
- } else {
- messageBox("부서코드를","C002");
- model.setValue(sUserNode+"["+ grd_userlist.row +"]/choi", "false");
- }
- }
-
- /* @group : 사용자목록관리
- * @ver : 2007.11.07 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자목록에서 저장되는 Function
- */
- function fSaveUserDept() {
-
- var sNode = "/root/main/choilist";
- var iFindNo = 0;
-
- /*
- //----------------------------------
- if(!getGridUpdateData(grd_choilist))
- {
- messageBox("저장할 데이터를","C002");
- return ;
- }
- */
- iFindNo = grd_choilist.findRow("true", 1, 1, false, false);
- if (Number(iFindNo) <= 0) {
- messageBox("저장할 사용자정보가 없습니다!", "I007");
- return false;
- }
-
- //----------------------------------------------------
- for(var iNo=1; iNo <= getNodesetCount(sNode); iNo++) {
- if (model.getValue(sNode+"["+iNo+"]/choi") == "true") { // 체크박스에 체크가 되어있고
- if (model.getValue(sNode+"["+iNo+"]/exist") != "Y") {
- grd_choilist.addStatus(iNo,"insert");
- }
- }
- }
-
- //------------------------------------------------------------------
- model.makeValue("/root/send/choilist",grd_choilist.getUpdateData());
- if (submit("TXLAF00501")) { // 저장버튼 function
- submit("TRLAF00502");
-
- //---------------------------------------------------
- for(var iNo=1; iNo < getNodesetCount(sNode); iNo++) {
- model.setValue(sNode+"["+iNo+"]/choi", "false");
- }
-
- //------------------------------------------------------------------------
- for (var iNum=1; iNum <= getNodesetCount("/root/main/userlist"); iNum++) {
- model.setValue("/root/main/userlist["+ iNum +"]/choi", "false");
- }
-
- }
- }
-
- /* @group : 사용자목록관리
- * @ver : 2007.11.07 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자목록 취소 Function
- */
- function fDeleteUserList(){
- var sNode = "/root/main/choilist";
- var iFindNo = 0;
-
- /*
- if(!getGridUpdateData(grd_choilist))
- {
- messageBox("취소할 데이터를","C002");
- return ;
- }
- */
- grd_choilist.clearStatus();
-
- //---------------------------------------------------------
- iFindNo = grd_choilist.findRow("true", 1, 1, false, false);
- if (Number(iFindNo) <= 0) {
- messageBox("취소할 사용자정보가 없습니다!", "I007");
- return false;
- }
- //------------------------------------------------------
- for (var iRow=1;iRow <= getNodesetCount(sNode);iRow++) {
- if (model.getValue("/root/main/choilist["+ iRow +"]/choi") == "true") {
- if (model.getValue("/root/main/choilist["+ iRow +"]/exist") == "Y") {
- grd_choilist.addStatus(iRow,"update");
- }
- }
- }
-
- //-------------------------------------------------------------------
- model.makeValue("/root/send/choilist", grd_choilist.getUpdateData());
- if (submit("TXLAF00502")) { // 선택 사용자코드 데이터 중 불필요한것 삭제
- submit("TRLAF00502");
-
- //--------------------------------------------------------
- for (var iNum=1; iNum <= getNodesetCount(sNode); iNum++) {
- model.setValue(sNode+"["+ iNum +"]/choi", "false");
- }
-
- //------------------------------------------------------------------------
- for (var iNum=1; iNum <= getNodesetCount("/root/main/userlist"); iNum++) {
- model.setValue("/root/main/userlist["+ iNum +"]/choi", "false");
- }
- }
- }
-
- /* @group : 사용자목록관리
- * @ver : 2007.11.07 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 부서목록에서 클릭시 사용자목록으로 보여지는 Function
- */
- function fExeDeptUserList() {
-
- var sDeptNode = "/root/main/deptlist";
-
- //-----------------------------------------------------------------------------------------------------------
- if(grd_deptlist.row > 0 && grd_deptlist.isCell(event.target) && grd_deptlist.row >= grd_deptlist.fixedRows) {
- caption8.text = model.getValue(sDeptNode+"["+ grd_deptlist.row +"]/unitnm") + " 사용자목록";
- model.makeValue("/root/send/dutdeptcd", model.getValue(sDeptNode+"["+ grd_deptlist.row +"]/dutdeptcd"));
- model.makeValue("/root/send/posdeptcd", model.getValue(sDeptNode+"["+ grd_deptlist.row +"]/deptflag"));
- submit("TRLAF00502"); // 사용자목록 보여주는 조회 function
- }
-
- //------------------------------------------------------------------------
- for (var iNum=1; iNum <= getNodesetCount("/root/main/userlist"); iNum++) {
- model.setValue("/root/main/userlist["+ iNum +"]/choi", "false");
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <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="grp_biz" scroll="auto" style="left:0px; top:35px; width:1195px; height:744px; ">
- <line id="line12" class="line_1" style="x1:0px; y1:25px; x2:385px; y2:25px; "/>
- <caption id="caption3" class="tit_2" style="left:5px; top:10px; width:95px; height:14px; ">부서목록</caption>
- <line id="line2" class="line_1" style="x1:390px; y1:25px; x2:720px; y2:25px; "/>
- <caption id="caption5" class="tit_2" style="left:395px; top:10px; width:108px; height:13px; ">전체사용자목록</caption>
- <datagrid id="grd_deptlist" nodeset="/root/main/deptlist" autoresize="true" caption="부서구분코드^부서코드^부서명" colsep="^" colwidth="90, 101, 150" dataheight="23" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:30px; width:385px; height:690px; ">
- <col ref="deptflag" style="text-align:center; "/>
- <col ref="dutdeptcd" style="text-align:center; "/>
- <col ref="unitnm" style="text-align:center; "/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fExeDeptUserList();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_deptlist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_userlist" nodeset="/root/main/userlist" caption="선택^사용자ID^사용자명" colsep="^" colwidth="34, 105, 148" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:390px; top:30px; width:330px; height:690px; ">
- <col ref="choi" type="checkbox"/>
- <col ref="userid" style="text-align:center; "/>
- <col ref="usernm" style="text-align:center; "/>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fExeChoiUserList();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_userlist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_choilist" nodeset="/root/main/choilist" caption="선택^과코드^부서코드^사용자ID^사용자명^부서구분^존재" colsep="^" colwidth="34, 0, 100, 120, 153, 0, 0" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:725px; top:30px; width:450px; height:690px; ">
- <col ref="choi" type="checkbox"/>
- <col ref="posdeptcd"/>
- <col ref="dutdeptcd" style="text-align:center; "/>
- <col ref="userid" style="text-align:center; "/>
- <col ref="usernm" style="text-align:center; "/>
- <col ref="deptflag"/>
- <col ref="exist"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fExeUnUserList();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_choilist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="caption8" class="tit_2" style="left:730px; top:10px; width:445px; height:13px; ">사용자목록</caption>
- <line id="line3" class="line_1" style="x1:725px; y1:25px; x2:1175px; y2:25px; "/>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1175px; y2:25px; "/>
- <button id="btn_save" class="btn4_letter2" style="left:1118px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveUserDept();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter2" style="left:1059px; top:3px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDeleteUserList();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|