123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- <?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>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <list>
- <msg>
- <stationcd/>
- <stationflag/>
- <stationnm/>
- <useyn/>
- <delyn/>
- <fstrgstrid/>
- <fstrgstdt/>
- <filesave/>
- </msg>
- </list>
- </main>
- <send>
- <stationflag/>
- <useyn/>
- <data/>
- </send>
- <init>
- <stflag>
- <itemlist>
- <cdid/>
- <cdnm/>
- </itemlist>
- </stflag>
- </init>
- <temp>
- <filesave/>
- </temp>
- <properties>
- <error>
- <msg/>
- </error>
- </properties>
- </root>
- </instance>
- <submission id="TRDDS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
- <submission id="TXDDS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- submit("TRDDS00102");
- addComboItem("cmb_station");
- model.removeNodeset("/root/main/list/msg");
- model.refresh();
-
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function fSetSJudgButtonText() { //정규심사리스트의 '회의출석체크' 와 '기타작성' 버튼에 텍스트 셋팅
-
- var judgchk = datagrid1.colRef("filesave"); //회의출석체크
- for(var i = datagrid1.fixedCols; i < datagrid1.rows; i++ ) {
- datagrid1.valueMatrix(i, judgchk) = "저장";
-
- }
- }
- ]]>
- </script>
- <submission id="TRDDS00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" replace="instance" resultref="/root/init/stflag"/>
- </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/authinfoweb/js/ZSA001.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- </xhtml:head>
- <xhtml:body guideline="2,23;2,58;2,32;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">장비관리 - RF 리더 설치 스테이션 관리</caption>
- </group>
- <group id="group3" style="left:0px; top:13px; width:1195px; height:767px; ">
- <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption1" class="search_name" style="left:250px; top:10px; width:80px; height:17px; ">사용유무</caption>
- <button id="button1" class="btn1_letter2" style="left:1125px; top:5px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- submit("TRDDS00101");
- fSetSJudgButtonText();
- ]]>
- </script>
- </button>
- <caption id="caption5" class="search_name" style="left:5px; top:11px; width:107px; height:17px; ">스테이션 구분</caption>
- <select1 id="cmb_station" ref="/root/send/stationflag" class="combo_search" appearance="minimal" style="left:120px; top:10px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/stflag/itemlist">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="combo2" ref="/root/send/useyn" class="combo_default" appearance="minimal" style="left:330px; top:9px; width:100px; height:19px; ">
- <choices>
- <item>
- <label>- 전체 -</label>
- <value/>
- </item>
- <item>
- <label>사용</label>
- <value>Y</value>
- </item>
- <item>
- <label>미사용</label>
- <value>N</value>
- </item>
- </choices>
- </select1>
- <line id="line2" class="line_4" style="x1:1110px; y1:7px; x2:1110px; y2:27px; border-color:#ffe4bb; border-left-style:solid; "/>
- </group>
- <caption id="caption2" class="tit_2" style="left:5px; top:60px; width:300px; height:13px; font-family:돋움; vertical-align:middle; ">스테이션 리스트</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:75px; x2:1195px; y2:75px; "/>
- <datagrid id="datagrid1" nodeset="/root/main/list/msg" visibility="visible" caption="스테이션코드^스테이션구분^스테이션명^사용유무^삭제유무^등록자^등록일^저장" colsep="^" colwidth="150, 171, 229, 139, 100, 130, 130, 65" dataheight="23" defaultrows="1" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:80px; width:1195px; height:660px; ">
- <col explorerbar="sortshowmove" ref="stationcd" type="input" maxlength="5" _key="true" style="text-align:center; "/>
- <col explorerbar="sortshowmove" disabled="false" ref="stationflag" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/stflag/itemlist">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col explorerbar="sortshowmove" ref="stationnm" type="input" maxlength="25" style="text-align:center; "/>
- <col explorerbar="sortshowmove" disabled="false" ref="useyn" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label>사용</label>
- <value>Y</value>
- </item>
- <item>
- <label>미사용</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col disabled="true" editmode="false" ref="delyn" type="combo" _key="true" style="text-align:center; ">
- <choices>
- <item>
- <label>가능</label>
- <value>Y</value>
- </item>
- <item>
- <label>불가능</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col explorerbar="sortshowmove" disabled="true" ref="fstrgstrid" _key="true" style="text-align:center; "/>
- <col explorerbar="sortshowmove" ref="fstrgstdt" format="yyyy-mm-dd" _key="true" style="text-align:center; "/>
- <col ref="filesave" style="text-align:center; padding-left:0; background-image:../../../com/commonweb/images/btn2_letter4.gif; background-position:center; cursor:hand; "/>
- <script type="javascript" ev:event="onmouseover">
- <![CDATA[
- if(datagrid1.mouseCol == 5){
- var iRow = datagrid1.mouseRow;
- datagrid1.isReadOnly(iRow, datagrid1.mouseCol) = true;
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(datagrid1.col==8&&datagrid1.mouseRow==datagrid1.row){
- var vRow = datagrid1.row;
- if(model.getValue("/root/main/list/msg["+vRow+"]/stationcd")==""){
- messageBox("데이터를 저장", "E001");
- return;
- }
-
- messageBox("파일저장이","I002");
- var stcd = model.getValue("/root/main/list/msg["+vRow+"]/stationcd");
- var stflag = model.getValue("/root/main/list/msg["+vRow+"]/stationflag");
- model.setValue("/root/temp/filesave", stcd+"|"+stflag);
- var filesave = model.getValue("/root/temp/filesave");
-
- var fso, tempfile;
- fso = new ActiveXObject("Scripting.FileSystemObject");
-
- function CreateTempFile()
- {
- var tfolder, tfile, tname, fname, TemporaryFolder = 0;
- tfolder = fso.GetSpecialFolder(TemporaryFolder);
- tname = "Station.ini";
- tfile = tfolder.CreateTextFile(tname);
- return(tfile);
- }
- tempfile = CreateTempFile();
- tempfile.writeline(filesave);
- tempfile.close();
- }
- ]]>
- </script>
- </datagrid>
- <button id="button2" class="btn2_letter2" style="left:1102px; top:55px; width:42px; height:19px; ">
- <caption>추가</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- datagrid1.additem();
- model.setValue("/root/main/list/msg["+datagrid1.row+"]/fstrgstdt", getCurrentDate());
- model.setValue("/root/main/list/msg["+datagrid1.row+"]/useyn", "Y");
- model.setValue("/root/main/list/msg["+datagrid1.row+"]/delyn", "Y");
- model.setValue("/root/main/list/msg["+datagrid1.row+"]/stationflag", "01");
- model.setValue("/root/main/list/msg["+datagrid1.row+"]/fstrgstrid", getUserName());
- fSetSJudgButtonText();
- ]]>
- </script>
- </button>
- <button id="button3" class="btn2_letter2" style="left:1150px; top:55px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
-
- var cur_row = datagrid1.row; // 행 번호 가져오기
- var iStatus = datagrid1.rowstatus(cur_row);
-
- if(model.getValue("/root/main/list/msg["+datagrid1.row+"]/delyn")=="N"){
- messageBox("하위 데이터가 존재하여 삭제할 수 ", "I004");
- return;
- }
-
- if(datagrid1.row<0){
- messageBox("삭제할 행을", "C002");
- return;
- }
- else if (iStatus == 1|iStatus == 3) // 새로 삽입된 행이고 데이터를 입력햇을시. 삭제.
- {
- datagrid1.deleteitem(cur_row);
-
- }
- else if (iStatus == 4) // 삭제로 표시된 행이면
- {
- datagrid1.removestatus(cur_row, "delete");
- }
- else
- {
- datagrid1.addStatus(cur_row, "delete");
- }
-
-
-
- ]]>
- </script>
- </button>
- <button id="btn_cle" class="btn4_letter3" style="left:1125px; top:745px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.reset();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter3" style="left:1054px; top:745px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(!checkGridUpdate(datagrid1))
- {
- messageBox("저장할 데이터가 ", "I004");
- return;
- }else{
- // 저장 시 신규의 경우 null(공백) 체크 및 중복체크 - issno, eqmpos
- for(var i=1;i<datagrid1.rows;i++){
- var chkSt = datagrid1.rowStatus(i); // 데이터그리드 각 로우의 상태 체크 Insert = 3, Update = 2
- var chkstationcd = model.getValue("/root/main/list/msg["+i+"]/stationcd");
- var chkstationflag = model.getValue("/root/main/list/msg["+i+"]/stationflag");
- var chkstationnm = model.getValue("/root/main/list/msg["+i+"]/stationnm");
- var useyn = model.getValue("/root/main/list/msg["+i+"]/useyn");
- if(chkSt == 1||chkSt == 2||chkSt == 3){ // 그리드의 상태가 입력(3) 이거나 수정(2) 일 경우
-
- if(chkstationcd==""){
- messageBox("스테이션 코드가 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001");
- return;
- }
- if(chkstationflag==""){
- messageBox("스테이션 구분이 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001");
- return;
- }
- if(chkstationnm==""){
- messageBox("스테이션명이 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001");
- return;
- }
- if(useyn==""){
- messageBox("사용여부가 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001");
- return;
- }
-
- for(var j = 1;j<datagrid1.rows;j++){ // issno, eqmpos 중복체크 시작
-
- var oriStationcd = model.getValue("/root/main/list/msg["+j+"]/stationcd");
-
- if(i!=j){ // 같은 행의 값을 비교하는 경우가 아니면
- if(chkstationcd == oriStationcd){ // isso 중복체크
- messageBox("입력하신 "+i+"행의 스테이션 코드("+chkstationcd+")가 "+j+"행의 스테이션 코드("+oriStationcd+")와 ", "E006")
- return;
- }
- }
- }
- }
- }
- }
- var update_data = datagrid1.getUpdateData();
- model.setValue("/root/send/data", update_data);
-
- if(submit("TXDDS00101")){
- datagrid1.clearStatus();
- fSetSJudgButtonText();
- model.refresh();
- }
-
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|