SPCCM00200_우편번호검색.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * Name : SPCCM00200_우편번호검색.xrw
  4. * Summary : 우편번호검색
  5. * Programmer : Roger Kim
  6. * Date Written : 2007.04.02
  7. * History :
  8. * Remark :
  9. -->
  10. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  11. <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">
  12. <xhtml:head>
  13. <xhtml:title>우편번호 검색</xhtml:title>
  14. <model id="model1">
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <main>
  18. <list>
  19. <zipcodelist>
  20. <serialnum/>
  21. <seqno/>
  22. <zipcd/>
  23. <address/>
  24. <zipcd1/>
  25. <zipcd2/>
  26. <zipcdaddr/>
  27. <citycd/>
  28. <citycntyareacd/>
  29. <blokcd/>
  30. </zipcodelist>
  31. </list>
  32. <search>
  33. <searchcondition>srchzipcd</searchcondition>
  34. <searchterm/>
  35. </search>
  36. </main>
  37. <send>
  38. <data>
  39. </data>
  40. </send>
  41. </root>
  42. </instance>
  43. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  44. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  45. <script type="javascript" ev:event="xforms-ready">
  46. <![CDATA[
  47. var search_condition = opener.window.javascript.getParameter("search_condition");
  48. var search_term = opener.window.javascript.getParameter("search_term");
  49. var receive_zipcd1_path = opener.window.javascript.getParameter("receive_zipcd1_path");
  50. var receive_zipcd2_path = opener.window.javascript.getParameter("receive_zipcd2_path");
  51. var receive_zipcdseq_path = opener.window.javascript.getParameter("receive_zipcdseq_path");
  52. var receive_zipcdaddr_path = opener.window.javascript.getParameter("receive_zipcdaddr_path");
  53. var receive_citycd_path = opener.window.javascript.getParameter("receive_citycd_path");
  54. var receive_citycntyareacd_path = opener.window.javascript.getParameter("receive_citycntyareacd_path");
  55. var receive_blokcd_path = opener.window.javascript.getParameter("receive_blokcd_path");
  56. // 두번째 검색시 첫번째 검색내용을 초기화시킴.
  57. model.removeNodeset("/root/main/list/zipcodelist");
  58. model.setValue("/root/main/search/searchcondition", search_condition);
  59. model.setValue("/root/main/search/searchterm", search_term);
  60. model.makeValue("/root/send/data/searchcondition", search_condition);
  61. model.makeValue("/root/send/data/searchterm", "%"+search_term+"%");
  62. // 처음 검색 팝업을 띄울 때에는 기본 정보를 안 보여주고, 한번 검색 한 이후에는 최종선택한 정보를 기본적으로 가져옴..
  63. if ( search_term == "-" ){
  64. model.setValue("/root/main/search/searchterm", "");
  65. }
  66. if ( search_term == "-" || search_term == "" || search_term == null ){
  67. model.setFocus("ipt_search_item");
  68. } else {
  69. submit("TRCCM00201");
  70. model.SetFocus("grd_zipcodelist");
  71. }
  72. model.refresh();
  73. ]]>
  74. </script>
  75. <submission id="TRCCM00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" add="bottom" resultref="/root/main/list"/>
  76. </model>
  77. </xhtml:head>
  78. <xhtml:body pagewidth="506" pageheight="350" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  79. <group id="grp_Condition" scroll="auto" style="left:0px; top:0px; width:490px; height:305px; ">
  80. <group id="group2" style="left:0px; top:0px; width:489px; height:35px; vertical-align:top; ">
  81. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:489px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  82. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:117px; height:17px; ">검색조건</caption>
  83. <line id="line1" style="x1:403px; y1:7px; x2:403px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  84. <button id="btn_search" class="btn1_letter2" style="left:418px; top:7px; width:56px; height:22px; ">
  85. <caption>조회</caption>
  86. <script type="javascript" ev:event="DOMActivate">
  87. <![CDATA[
  88. var search_condition = model.getValue("/root/main/search/searchcondition");
  89. var search_term = model.getValue("/root/main/search/searchterm");
  90. var receive_zipcd1_path = opener.window.javascript.getParameter("receive_zipcd1_path");
  91. var receive_zipcd2_path = opener.window.javascript.getParameter("receive_zipcd2_path");
  92. var receive_zipcdseq_path = opener.window.javascript.getParameter("receive_zipcdseq_path");
  93. var receive_zipcdaddr_path = opener.window.javascript.getParameter("receive_zipcdaddr_path");
  94. var receive_citycd_path = opener.window.javascript.getParameter("receive_citycd_path");
  95. var receive_citycntyareacd_path = opener.window.javascript.getParameter("receive_citycntyareacd_path");
  96. var receive_blokcd_path = opener.window.javascript.getParameter("receive_blokcd_path");
  97. if (isRequiredControls("ipt_search_item")){
  98. model.removeNodeset("/root/main/list/zipcodelist");
  99. model.makeValue("/root/send/data/searchcondition", search_condition);
  100. model.makeValue("/root/send/data/searchterm", "%"+search_term+"%");
  101. submit("TRCCM00201");
  102. model.SetFocus("grd_zipcodelist");
  103. model.refresh();
  104. }
  105. ]]>
  106. </script>
  107. </button>
  108. <input id="ipt_search_item" ref="/root/main/search/searchterm" class="input_s_essential" style="left:263px; top:8px; width:120px; height:19px; ">
  109. <script type="javascript" ev:event="onkeyup">
  110. <![CDATA[
  111. inputEnterKey("btn_search", "DOMActivate");
  112. ]]>
  113. </script>
  114. </input>
  115. <select1 id="combo1" ref="/root/main/search/searchcondition" class="combo_search" appearance="minimal" style="left:105px; top:8px; width:150px; height:19px; ">
  116. <choices>
  117. <item>
  118. <label>우편번호</label>
  119. <value>srchzipcd</value>
  120. </item>
  121. <item>
  122. <label>동명/아파트명/건물명</label>
  123. <value>srchcombination</value>
  124. </item>
  125. <item>
  126. <label>주소</label>
  127. <value>srchaddress</value>
  128. </item>
  129. </choices>
  130. </select1>
  131. </group>
  132. <caption id="caption9" class="tit_2" style="left:5px; top:40px; width:135px; height:14px; vertical-align:middle; ">우편번호 목록</caption>
  133. <line id="line12" class="line_1" style="x1:0px; y1:55px; x2:489px; y2:55px; "/>
  134. <datagrid id="grd_zipcodelist" nodeset="/root/main/list/zipcodelist" allowselection="false" caption="번호^우편번호^등록순서^주소^우편번호1^우편번호2^우편번호주소^시코드^구코드^동코드" colwidth="0, 100, 0, 340, 0, 0, 0, 0, 0, 0" dataheight="25" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" style="left:0px; top:60px; width:489px; height:243px; ">
  135. <col ref="serialnum" visibility="hidden"/>
  136. <col ref="zipcd" style="text-align:center; "/>
  137. <col ref="seqno" visibility="hidden"/>
  138. <col ref="address"/>
  139. <col ref="zipcd1" visibility="hidden" style="text-align:center; "/>
  140. <col ref="zipcd2" visibility="hidden" style="text-align:center; "/>
  141. <col ref="zipcdaddr" visibility="hidden"/>
  142. <col ref="citycd" visibility="hidden"/>
  143. <col ref="citycntyareacd" visibility="hidden"/>
  144. <col ref="blokcd" visibility="hidden"/>
  145. <script type="javascript" ev:event="ondblclick">
  146. <![CDATA[
  147. var receive_zipcd1_path = opener.window.javascript.getParameter("receive_zipcd1_path");
  148. var receive_zipcd2_path = opener.window.javascript.getParameter("receive_zipcd2_path");
  149. var receive_zipcdseq_path = opener.window.javascript.getParameter("receive_zipcdseq_path");
  150. var receive_zipcdaddr_path = opener.window.javascript.getParameter("receive_zipcdaddr_path");
  151. var receive_citycd_path = opener.window.javascript.getParameter("receive_citycd_path");
  152. var receive_citycntyareacd_path = opener.window.javascript.getParameter("receive_citycntyareacd_path");
  153. var receive_blokcd_path = opener.window.javascript.getParameter("receive_blokcd_path");
  154. var row = grd_zipcodelist.row;
  155. var zipcd1 = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("zipcd1"));
  156. var zipcd2 = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("zipcd2"));
  157. var zipcdseq = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("seqno"));
  158. var zipcdaddr = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("zipcdaddr"));
  159. var citycd = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("citycd"));
  160. var citycntyareacd = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("citycntyareacd"));
  161. var blokcd = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("blokcd"));
  162. if ((grd_zipcodelist.row > 0) && grd_zipcodelist.isCell(event.target)){
  163. if(receive_zipcd1_path != ""){
  164. opener.model.setValue(receive_zipcd1_path, zipcd1);
  165. }
  166. if(receive_zipcd2_path != ""){
  167. opener.model.setValue(receive_zipcd2_path, zipcd2);
  168. }
  169. if(receive_zipcdseq_path != ""){
  170. opener.model.makeValue(receive_zipcdseq_path, zipcdseq);
  171. }
  172. if(receive_zipcdaddr_path != ""){
  173. opener.model.setValue(receive_zipcdaddr_path, zipcdaddr);
  174. }
  175. if (receive_citycd_path != "") { opener.model.setValue(receive_citycd_path, citycd); }
  176. if (receive_citycntyareacd_path != "") { opener.model.setValue(receive_citycntyareacd_path, citycntyareacd); }
  177. if (receive_blokcd_path != "") { opener.model.setValue(receive_blokcd_path, blokcd); }
  178. opener.model.refresh();
  179. // opener.model.setFocus("ipt_detladdr");
  180. window.close();
  181. } else {
  182. }
  183. ]]>
  184. </script>
  185. </datagrid>
  186. </group>
  187. <group id="group5" scroll="auto" style="left:0px; top:305px; width:489px; height:27px; ">
  188. <button id="button2" class="btn4_letter2" style="left:373px; top:5px; width:56px; height:22px; ">
  189. <caption>확인</caption>
  190. <script type="javascript" ev:event="DOMActivate">
  191. <![CDATA[
  192. var receive_zipcd1_path = opener.window.javascript.getParameter("receive_zipcd1_path");
  193. var receive_zipcd2_path = opener.window.javascript.getParameter("receive_zipcd2_path");
  194. var receive_zipcdseq_path = opener.window.javascript.getParameter("receive_zipcdseq_path");
  195. var receive_zipcdaddr_path = opener.window.javascript.getParameter("receive_zipcdaddr_path");
  196. var receive_citycd_path = opener.window.javascript.getParameter("receive_citycd_path");
  197. var receive_citycntyareacd_path = opener.window.javascript.getParameter("receive_citycntyareacd_path");
  198. var receive_blokcd_path = opener.window.javascript.getParameter("receive_blokcd_path");
  199. var row = grd_zipcodelist.row;
  200. var zipcd1 = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("zipcd1"));
  201. var zipcd2 = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("zipcd2"));
  202. var zipcdseq = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("seqno"));
  203. var zipcdaddr = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("zipcdaddr"));
  204. var citycd = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("citycd"));
  205. var citycntyareacd = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("citycntyareacd"));
  206. var blokcd = grd_zipcodelist.valueMatrix(row, grd_zipcodelist.colRef("blokcd"));
  207. if ((grd_zipcodelist.row > 0) && (grd_zipcodelist.col > 1)) {
  208. if(receive_zipcd1_path != ""){
  209. opener.model.setValue(receive_zipcd1_path, zipcd1);
  210. }
  211. if(receive_zipcd2_path != ""){
  212. opener.model.setValue(receive_zipcd2_path, zipcd2);
  213. }
  214. if(receive_zipcdseq_path != ""){
  215. opener.model.makeValue(receive_zipcdseq_path, zipcdseq);
  216. }
  217. if(receive_zipcdaddr_path != ""){
  218. opener.model.setValue(receive_zipcdaddr_path, zipcdaddr);
  219. }
  220. if (receive_citycd_path != "") { opener.model.setValue(receive_citycd_path, citycd); }
  221. if (receive_citycntyareacd_path != "") { opener.model.setValue(receive_citycntyareacd_path, citycntyareacd); }
  222. if (receive_blokcd_path != "") { opener.model.setValue(receive_blokcd_path, blokcd); }
  223. opener.model.refresh();
  224. // opener.model.setFocus("ipt_detladdr");
  225. window.close();
  226. } else {
  227. messageBox("조회하신 후 목록을 ","C002");
  228. model.SetFocus("grd_zipcodelist");
  229. }
  230. ]]>
  231. </script>
  232. </button>
  233. <button id="button3" class="btn4_letter2" style="left:432px; top:5px; width:56px; height:22px; ">
  234. <caption>닫기</caption>
  235. <script type="javascript" ev:event="DOMActivate">
  236. <![CDATA[
  237. window.close();
  238. ]]>
  239. </script>
  240. </button>
  241. </group>
  242. </xhtml:body>
  243. </xhtml:html>