SMDDP00300_진료카드프린터코드관리.xrw 11 KB

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