file.ejs 4.9 KB

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