analysis_list.ejs 5.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <% include ./list_sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex">
  5. <% include ./list_sub_mini_menu.ejs %>
  6. <h2>
  7. 收支列表
  8. </h2>
  9. <% if (ctx.permission.cost.analysis_add && (stagelist.length === 0 || stagelist[0].audit_status === auditConst.status.checked)) { %>
  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">期数</th>
  23. <th width="70px">报审月份</th>
  24. <th width="70px">创建人</th>
  25. <th>项目收入</th>
  26. <th>项目支出</th>
  27. <th>利润</th>
  28. <th>利润率</th>
  29. <th width="120px">审批进度</th>
  30. <th width="100px">操作</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <% for (const s of stagelist) { %>
  35. <tr>
  36. <td>
  37. <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/analysis/<%- s.stage_order %>/stage" target="_blank">第 <%- s.stage_order %> 期</a>
  38. </td>
  39. <td class="text-center"><%- s.stage_date %></td>
  40. <td class="text-right"><%- s.pay_tp %></td>
  41. <td class="text-right"><%- s.cut_tp %></td>
  42. <td class="text-right"><%- s.yf_tp %></td>
  43. <td class="text-right"><%- s.sf_tp %></td>
  44. <td class="text-right"><%- s.end_pay_tp %></td>
  45. <td class="text-right"><%- s.end_cut_tp %></td>
  46. <td class="text-right"><%- s.end_yf_tp %></td>
  47. <td class="text-right"><%- s.end_sf_tp %></td>
  48. <td class="<%- auditConst.info[s.audit_status].class %>">
  49. <% if (s.audit_status === auditConst.status.checked && s.final_auditor_str) { %>
  50. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" stage-order="<%- s.stage_order %>"><%- s.final_auditor_str %></a>
  51. <% } else { %>
  52. <% if (s.curAuditors.length > 0) { %>
  53. <% if (s.curAuditors[0].audit_type === auditType.key.common) { %>
  54. <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>
  55. <% } else { %>
  56. <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>
  57. <% } %>
  58. <% } %>
  59. <% } %>
  60. <%- auditConst.info[s.audit_status].title %>
  61. </td>
  62. <td class="text-center">
  63. <% if (s.audit_status === auditConst.status.uncheck && s.create_user_id === ctx.session.sessionUser.accountId) { %>
  64. <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/analysis/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
  65. <% } else if (s.audit_status === auditConst.status.checkNo && s.create_user_id === ctx.session.sessionUser.accountId) { %>
  66. <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/analysis/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
  67. <% } 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) { %>
  68. <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/analysis/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
  69. <% } else { %>
  70. <span class="<%- auditConst.info[s.audit_status].class %>"><%- auditConst.info[s.audit_status].title %></span>
  71. <% } %>
  72. </td>
  73. </tr>
  74. <% } %>
  75. </tbody>
  76. </table>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <script>
  82. const stageList = JSON.parse('<%- JSON.stringify(stageList) %>');
  83. const auditType = JSON.parse('<%- JSON.stringify(auditType) %>');
  84. const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
  85. </script>