file.ejs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. <% if(auditors.includes(ctx.session.sessionUser.accountId)) { %>
  7. <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>
  8. <% } %>
  9. <span class="d-flex align-items-center" style="margin-left: 5px;">
  10. <input type="checkbox" id="file-checkbox">
  11. <span class="text-primary" style="margin-left: 5px;">所有期</span>
  12. </span>
  13. </div>
  14. <div>
  15. <a href="#sub-ap" data-toggle="modal" data-target="#sub-ap" class="btn btn-sm btn-primary pull-right">上报审批</a>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="content-wrap">
  20. <div class="c-body">
  21. <div class="sjs-height-0">
  22. <table class="table table-bordered">
  23. <thead>
  24. <tr><th width="50">序号</th><th>名称</th><th width="90">大小</th><th width="100">上传时间</th><th width="100">操作</th></tr>
  25. </thead>
  26. <tbody id="file-list">
  27. <% fileList.forEach(function(file, idx){ %>
  28. <tr>
  29. <td><%=idx + 1%></td>
  30. <td>
  31. <a href="/<%- file.file_path %>" target="_blank"><%=file.file_name%></a>
  32. </td><td><%=file.file_size%></td>
  33. <td><%=file.upload_time%></td>
  34. <td>
  35. <% if(material.status !== auditConst.status.checked &&
  36. ctx.session.sessionUser.accountId === file.user_id) { %>
  37. <a href="javascript: void;" class="btn btn-light btn-sm delete-file" title="删除附件" data-attid="<%- file.id %>">
  38. <span class="fa fa-trash text-danger"></span>
  39. </a>
  40. <% } %>
  41. </td>
  42. </tr>
  43. <% }) %>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <script>
  51. const curMaterialStatus = <%- material.status %>;
  52. // const auditConstCheck = <%- auditConst.status.checked %>;
  53. const fileList = <%- fileList %>;
  54. const auditors = <%- auditors %>;
  55. </script>