SMAZZ00201_약품편람업로드.xrw 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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>약국 이미지 Upload</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <reportlist>
  12. <reportnm/>
  13. <reportid/>
  14. </reportlist>
  15. <attachlist>
  16. <lastupdtdt/>
  17. <lastupdtrid/>
  18. <filename/>
  19. <filesize/>
  20. <filetype/>
  21. <filepath/>
  22. <dispid/>
  23. <fstrgstrid/>
  24. <fstrgstdt/>
  25. <seq/>
  26. </attachlist>
  27. </list>
  28. </main>
  29. <send>
  30. <attach>
  31. <file/>
  32. </attach>
  33. <dispid/>
  34. <updateflag/>
  35. </send>
  36. <delsend>
  37. <dispid/>
  38. <seq/>
  39. </delsend>
  40. <init>
  41. <flagcd/>
  42. </init>
  43. <hidden>
  44. <flagcd/>
  45. </hidden>
  46. </root>
  47. </instance>
  48. <script type="javascript" ev:event="xforms-model-construct">
  49. <![CDATA[
  50. ]]>
  51. </script>
  52. <submission id="TRAZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list/attachlist"/>
  53. <submission id="TRAZZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  54. <submission id="TXAZZ00102" mediatype="multipart/form-data" method="form-data-post" ref="/root/delsend" resultref="/root/hidden"/>
  55. <submission id="TXAZZ00201" mediatype="multipart/form-data" method="form-data-post" ref="/root/send" resultref="/root/hidden"/>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. fInitialize();
  59. ]]>
  60. </script>
  61. </model>
  62. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  65. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  66. <script type="javascript">
  67. <![CDATA[
  68. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  69. function fInitialize() {
  70. model.removeNodeset("/root/main/list/attachlist");
  71. model.removeNodeset("/root/send/attach");
  72. model.makeValue("/root/send/updateflag", "1");
  73. model.makeValue("/root/init/flagcd", "1");
  74. button1.dispatch("DOMActivate");
  75. model.refresh();
  76. }
  77. ]]>
  78. </script>
  79. </xhtml:head>
  80. <xhtml:body pagewidth="710" pageheight="600" guideline="1,687;1,686;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  81. <group id="group3" scroll="auto" style="left:0px; top:0px; width:690px; height:580px; ">
  82. <caption id="caption2" class="tit_1" style="left:0px; top:0px; width:217px; height:14px; vertical-align:middle; ">약국 이미지 Upload</caption>
  83. <button id="btn_upload" class="btn5_letter3" style="left:611px; top:22px; width:53px; height:19px; ">
  84. <caption>업로드</caption>
  85. <script type="javascript" ev:event="DOMActivate">
  86. <![CDATA[
  87. if (Number(getNodesetCount("/root/send/attach/file")) <= 0) {
  88. messageBox("파일을 추가하여 주세요.", "E999");
  89. return false;
  90. }
  91. if (submit("TXAZZ00201")) {
  92. messageBox("Upload가 성공적으로 이루어졌습니다.","I999");
  93. model.removeNodeset("/root/send/attach");
  94. model.refresh();
  95. }
  96. ]]>
  97. </script>
  98. </button>
  99. <button id="btn_addfile" class="btn2_letter4" style="left:545px; top:22px; width:64px; height:19px; ">
  100. <caption>파일추가</caption>
  101. <script type="javascript" ev:event="DOMActivate">
  102. <![CDATA[
  103. files = window.fileDialog("open", "|", true);
  104. filelist = files.split("|");
  105. for(var i = 0 ; i < filelist.length ; i++ ) {
  106. if(filelist[i] != "") {
  107. grd_attach.addRow(false);
  108. grd_attach.valueMatrix(grd_attach.rows - 1, 1) = filelist[i];
  109. }
  110. }
  111. model.refresh();
  112. ]]>
  113. </script>
  114. </button>
  115. <upload id="upload1" nodeset="/root/send/attach/file" style="left:260px; top:10px; width:100px; height:20px; "/>
  116. <datagrid id="grd_attach" nodeset="/root/send/attach" caption="파일경로^" colwidth="644" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" style="left:0px; top:45px; width:665px; height:530px; ">
  117. <col ref="file"/>
  118. </datagrid>
  119. <select1 id="combo1" ref="/root/init/flagcd" appearance="minimal" style="left:464px; top:22px; width:79px; height:19px; ">
  120. <choices>
  121. <item>
  122. <label>약품편람</label>
  123. <value>1</value>
  124. </item>
  125. <item>
  126. <label>약품식별</label>
  127. <value>2</value>
  128. </item>
  129. <item>
  130. <label>식별문양</label>
  131. <value>3</value>
  132. </item>
  133. </choices>
  134. <script type="javascript" ev:event="xforms-value-changed">
  135. <![CDATA[
  136. model.makeValue("/root/send/updateflag", model.getValue("/root/init/flagcd"));
  137. ]]>
  138. </script>
  139. </select1>
  140. <datagrid id="grd_attachfile" nodeset="/root/main/list/attachlist" visibility="hidden" caption="업로드일시^업로드ID^첨부파일명^파일크기(Byte)^파일종류^서버저장경로^화면ID^최초등록자^최초등록일시^순번" colwidth="148, 87, 307, 97, 100, 100, 100, 100, 100, 100" extendlastcol="scroll" mergecellsfixedrows="bycolrec" style="left:310px; top:260px; width:120px; height:153px; ">
  141. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  142. <col ref="lastupdtrid" style="text-align:center; "/>
  143. <col ref="filename"/>
  144. <col ref="filesize"/>
  145. <col ref="filetype"/>
  146. <col ref="filepath" visibility="hidden"/>
  147. <col ref="dispid" visibility="hidden"/>
  148. <col ref="fstrgstrid" visibility="hidden"/>
  149. <col ref="fstrgstdt" visibility="hidden"/>
  150. <col ref="seq" visibility="hidden"/>
  151. <script type="javascript" ev:event="ondblclick">
  152. <![CDATA[
  153. //alert(getActionURL("TRAZZ00102"));
  154. var idx = grd_attachfile.row;
  155. var filepath = model.getValue("/root/main/list/attachlist["+idx+"]/filepath");
  156. var filenm = model.getValue("/root/main/list/attachlist["+idx+"]/filename");
  157. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  158. if (localfile != "") {
  159. model.download(getActionURL("TRAZZ00102")+"&filepath="+filepath,localfile);
  160. var rtn = messageBox("파일을", "Q004");
  161. if( rtn == 6 ) {
  162. window.exec(localfile);
  163. }
  164. }
  165. ]]>
  166. </script>
  167. </datagrid>
  168. <button id="button1" class="btn1_letter2" visibility="hidden" style="left:340px; top:355px; width:56px; height:22px; ">
  169. <caption>조회</caption>
  170. <script type="javascript" ev:event="DOMActivate">
  171. <![CDATA[
  172. //model.send("TRZSS00101");
  173. submit("TRAZZ00101");
  174. ]]>
  175. </script>
  176. </button>
  177. <button id="button2" class="btn1_letter2" visibility="hidden" style="left:335px; top:315px; width:56px; height:22px; ">
  178. <caption>삭제</caption>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. if ( (grd_attachfile.row >= grd_attachfile.fixedRows) ) {
  182. var cur_row = grd_attachfile.row;
  183. var dispid = model.getValue("/root/main/list/attachlist["+cur_row+"]/dispid");
  184. var seq = model.getValue("/root/main/list/attachlist["+cur_row+"]/seq");
  185. model.setValue("/root/delsend/dispid", dispid);
  186. model.setValue("/root/delsend/seq", seq);
  187. if ( messageBox("파일 ["+model.getValue("/root/main/list/attachlist["+cur_row+"]/filename")+"] 을 ","Q001")==6 ) {
  188. // alert('삭제한다.');
  189. if ( submit("TXAZZ00102") ) {
  190. messageBox("파일을 삭제하였습니다.","I999");
  191. submit("TRAZZ00101");
  192. model.refresh();
  193. }else {
  194. messageBox("파일삭제 실패하였습니다. 전산실로 문의하십시오.","I999");
  195. model.resetInstanceNode("/root/delsend");
  196. return;
  197. }
  198. }else {
  199. //alert('삭제안한다.');
  200. model.resetInstanceNode("/root/delsend");
  201. }
  202. }
  203. ]]>
  204. </script>
  205. </button>
  206. <caption id="caption20" class="tit_2" style="left:0px; top:25px; width:118px; height:14px; ">이미지 목록</caption>
  207. <line id="line8" class="line_1" style="x1:0px; y1:42px; x2:665px; y2:42px; "/>
  208. </group>
  209. </xhtml:body>
  210. </xhtml:html>