audit_modal.ejs 5.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <% if (ctx.phasePay && (ctx.phasePay.audit_status === auditConst.status.uncheck || ctx.phasePay.audit_status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
  2. <!--上报审批-->
  3. <div class="modal fade" id="audit-start" data-backdrop="static">
  4. <div class="modal-dialog" role="document">
  5. <div class="modal-content">
  6. <div class="modal-header">
  7. <h5 class="modal-title">上报审批</h5>
  8. </div>
  9. <div class="modal-body">
  10. <div class="dropdown text-right">
  11. <% if (ctx.tender.info.shenpi.phasePay !== shenpiConst.sp_status.gdspl && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
  12. <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
  13. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  14. 添加审批流程
  15. </button>
  16. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton" style="width:220px">
  17. <div class="mb-2 p-2"><input class="form-control form-control-sm" placeholder="姓名/手机 检索"
  18. id="gr-search" autocomplete="off"></div>
  19. <dl class="list-unstyled book-list" id="book-list">
  20. <% accountGroup.forEach((group, idx) => { %>
  21. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
  22. data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  23. <div class="dd-content" data-toggleid="<%- idx %>">
  24. <% group.groupList.forEach(item => { %>
  25. <% if (item.id !== ctx.session.sessionUser.accountId) { %>
  26. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
  27. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  28. class="ml-auto"><%- item.mobile %></span></p>
  29. <span class="text-muted"><%- item.role %></span>
  30. </dd>
  31. <% } %>
  32. <% })%>
  33. </div>
  34. <% }) %>
  35. </dl>
  36. </div>
  37. <% } %>
  38. </div>
  39. <div class="card mt-3">
  40. <div class="card-header">
  41. 审批流程
  42. </div>
  43. <div class="modal-height-500" style="overflow: auto">
  44. <ul class="list-group list-group-flush" id="auditors">
  45. <% for (let i = 0, iLen = ctx.phasePay.auditorGroups.length; i < iLen; i++) { %>
  46. <li class="list-group-item d-flex" auditorId="<%- ctx.phasePay.auditorGroups[i][0].aid %>">
  47. <div class="col-auto"><%- i+1 %></div>
  48. <div class="col">
  49. <% for (const auditor of ctx.phasePay.auditorGroups[i]) { %>
  50. <div class="d-inline-block mx-1" auditorId="<%- auditor.audit_id %>">
  51. <i class="fa fa-user text-muted"></i> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small>
  52. </div>
  53. <% } %>
  54. </div>
  55. <div class="col-auto">
  56. <% if (ctx.phasePay.auditorGroups[i][0].audit_type !== auditType.key.common) { %>
  57. <span class="badge badge-pill badge-<%- auditType.info[ctx.phasePay.auditorGroups[i][0].audit_type].class %> badge-bg-small"><small><%- auditType.info[ctx.phasePay.auditorGroups[i][0].audit_type].long%></small></span>
  58. <% } %>
  59. <% if ((ctx.tender.info.shenpi.phasePay === shenpiConst.sp_status.sqspr ||
  60. (ctx.tender.info.shenpi.phasePay === shenpiConst.sp_status.gdzs && i+1 !== iLen)) && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
  61. <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
  62. <% } %>
  63. </div>
  64. </li>
  65. <% } %>
  66. </ul>
  67. </div>
  68. </div>
  69. </div>
  70. <form class="modal-footer" method="post" action="audit/start" name="stage-start">
  71. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  72. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
  73. <% if (ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
  74. <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
  75. <% } %>
  76. </form>
  77. </div>
  78. </div>
  79. </div>
  80. <% } %>
  81. <script>
  82. const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
  83. const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
  84. const shenpi_status = <%- ctx.tender.info.shenpi.phasePay %>;
  85. const shenpiConst = JSON.parse('<%- JSON.stringify(shenpiConst) %>');
  86. </script>