SMDDS00100_장비관리RF리더설치 스테이션관리.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <msg>
  12. <stationcd/>
  13. <stationflag/>
  14. <stationnm/>
  15. <useyn/>
  16. <delyn/>
  17. <fstrgstrid/>
  18. <fstrgstdt/>
  19. <filesave/>
  20. </msg>
  21. </list>
  22. </main>
  23. <send>
  24. <stationflag/>
  25. <useyn/>
  26. <data/>
  27. </send>
  28. <init>
  29. <stflag>
  30. <itemlist>
  31. <cdid/>
  32. <cdnm/>
  33. </itemlist>
  34. </stflag>
  35. </init>
  36. <temp>
  37. <filesave/>
  38. </temp>
  39. <properties>
  40. <error>
  41. <msg/>
  42. </error>
  43. </properties>
  44. </root>
  45. </instance>
  46. <submission id="TRDDS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  47. <submission id="TXDDS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. submit("TRDDS00102");
  51. addComboItem("cmb_station");
  52. model.removeNodeset("/root/main/list/msg");
  53. model.refresh();
  54. ]]>
  55. </script>
  56. <script type="javascript">
  57. <![CDATA[
  58. function fSetSJudgButtonText() { //정규심사리스트의 '회의출석체크' 와 '기타작성' 버튼에 텍스트 셋팅
  59. var judgchk = datagrid1.colRef("filesave"); //회의출석체크
  60. for(var i = datagrid1.fixedCols; i < datagrid1.rows; i++ ) {
  61. datagrid1.valueMatrix(i, judgchk) = "저장";
  62. }
  63. }
  64. ]]>
  65. </script>
  66. <submission id="TRDDS00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" replace="instance" resultref="/root/init/stflag"/>
  67. </model>
  68. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  71. <script type="javascript" src="../../../com/authinfoweb/js/ZSA001.js"/>
  72. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  73. </xhtml:head>
  74. <xhtml:body guideline="2,23;2,58;2,32;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  75. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  76. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">장비관리 - RF 리더 설치 스테이션 관리</caption>
  77. </group>
  78. <group id="group3" style="left:0px; top:13px; width:1195px; height:767px; ">
  79. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; ">
  80. <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; "/>
  81. <caption id="caption1" class="search_name" style="left:250px; top:10px; width:80px; height:17px; ">사용유무</caption>
  82. <button id="button1" class="btn1_letter2" style="left:1125px; top:5px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  83. <caption>조회</caption>
  84. <script type="javascript" ev:event="DOMActivate">
  85. <![CDATA[
  86. submit("TRDDS00101");
  87. fSetSJudgButtonText();
  88. ]]>
  89. </script>
  90. </button>
  91. <caption id="caption5" class="search_name" style="left:5px; top:11px; width:107px; height:17px; ">스테이션 구분</caption>
  92. <select1 id="cmb_station" ref="/root/send/stationflag" class="combo_search" appearance="minimal" style="left:120px; top:10px; width:100px; height:19px; ">
  93. <choices>
  94. <itemset nodeset="/root/init/stflag/itemlist">
  95. <label ref="cdnm"/>
  96. <value ref="cdid"/>
  97. </itemset>
  98. </choices>
  99. </select1>
  100. <select1 id="combo2" ref="/root/send/useyn" class="combo_default" appearance="minimal" style="left:330px; top:9px; width:100px; height:19px; ">
  101. <choices>
  102. <item>
  103. <label>- 전체 -</label>
  104. <value/>
  105. </item>
  106. <item>
  107. <label>사용</label>
  108. <value>Y</value>
  109. </item>
  110. <item>
  111. <label>미사용</label>
  112. <value>N</value>
  113. </item>
  114. </choices>
  115. </select1>
  116. <line id="line2" class="line_4" style="x1:1110px; y1:7px; x2:1110px; y2:27px; border-color:#ffe4bb; border-left-style:solid; "/>
  117. </group>
  118. <caption id="caption2" class="tit_2" style="left:5px; top:60px; width:300px; height:13px; font-family:돋움; vertical-align:middle; ">스테이션 리스트</caption>
  119. <line id="line1" class="line_1" style="x1:0px; y1:75px; x2:1195px; y2:75px; "/>
  120. <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; ">
  121. <col explorerbar="sortshowmove" ref="stationcd" type="input" maxlength="5" _key="true" style="text-align:center; "/>
  122. <col explorerbar="sortshowmove" disabled="false" ref="stationflag" type="combo" style="text-align:center; ">
  123. <choices>
  124. <itemset nodeset="/root/init/stflag/itemlist">
  125. <label ref="cdnm"/>
  126. <value ref="cdid"/>
  127. </itemset>
  128. </choices>
  129. </col>
  130. <col explorerbar="sortshowmove" ref="stationnm" type="input" maxlength="25" style="text-align:center; "/>
  131. <col explorerbar="sortshowmove" disabled="false" ref="useyn" type="combo" style="text-align:center; ">
  132. <choices>
  133. <item>
  134. <label>사용</label>
  135. <value>Y</value>
  136. </item>
  137. <item>
  138. <label>미사용</label>
  139. <value>N</value>
  140. </item>
  141. </choices>
  142. </col>
  143. <col disabled="true" editmode="false" ref="delyn" type="combo" _key="true" style="text-align:center; ">
  144. <choices>
  145. <item>
  146. <label>가능</label>
  147. <value>Y</value>
  148. </item>
  149. <item>
  150. <label>불가능</label>
  151. <value>N</value>
  152. </item>
  153. </choices>
  154. </col>
  155. <col explorerbar="sortshowmove" disabled="true" ref="fstrgstrid" _key="true" style="text-align:center; "/>
  156. <col explorerbar="sortshowmove" ref="fstrgstdt" format="yyyy-mm-dd" _key="true" style="text-align:center; "/>
  157. <col ref="filesave" style="text-align:center; padding-left:0; background-image:../../../com/commonweb/images/btn2_letter4.gif; background-position:center; cursor:hand; "/>
  158. <script type="javascript" ev:event="onmouseover">
  159. <![CDATA[
  160. if(datagrid1.mouseCol == 5){
  161. var iRow = datagrid1.mouseRow;
  162. datagrid1.isReadOnly(iRow, datagrid1.mouseCol) = true;
  163. }
  164. ]]>
  165. </script>
  166. <script type="javascript" ev:event="onclick">
  167. <![CDATA[
  168. if(datagrid1.col==8&&datagrid1.mouseRow==datagrid1.row){
  169. var vRow = datagrid1.row;
  170. if(model.getValue("/root/main/list/msg["+vRow+"]/stationcd")==""){
  171. messageBox("데이터를 저장", "E001");
  172. return;
  173. }
  174. messageBox("파일저장이","I002");
  175. var stcd = model.getValue("/root/main/list/msg["+vRow+"]/stationcd");
  176. var stflag = model.getValue("/root/main/list/msg["+vRow+"]/stationflag");
  177. model.setValue("/root/temp/filesave", stcd+"|"+stflag);
  178. var filesave = model.getValue("/root/temp/filesave");
  179. var fso, tempfile;
  180. fso = new ActiveXObject("Scripting.FileSystemObject");
  181. function CreateTempFile()
  182. {
  183. var tfolder, tfile, tname, fname, TemporaryFolder = 0;
  184. tfolder = fso.GetSpecialFolder(TemporaryFolder);
  185. tname = "Station.ini";
  186. tfile = tfolder.CreateTextFile(tname);
  187. return(tfile);
  188. }
  189. tempfile = CreateTempFile();
  190. tempfile.writeline(filesave);
  191. tempfile.close();
  192. }
  193. ]]>
  194. </script>
  195. </datagrid>
  196. <button id="button2" class="btn2_letter2" style="left:1102px; top:55px; width:42px; height:19px; ">
  197. <caption>추가</caption>
  198. <script type="javascript" ev:event="onclick">
  199. <![CDATA[
  200. datagrid1.additem();
  201. model.setValue("/root/main/list/msg["+datagrid1.row+"]/fstrgstdt", getCurrentDate());
  202. model.setValue("/root/main/list/msg["+datagrid1.row+"]/useyn", "Y");
  203. model.setValue("/root/main/list/msg["+datagrid1.row+"]/delyn", "Y");
  204. model.setValue("/root/main/list/msg["+datagrid1.row+"]/stationflag", "01");
  205. model.setValue("/root/main/list/msg["+datagrid1.row+"]/fstrgstrid", getUserName());
  206. fSetSJudgButtonText();
  207. ]]>
  208. </script>
  209. </button>
  210. <button id="button3" class="btn2_letter2" style="left:1150px; top:55px; width:42px; height:19px; ">
  211. <caption>삭제</caption>
  212. <script type="javascript" ev:event="onclick">
  213. <![CDATA[
  214. var cur_row = datagrid1.row; // 행 번호 가져오기
  215. var iStatus = datagrid1.rowstatus(cur_row);
  216. if(model.getValue("/root/main/list/msg["+datagrid1.row+"]/delyn")=="N"){
  217. messageBox("하위 데이터가 존재하여 삭제할 수 ", "I004");
  218. return;
  219. }
  220. if(datagrid1.row<0){
  221. messageBox("삭제할 행을", "C002");
  222. return;
  223. }
  224. else if (iStatus == 1|iStatus == 3) // 새로 삽입된 행이고 데이터를 입력햇을시. 삭제.
  225. {
  226. datagrid1.deleteitem(cur_row);
  227. }
  228. else if (iStatus == 4) // 삭제로 표시된 행이면
  229. {
  230. datagrid1.removestatus(cur_row, "delete");
  231. }
  232. else
  233. {
  234. datagrid1.addStatus(cur_row, "delete");
  235. }
  236. ]]>
  237. </script>
  238. </button>
  239. <button id="btn_cle" class="btn4_letter3" style="left:1125px; top:745px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  240. <caption>초기화</caption>
  241. <script type="javascript" ev:event="DOMActivate">
  242. <![CDATA[
  243. model.reset();
  244. ]]>
  245. </script>
  246. </button>
  247. <button id="btn_save" class="btn4_letter3" style="left:1054px; top:745px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  248. <caption>저장</caption>
  249. <script type="javascript" ev:event="DOMActivate">
  250. <![CDATA[
  251. if(!checkGridUpdate(datagrid1))
  252. {
  253. messageBox("저장할 데이터가 ", "I004");
  254. return;
  255. }else{
  256. // 저장 시 신규의 경우 null(공백) 체크 및 중복체크 - issno, eqmpos
  257. for(var i=1;i<datagrid1.rows;i++){
  258. var chkSt = datagrid1.rowStatus(i); // 데이터그리드 각 로우의 상태 체크 Insert = 3, Update = 2
  259. var chkstationcd = model.getValue("/root/main/list/msg["+i+"]/stationcd");
  260. var chkstationflag = model.getValue("/root/main/list/msg["+i+"]/stationflag");
  261. var chkstationnm = model.getValue("/root/main/list/msg["+i+"]/stationnm");
  262. var useyn = model.getValue("/root/main/list/msg["+i+"]/useyn");
  263. if(chkSt == 1||chkSt == 2||chkSt == 3){ // 그리드의 상태가 입력(3) 이거나 수정(2) 일 경우
  264. if(chkstationcd==""){
  265. messageBox("스테이션 코드가 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001");
  266. return;
  267. }
  268. if(chkstationflag==""){
  269. messageBox("스테이션 구분이 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001");
  270. return;
  271. }
  272. if(chkstationnm==""){
  273. messageBox("스테이션명이 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001");
  274. return;
  275. }
  276. if(useyn==""){
  277. messageBox("사용여부가 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001");
  278. return;
  279. }
  280. for(var j = 1;j<datagrid1.rows;j++){ // issno, eqmpos 중복체크 시작
  281. var oriStationcd = model.getValue("/root/main/list/msg["+j+"]/stationcd");
  282. if(i!=j){ // 같은 행의 값을 비교하는 경우가 아니면
  283. if(chkstationcd == oriStationcd){ // isso 중복체크
  284. messageBox("입력하신 "+i+"행의 스테이션 코드("+chkstationcd+")가 "+j+"행의 스테이션 코드("+oriStationcd+")와 ", "E006")
  285. return;
  286. }
  287. }
  288. }
  289. }
  290. }
  291. }
  292. var update_data = datagrid1.getUpdateData();
  293. model.setValue("/root/send/data", update_data);
  294. if(submit("TXDDS00101")){
  295. datagrid1.clearStatus();
  296. fSetSJudgButtonText();
  297. model.refresh();
  298. }
  299. ]]>
  300. </script>
  301. </button>
  302. </group>
  303. </xhtml:body>
  304. </xhtml:html>