123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- <?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>
- <userinfo>
- <userlist>
- <userid/>
- <usernm/>
- <pwd/>
- <rttmd/>
- <authstat/>
- </userlist>
- </userinfo>
- <userinfo2>
- <username>
- <usernm/>
- </username>
- </userinfo2>
- </main>
- <send>
- <reqdata>
- <userid/>
- <rttmd/>
- <rttmd1/>
- <rttmd2/>
- <rttmd3/>
- <rttmd4/>
- </reqdata>
- <reqdata1>
- <userid/>
- </reqdata1>
- </send>
- <senddata>
- <execdata>
- <userlist/>
- </execdata>
- </senddata>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- model.setValue("/root/send/reqdata/rttmd1", "N");
- model.setValue("/root/send/reqdata/rttmd2", "N");
- model.setValue("/root/send/reqdata/rttmd3", "N");
- model.setValue("/root/send/reqdata/rttmd4", "N");
- readfunc();
- ]]>
- </script>
- <submission id="TRAEA03908" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/userinfo"/>
- <submission id="TRAOC03302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata1" resultref="/root/main/userinfo2"/>
- <submission id="TXAEA03908" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/senddata/execdata" resultref="/root/hidden"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript">
- <![CDATA[
- function readfunc(){ // 해당 조건에 대한 사용자 권한내역을 조회한다.
- model.removeNodeset("/root/main/userinfo/userlist");
- btn_save.disabled = false;
- model.setValue("/root/send/reqdata/rttmd", "");
- var str = "";
- if (model.getValue("/root/send/reqdata/rttmd1") == "Y"){
- str = "'1'";
- }
- if (model.getValue("/root/send/reqdata/rttmd2") == "Y"){
- if (str == ""){
- str = "'2'";
- }else{
- str = str + "," + "'2'";
- }
- }
- if (model.getValue("/root/send/reqdata/rttmd3") == "Y"){
- if (str == ""){
- str = "'3'";
- }else{
- str = str + "," + "'3'";
- }
- }
- if (model.getValue("/root/send/reqdata/rttmd4") == "Y"){
- if (str == ""){
- str = "'4'";
- }else{
- str = str + "," + "'4'";
- }
- }
- if (str != ""){
- str = "(" + str + ")";
- }
- model.setValue("/root/send/reqdata/rttmd", str);
- if (submit("TRAEA03908")){
- }
- model.refresh();
- }
- function datacheck(){
- for (var i = 1; i < datagrid1.rows; i ++){
- if (model.getValue("/root/main/userinfo/userlist[" + i + "]/userid") == ""){
- messageBox("사번은 필수 입력항목입니다.", "E999", "");
- return false;
- }
- if (model.getValue("/root/main/userinfo/userlist[" + i + "]/usernm") == ""){
- messageBox(i + "번째 사번은 등록 할 수 없습니다.", "E999", "");
- return false;
- }
- if (model.getValue("/root/main/userinfo/userlist[" + i + "]/pwd") == ""){
- messageBox("PASSWORD는 필수 입력항목입니다.", "E999", "");
- return false;
- }
- if (model.getValue("/root/main/userinfo/userlist[" + i + "]/rttmd") == ""){
- messageBox("구분은 필수 선택항목입니다.", "E999", "");
- return false;
- }
- }
- return true;
- }
- function ExecData(){
- var update = getGridUpdateData(datagrid1);
- model.setValue("/root/senddata/execdata/userlist", update);
- if (submit("TXAEA03908")){
- readfunc();
- }
- }
- function isDate(str) { // 날짜 형식에 대한 적합여부 체크
- if (str == "") return true; // 빈건 체크안함
- if (trim(str) == "") return true; // 빈건 체크안함
- if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
- if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
-
- var yy = new Number(str.substring(0, 4));
- var mm = new Number(str.substring(4, 6)) - 1;
- var dd = new Number(str.substring(6, 8));
- var date = new Date(yy, mm, dd);
- //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
- if (yy != date.getFullYear() ||
- mm != date.getMonth() ||
- dd != date.getDate()) {
- return false; // 존재하지 않는 날짜
- }
-
- return true; // 존재하는 날짜
- }
- function trim(data){ // 문자에 대한 TRIM 작업
- return data.replace(/(^\s*)|(\s*$)/g, "");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="570px" pageheight="650px" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:252px; height:13px; ">사이버나이프 권한관리</caption>
- <shape id="rectangle1" appearance="roundrect" style="left:2px; top:18px; width:540px; height:67px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption11" class="search_name" style="left:10px; top:26px; width:67px; height:17px; ">사번:</caption>
- <caption id="caption2" class="search_name" style="left:190px; top:26px; width:62px; height:17px; ">구분:</caption>
- <input id="input13" ref="/root/send/reqdata/userid" class="input_search" style="left:71px; top:25px; width:104px; height:19px; "/>
- <button id="button21" class="btn1_letter2" style="left:476px; top:39px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- readfunc();
- ]]>
- </script>
- </button>
- <line id="line6" style="x1:466px; y1:24px; x2:466px; y2:46px; border-color:#ffe4bb; border-left-style:solid; "/>
- <line id="line7" class="line_1" style="x1:3px; y1:111px; x2:543px; y2:111px; "/>
- <datagrid id="datagrid1" nodeset="/root/main/userinfo/userlist" caption="사번^이름^Password^구분^권한상태" colsep="^" colwidth="100, 79, 147, 100, 71" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:2px; top:115px; width:540px; height:480px; ">
- <col disabled="true" ref="userid" type="input" maxlength="10" style="text-align:center; "/>
- <col ref="usernm" style="text-align:center; "/>
- <col ref="pwd" secretmark="*" secretstartposition="0" type="input" maxlength="32" style="text-align:center; "/>
- <col ref="rttmd" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label>Dometrist</label>
- <value>1</value>
- </item>
- <item>
- <label>RTT</label>
- <value>2</value>
- </item>
- <item>
- <label>Physicist</label>
- <value>3</value>
- </item>
- <item>
- <label>MD</label>
- <value>4</value>
- </item>
- </choices>
- </col>
- <col ref="authstat" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label>YES</label>
- <value>Y</value>
- </item>
- <item>
- <label>NO</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (datagrid1.colRef("userid") == datagrid1.col){
- var suserid = model.getValue("/root/main/userinfo/userlist[" + datagrid1.row + "]/userid");
- if (suserid == ""){
- model.setValue("/root/main/userinfo/userlist[" + datagrid1.row + "]/usernm", "");
- }else{
- model.setValue("/root/send/reqdata1/userid", suserid);
- submit("TRAOC03302");
- if (model.getValue("/root/main/userinfo2/username/usernm") == ""){
- model.setValue("/root/main/userinfo/userlist[" + datagrid1.row + "]/usernm", "");
- messageBox("등록할 수 없는 사번입니다.", "E999");
- }else{
- model.setValue("/root/main/userinfo/userlist[" + datagrid1.row + "]/usernm", model.getValue("/root/main/userinfo2/username/usernm"));
- }
- }
- model.refresh();
- }
-
- ]]>
- </script>
- </datagrid>
- <caption id="caption4" class="tit_2" style="left:2px; top:95px; width:113px; height:13px; ">권한 상세 정보</caption>
- <button id="btn_grdadd" class="btn2_letter3" style="left:433px; top:91px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- datagrid1.addRow();
- var irow = datagrid1.row;
- model.setValue("/root/main/userinfo/userlist[" + irow + "]/authstat", "Y");
- datagrid1.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_grddel" class="btn2_letter3" style="left:488px; top:91px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- datagrid1.deleteRow(datagrid1.row);
- ]]>
- </script>
- </button>
- <button id="btn_grdcopy" class="btn2_letter3" visibility="hidden" style="left:378px; top:91px; width:53px; height:19px; ">
- <caption>행복사</caption>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:485px; top:600px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (datacheck() == false){
- return;
- }
- ExecData();
- ]]>
- </script>
- </button>
- <line id="line1" class="line_3" style="x1:2px; y1:596px; x2:542px; y2:596px; "/>
- <bool id="bool1" checkvalue="Y,N" ref="/root/send/reqdata/rttmd1" style="left:250px; top:25px; width:30px; height:20px; "/>
- <bool id="bool2" checkvalue="Y,N" ref="/root/send/reqdata/rttmd2" style="left:360px; top:25px; width:30px; height:20px; "/>
- <caption id="caption3" style="left:277px; top:26px; width:67px; height:20px; font-weight:bold; ">Dometrist</caption>
- <caption id="caption5" style="left:387px; top:26px; width:40px; height:20px; font-weight:bold; ">RTT</caption>
- <bool id="bool3" checkvalue="Y,N" ref="/root/send/reqdata/rttmd4" style="left:360px; top:50px; width:30px; height:20px; "/>
- <caption id="caption6" style="left:387px; top:51px; width:40px; height:20px; font-weight:bold; ">MD</caption>
- <bool id="bool4" checkvalue="Y,N" ref="/root/send/reqdata/rttmd3" style="left:250px; top:50px; width:30px; height:20px; "/>
- <caption id="caption7" style="left:277px; top:51px; width:72px; height:20px; font-weight:bold; ">Physicist</caption>
- </xhtml:body>
- </xhtml:html>
|