file.ejs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <% include ./material_sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex">
  5. <% include ./material_sub_mini_menu.ejs %>
  6. <div>
  7. <div class="d-inline-block">
  8. <a href="#addfujian" data-toggle="modal" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加清单"><i class="fa fa-cloud-upload" aria-hidden="true"></i> 上传附件</a>
  9. </div>
  10. <div class="d-inline-block">
  11. <span class="d-flex align-items-center" style="margin-left: 5px;">
  12. <input type="checkbox" id="file-checkbox">
  13. <span class="text-primary" style="margin-left: 5px;">所有期</span>
  14. </span>
  15. </div>
  16. </div>
  17. <!--<div class="d-flex justify-content-start align-items-center">-->
  18. <!--<a href="#addfujian" data-toggle="modal" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加清单"><i class="fa fa-cloud-upload" aria-hidden="true"></i> 上传附件</a>-->
  19. <!--<span class="d-flex align-items-center" style="margin-left: 5px;">-->
  20. <!--<input type="checkbox" id="file-checkbox">-->
  21. <!--<span class="text-primary" style="margin-left: 5px;">所有期</span>-->
  22. <!--</span>-->
  23. <!--</div>-->
  24. </div>
  25. </div>
  26. <div class="content-wrap">
  27. <div class="c-body">
  28. <div class="sjs-height-0">
  29. <table class="table table-bordered">
  30. <thead>
  31. <tr>
  32. <th width="50">序号</th>
  33. <th>名称</th>
  34. <th width="90">大小</th>
  35. <th width="90">调差期</th>
  36. <th width="150">上传时间</th>
  37. <th width="100">操作</th>
  38. </tr>
  39. </thead>
  40. <tbody id="file-list">
  41. <!-- <% fileList.filter(file => file.mid === ctx.material.id).forEach(function(file, idx){ %>
  42. <tr>
  43. <td><%=idx + 1%></td>
  44. <td><a href="/<%- file.filepath %>" target="_blank"><%=file.file_name%></a></td>
  45. <td><%=file.file_size%></td>
  46. <td>第<%= file.s_order %>期</td>
  47. <td><%=file.upload_time%></td>
  48. <td>
  49. <% if(file.user_id === ctx.session.sessionUser.accountId) { %>
  50. <% if (!ctx.material.curAuditor) { %>
  51. <% if (ctx.material.status === auditConst.status.uncheck && ctx.session.sessionUser.accountId === ctx.material.user_id) { %>
  52. <a href="javascript: void;" class="btn btn-light btn-sm delete-file" title="删除附件" data-attid="<%- file.id %>">
  53. <span class="fa fa-trash text-danger"></span>
  54. </a>
  55. <% } %>
  56. <% if (ctx.material.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === ctx.material.user_id) { %>
  57. <a href="javascript: void;" class="btn btn-light btn-sm delete-file" title="删除附件" data-attid="<%- file.id %>">
  58. <span class="fa fa-trash text-danger"></span>
  59. </a>
  60. <% } %>
  61. <% } else {%>
  62. <% if(ctx.material.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
  63. <a href="javascript: void;" class="btn btn-light btn-sm delete-file" title="删除附件" data-attid="<%- file.id %>">
  64. <span class="fa fa-trash text-danger"></span>
  65. </a>
  66. <% } %>
  67. <% } %>
  68. <% } %>
  69. </td>
  70. </tr>
  71. <% }) %> -->
  72. </tbody>
  73. </table>
  74. <div class="d-flex justify-content-center">
  75. <!--所有附件 翻页-->
  76. <!--
  77. <span id="showPage"><a href="javascript:void(0);" class="page-select" content="pre"><i class="fa fa-chevron-left"></i></a> <span id="currentPage">1</span>/<span id="totalPage">10</span> <a href="javascript:void(0);" class="page-select" content="next"><i class="fa fa-chevron-right"></i></a></span> -->
  78. <nav aria-label="Page navigation example">
  79. <ul id="file-pagination" class="pagination">
  80. <li class="page-item page-back">
  81. <a class="page-link" href="#" aria-label="Previous">
  82. <span aria-hidden="true">&laquo;</span>
  83. </a>
  84. </li>
  85. <!-- <li class="page-item active"><a class="page-link" href="#">1</a></li>
  86. <li class="page-item"><a class="page-link" href="#">2</a></li>
  87. <li class="page-item"><a class="page-link" href="#">3</a></li> -->
  88. <li class="page-item page-next">
  89. <a class="page-link" href="#" aria-label="Next">
  90. <span aria-hidden="true">&raquo;</span>
  91. </a>
  92. </li>
  93. </ul>
  94. </nav>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <script>
  101. const auditors = JSON.parse('<%- JSON.stringify(auditors) %>');
  102. const curAuditor = JSON.parse('<%- JSON.stringify(ctx.material.curAuditor) %>');
  103. const material = JSON.parse('<%- JSON.stringify(ctx.material) %>');
  104. const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
  105. const tid = '<%- ctx.tender.id %>';
  106. const mid = '<%- ctx.material.id %>';
  107. const fileList = JSON.parse('<%- JSON.stringify(fileList) %>');
  108. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  109. </script>