123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <?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>
- <emplist>
- <chkflag/>
- <empid/>
- <empnm/>
- <usrlevel/>
- </emplist>
- </main>
- <init>
- </init>
- <send>
- <reqdata/>
- <savedata/>
- </send>
- <temp>
- <userid/>
- <usernm/>
- <chkcncl/>
- </temp>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- grd_emplist.fixedcellcheckbox(0,1) = true;
- model.removeNodeset("/root/main/emplist");
- submit("TRMNP04611");
- ]]>
- </script>
- <submission id="TRMNP04611" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/main/emplist"/>
- <script type="javascript" ev:event="xforms-close">
- <![CDATA[
- model.setValue("/root/temp/chkcncl", "C");
- ]]>
- </script>
- <submission id="TXMNP04611" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/emplist"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="320" pageheight="320" guideline="2,343;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:0px; top:0px; width:300px; height:300px; ">
- <caption id="caption1" class="tit_2" style="left:5px; top:16px; width:145px; height:13px; ">권한 리스트</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:31px; x2:300px; y2:31px; "/>
- <datagrid id="grd_emplist" nodeset="/root/main/emplist" class="grd_agtplcelist" autoresize="true" caption="^사원번호^이름^권한" colsep="^" colwidth="30, 90, 88, 50" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="never" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:36px; width:300px; height:264px; ">
- <col ref="chkflag" type="checkbox"/>
- <col ref="empid" type="input" style="text-align:center; "/>
- <col imemode="hangul" ref="empnm" type="input" style="text-align:center; "/>
- <col ref="usrlevel" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label>관리자</label>
- <value>M</value>
- </item>
- <item>
- <label>업무담당</label>
- <value>C</value>
- </item>
- </choices>
- </col>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- var iRow = grd_emplist.row;
- var userid = model.getValue("/root/main/emplist[" + iRow + "]/empid");
- var usernm = model.getValue("/root/main/emplist[" + iRow + "]/empnm");
- var olduserid = model.getValue("/root/temp/userid");
- var oldusernm = model.getValue("/root/temp/usernm");
-
- if( ( userid != "" )||( usernm != "" ) ) {
- if( userid != olduserid ) {
-
- setParameter("userid", userid);
- setParameter("usernm", "");
-
- modal("SMMNP04620" ,"", "450", "200", "SMMNP04620", "", "");
-
- if( model.getValue("/root/temp/chkcncl") == "C" ) {
- return;
- }else {
- model.setValue("/root/main/emplist[" + iRow + "]/empid", model.getValue("/root/temp/userid"));
- model.setValue("/root/main/emplist[" + iRow + "]/empnm", model.getValue("/root/temp/usernm"));
- model.resetInstanceNode("/root/temp");
- model.refresh();
- }
- }else if( usernm != oldusernm ) {
-
- setParameter("userid", "");
- setParameter("usernm", usernm);
-
- modal("SMMNP04620" ,"", "450", "200", "SMMNP04620", "", "");
-
- if( model.getValue("/root/temp/chkcncl") == "C" ) {
- return;
- }else {
- model.setValue("/root/main/emplist[" + iRow + "]/empid", model.getValue("/root/temp/userid"));
- model.setValue("/root/main/emplist[" + iRow + "]/empnm", model.getValue("/root/temp/usernm"));
- model.resetInstanceNode("/root/temp");
- model.refresh();
- }
- }
- if( (model.getValue("/root/main/emplist[" + iRow + "]/empid") != "")&&(model.getValue("/root/main/emplist[" + iRow + "]/empnm") != "") ) {
- model.setValue("/root/main/emplist[" + iRow + "]/chkflag", "true");
- }else {
- model.setValue("/root/main/emplist[" + iRow + "]/chkflag", "false");
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- var iRow = grd_emplist.row;
- model.setValue("/root/temp/userid", model.getValue("/root/main/emplist[" + iRow + "]/empid"));
- model.setValue("/root/temp/usernm", model.getValue("/root/main/emplist[" + iRow + "]/empnm"));
- ]]>
- </script>
- </datagrid>
- <button id="button9" class="btn2_letter3" style="left:153px; top:10px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_emplist.addRow();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter2" style="left:208px; top:10px; width:42px; height:19px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var iRows = -1;
- var chkflag;
- var cnt = 0;
- iRows = grd_emplist.rows;
-
- for( var i = 0; i < iRows; i++ ) {
- chkflag = model.getValue("/root/main/emplist["+i+"]/chkflag");
- if( chkflag == "true" ) {
- if( model.getValue("/root/main/emplist["+i+"]/usrlevel") == "" ) {
- messageBox("권한설정을 ", "C002");
- return;
- }
- cnt += 1;
- }
- }
-
- if( cnt > 0 ) {
- model.setValue("/root/send/savedata", grd_emplist.getUpdateData());
- model.resetInstanceNode("/root/main/emplist");
- submit("TXMNP04611");
- }else {
- messageBox("선택한것이", "I004");
- }
- ]]>
- </script>
- </button>
- <button id="button2" class="btn2_letter2" style="left:253px; top:10px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var iRows = -1;
- var chkflag, empid, empnm, usrlevel;
- var cnt = 0;
- iRows = grd_emplist.rows;
- var empDelList = "m▦rownum▦chkflag▦empid▦empnm▦usrlevel";
- for( var i = 0; i < iRows; i++ ) {
- chkflag = model.getValue("/root/main/emplist"+"["+i+"]/chkflag");
- empid = model.getValue("/root/main/emplist"+"["+i+"]/empid");
- empnm = model.getValue("/root/main/emplist"+"["+i+"]/empnm");
- usrlevel = model.getValue("/root/main/emplist"+"["+i+"]/usrlevel");
- if( chkflag == "true" ) {
- empDelList = empDelList + "▩" + "d" + "▦" + i + "▦" + chkflag + "▦" + empid + "▦" + empnm + "▦" + usrlevel;
- cnt += 1;
- }
- }
- if( cnt > 0 ) {
- model.setValue("/root/send/savedata", empDelList);
- model.resetInstanceNode("/root/main/emplist");
- submit("TXMNP04611");
- }else {
- messageBox("선택한것이", "I004");
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|