index.ejs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <div class="panel-content">
  2. <div class="panel-title fluid">
  3. <div class="title-main d-flex">
  4. <div class="d-inline-block">
  5. <div class="btn-group group-tab">
  6. <a href="javascript:void(0);" class="btn btn-sm btn-light active">
  7. 项目合同
  8. </a>
  9. <a href="/contract/tender" class="btn btn-sm btn-light">
  10. 标段合同
  11. </a>
  12. </div>
  13. </div>
  14. <div class="d-inline-block mr-2" id="show-level"></div>
  15. </div>
  16. </div>
  17. <div class="content-wrap">
  18. <div class="sjs-height-0" style="background-color: #fff">
  19. <div class="c-body">
  20. <% if (!projectList || projectList.length === 0) { %>
  21. <div class="jumbotron" id="no-project">
  22. <h3 class="display-6">还没有项目数据</h3>
  23. </div>
  24. <% } else { %>
  25. <table class="table table-bordered">
  26. <tr class="text-center">
  27. <th style="min-width: 200px" rowspan="2">项目名称</th>
  28. <th width="10%" rowspan="2">创建时间</th>
  29. <th colspan="3">支出合同</th>
  30. <th colspan="3">收入合同</th>
  31. <% if (ctx.session.sessionUser.is_admin) { %>
  32. <th width="10%" rowspan="2">操作</th>
  33. <% } %>
  34. </tr>
  35. <tr class="text-center">
  36. <th width="6%">合同个数</th>
  37. <th width="10%">合同金额</th>
  38. <th width="15%">支出进度</th>
  39. <th width="6%">合同个数</th>
  40. <th width="10%">合同金额</th>
  41. <th width="15%">回款进度</th>
  42. </tr>
  43. <tbody id="projectList">
  44. </tbody>
  45. </table>
  46. <% } %>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. <script>
  52. const projectList = JSON.parse(unescape('<%- escape(JSON.stringify(projectList)) %>'));
  53. console.log(projectList);
  54. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  55. const is_admin = <%- ctx.session.sessionUser.is_admin %>;
  56. </script>