SMDDP00200_직원카드프린터코드관리.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <instcd/>
  13. <issno/>
  14. <eqmpos/>
  15. <useyn/>
  16. <candel/>
  17. <eqdesc/>
  18. <fstrgstdt/>
  19. <seqno/>
  20. </msg>
  21. </list>
  22. <enquiry>
  23. <eqyn/>
  24. </enquiry>
  25. </main>
  26. <send>
  27. <srchinstcd/>
  28. <srchuseyn/>
  29. <data/>
  30. </send>
  31. <init>
  32. <issflag>
  33. <itemlist>
  34. <cdid/>
  35. <cdnm/>
  36. </itemlist>
  37. </issflag>
  38. <instcd>
  39. <itemlist>
  40. <cdid/>
  41. <cdnm/>
  42. </itemlist>
  43. </instcd>
  44. </init>
  45. <temp/>
  46. </root>
  47. </instance>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. submit("TRDDP00202");// 발급 구분
  51. submit("TRDDP00203");// 기관명
  52. addComboItem("cmb_instcd");
  53. model.removeNodeset("/root/main/list/msg");
  54. model.refresh();
  55. ]]>
  56. </script>
  57. <submission id="TRDDP00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  58. <submission id="TRDDP00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" replace="instance" resultref="/root/init/issflag"/>
  59. <submission id="TXDDP00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  60. <bind id="bind1" ref="/root/main/list/msg/issno"/>
  61. <bind id="bind2" ref="/root/main/list/msg/eqmpos"/>
  62. <submission id="TRDDP00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" replace="instance" resultref="/root/init/instcd"/>
  63. </model>
  64. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <script type="javascript" src="../../../com/authinfoweb/js/ZSA001.js"/>
  68. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  69. </xhtml:head>
  70. <xhtml:body guideline="2,63;2,52;2,58;1,3;2,136;1,1044;1,1382;1,1096;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  71. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  72. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">장비관리 - 직원카드 프린터 코드관리</caption>
  73. </group>
  74. <group id="group3" style="left:0px; top:13px; width:1195px; height:767px; ">
  75. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; ">
  76. <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; "/>
  77. <caption id="caption1" class="search_name" style="left:205px; top:10px; width:80px; height:17px; ">사용유무</caption>
  78. <button id="button1" class="btn1_letter2" style="left:1124px; top:7px; width:56px; height:22px; ">
  79. <caption>조회</caption>
  80. <script type="javascript" ev:event="DOMActivate">
  81. <![CDATA[
  82. submit("TRDDP00201");
  83. model.setValue("/root/main/enquiry/eqyn", "true");
  84. ]]>
  85. </script>
  86. </button>
  87. <select1 id="combo1" ref="/root/send/srchuseyn" appearance="minimal" style="left:291px; top:9px; width:100px; height:19px; ">
  88. <choices>
  89. <item>
  90. <label>- 전체 -</label>
  91. <value/>
  92. </item>
  93. <item>
  94. <label>사용</label>
  95. <value>Y</value>
  96. </item>
  97. <item>
  98. <label>미사용</label>
  99. <value>N</value>
  100. </item>
  101. </choices>
  102. </select1>
  103. <input id="input1" ref="/root/main/enquiry/eqyn" visibility="hidden" style="left:570px; top:10px; width:100px; height:19px; "/>
  104. <caption id="caption3" visibility="hidden" style="left:495px; top:10px; width:60px; height:20px; ">조회 여부</caption>
  105. <caption id="caption4" class="search_name" style="left:11px; top:9px; width:84px; height:17px; ">기관명</caption>
  106. <select1 id="cmb_instcd" ref="/root/send/srchinstcd" appearance="minimal" style="left:90px; top:9px; width:100px; height:19px; ">
  107. <choices>
  108. <itemset nodeset="/root/init/instcd/itemlist">
  109. <label ref="cdnm"/>
  110. <value ref="cdid"/>
  111. </itemset>
  112. </choices>
  113. </select1>
  114. <line id="line2" class="line_4" style="x1:1110px; y1:7px; x2:1110px; y2:27px; border-color:#ffe4bb; border-left-style:solid; "/>
  115. </group>
  116. <caption id="caption2" class="tit_2" style="left:5px; top:60px; width:300px; height:13px; font-family:돋움; vertical-align:middle; ">직원카드 발급 장비 리스트</caption>
  117. <line id="line1" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
  118. <datagrid id="datagrid1" nodeset="/root/main/list/msg" caption="기관명^발급기코드^발급기명^사용유무^삭제^설명^등록일^seqno" colsep="^" colwidth="160, 70, 140, 60, 50, 530, 131, 100" dataheight="23" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:80px; width:1195px; height:660px; ">
  119. <col explorerbar="sortshowmove" disabled="true" ref="instcd" type="combo" _key="true" style="text-align:center; ">
  120. <choices>
  121. <itemset nodeset="/root/init/instcd/itemlist">
  122. <label ref="cdnm"/>
  123. <value ref="cdid"/>
  124. </itemset>
  125. </choices>
  126. </col>
  127. <col explorerbar="sortshowmove" imemode="alpha" ref="issno" type="input" maxlength="2" _key="true" style="text-align:center; "/>
  128. <col explorerbar="sortshowmove" ref="eqmpos" type="input" maxlength="30" _key="true" style="text-align:center; "/>
  129. <col explorerbar="sortshowmove" ref="useyn" type="combo" style="text-align:center; ">
  130. <choices>
  131. <item>
  132. <label>사용</label>
  133. <value>Y</value>
  134. </item>
  135. <item>
  136. <label>미사용</label>
  137. <value>N</value>
  138. </item>
  139. </choices>
  140. </col>
  141. <col explorerbar="sortshowmove" disabled="true" ref="candel" type="combo" style="text-align:center; ">
  142. <choices>
  143. <item>
  144. <label>가능</label>
  145. <value>Y</value>
  146. </item>
  147. <item>
  148. <label>불가능</label>
  149. <value>N</value>
  150. </item>
  151. </choices>
  152. </col>
  153. <col explorerbar="sortshowmove" ref="eqdesc" type="input" maxlength="100" style="text-align:center; "/>
  154. <col explorerbar="sortshowmove" ref="fstrgstdt" type="input" format="yyyy-mm-dd" style="text-align:center; "/>
  155. <col ref="seqno" visibility="hidden"/>
  156. <script type="javascript" ev:event="onclick">
  157. <![CDATA[
  158. ]]>
  159. </script>
  160. <script type="javascript" ev:event="onmouseout">
  161. <![CDATA[
  162. if(datagrid1.mouseCol == 5){
  163. var iRow = datagrid1.mouseRow;
  164. datagrid1.isReadOnly(iRow, datagrid1.mouseCol) = true;
  165. }
  166. ]]>
  167. </script>
  168. </datagrid>
  169. <button id="button2" class="btn2_letter2" style="left:1102px; top:55px; width:42px; height:19px; ">
  170. <caption>추가</caption>
  171. <script type="javascript" ev:event="onclick">
  172. <![CDATA[
  173. if(model.getValue("/root/main/enquiry/eqyn")!="true") {
  174. messageBox(" 조회 후 추가 ", "C002");
  175. return;
  176. }
  177. datagrid1.additem();
  178. model.setValue("/root/main/list/msg["+datagrid1.row+"]/instcd", "012");
  179. model.setValue("/root/main/list/msg["+datagrid1.row+"]/fstrgstdt", getCurrentDate());
  180. model.setValue("/root/main/list/msg["+datagrid1.row+"]/useyn", "Y");
  181. model.setValue("/root/main/list/msg["+datagrid1.row+"]/candel", "Y");
  182. ]]>
  183. </script>
  184. </button>
  185. <button id="button3" class="btn2_letter2" style="left:1150px; top:55px; width:42px; height:19px; ">
  186. <caption>삭제</caption>
  187. <script type="javascript" ev:event="onclick">
  188. <![CDATA[
  189. var cur_row = datagrid1.row; // 행 번호 가져오기
  190. var iStatus = datagrid1.rowstatus(cur_row);
  191. if(cur_row<0) {
  192. messageBox("삭제할 행을", "C002");
  193. return;
  194. }
  195. if(model.getValue("/root/main/list/msg["+datagrid1.row+"]/candel")=="N"){
  196. messageBox("하위 데이터가 존재하여 삭제할 수 ", "I004");
  197. return;
  198. }
  199. else if (iStatus == 1|iStatus == 3) // 새로 삽입된 행이고 데이터를 입력햇을시. 삭제.
  200. {
  201. datagrid1.deleteitem(cur_row);
  202. }
  203. else if (iStatus == 4) // 삭제로 표시된 행이면
  204. {
  205. datagrid1.removestatus(cur_row, "delete");
  206. }
  207. else
  208. {
  209. datagrid1.addStatus(cur_row, "delete");
  210. }
  211. ]]>
  212. </script>
  213. </button>
  214. <button id="btn_cle" class="btn4_letter3" style="left:1125px; top:745px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  215. <caption>초기화</caption>
  216. <script type="javascript" ev:event="DOMActivate">
  217. <![CDATA[
  218. model.reset();
  219. addComboItem("cmb_instcd");
  220. ]]>
  221. </script>
  222. </button>
  223. <button id="btn_save" class="btn4_letter3" style="left:1054px; top:745px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  224. <caption>저장</caption>
  225. <script type="javascript" ev:event="onclick">
  226. <![CDATA[
  227. if(!checkGridUpdate(datagrid1))
  228. {
  229. messageBox("저장할 자료가 존재하지 ", "I004");
  230. return;
  231. }else{
  232. // 저장 시 신규의 경우 null(공백) 체크 및 중복체크 - issno, eqmpos
  233. for(var i=1;i<datagrid1.rows;i++){
  234. var chkSt = datagrid1.rowStatus(i); // 데이터그리드 각 로우의 상태 체크 Insert = 1, Update = 3
  235. var instcd = model.getValue("/root/main/list/msg["+i+"]/instcd");
  236. var chkIssno = model.getValue("/root/main/list/msg["+i+"]/issno");
  237. var chkEqmpos = model.getValue("/root/main/list/msg["+i+"]/eqmpos");
  238. if(chkSt == 1||chkSt == 3){ // 그리드의 상태가 입력(1) 이거나 수정(3) 일 경우
  239. if(instcd==""){ // instcd 널체크
  240. messageBox("기관명이 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001")
  241. return;
  242. }
  243. if(chkIssno==""){ // issno 널체크
  244. messageBox("발급기코드가 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001")
  245. return;
  246. }
  247. if(chkEqmpos==""){ // eqmpos 널체크
  248. messageBox("발급기명이 입력되지 않았습니다 "+i+"번째 행의 값을 ", "C001")
  249. return;
  250. }
  251. for(var j = 1;j<datagrid1.rows;j++){ // issno, eqmpos 중복체크 시작
  252. var oriIssno = model.getValue("/root/main/list/msg["+j+"]/issno")
  253. var oriEqmpos = model.getValue("/root/main/list/msg["+j+"]/eqmpos")
  254. if(i!=j){ // 같은 행의 값을 비교하는 경우가 아니면
  255. if(chkIssno == oriIssno ){ // isso 중복체크
  256. messageBox("입력하신 "+i+"행의 발급기코드("+chkIssno+")가 "+j+"행의 발급기코드("+oriIssno+")와 ", "E006")
  257. return;
  258. }
  259. if(chkEqmpos == oriEqmpos ){ // eqmpos 중복체크
  260. messageBox("입력하신 "+i+"행의 발급기명("+chkEqmpos+")이 "+j+"행의 발급기명("+oriEqmpos+")과", "E006")
  261. return;
  262. }
  263. }
  264. }
  265. }
  266. }
  267. }
  268. var update_data = datagrid1.getUpdateData();
  269. model.removenode("/root/send/data");
  270. model.makeNode("/root/send/data");
  271. model.setValue("/root/send/data", update_data);
  272. if(submit("TXDDP00201")){
  273. datagrid1.clearStatus();
  274. }
  275. ]]>
  276. </script>
  277. </button>
  278. </group>
  279. </xhtml:body>
  280. </xhtml:html>