123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLAF00400_사용부서목록관리.xrw
- * 설 명 : 사용부서목록관리 화면
- * 설 계 자 : 한음미
- * 작 성 자 : 한음미
- * 작 성 일 : 2007.11.01
- * 수정이력 : 2008.04.14 - 유동철
- * 기 타 :
- -->
- <?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>
- <choi/>
- <deptflag/>
- <deptnm/>
- <dutdeptcd/>
- <unitnm/>
- <grsectcd/>
- <fromdd/>
- <todd/>
- <exist/>
- </deptlist>
- </main>
- <send>
- <use/>
- </send>
- <init>
- <sysdt>
- <sysdtinfo>
- <sysdd/>
- <systm/>
- </sysdtinfo>
- </sysdt>
- <deptinfo>
- <cd/>
- </deptinfo>
- </init>
- <hidden>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fExeInitialize();
- ]]>
- </script>
- <submission id="TRLPZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/sysdt/sysdtinfo"/>
- <submission id="TRLAF00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/deptlist"/>
- <submission id="TRLAF00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/deptinfo"/>
- <submission id="TXLAF00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/deptlist"/>
- </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="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
- <script type="javascript">
- <![CDATA[
- /* @group : 물품코드관리
- * @ver : 2007.11.01 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기값 Function
- */
- function fExeInitialize() {
-
- //--------------------------------
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/deptlist");
-
- //-----------------------------------------------------------------
- model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
- submit("TRLPZ00102"); // 현재의 time 가져오기
- submit("TRLAF00402"); // 로그인 사용자의 과코드에 해당하는 대체 과코드 검색
- //model.makeValue("/root/init/deptinfo/cd", "P");
-
- model.makeValue("/root/send/useyn", "");
- submit("TRLAF00401"); // 부서목록 조회하여 그리드에 가져오기
-
-
- //----------------------------------------------
- for(var iNo=1; iNo < grd_deptlist.rows; iNo++) {
- grd_deptlist.isReadOnly(iNo,2) = true;
- grd_deptlist.isReadOnly(iNo,4) = true;
- grd_deptlist.isReadOnly(iNo,7) = true;
- //grd_deptlist.isReadOnly(iNo,6) = true;
- }
-
- //--------------
- model.refresh();
- }
-
- /* @group : 물품코드관리
- * @ver : 2007.11.01 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 각 과에 사용부서 저장 Function
- */
- function fExeSaveDept(){
-
- var sNode = "/root/main/deptlist";
-
- /*
- //------------------------------------
- if(!getGridUpdateData(grd_deptlist)) {
- messageBox("저장할 데이터를","C002");
- return ;
- }
- */
-
- //------------------------------------------------------
- for(var iRow=1;iRow <= getNodesetCount(sNode); iRow++) {
-
- //------------------------------------------------------
- if (model.getValue(sNode+"["+iRow+"]/choi") == "true") {
-
- //----------------------------------------------------
- if (model.getValue(sNode+"["+iRow+"]/dutdeptcd") == "" ||
- model.getValue(sNode+"["+iRow+"]/unitnm") == "" ||
- model.getValue(sNode+"["+iRow+"]/grsectcd") == "") {
- messageBox(iRow + "행에 데이터를","C001");
- return false;
-
- } else {
- //-------------------------------
- // 신규 부서코드 등록일 경우 처리
- if (model.getValue(sNode+"["+iRow+"]/exist") != "Y") {
- if (model.getValue(sNode+"["+iRow+"]/todd") == "") {
- //messageBox(iRow + "행에 종료일자를","C001");
- //return ;
- model.makeValue(sNode+"["+iRow+"]/todd", "99991231");
- }
-
- //------------------------------------
- grd_deptlist.addStatus(iRow,"insert");
-
- } else {
- if(model.getValue(sNode+"["+iRow+"]/todd") == "") {
- messageBox(iRow + "행에 종료일자를","C001");
- return ;
- }
-
- //------------------------------------
- grd_deptlist.addStatus(iRow,"update");
- }
- }
- }
- }
-
- //-------------------------------------------------------------------
- model.makeValue("/root/send/deptlist", grd_deptlist.getUpdateData());
- setAlertOn();
- if (submit("TXLAF00401")) {
- fExeInitialize();
- }
- }
-
- /* @group : 물품코드관리
- * @ver : 2007.11.01 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 행추가 Function
- */
- function fExeInsertRow() {
-
- var sNode = "/root/main/deptlist";
- var iRowNo = 0;
-
- //-----------------------------------------------------------------------------------------------------
- if(model.getValue("/root/init/deptinfo/cd") == "" || model.getValue("/root/init/deptinfo/cd") == " ") {
- messageBox("소속 과에 해당하는 코드가 없습니다! ","I007");
- return false;
- }
-
- //-----------------------------
- grd_deptlist.addRow(true,true);
- iRowNo = getNodesetCount(sNode);
-
- //-----------------------------------------------------------------
- model.setValue(sNode+"["+ grd_deptlist.row +"]/choi", "true");
- model.setValue(sNode+"["+ grd_deptlist.row +"]/deptflag", model.getValue("/root/init/deptinfo/cd"));
- model.setValue(sNode+"["+ grd_deptlist.row +"]/deptnm", model.getValue("/root/init/deptinfo/cd"));
- model.setValue(sNode+"["+ grd_deptlist.row +"]/dutdeptcd", "");
- model.setValue(sNode+"["+ grd_deptlist.row +"]/unitnm", "");
- model.setValue(sNode+"["+ grd_deptlist.row +"]/grsectcd", "");
- model.setValue(sNode+"["+ grd_deptlist.row +"]/fromdd", model.getValue("/root/init/sysdt/sysdtinfo/sysdd"));
- model.setValue(sNode+"["+ grd_deptlist.row +"]/todd", "99991231");
- model.setValue(sNode+"["+ grd_deptlist.row +"]/exist", "N");
- grd_deptlist.refresh();
- }
-
- /* @group : 물품코드관리
- * @ver : 2007.11.01 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 행삭제 Function
- */
- function fExeDeleteRow() {
-
- var sNode = "/root/main/deptlist";
-
- //-------------------------------
- if (getNodesetCount(sNode) > 0) {
-
- //-----------------------------------------------------------------
- if(model.getValue(sNode+"["+ grd_deptlist.row +"]/exist") != "Y") {
- grd_deptlist.deleteRow(grd_deptlist.row, true);
- grd_deptlist.refresh();
- } else {
- if (model.getValue(sNode+"["+ grd_deptlist.row +"]/todd") == "") {
- messageBox("종료일자를 ","C001");
- return false;
- }
- }
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" scroll="auto" style="left:0px; top:0px; width:1194px; height:15px; ">
- <caption id="caption6" class="tit_1" autoresize="true" style="left:0px; top:0px; width:140px; height:14px; background-image:../../../com/commonweb/images/tit_bullet1.gif; ">사용부서목록관리</caption>
- </group>
- <group id="group3" style="left:0px; top:40px; width:1194px; height:679px; ">
- <caption id="caption22" class="tit_2" style="left:10px; top:4px; width:82px; height:14px; background-image:../../../com/commonweb/images/tit_bullet2.gif; ">부서목록</caption>
- <line id="line2" class="line_1" style="x1:10px; y1:23px; x2:1190px; y2:23px; "/>
- <datagrid id="grd_deptlist" nodeset="/root/main/deptlist" caption="선택^과구분^과명^부서코드^부서명^그룹부서^시작일자^종료일자^존재" colsep="^" colwidth="50, 100, 200, 130, 250, 120, 150, 150, 0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:10px; top:28px; width:1180px; height:644px; vertical-align:middle; ">
- <col ref="choi" type="checkbox"/>
- <col disabled="true" editmode="input" ref="deptflag" type="input" visibility="visible" appearance="minimal" style="text-align:center; "/>
- <col disabled="true" ref="deptnm" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label>진단검사의학과</label>
- <value>L</value>
- </item>
- <item>
- <label>병리과</label>
- <value>P</value>
- </item>
- <item>
- <label>핵의학-체외</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col ref="dutdeptcd" type="input" maxlength="5" style="text-align:center; "/>
- <col ref="unitnm" type="input" maxlength="60" style="text-align:center; "/>
- <col autonext="false" ref="grsectcd" type="input" maxlength="1" style="text-align:center; "/>
- <col ref="fromdd" type="inputdate" style="text-align:center; "/>
- <col ref="todd" type="inputdate" style="text-align:center; "/>
- <col ref="exist"/>
- </datagrid>
- <button id="button4" class="btn2_letter3" navindex="6" style="left:1080px; top:3px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeInsertRow();
- ]]>
- </script>
- </button>
- <button id="btn_del" class="btn2_letter3" navindex="6" style="left:1136px; top:3px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeDeleteRow();
- ]]>
- </script>
- </button>
- </group>
- <group id="group2" style="left:0px; top:15px; width:1194px; height:25px; ">
- <line id="line05" class="line_6" style="x1:10px; y1:23px; x2:1190px; y2:23px; "/>
- <button id="button1" class="btn4_letter2" style="left:1133px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeSaveDept();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|