SPAER00401_결과관리(서식)첨부파일.xrw 8.3 KB

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