SPPIZ01100_확인코드조회.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <!--
  4. * @(#)SPPIZ09100_확인코드조회.xrw
  5. * 수정이력
  6. * - 2007.08.13 / 최초작성 / 김건기
  7. *
  8. * - opener 에서 전달받는 조건 경로
  9. -->
  10. <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">
  11. <xhtml:head>
  12. <xhtml:title>확인코드조회</xhtml:title>
  13. <model id="model1">
  14. <instance id="instance1">
  15. <root xmlns="">
  16. <main>
  17. <list>
  18. <cnfmcdlist>
  19. <chos/>
  20. <cdid/>
  21. <cdnm/>
  22. <detldesc/>
  23. </cnfmcdlist>
  24. </list>
  25. </main>
  26. <send>
  27. <data1>
  28. <srchflag/>
  29. <srchcond1/>
  30. <srchcond2/>
  31. <flag/>
  32. </data1>
  33. <data2>
  34. <code/>
  35. </data2>
  36. </send>
  37. <hidden>
  38. <rcv/>
  39. </hidden>
  40. <init>
  41. <sppiz01100>
  42. <cond>
  43. <code/>
  44. </cond>
  45. </sppiz01100>
  46. </init>
  47. </root>
  48. </instance>
  49. <script type="javascript" ev:event="xforms-ready">
  50. <![CDATA[
  51. fInitialize(); // 화면을 초기화한다.
  52. ]]>
  53. </script>
  54. <submission id="TRPIZ01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/hidden/rcv"/>
  55. </model>
  56. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  58. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  59. <script type="javascript">
  60. <![CDATA[
  61. function fInitialize() {
  62. model.removenode("/root/main/list");
  63. model.makeNode("/root/main/list");
  64. model.setValue("/root/send/data1/srchflag","0");
  65. model.setValue("/root/send/data1/srchcond1","1");
  66. if (checkOpener()) {
  67. // opener에 설정된 확인코드를 초기 입력코드 값으로 한다.
  68. var code = model.getValue("/root/init/sppiz01100/cond/code");
  69. var len = code.length;
  70. if (len > 1) {
  71. model.setValue("/root/send/data2/code", "/" + code);
  72. }
  73. // 팝업 화면으로 사용시 기본적으로 전체 조회 상태가 된다.
  74. btn_search.dispatch("DOMActivate");
  75. var code = model.getValue("/root/send/data2/code");
  76. if (code !="") {
  77. var arr = code.split("/");
  78. var cdid = "";
  79. var reqcdid = "";
  80. var rows = grd_codelist.rows;
  81. for (var i=1; i<arr.length; i++) {
  82. reqcdid = arr[i];
  83. for (var j=0; j<rows; j++) {
  84. cdid = model.getValue("/root/main/list/cnfmcdlist[" + j +"]/cdid");
  85. if (reqcdid == cdid) {
  86. grd_codelist.valueMatrix(j,grd_codelist.colRef("chos")) = "true";
  87. }
  88. }
  89. }
  90. }
  91. }
  92. model.refresh();
  93. }
  94. //선택된 확인 코드를 Opener에 전달 한다.
  95. function fSetSelectedData()
  96. {
  97. if (checkOpener()) { // (common.js) 자신을 Open한 opener의 현재 UID가 자신을 open한 시점의 UID와 비교하여 변경되었는지 여부를 반환
  98. // model.copyNode(opener.root.hidden.JT001, model.getValue("/root/send/data2/code"));
  99. // 입력을 취소 상태로 하여 opener에게 전달한 경우와 변경없이 닫기 요청을 한 경우 구분을 위해
  100. // rslt 경로가 존재하면 "입력" 한 것으로, 없으면 "닫기"를 요청한 것으로 판단한다.
  101. var code = model.getValue("/root/send/data2/code");
  102. var len = code.length;
  103. if (len > 1) {
  104. var tmp = code.substring(0,1);
  105. if (tmp == "/") {
  106. code = code.substring(1,len);
  107. }
  108. model.setValue("/root/send/data2/code",code);
  109. }
  110. opener.model.removeNodeset("root/hidden/sppiz01100/rslt");
  111. opener.model.makeNode("root/hidden/sppiz01100/rslt");
  112. model.copyNode(opener.root.hidden.sppiz01100.rslt, "/root/send/data2");
  113. } else {
  114. messageBox("상위화면이 변경되어 데이터를 전달할 수", "I004"); ///상위화면이 변경되어 데이터를 전달할 수 없습니다.
  115. }
  116. window.close(); // F5 실행시 IE를 종료시킨다.
  117. }
  118. ]]>
  119. </script>
  120. </xhtml:head>
  121. <xhtml:body pagewidth="587" pageheight="558" style="font-family:굴림체; margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  122. <group id="group3" scroll="auto" style="left:0px; top:40px; width:571px; height:489px; ">
  123. <input id="opt_code" ref="/root/send/data2/code" class="input_default" _chartype="upper" appearance="input" style="left:103px; top:22px; width:465px; height:19px; "/>
  124. <caption id="caption1" class="tit_2" style="left:0px; top:0px; width:126px; height:13px; ">확인코드</caption>
  125. <caption id="caption2" class="cell_1" style="left:0px; top:20px; width:100px; height:23px; ">입력코드</caption>
  126. <line id="line1" class="line_3" style="x1:0px; y1:44px; x2:570px; y2:44px; "/>
  127. <line id="line2" class="line_1" style="width:570px; x1:0px; y1:15px; x2:570px; y2:15px; "/>
  128. <datagrid id="grd_codelist" nodeset="/root/main/list/cnfmcdlist" caption="선택^코드^내역^영문" colsep="^" colwidth="41, 85, 147, 279" ellipsis="true" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:50px; width:570px; height:438px; ">
  129. <col ref="chos" type="checkbox"/>
  130. <col ref="cdid"/>
  131. <col ref="cdnm"/>
  132. <col ref="detldesc"/>
  133. <script type="javascript" ev:event="ondblclick">
  134. <![CDATA[
  135. if(grd_codelist.isCell(event.target) && grd_codelist.row >= grd_codelist.fixedRows) {
  136. var row = grd_codelist.row ;
  137. var code = model.getValue("/root/send/data2/code");
  138. var chk = grd_codelist.valueMatrix(row,0);
  139. var cdid = grd_codelist.valueMatrix(row,1);
  140. cdid = "/" + cdid;
  141. if ( chk != "true") {
  142. model.setValue("/root/send/data2/code", code + cdid);
  143. grd_codelist.valueMatrix(row,0) = "true";
  144. } else {
  145. model.setValue("/root/send/data2/code", code.replace(cdid,""));
  146. grd_codelist.valueMatrix(row,0) = "false";
  147. }
  148. model.refresh();
  149. }
  150. ]]>
  151. </script>
  152. <script type="javascript" ev:event="xforms-value-changed">
  153. <![CDATA[
  154. var row = grd_codelist.row ;
  155. var code = model.getValue("/root/send/data2/code");
  156. var chk = grd_codelist.valueMatrix(row,0);
  157. var cdid = grd_codelist.valueMatrix(row,1);
  158. cdid = "/" + cdid;
  159. if ( chk == "true") {
  160. model.setValue("/root/send/data2/code", code + cdid);
  161. } else {
  162. model.setValue("/root/send/data2/code", code.replace(cdid,""));
  163. }
  164. model.refresh();
  165. ]]>
  166. </script>
  167. </datagrid>
  168. </group>
  169. <group id="group4" scroll="auto" style="left:0px; top:531px; width:571px; height:27px; ">
  170. <line id="line23" class="line_6" style="x1:0px; y1:0px; x2:570px; y2:0px; "/>
  171. <button id="btn_confirm" class="btn4_letter2" navindex="3" style="left:514px; top:5px; width:56px; height:22px; ">
  172. <caption>닫기</caption>
  173. <script type="javascript" ev:event="DOMActivate">
  174. <![CDATA[
  175. window.close(); // F5 실행시 IE를 종료시킨다.
  176. ]]>
  177. </script>
  178. </button>
  179. <button id="button42" class="btn4_letter2" navindex="2" style="left:394px; top:5px; width:56px; height:22px; ">
  180. <caption>입력</caption>
  181. <script type="javascript" ev:event="DOMActivate">
  182. <![CDATA[
  183. // 선택된 Message를 Opener 에 전달 한다.
  184. fSetSelectedData();
  185. ]]>
  186. </script>
  187. </button>
  188. <button id="button1" class="btn4_letter2" navindex="2" style="left:454px; top:5px; width:56px; height:22px; ">
  189. <caption>취소</caption>
  190. <script type="javascript" ev:event="DOMActivate">
  191. <![CDATA[
  192. model.setValue("/root/send/data2/code","");
  193. var rows = grd_codelist.rows;
  194. for (i=1;i<rows;i++) {
  195. grd_codelist.valueMatrix(i,0) = "false";
  196. }
  197. model.refresh();
  198. ]]>
  199. </script>
  200. </button>
  201. </group>
  202. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:571px; height:35px; "/>
  203. <select1 id="cmb_srchcond1" ref="/root/send/data1/srchflag" class="combo_s_default" navindex="1" appearance="minimal" style="left:104px; top:8px; width:100px; height:19px; ">
  204. <choices>
  205. <item>
  206. <label>전체</label>
  207. <value>0</value>
  208. </item>
  209. <item>
  210. <label>검체</label>
  211. <value>1</value>
  212. </item>
  213. <item>
  214. <label>부위</label>
  215. <value>2</value>
  216. </item>
  217. <item>
  218. <label>진료과</label>
  219. <value>3</value>
  220. </item>
  221. </choices>
  222. <script type="javascript" ev:event="xforms-value-changed">
  223. <![CDATA[
  224. model.removeNodeset("/root/main/list");
  225. model.makeNode("/root/main/list");
  226. var str = model.getValue("/root/send/data1/srchcond2");
  227. if (str.charCodeAt(0) > 255) {
  228. model.setValue("/root/send/data1/flag","1");
  229. } else {
  230. model.setValue("/root/send/data1/flag","2");
  231. }
  232. //
  233. if(submit("TRPIZ01101")) {
  234. var listcnt = getNodesetCount("/root/hidden/rcv/list/cnfmcdlist");
  235. if (listcnt > 0) {
  236. copyNodeType("/root/main/list","/root/hidden/rcv/list","replace");
  237. }
  238. model.refresh();
  239. }
  240. ]]>
  241. </script>
  242. </select1>
  243. <caption id="caption4" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">조회구분 :</caption>
  244. <line id="line13" class="line_4" style="x1:490px; y1:6px; x2:490px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  245. <button id="btn_search" class="btn1_letter2" navindex="5" style="left:505px; top:6px; width:56px; height:22px; ">
  246. <caption>조회</caption>
  247. <script type="javascript" ev:event="DOMActivate">
  248. <![CDATA[
  249. model.removeNodeset("/root/main/list");
  250. model.makeNode("/root/main/list");
  251. var str = model.getValue("/root/send/data1/srchcond2");
  252. if (str.charCodeAt(0) > 255) {
  253. model.setValue("/root/send/data1/flag","1");
  254. } else {
  255. model.setValue("/root/send/data1/flag","2");
  256. }
  257. //
  258. if(submit("TRPIZ01101")) {
  259. var listcnt = getNodesetCount("/root/hidden/rcv/list/cnfmcdlist");
  260. if (listcnt > 0) {
  261. copyNodeType("/root/main/list","/root/hidden/rcv/list","replace");
  262. }
  263. model.refresh();
  264. }
  265. ]]>
  266. </script>
  267. </button>
  268. <select1 id="rdo_srchcond2" ref="/root/send/data1/srchcond1" appearance="full" cols="2" overflow="visible" style="left:220px; top:10px; width:100px; height:15px; border-style:none; ">
  269. <choices>
  270. <item>
  271. <label>코드</label>
  272. <value>1</value>
  273. </item>
  274. <item>
  275. <label>내역</label>
  276. <value>2</value>
  277. </item>
  278. </choices>
  279. </select1>
  280. <input id="ipt_srchcond3" ref="/root/send/data1/srchcond2" class="input_search" _chartype="upper" style="left:325px; top:8px; width:155px; height:19px; ">
  281. <script type="javascript" ev:event="onkeypress">
  282. <![CDATA[
  283. if (event.keyCode=='13') {
  284. inputEnterKey("btn_search", "DOMActivate");
  285. }
  286. ]]>
  287. </script>
  288. </input>
  289. </xhtml:body>
  290. </xhtml:html>