manager.ejs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <% include ./stage_sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex">
  5. <% include ./stage_sub_mini_menu.ejs %>
  6. <div>
  7. 第<%- ctx.stage.order %>期
  8. </div>
  9. </div>
  10. </div>
  11. <div class="content-wrap">
  12. <div class="sjs-height-0">
  13. <div class="c-body">
  14. <% if (lastStage) { %>
  15. <% for (let i = lastStage.order; i > 0; i--) { %>
  16. <% if (i === lastStage.order && lastStage.status !== auditConst.status.uncheck) { %>
  17. <table class="table table-bordered">
  18. <thead>
  19. <tr><th>第<%- lastStage.order %>期</th></tr>
  20. </thead>
  21. <tr>
  22. <td>
  23. <% for (const la in lastAuditList) { %>
  24. <table class="table table-bordered table-hover">
  25. <thead>
  26. <tr><th colspan="5"><%- lastAuditList[la][0].auditors[0].times %>#
  27. <% if (parseInt(la) === 0) { %>
  28. <% if (lastStage.times === 1 || (lastStage.times === 2 && lastStage.status === auditConst.status.checkNo)) { %>
  29. <a href="#del-qi" data-toggle="modal" class="btn btn-sm btn-light pull-right text-danger">删除本期</a>
  30. <% } else { %>
  31. <a href="#del" data-toggle="modal" class="btn btn-sm btn-light pull-right text-danger">删除本次审批</a>
  32. <% } %>
  33. <% if (lastStage.status === auditConst.status.checked) { %>
  34. <a href="#pass" data-toggle="modal" class="btn btn-sm btn-warning pull-right mr-2">设置终审审批</a>
  35. <% } %>
  36. <% } %>
  37. </th></tr>
  38. </thead>
  39. <tbody>
  40. <tr>
  41. <th width="10%">审批流程</th>
  42. <th width="25%">审批人</th>
  43. <th width="15%">审批状态</th>
  44. <th>审批意见</th>
  45. </tr>
  46. <% for (const group of lastAuditList[la]) { %>
  47. <tr>
  48. <td>
  49. <% if (group.is_final) { %>终<% } else { %><%- group.audit_order %><% } %>审
  50. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %>"><%- auditType.info[group.audit_type].short %></span><% } %>
  51. </td>
  52. <td>
  53. <% for (const audit of group.auditors) { %>
  54. <div class="d-inline-block mr-2">
  55. <%- audit.name %><% if (audit.role) { %>(<%- audit.role %>)<% } %><p class="text-muted m-0"><%- audit.company %></p>
  56. </div>
  57. <% } %>
  58. </td>
  59. <td>
  60. <% if (group.status === auditConst.status.checkNo) { %>
  61. <span class="text-danger">退回原报</span>
  62. <% } else { %>
  63. <span class="<%- auditConst.auditStringClass[group.status] %>"><% if (group.status !== auditConst.status.uncheck) { %><%- auditConst.auditProgress[group.status] %><% } %></span>
  64. <% } %>
  65. <p class="text-muted m-0"><% if (group.status !== auditConst.status.uncheck && group.status !== auditConst.status.checking) { %><%- group.end_time.toLocaleDateString() %><% } %></p></td>
  66. <td>
  67. <% for (const audit of group.auditors) { %>
  68. <%- audit.opinion %>
  69. <% } %>
  70. </td>
  71. </tr>
  72. <% } %>
  73. <tr>
  74. <td>原报</td>
  75. <td><%- lastStageUser.name %><% if (lastStageUser.role) { %>(<%- lastStageUser.role %>)<% } %><p class="text-muted m-0"><%- lastStageUser.company %></p></td>
  76. <td><span>上报</span><p class="text-muted m-0"><%- lastAuditList[la][lastAuditList[la].length - 1].begin_time.toLocaleDateString() %></p></td>
  77. <td></td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. <% } %>
  82. </td>
  83. </tr>
  84. </table>
  85. <% } else { %>
  86. <table class="table table-bordered">
  87. <thead>
  88. <tr><th>第<%- i %>期</th></tr>
  89. </thead>
  90. <tr><td class="text-center text-muted"><% if (i === lastStage.order && lastStage.status !== auditConst.status.checked) { %><%- auditConst.statusString[lastStage.status] %><% } else { %>需处理前一期后,再进行管理<% } %></td></tr>
  91. </table>
  92. <% } %>
  93. <% } %>
  94. <% } %>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <script type="text/javascript">
  100. autoFlashHeight();
  101. $(function () {
  102. $.subMenu({
  103. menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
  104. toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
  105. key: 'menu.1.0.0',
  106. miniHint: '#sub-mini-hint', hintKey: 'menu.hint.1.0.1',
  107. callback: function (info) {
  108. if (info.mini) {
  109. $('.panel-title').addClass('fluid');
  110. $('#sub-menu').removeClass('panel-sidebar');
  111. } else {
  112. $('.panel-title').removeClass('fluid');
  113. $('#sub-menu').addClass('panel-sidebar');
  114. }
  115. autoFlashHeight();
  116. }
  117. });
  118. })
  119. </script>