SPZSB00302_배치로그파일리스트.xrw 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. <loginfo>
  11. <resultfile>
  12. </resultfile>
  13. </loginfo>
  14. </main>
  15. <send>
  16. <execrid/>
  17. <fromdt/>
  18. <offset>0</offset>
  19. <pagesize>1</pagesize>
  20. <prgmexecno/>
  21. <enddt/>
  22. </send>
  23. </root>
  24. </instance>
  25. <script type="javascript" ev:event="xforms-ready">
  26. <![CDATA[
  27. grd_batlog.fixedcellcheckbox(0,grd_batlog.colRef("chk"),false) = true;
  28. model.refresh();
  29. submit("TRZSB00303");
  30. ]]>
  31. </script>
  32. <submission id="TRZSB00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo"/>
  33. <bind id="prcsstat" ref="/root/main/list/batlog/prcsstat" readonly="true()"/>
  34. </model>
  35. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  36. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  37. <script type="javascript">
  38. <![CDATA[
  39. ]]>
  40. </script>
  41. </xhtml:head>
  42. <xhtml:body pagewidth="500" pageheight="450" guideline="1,966;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  43. <group id="group5" scroll="auto" style="left:0px; top:0px; width:480px; height:450px; ">
  44. <caption id="caption48" class="tit_2" style="left:5px; top:10px; width:138px; height:14px; ">배치 생성 파일 목록</caption>
  45. <line id="line20" class="line_1" style="x1:0px; y1:25px; x2:475px; y2:25px; "/>
  46. <datagrid id="grd_batlog" nodeset="/root/main/loginfo/resultfile" visibility="visible" autoresize="true" caption="^파일 경로^크기" colsep="^" colwidth="30, 385, 37" dataheight="50" datatype="xml" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:30px; width:475px; height:390px; ">
  47. <col ref="chk" type="checkbox"/>
  48. <col ref="filepath"/>
  49. <col autonext="true" ref="filesize"/>
  50. </datagrid>
  51. <button id="button1" class="btn4_letter2" disabled="false" style="left:420px; top:425px; width:56px; height:22px; ">
  52. <caption>닫기</caption>
  53. <script type="javascript" ev:event="DOMActivate">
  54. <![CDATA[
  55. model.close();
  56. ]]>
  57. </script>
  58. </button>
  59. <button id="button163" class="btn4_letter7" visibility="visible" style="left:295px; top:425px; width:116px; height:22px; ">
  60. <caption>파일 내려받기</caption>
  61. <script type="javascript" ev:event="DOMActivate">
  62. <![CDATA[
  63. var nodeList = instance1.selectNodes("/root/main/loginfo/resultfile[chk='true']");
  64. var node;
  65. if (nodeList.length == 1) {
  66. var filepath = nodeList.nextNode().filepath.text;
  67. var filenm = filepath.split(/\/|\\/); // / 또는 \ 로 split 하여 마지막 항목을 default 파일 명으로 사용한다.
  68. var len = filenm.length;
  69. filenm = filenm[len-1];
  70. var localfile = window.fileDialog("save","|",false, filenm, "", "All Files(*.*)|*.*");
  71. if (localfile != "") {
  72. download("TRZSB00205", "&filepath="+filepath, localfile);
  73. //model.download(getActionURL("TRZSB00205")+"&filepath="+filepath,localfile);
  74. }
  75. } else if (nodeList.length > 1) {
  76. var localfile = window.folderDialog("배치 로그 파일 다운로드");
  77. var succCnt = 0;
  78. while( node = nodeList.nextNode() ) {
  79. var filepath = node.filepath.text;
  80. var filenm = filepath.split(/\/|\\/); // / 또는 \ 로 split 하여 마지막 항목을 default 파일 명으로 사용한다.
  81. var len = filenm.length;
  82. filenm = filenm[len-1];
  83. if (localfile != "") {
  84. download("TRZSB00205", "&filepath="+filepath, localfile+"\\"+filenm,false);
  85. succCnt++;
  86. //model.download(getActionURL("TRZSB00205")+"&filepath="+filepath,localfile+"\\"+filenm);
  87. }
  88. }
  89. if(succCnt == nodeList.length){
  90. messageBox("파일저장이 ","I002");
  91. }else{
  92. messageBox("파일저장이 일부 ","E009");
  93. }
  94. }
  95. ]]>
  96. </script>
  97. </button>
  98. </group>
  99. </xhtml:body>
  100. </xhtml:html>