stage.ejs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <% include ../tender/tender_sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex justify-content-between">
  5. <h2>
  6. 期列表
  7. </h2>
  8. <div>
  9. <% if (ctx.session.sessionUser.accountId === ctx.tender.data.user_id && ctx.tender.data.ledger_status === auditConst.status.checked &&
  10. (stages.length === 0 || stages[0].status === auditConst.status.checked)) { %>
  11. <a href="#add-qi" data-toggle="modal" data-target="#add-qi" class="btn btn-primary btn-sm pull-right">开始新一期</a>
  12. <% } %>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="content-wrap">
  17. <div class="c-body">
  18. <table class="table table-bordered">
  19. <thead>
  20. <tr>
  21. <th>期数</th>
  22. <th class="text-center">计量月份</th>
  23. <th class="text-center">本期合同计量</th>
  24. <th class="text-center">本期数量变更计量</th>
  25. <th class="text-center">本期完成计量</th>
  26. <th class="text-center">截止上期完成计量</th>
  27. <th class="text-center">截止本期完成计量</th>
  28. <th class="text-center">审批进度</th>
  29. <th class="text-center">操作</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. <% for (const s of stages) { %>
  34. <tr>
  35. <td>
  36. <a href="<%- '/tender/' + ctx.tender.id + '/measure/stage/' + s.order %>">第 <%- s.order %> 期</a>
  37. <% if (s.status === auditConst.status.uncheck && s.user_id === ctx.session.sessionUser.accountId) { %>
  38. <a href="#edit" data-toggle="modal" data-target="#edit"><i class="fa fa-pencil-square-o "></i></a>
  39. <% } %>
  40. </td>
  41. <td class="text-center"><%- s.s_time %></td>
  42. <td class="text-right"><%- (s.contract_tp ? s.contract_tp : '')%></td>
  43. <td class="text-right"><%- (s.qc_tp ? s.qc_tp : '')%></td>
  44. <td class="text-right"><%- (s.tp ? s.tp : '')%></td>
  45. <td class="text-right"><%- (s.pre_tp ? s.pre_tp : '')%></td>
  46. <td class="text-right"><%- (s.end_tp ? s.end_tp : '')%></td>
  47. <td class="<%- auditConst.auditProgressClass[s.status] %>">
  48. <% if (s.curAuditor) { %>
  49. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" s-order="<%- s.order %>"><%- s.curAuditor.name %><%if (s.curAuditor.role !== '' && s.curAuditor.role !== null) { %>-<%- s.curAuditor.role %><% } %></a>
  50. <% } %>
  51. <%- auditConst.auditProgress[s.status] %>
  52. </td>
  53. <td class="text-center">
  54. <% if (s.status === auditConst.status.uncheck && s.user_id === ctx.session.sessionUser.accountId) { %>
  55. <a href="<%- '/tender/' + ctx.tender.id + '/measure/stage/' + s.order %>" class="btn <%- auditConst.statusButtonClass[s.status] %> btn-sm"><%- auditConst.statusButton[s.status] %></a>
  56. <% } else if (s.status === auditConst.status.checkNo && s.curAuditor && s.user_id === ctx.session.sessionUser.accountId) { %>
  57. <a href="<%- '/tender/' + ctx.tender.id + '/measure/stage/' + s.order %>" class="btn <%- auditConst.statusButtonClass[s.status] %> btn-sm"><%- auditConst.statusButton[s.status] %></a>
  58. <% } else if (s.status === auditConst.status.checking && s.curAuditor && s.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
  59. <a href="<%- '/tender/' + ctx.tender.id + '/measure/stage/' + s.order %>" class="btn <%- auditConst.statusButtonClass[s.status] %> btn-sm"><%- auditConst.statusButton[s.status] %></a>
  60. <% } else if (s.status === auditConst.status.checkNoPre && s.curAuditor && s.curAuditor2.aid === ctx.session.sessionUser.accountId) { %>
  61. <a href="<%- '/tender/' + ctx.tender.id + '/measure/stage/' + s.order %>" class="btn <%- auditConst.statusButtonClass[s.status] %> btn-sm"><%- auditConst.statusButton[s.status] %></a>
  62. <% } else { %>
  63. <span class="<%- auditConst.auditStringClass[s.status] %>"><%- auditConst.auditString[s.status] %></span>
  64. <% } %>
  65. <% if (s.user_id === ctx.session.sessionUser.accountId && s.order === stages.length) { %>
  66. <a href="#del-qi" class="btn btn-outline-danger btn-sm ml-1" data-toggle="modal" data-target="#del-qi">删除</a>
  67. <% } %>
  68. </td>
  69. </tr>
  70. <% } %>
  71. </tbody>
  72. </table>
  73. </div>
  74. </div>
  75. </div>
  76. <script>
  77. const stages = JSON.parse('<%- JSON.stringify(stages) %>');
  78. </script>