SPRFE02500_예방점검 첨부파일등록.xrw 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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. <fileinfo>
  11. <fileinfolist/>
  12. </fileinfo>
  13. </main>
  14. <target/>
  15. <init>
  16. </init>
  17. <send>
  18. <fileinfo>
  19. <instcd/>
  20. <reqdd/>
  21. <reqflag/>
  22. <reqno/>
  23. <reqseqno/>
  24. <reqpsnid/>
  25. <reqdeptcd/>
  26. <fileseqno/>
  27. </fileinfo>
  28. <save>
  29. <fileinfolist/>
  30. </save>
  31. </send>
  32. </root>
  33. </instance>
  34. <script type="javascript" ev:event="xforms-ready">
  35. <![CDATA[
  36. misfGridInit(grd_fileinfo);
  37. misfMsterDetailSet(grd_fileinfo,null, "TRRFE02501" ,"Y");
  38. var instcd = opener.window.javascript.getParameter("para_instcd" );
  39. var reqdd = opener.window.javascript.getParameter("para_reqdd" );
  40. var fileseqno = opener.window.javascript.getParameter("para_fileseqno" );
  41. var goodflag = opener.window.javascript.getParameter("para_goodflag" );
  42. var reqno = opener.window.javascript.getParameter("para_reqno" );
  43. var reqseqno = opener.window.javascript.getParameter("para_reqseqno" );
  44. var attfilenm = opener.window.javascript.getParameter("para_attfilenm" );
  45. var attfilepathnm = opener.window.javascript.getParameter("para_attfilepathnm");
  46. var manlyn = opener.window.javascript.getParameter("para_manlyn" );
  47. model.makeValue("/root/send/fileinfo/instcd" , instcd );
  48. model.makeValue("/root/send/fileinfo/reqdd" , reqdd );
  49. model.makeValue("/root/send/fileinfo/goodflag" , goodflag);
  50. model.makeValue("/root/send/fileinfo/reqno" , reqno);
  51. model.makeValue("/root/send/fileinfo/reqseqno" , reqseqno);
  52. model.makeValue("/root/send/fileinfo/fileseqno" , fileseqno);
  53. model.makeValue("/root/send/fileinfo/manlyn" , manlyn);
  54. btn_search.dispatch("DOMActivate");
  55. ]]>
  56. </script>
  57. <script type="javascript" ev:event="xforms-model-destruct">
  58. <![CDATA[
  59. if (getGridUpdateData(grd_fileinfo) != "" ) {
  60. if (btn_save.disabled == false) {
  61. var save_val = messageBox("삭제 자료가 존재 합니다. ", "Q002");
  62. if (save_val == "6") {
  63. btn_save.dispatch("DOMActivate");
  64. }
  65. }
  66. }
  67. ]]>
  68. </script>
  69. <submission id="TRRFE02501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/fileinfo" resultref="/root/main/fileinfo"/>
  70. <submission id="TXRFE02502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/fileinfo" resultref="/root/main/fileinfo"/>
  71. <submission id="TRRSD00422" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  72. </model>
  73. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  74. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  75. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  77. </xhtml:head>
  78. <xhtml:body pagewidth="800" pageheight="570" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  79. <group id="group3" scroll="auto" style="left:10px; top:0px; width:755px; height:522px; ">
  80. <caption id="caption1" class="tit_2" style="left:3px; top:11px; width:175px; height:13px; ">첨부파일내역조회</caption>
  81. <line id="line1" class="line_1" style="x1:0px; y1:27px; x2:755px; y2:27px; "/>
  82. <datagrid id="grd_fileinfo" nodeset="/root/main/fileinfo/fileinfolist" caption="계약일자^첨부파일번호^파일이름^파일크기^파일타입^다운로드수^부서명^파일이름(부모창)^caption1" colsep="^" colwidth="75, 86, 246, 67, 150, 71, 91, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="23" defaultrows="0" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="never" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:80px; width:755px; height:440px; ">
  83. <col ref="reqdd" format="yyyy-mm-dd"/>
  84. <col ref="fileseqno"/>
  85. <col ref="filenm"/>
  86. <col ref="filesize" style="text-align:right; "/>
  87. <col ref="filetype"/>
  88. <col ref="qrycnt" style="text-align:center; "/>
  89. <col ref="reqdeptnm" visibility="hidden"/>
  90. <col ref="attfilenm" visibility="hidden"/>
  91. <col ref="instcd" visibility="hidden"/>
  92. <col ref="reqdeptcd" visibility="hidden"/>
  93. <col ref="goalflag" visibility="hidden"/>
  94. <col ref="seqno" visibility="hidden"/>
  95. <col ref="reqpsnid" visibility="hidden"/>
  96. <col ref="filepath" visibility="hidden"/>
  97. <col ref="reqflag" visibility="hidden"/>
  98. <col ref="reqno" visibility="hidden"/>
  99. <col ref="reqseqno" visibility="hidden"/>
  100. <col ref="valumdlcd" visibility="hidden"/>
  101. <col ref="valuclsdetlcd" visibility="hidden"/>
  102. <col ref="publbaseflag" visibility="hidden"/>
  103. <col ref="idxcd" visibility="hidden"/>
  104. <col ref="seqno2" visibility="hidden"/>
  105. <col ref="wrtedd" visibility="hidden"/>
  106. <col ref="fileflag" visibility="hidden"/>
  107. <col ref="workflag" visibility="hidden"/>
  108. <script type="javascript" ev:event="ondblclick">
  109. <![CDATA[
  110. var idx = grd_fileinfo.row;
  111. var filepath = model.getValue("/root/main/fileinfo/fileinfolist["+idx+"]/filepath");
  112. var filenm = model.getValue("/root/main/fileinfo/fileinfolist["+idx+"]/filenm");
  113. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  114. if (localfile != "") {
  115. var qrycnt=grd_fileinfo.valueMatrix(idx,grd_fileinfo.colRef("qrycnt"));
  116. //qrycnt 가 빈값일 경우는 숫자로 변환해도 0이 아닌 값으로 변환되므로 조건문으로 처리한다.
  117. if ( qrycnt == "") {
  118. qrycnt = "0";
  119. }
  120. cnt = parseInt(qrycnt)+1;
  121. model.setValue("/root/main/fileinfo/fileinfolist["+idx+"]/qrycnt",cnt);
  122. grd_fileinfo.addStatus(idx,"update");
  123. misfSave("TXRFE02502");
  124. model.download(getActionURL("TRRSD00422")+"&filepath="+filepath,localfile);
  125. var rtn = messageBox("파일을", "Q004");
  126. if( rtn == 6 ) {
  127. window.exec(localfile);
  128. }
  129. }
  130. btn_search.dispatch("DOMActivate");
  131. ]]>
  132. </script>
  133. </datagrid>
  134. <button id="btn_search" class="btn1_letter2" style="left:697px; top:33px; width:56px; height:22px; ">
  135. <caption>조회</caption>
  136. <script type="javascript" ev:event="DOMActivate">
  137. <![CDATA[
  138. misfMsterDetailRetrieve();
  139. if (grd_fileinfo.rows - grd_fileinfo.fixedRows > 0) {
  140. if (grd_fileinfo.valueMatrix(grd_fileinfo.fixedRows, grd_fileinfo.colRef("reqpsnid")) == getUserInfo("userid")) {
  141. btn_save.disabled = false;
  142. btn_delgrd.disabled = false;
  143. }
  144. else {
  145. btn_save.disabled = true;
  146. btn_delgrd.disabled = true;
  147. }
  148. }
  149. else {
  150. btn_save.disabled = true;
  151. btn_delgrd.disabled = true;
  152. }
  153. ]]>
  154. </script>
  155. </button>
  156. <button id="btn_save" class="btn4_letter2" style="left:695px; top:3px; width:56px; height:22px; ">
  157. <caption>저장</caption>
  158. <script type="javascript" ev:event="DOMActivate">
  159. <![CDATA[
  160. //그리드 for 문 돌려서 삭제인 것만 찾아서 attfilenm 을 다 null로 바꾸어 주고 부모창에 넘기면 된다....
  161. /*
  162. for (var i=grd_fileinfo.fixedRows ; i< grd_fileinfo.rows ; i++) {
  163. if ( grd_fileinfo.rowStatus(i) = 4) {
  164. model.setValue("/root/main/fileinfo/fileinfolist["+i+"]/attfilenm" , "");
  165. }
  166. }
  167. */
  168. misfSave("TXRFE02502");
  169. btn_search.dispatch("DOMActivate");
  170. //부모창 즉 비품청구 등록 창에 첨부파일 항목을 지워주어야 한다.
  171. //attfilenm 을 빈값으로 만든 다음 넘겨야 한다.
  172. //즉 노드셋단에서 한번 조작을 가한후 해당 데이터를 부모창에 넘겨주어햐 한다.
  173. //misfPopUpListReturn(grd_fileinfo);
  174. ]]>
  175. </script>
  176. </button>
  177. <line id="line2" class="line_3" style="x1:0px; y1:57px; x2:755px; y2:57px; "/>
  178. <button id="btn_delgrd" class="btn2_letter3" style="left:699px; top:60px; width:53px; height:19px; ">
  179. <caption>행삭제</caption>
  180. <script type="javascript" ev:event="DOMActivate">
  181. <![CDATA[
  182. misfGridIUD(grd_fileinfo, "D");
  183. ]]>
  184. </script>
  185. </button>
  186. </group>
  187. <group id="group1" scroll="auto" style="left:10px; top:521px; width:755px; height:27px; ">
  188. <button id="btn_confirm" class="btn4_letter2" style="left:637px; top:2px; width:56px; height:22px; ">
  189. <caption>확인</caption>
  190. <script type="javascript" ev:event="DOMActivate">
  191. <![CDATA[
  192. window.close();
  193. ]]>
  194. </script>
  195. </button>
  196. <button id="btn_cancel" class="btn4_letter2" style="left:694px; top:2px; width:56px; height:22px; ">
  197. <caption>취소</caption>
  198. <script type="javascript" ev:event="DOMActivate">
  199. <![CDATA[
  200. window.close();
  201. ]]>
  202. </script>
  203. </button>
  204. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:580; y2:0px; "/>
  205. </group>
  206. </xhtml:body>
  207. </xhtml:html>