file.ejs 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. <div style="margin-left: 20px;">
  11. <!--所有附件 翻页-->
  12. <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>
  13. </div>
  14. </span>
  15. </div>
  16. </div>
  17. </div>
  18. <div class="content-wrap">
  19. <div class="c-body">
  20. <div class="sjs-height-0">
  21. <table class="table table-bordered">
  22. <thead>
  23. <tr>
  24. <th width="50">序号</th>
  25. <th>名称</th>
  26. <th width="90">大小</th>
  27. <th width="90">调差期</th>
  28. <th width="150">上传时间</th>
  29. <th width="100">操作</th>
  30. </tr>
  31. </thead>
  32. <tbody id="file-list">
  33. <!-- <% fileList.filter(file => file.mid === ctx.material.id).forEach(function(file, idx){ %>
  34. <tr>
  35. <td><%=idx + 1%></td>
  36. <td><a href="/<%- file.filepath %>" target="_blank"><%=file.file_name%></a></td>
  37. <td><%=file.file_size%></td>
  38. <td>第<%= file.s_order %>期</td>
  39. <td><%=file.upload_time%></td>
  40. <td>
  41. <% if(file.user_id === ctx.session.sessionUser.accountId) { %>
  42. <% if (!ctx.material.curAuditor) { %>
  43. <% if (ctx.material.status === auditConst.status.uncheck && ctx.session.sessionUser.accountId === ctx.material.user_id) { %>
  44. <a href="javascript: void;" class="btn btn-light btn-sm delete-file" title="删除附件" data-attid="<%- file.id %>">
  45. <span class="fa fa-trash text-danger"></span>
  46. </a>
  47. <% } %>
  48. <% if (ctx.material.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === ctx.material.user_id) { %>
  49. <a href="javascript: void;" class="btn btn-light btn-sm delete-file" title="删除附件" data-attid="<%- file.id %>">
  50. <span class="fa fa-trash text-danger"></span>
  51. </a>
  52. <% } %>
  53. <% } else {%>
  54. <% if(ctx.material.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
  55. <a href="javascript: void;" class="btn btn-light btn-sm delete-file" title="删除附件" data-attid="<%- file.id %>">
  56. <span class="fa fa-trash text-danger"></span>
  57. </a>
  58. <% } %>
  59. <% } %>
  60. <% } %>
  61. </td>
  62. </tr>
  63. <% }) %> -->
  64. </tbody>
  65. </table>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <script>
  71. const auditors = JSON.parse('<%- JSON.stringify(auditors) %>');
  72. const curAuditor = JSON.parse('<%- JSON.stringify(ctx.material.curAuditor) %>');
  73. const material = JSON.parse('<%- JSON.stringify(ctx.material) %>');
  74. const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
  75. const cur_uid = '<%- ctx.session.sessionUser.accountId %>';
  76. const tid = '<%- ctx.tender.id %>';
  77. const mid = '<%- ctx.material.id %>';
  78. const fileList = JSON.parse('<%- JSON.stringify(fileList) %>');
  79. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  80. </script>