book_list.ejs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <% include ./list_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex">
  5. <% include ./list_mini_menu.ejs %>
  6. <h2>
  7. 审批列表
  8. </h2>
  9. <% if (ctx.permission.cost.book_add && (stages.length === 0 || stages[0].audit_status === auditConst.status.checked) && validLedgerStages.length > 0) { %>
  10. <div class="ml-auto">
  11. <a href="#add-qi" data-toggle="modal" data-target="#add-qi" class="btn btn-primary btn-sm">新建报审</a>
  12. </div>
  13. <% } %>
  14. </div>
  15. </div>
  16. <div class="content-wrap">
  17. <div class="c-body">
  18. <div class="sjs-height-0">
  19. <table class="table table-bordered table-hover">
  20. <thead>
  21. <tr class="text-center">
  22. <th width="80px" rowspan="2">期数</th>
  23. <th width="70px" rowspan="2">报审月份</th>
  24. <th width="70px" rowspan="2">关联成本</th>
  25. <th width="70px" rowspan="2">创建人</th>
  26. <th width="120px" colspan="4">本期</th>
  27. <th width="120px" colspan="4">截止本期</th>
  28. <th rowspan="2">审批进度</th>
  29. <th width="100px" rowspan="2">操作</th>
  30. </tr>
  31. <tr class="text-center">
  32. <th width="130px">应付金额</th>
  33. <th width="130px">实付金额</th>
  34. <th width="130px">入账金额</th>
  35. <th width="130px">入账金额(不含税)</th>
  36. <th width="130px">应付金额</th>
  37. <th width="130px">实付金额</th>
  38. <th width="130px">入账金额</th>
  39. <th width="130px">入账金额(不含税)</th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <% for (const s of stages) { %>
  44. <tr>
  45. <td>
  46. <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/book/<%- s.stage_order %>/stage" target="_blank">第 <%- s.stage_order %> 期</a>
  47. </td>
  48. <td class="text-center"><%- s.stage_date %></td>
  49. <td class="text-center">第<%- s.rela_stage.sorder %>期</td>
  50. <td class="text-center"><%- s.user_name %></td>
  51. <td class="text-right"><%- s.relaStage.stage_tp.yf_tp %></td>
  52. <td class="text-right"><%- s.relaStage.stage_tp.sf_tp %></td>
  53. <td class="text-right"><%- s.stage_tp.in_tp %></td>
  54. <td class="text-right"><%- s.stage_tp.in_excl_tax_tp %></td>
  55. <td class="text-right"><%- s.relaStage.stage_end_tp.yf_tp %></td>
  56. <td class="text-right"><%- s.relaStage.stage_end_tp.sf_tp %></td>
  57. <td class="text-right"><%- s.stage_end_tp.in_tp %></td>
  58. <td class="text-right"><%- s.stage_end_tp.in_excl_tax_tp %></td>
  59. <td class="<%- auditConst.info[s.audit_status].class %>">
  60. <% if (s.audit_status === auditConst.status.checked && s.final_auditor_str) { %>
  61. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" stage-order="<%- s.stage_order %>"><%- s.final_auditor_str %></a>
  62. <% } else { %>
  63. <% if (s.curAuditors.length > 0) { %>
  64. <% if (s.curAuditors[0].audit_type === auditType.key.common) { %>
  65. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" stage-order="<%- s.stage_order %>"><%- s.curAuditors[0].name %><%if (s.curAuditors[0].role !== '' && s.curAuditors[0].role !== null) { %>-<%- s.curAuditors[0].role %><% } %></a>
  66. <% } else { %>
  67. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" stage-order="<%- s.stage_order %>"><%- ctx.helper.transFormToChinese(s.curAuditors[0].audit_order) + '审' %></a>
  68. <% } %>
  69. <% } %>
  70. <% } %>
  71. <%- auditConst.info[s.audit_status].title %>
  72. </td>
  73. <td class="text-center">
  74. <% if (s.audit_status === auditConst.status.uncheck && s.create_user_id === ctx.session.sessionUser.accountId) { %>
  75. <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/book/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
  76. <% } else if (s.audit_status === auditConst.status.checkNo && s.create_user_id === ctx.session.sessionUser.accountId) { %>
  77. <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/book/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
  78. <% } else if ((s.audit_status === auditConst.status.checking || s.audit_status === auditConst.status.checkNoPre) && s.curAuditors && s.curAuditors.findIndex(x => { return x.audit_id === ctx.session.sessionUser.accountId; }) >= 0) { %>
  79. <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/book/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
  80. <% } else { %>
  81. <span class="<%- auditConst.info[s.audit_status].class %>"><%- auditConst.info[s.audit_status].title %></span>
  82. <% } %>
  83. </td>
  84. </tr>
  85. <% } %>
  86. </tbody>
  87. </table>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <script>
  93. const stages = JSON.parse('<%- JSON.stringify(stages) %>');
  94. const auditType = JSON.parse('<%- JSON.stringify(auditType) %>');
  95. const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
  96. </script>