SMRSD00420_물품청구첨부파일조회.xrw 9.0 KB

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