SPADB62600_문양검색.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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>문양검색</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <shape>
  11. <shapephot1/>
  12. <shapecd1/>
  13. <shapephot2/>
  14. <shapecd2/>
  15. <shapephot3/>
  16. <shapecd3/>
  17. <shapephot4/>
  18. <shapecd4/>
  19. <shapephot5/>
  20. <shapecd5/>
  21. <shapephot6/>
  22. <shapecd6/>
  23. <shapephot7/>
  24. <shapecd7/>
  25. <shapephot8/>
  26. <shapecd8/>
  27. </shape>
  28. </main>
  29. <send>
  30. <srchinfo>
  31. <instcd>012</instcd>
  32. <fromcount/>
  33. <tocount/>
  34. </srchinfo>
  35. </send>
  36. <init>
  37. <count>
  38. <label/>
  39. <value/>
  40. </count>
  41. </init>
  42. <hidden>
  43. <receiveref/>
  44. <index/>
  45. </hidden>
  46. <temp>
  47. <shape/>
  48. <shapecd/>
  49. </temp>
  50. </root>
  51. </instance>
  52. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  54. <script type="javascript" ev:event="xforms-ready">
  55. <![CDATA[
  56. document.controls("Base64_Preview1").attribute("visibility") = "hidden";
  57. submit("TRADB62602",false);
  58. model.setValue("/root/send/srchinfo/fromcount","1");
  59. model.setValue("/root/send/srchinfo/tocount","40");
  60. model.setValue("/root/hidden/index", "1");
  61. fGetShape();
  62. model.refresh();
  63. /*
  64. submit("TRADB62601");
  65. for(var i=0; i < grd_shape.cols; i+=2){
  66. grd_shape.colWidth(i) = 60;
  67. }
  68. for(var i = 0; i < getNodesetCount("/root/main/shape"); i++){
  69. setImageRefInstance("/root/main/shape["+i+"]/shapephot1");
  70. setImageRefInstance("/root/main/shape["+i+"]/shapephot2");
  71. setImageRefInstance("/root/main/shape["+i+"]/shapephot3");
  72. setImageRefInstance("/root/main/shape["+i+"]/shapephot4");
  73. setImageRefInstance("/root/main/shape["+i+"]/shapephot5");
  74. setImageRefInstance("/root/main/shape["+i+"]/shapephot6");
  75. setImageRefInstance("/root/main/shape["+i+"]/shapephot7");
  76. setImageRefInstance("/root/main/shape["+i+"]/shapephot8");
  77. grd_shape.rowHeight(i) = 60;
  78. }
  79. */
  80. model.refresh();
  81. ]]>
  82. </script>
  83. <script type="javascript">
  84. <![CDATA[
  85. function fGetShape(){
  86. var sImgcnts = "";
  87. var strBase64 = "";
  88. submit("TRADB62601", false);
  89. //for(var i = grd_shape.fixedRows; i <= grd_shape.rows; i++){
  90. for(var i = 1; i <= getNodesetCount("/root/main/shape") ; i++){
  91. //화면 속도를 위해 이미지를 작게 만듬.
  92. sImgcnts = model.getValue("/root/main/shape["+i+"]/shapephot1");
  93. Base64_Preview1.LoadImageBase64(sImgcnts);
  94. Base64_Preview1.SetViewMode(1);
  95. strBase64 = Base64_Preview1.SaveImageBase64();
  96. model.setValue("/root/main/shape["+i+"]/shapephot1", strBase64);
  97. setImageRefInstance("/root/main/shape["+i+"]/shapephot1");
  98. sImgcnts = model.getValue("/root/main/shape["+i+"]/shapephot2");
  99. Base64_Preview1.LoadImageBase64(sImgcnts);
  100. Base64_Preview1.SetViewMode(1);
  101. strBase64 = Base64_Preview1.SaveImageBase64();
  102. model.setValue("/root/main/shape["+i+"]/shapephot2", strBase64);
  103. setImageRefInstance("/root/main/shape["+i+"]/shapephot2");
  104. sImgcnts = model.getValue("/root/main/shape["+i+"]/shapephot3");
  105. Base64_Preview1.LoadImageBase64(sImgcnts);
  106. Base64_Preview1.SetViewMode(1);
  107. strBase64 = Base64_Preview1.SaveImageBase64();
  108. model.setValue("/root/main/shape["+i+"]/shapephot3", strBase64);
  109. setImageRefInstance("/root/main/shape["+i+"]/shapephot3");
  110. sImgcnts = model.getValue("/root/main/shape["+i+"]/shapephot4");
  111. Base64_Preview1.LoadImageBase64(sImgcnts);
  112. Base64_Preview1.SetViewMode(1);
  113. strBase64 = Base64_Preview1.SaveImageBase64();
  114. model.setValue("/root/main/shape["+i+"]/shapephot4", strBase64);
  115. setImageRefInstance("/root/main/shape["+i+"]/shapephot4");
  116. sImgcnts = model.getValue("/root/main/shape["+i+"]/shapephot5");
  117. Base64_Preview1.LoadImageBase64(sImgcnts);
  118. Base64_Preview1.SetViewMode(1);
  119. strBase64 = Base64_Preview1.SaveImageBase64();
  120. model.setValue("/root/main/shape["+i+"]/shapephot5", strBase64);
  121. setImageRefInstance("/root/main/shape["+i+"]/shapephot5");
  122. sImgcnts = model.getValue("/root/main/shape["+i+"]/shapephot6");
  123. Base64_Preview1.LoadImageBase64(sImgcnts);
  124. Base64_Preview1.SetViewMode(1);
  125. strBase64 = Base64_Preview1.SaveImageBase64();
  126. model.setValue("/root/main/shape["+i+"]/shapephot6", strBase64);
  127. setImageRefInstance("/root/main/shape["+i+"]/shapephot6");
  128. sImgcnts = model.getValue("/root/main/shape["+i+"]/shapephot7");
  129. Base64_Preview1.LoadImageBase64(sImgcnts);
  130. Base64_Preview1.SetViewMode(1);
  131. strBase64 = Base64_Preview1.SaveImageBase64();
  132. model.setValue("/root/main/shape["+i+"]/shapephot7", strBase64);
  133. setImageRefInstance("/root/main/shape["+i+"]/shapephot7");
  134. sImgcnts = model.getValue("/root/main/shape["+i+"]/shapephot8");
  135. Base64_Preview1.LoadImageBase64(sImgcnts);
  136. Base64_Preview1.SetViewMode(1);
  137. strBase64 = Base64_Preview1.SaveImageBase64();
  138. model.setValue("/root/main/shape["+i+"]/shapephot8", strBase64);
  139. setImageRefInstance("/root/main/shape["+i+"]/shapephot8");
  140. }
  141. grd_shape.refresh();
  142. //grd_shape.visible = true;
  143. for(var i=0; i < grd_shape.cols; i+=2){
  144. grd_shape.colWidth(i) = 60;
  145. }
  146. for(var i = grd_shape.fixedRows; i <= grd_shape.rows; i++){
  147. grd_shape.rowHeight(i) = 60;
  148. }
  149. }
  150. ]]>
  151. </script>
  152. <submission id="TRADB62601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main"/>
  153. <submission id="TRADB62602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/init"/>
  154. </model>
  155. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  156. </xhtml:head>
  157. <xhtml:body pagewidth="520" pageheight="440" guideline="1,501;" style="margin:8; margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  158. <group id="grp_biz" scroll="auto" style="left:0px; top:10px; width:501px; height:370px; ">
  159. <datagrid id="grd_shape" nodeset="/root/main/shape" scroll="auto" colsep="^" rowsep="|" selectionmode="free" style="left:0px; top:31px; width:500px; height:309px; text-align:center; vertical-align:middle; ">
  160. <col ref="shapephot1" style="width:60; height:60; background-stretch:stretch; "/>
  161. <col ref="shapecd1" visibility="hidden" style="width:60; height:60; "/>
  162. <col ref="shapephot2" style="width:60; height:60; background-stretch:stretch; "/>
  163. <col ref="shapecd2" visibility="hidden" style="width:60; height:60; "/>
  164. <col ref="shapephot3" style="width:60; height:60; background-stretch:stretch; "/>
  165. <col ref="shapecd3" visibility="hidden" style="width:60; height:60; "/>
  166. <col ref="shapephot4" style="width:60; height:60; background-stretch:stretch; "/>
  167. <col ref="shapecd4" visibility="hidden" style="width:60; height:60; "/>
  168. <col ref="shapephot5" style="width:60; height:60; background-stretch:stretch; "/>
  169. <col ref="shapecd5" visibility="hidden" style="width:60; height:60; "/>
  170. <col ref="shapephot6" style="width:60; height:60; background-stretch:stretch; "/>
  171. <col ref="shapecd6" visibility="hidden" style="width:60; height:60; "/>
  172. <col ref="shapephot7" style="width:60; height:60; background-stretch:stretch; "/>
  173. <col ref="shapecd7" visibility="hidden" style="width:60; height:60; "/>
  174. <col ref="shapephot8" style="width:60; height:60; background-stretch:stretch; "/>
  175. <col ref="shapecd8" visibility="hidden" style="width:60; height:60; "/>
  176. <script type="javascript" ev:event="ondblclick">
  177. <![CDATA[
  178. var controlObj = document.controls("btn_cfm");
  179. controlObj.dispatch("onclick");
  180. ]]>
  181. </script>
  182. </datagrid>
  183. <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:140px; height:13px; ">문양검색</caption>
  184. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:500px; y2:25px; "/>
  185. <line id="line7" class="line_6" style="x1:1px; y1:369px; x2:501px; y2:369px; "/>
  186. <select1 id="rdo_count" ref="/root/hidden/index" appearance="full" cellspacing="25" cols="10" rows="2" overflow="visible" style="left:0px; top:345px; width:501px; height:20px; text-align:center; border-style:none; ">
  187. <choices>
  188. <itemset nodeset="/root/init/count">
  189. <label ref="label"/>
  190. <value ref="value"/>
  191. </itemset>
  192. </choices>
  193. <script type="javascript" ev:event="xforms-select">
  194. <![CDATA[
  195. var count = model.getValue("/root/hidden/index");
  196. model.setValue("/root/send/srchinfo/fromcount", (count*40)-39);
  197. model.setValue("/root/send/srchinfo/tocount",(count*40));
  198. fGetShape();
  199. model.refresh();
  200. ]]>
  201. </script>
  202. </select1>
  203. <object id="Base64_Preview1" clsid="{72e5d9ed-0d6a-46e8-aead-23144bfef878}" style="left:0px; top:30px; width:128px; height:128px; background-color:transparent; "/>
  204. </group>
  205. <group id="grp_btn" scroll="auto" style="left:0px; top:395px; width:501px; height:27px; ">
  206. <button id="btn_cfm" class="btn4_letter2" style="left:385px; top:5px; width:56px; height:22px; ">
  207. <caption>확인</caption>
  208. <script type="javascript" ev:event="onclick">
  209. <![CDATA[
  210. var shapecd = grd_shape.valueMatrix(grd_shape.row , grd_shape.col +1 );
  211. model.setValue("/root/hidden/receiveref/shapecd", grd_shape.valueMatrix(grd_shape.row , grd_shape.col +1 ));
  212. model.setValue("/root/hidden/receiveref/shape", grd_shape.valueMatrix(grd_shape.row, grd_shape.col));
  213. var receiveref = model.getValue("/root/hidden/receiveref");
  214. if(shapecd != ""){
  215. if(checkOpener()){
  216. model.copyNode(opener.root.hidden.receiveshape, root.hidden.receiveref);
  217. //opener.model.setValue(receiveref, shapecd);
  218. //opener.model.setValue(receiveref, shape);
  219. //opener.model.refresh();
  220. window.close();
  221. }else{
  222. messageBox("상위화면이 변경되어 데이터를 전달할 수 ","I004");
  223. }
  224. }else{
  225. messageBox("문양을","C002");
  226. }
  227. ]]>
  228. </script>
  229. </button>
  230. <button id="btn_can" class="btn4_letter2" style="left:444px; top:5px; width:56px; height:22px; ">
  231. <caption>취소</caption>
  232. <close ev:event="DOMActivate"/>
  233. </button>
  234. </group>
  235. </xhtml:body>
  236. </xhtml:html>