|
@@ -1,6 +1,6 @@
|
|
|
<% 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) { %>
|
|
|
<!--上报审批-->
|
|
|
-<div class="modal fade" id="audit-start" data-backdrop="static">
|
|
|
+<div class="modal fade" id="sub-sp" data-backdrop="static">
|
|
|
<div class="modal-dialog" role="document">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
@@ -29,7 +29,7 @@
|
|
|
<span class="text-muted"><%- item.role %></span>
|
|
|
</dd>
|
|
|
<% } %>
|
|
|
- <% })%>
|
|
|
+ <% });%>
|
|
|
</div>
|
|
|
<% }) %>
|
|
|
</dl>
|
|
@@ -43,8 +43,9 @@
|
|
|
<div class="modal-height-500" style="overflow: auto">
|
|
|
<ul class="list-group list-group-flush" id="auditors">
|
|
|
<% for (let i = 0, iLen = ctx.phasePay.auditorGroups.length; i < iLen; i++) { %>
|
|
|
- <li class="list-group-item d-flex" auditorId="<%- ctx.phasePay.auditorGroups[i][0].aid %>">
|
|
|
- <div class="col-auto"><%- i+1 %></div>
|
|
|
+ <% if (ctx.phasePay.auditorGroups[i][0].audit_order === 0) continue; %>
|
|
|
+ <li class="list-group-item d-flex" auditorId="<%- ctx.phasePay.auditorGroups[i][0].audit_id %>">
|
|
|
+ <div class="col-auto"><%- ctx.phasePay.auditorGroups[i][0].audit_order %></div>
|
|
|
<div class="col">
|
|
|
<% for (const auditor of ctx.phasePay.auditorGroups[i]) { %>
|
|
|
<div class="d-inline-block mx-1" auditorId="<%- auditor.audit_id %>">
|
|
@@ -57,7 +58,7 @@
|
|
|
<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>
|
|
|
<% } %>
|
|
|
<% if ((ctx.tender.info.shenpi.phasePay === shenpiConst.sp_status.sqspr ||
|
|
|
- (ctx.tender.info.shenpi.phasePay === shenpiConst.sp_status.gdzs && i+1 !== iLen)) && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
|
|
|
+ (ctx.tender.info.shenpi.phasePay === shenpiConst.sp_status.gdzs && i+1 !== iLen)) && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id && !ctx.tender.isTourist) { %>
|
|
|
<a href="javascript: void(0)" class="text-danger pull-right">移除</a>
|
|
|
<% } %>
|
|
|
</div>
|
|
@@ -67,7 +68,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <form class="modal-footer" method="post" action="audit/start" name="stage-start">
|
|
|
+ <form class="modal-footer" method="post" action="audit/start" name="phase-start">
|
|
|
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
<input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
|
|
|
<% if (ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
|
|
@@ -78,9 +79,786 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<% } %>
|
|
|
+<% if(ctx.phasePay && (ctx.phasePay.audit_status !== auditConst.status.uncheck)) { %>
|
|
|
+<!--审批流程/结果-->
|
|
|
+<div class="modal fade" id="sp-list" data-backdrop="static">
|
|
|
+ <div class="modal-dialog modal-lg" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">审批流程</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-4">
|
|
|
+ <% if(ctx.phasePay.audit_status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
|
|
|
+ <a class="sp-list-item" href="#sub-sp" data-toggle="modal" data-target="#sub-sp"
|
|
|
+ id="hideSp">修改审批流程</a>
|
|
|
+ <% } else if(ctx.phasePay.audit_status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
|
|
|
+ <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2"
|
|
|
+ id="hideSp">修改审批流程</a>
|
|
|
+ <% } %>
|
|
|
+ <div class="card modal-height-500 mt-3" style="overflow: auto">
|
|
|
+ <ul class="list-group list-group-flush auditors-list" id="auditors-list">
|
|
|
+ <% ctx.phasePay.userGroups.forEach((item, idx) => { %>
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <li class="list-group-item d-flex justify-content-between align-items-center">
|
|
|
+ <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
|
|
|
+ <span class="text-muted">
|
|
|
+ <% for (const u of item) { %>
|
|
|
+ <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
|
|
|
+ <% } %>
|
|
|
+ </span>
|
|
|
+ <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
|
|
|
+ </li>
|
|
|
+ <% } else if(idx === ctx.phasePay.userGroups.length -1 && idx !== 0) { %>
|
|
|
+ <li class="list-group-item d-flex justify-content-between align-items-center">
|
|
|
+ <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
|
|
|
+ <span class="text-muted">
|
|
|
+ <% for (const u of item) { %>
|
|
|
+ <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
|
|
|
+ <% } %>
|
|
|
+ </span>
|
|
|
+ <div class="d-flex ml-auto">
|
|
|
+ <% if (item[0].audit_type !== auditType.key.common) { %>
|
|
|
+ <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
|
|
|
+ <% } %>
|
|
|
+ <span class="badge badge-light badge-pill"><small>终审</small></span>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% } else {%>
|
|
|
+ <li class="list-group-item d-flex justify-content-between align-items-center">
|
|
|
+ <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
|
|
|
+ <span class="text-muted">
|
|
|
+ <% for (const u of item) { %>
|
|
|
+ <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
|
|
|
+ <% } %>
|
|
|
+ </span>
|
|
|
+ <div class="d-flex ml-auto">
|
|
|
+ <% if (item[0].audit_type !== auditType.key.common) { %>
|
|
|
+ <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
|
|
|
+ <% } %>
|
|
|
+ <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% } %>
|
|
|
+ <% }) %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-8 modal-height-500" style="overflow: auto">
|
|
|
+ <% ctx.phasePay.auditHistory.forEach((his, idx) => { %>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>
|
|
|
+ <div class="text-right">
|
|
|
+ <a href="javascript: void(0);" id="fold-btn" data-target="show" >展开历史审批流程</a>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <div class="<%- idx < ctx.phasePay.auditHistory.length - 1 ? 'fold-card' : '' %>">
|
|
|
+ <div class="text-center text-muted"><%- idx+1 %>#</div>
|
|
|
+ <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>last-auditor-list<% } %>">
|
|
|
+ <% his.forEach((group, index) => { %>
|
|
|
+ <li class="timeline-list-item pb-2 <% if (group.audit_status === auditConst.status.uncheck && idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>is_uncheck<% } %>">
|
|
|
+ <% if (group.auditYear) { %>
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- group.auditYear %>
|
|
|
+ <span><%- group.auditDate %></span>
|
|
|
+ <span><%- group.auditTime %></span>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <% if (index < his.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if (group.audit_order === 0) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checkNo || group.audit_status === auditConst.status.checkNoPre || group.audit_status === auditConst.status.checkCancel) { %>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checking) { %>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
|
|
|
+ <% } else { %>
|
|
|
+ <div class="timeline-item-icon bg-secondary text-light"></div>
|
|
|
+ <% } %>
|
|
|
+ <div class="timeline-item-content">
|
|
|
+ <div class="py-1">
|
|
|
+ <span class="text-black-50">
|
|
|
+ <%- group.auditName %>
|
|
|
+ <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
|
|
|
+ </span>
|
|
|
+ <% if (group.audit_order === 0) { %>
|
|
|
+ <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ <% } else if (group.audit_status !== auditConst.status.uncheck) { %>
|
|
|
+ <span class="pull-right <%- auditConst.statusClass[group.audit_status] %>"><%- auditConst.statusString[group.audit_status] %></span>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-body px-3 py-0">
|
|
|
+ <% for (const [i, auditor] of group.auditors.entries()) { %>
|
|
|
+ <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
|
|
|
+ <div class="col">
|
|
|
+ <span class="h6"><%- auditor.name %></span>
|
|
|
+ <span class="text-muted ml-1"><%- auditor.role %></span>
|
|
|
+ </div>
|
|
|
+ <div class="col">
|
|
|
+ <% if (auditor.audit_status === auditConst.status.checked) { %>
|
|
|
+ <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
|
|
|
+ <% } if (auditor.audit_status === auditConst.status.checkNo || auditor.audit_status === auditConst.status.checkNoPre || auditor.audit_status === auditConst.status.checkCancel) { %>
|
|
|
+ <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <% if (auditor.opinion) { %>
|
|
|
+ <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% }) %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <% }) %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <form class="modal-footer" method="post" action="audit/start" name="phase-start">
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
+ <% if(ctx.phasePay.audit_status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
|
|
|
+ <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
|
|
|
+ <% } %>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% } %>
|
|
|
+<% if (ctx.phasePay && (ctx.phasePay.audit_status === auditConst.status.checking || ctx.phasePay.audit_status === auditConst.status.checkNoPre) && ctx.phasePay.curAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0) { %>
|
|
|
+<!--审批通过-->
|
|
|
+<div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
|
|
|
+ <div class="modal-dialog modal-lg" role="document">
|
|
|
+ <form class="modal-content" action="audit/check" method="post" id="audit-check">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">审批通过</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-4">
|
|
|
+ <% if(ctx.phasePay.audit_status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
|
|
|
+ <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" id="hideSp">修改审批流程</a>
|
|
|
+ <% } %>
|
|
|
+ <div class="card modal-height-500 mt-3" style="overflow: auto">
|
|
|
+ <ul class="list-group list-group-flush auditors-list">
|
|
|
+ <% ctx.phasePay.userGroups.forEach((item, idx) => { %>
|
|
|
+ <li class="list-group-item d-flex justify-content-between align-items-center">
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
|
|
|
+ <% } else if (idx === ctx.phasePay.userGroups.length -1 && idx !== 0) { %>
|
|
|
+ <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
|
|
|
+ <% } else { %>
|
|
|
+ <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
|
|
|
+ <% } %>
|
|
|
+ <span class="text-muted">
|
|
|
+ <% for (const u of item) { %>
|
|
|
+ <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
|
|
|
+ <% } %>
|
|
|
+ </span>
|
|
|
+ <div class="d-flex ml-auto">
|
|
|
+ <% if (item[0].audit_type !== auditType.key.common) { %>
|
|
|
+ <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
|
|
|
+ <% } %>
|
|
|
+ <span class="badge badge-light badge-pill"><small><%- item.auditName %></small></span>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% }) %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-8 modal-height-500" style="overflow: auto">
|
|
|
+ <% ctx.phasePay.auditHistory.forEach((his, idx) => { %>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>
|
|
|
+ <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a></div>
|
|
|
+ <% } %>
|
|
|
+ <div class="<%- idx < ctx.phasePay.auditHistory.length - 1 ? 'fold-card' : '' %>">
|
|
|
+ <div class="text-center text-muted"><%- idx+1 %>#</div>
|
|
|
+ <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>last-auditor-list<% } %>">
|
|
|
+ <% his.forEach((group, index) => { %>
|
|
|
+ <li class="timeline-list-item pb-2 <% if (group.audit_status === auditConst.status.uncheck && idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>is_uncheck<% } %>">
|
|
|
+ <% if (group.auditYear) { %>
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- group.auditYear %>
|
|
|
+ <span><%- group.auditDate %></span>
|
|
|
+ <span><%- group.auditTime %></span>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <% if (index < his.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if (group.audit_order === 0) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checkNo || group.audit_status === auditConst.status.checkNoPre || group.audit_status === auditConst.status.checkCancel) { %>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checking) { %>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
|
|
|
+ <% } else { %>
|
|
|
+ <div class="timeline-item-icon bg-secondary text-light"></div>
|
|
|
+ <% } %>
|
|
|
+ <div class="timeline-item-content">
|
|
|
+ <div class="py-1">
|
|
|
+ <span class="text-black-50">
|
|
|
+ <%- group.auditName %>
|
|
|
+ <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
|
|
|
+ </span>
|
|
|
+ <% if (group.audit_order === 0) { %>
|
|
|
+ <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ <% } else if (group.audit_status !== auditConst.status.uncheck) { %>
|
|
|
+ <span class="pull-right <%- auditConst.statusClass[group.audit_status] %>"><%- auditConst.statusString[group.audit_status] %></span>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-body px-3 py-0">
|
|
|
+ <% for (const [i, auditor] of group.auditors.entries()) { %>
|
|
|
+ <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
|
|
|
+ <div class="col">
|
|
|
+ <span class="h6"><%- auditor.name %></span>
|
|
|
+ <span class="text-muted ml-1"><%- auditor.role %></span>
|
|
|
+ </div>
|
|
|
+ <div class="col">
|
|
|
+ <% if (auditor.audit_status === auditConst.status.checked) { %>
|
|
|
+ <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
|
|
|
+ <% } if (auditor.audit_status === auditConst.status.checkNo || auditor.audit_status === auditConst.status.checkNoPre || auditor.audit_status === auditConst.status.checkCancel) { %>
|
|
|
+ <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
|
|
|
+ <% } else if (auditor.audit_status === auditConst.status.checking) { %>
|
|
|
+ <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <% if (auditor.audit_status !== auditConst.status.uncheck && auditor.opinion) { %>
|
|
|
+ <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
|
|
|
+ <% } %>
|
|
|
+ <% if (auditor.audit_status === auditConst.status.checking && auditor.audit_id === ctx.session.sessionUser.accountId) { %>
|
|
|
+ <div class="col-12 py-1 bg-light">
|
|
|
+ <textarea class="form-control form-control-sm" name="opinion">同意</textarea>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% }) %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <% }) %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
|
|
|
+ <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
|
|
|
+ <button type="submit" class="btn btn-success btn-sm">确认通过</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<!--审批退回-->
|
|
|
+<div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
|
|
|
+ <div class="modal-dialog modal-lg" role="document">
|
|
|
+ <form class="modal-content modal-lg" action="audit/check" method="post" id="audit-check-no">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">审批退回</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-4">
|
|
|
+ <% if(ctx.phasePay.audit_status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
|
|
|
+ <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" id="hideSp">修改审批流程</a>
|
|
|
+ <% } %>
|
|
|
+ <div class="card modal-height-500 mt-3" style="overflow: auto">
|
|
|
+ <ul class="list-group list-group-flush auditors-list">
|
|
|
+ <% ctx.phasePay.userGroups.forEach((item, idx) => { %>
|
|
|
+ <li class="list-group-item d-flex justify-content-between align-items-center">
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
|
|
|
+ <% } else if (idx === ctx.phasePay.userGroups.length -1 && idx !== 0) { %>
|
|
|
+ <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
|
|
|
+ <% } else { %>
|
|
|
+ <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
|
|
|
+ <% } %>
|
|
|
+ <span class="text-muted">
|
|
|
+ <% for (const u of item) { %>
|
|
|
+ <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
|
|
|
+ <% } %>
|
|
|
+ </span>
|
|
|
+ <div class="d-flex ml-auto">
|
|
|
+ <% if (item[0].audit_type !== auditType.key.common) { %>
|
|
|
+ <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
|
|
|
+ <% } %>
|
|
|
+ <span class="badge badge-light badge-pill"><small><%- item.auditName %></small></span>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% }) %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-8 modal-height-500" style="overflow: auto">
|
|
|
+ <% ctx.phasePay.auditHistory.forEach((his, idx) => { %>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>
|
|
|
+ <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show" data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
|
|
|
+ <% } %>
|
|
|
+ <div class="<%- idx < ctx.phasePay.auditHistory.length - 1 ? 'fold-card' : '' %>">
|
|
|
+ <div class="text-center text-muted"><%- idx+1 %>#</div>
|
|
|
+ <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>last-auditor-list<% } %>">
|
|
|
+ <% his.forEach((group, index) => { %>
|
|
|
+ <li class="timeline-list-item pb-2 <% if (group.audit_status === auditConst.status.uncheck && idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>is_uncheck<% } %>">
|
|
|
+ <% if (group.auditYear) { %>
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- group.auditYear %>
|
|
|
+ <span><%- group.auditDate %></span>
|
|
|
+ <span><%- group.auditTime %></span>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <% if (index < his.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if (group.audit_order === 0) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checkNo || group.audit_status === auditConst.status.checkNoPre || group.audit_status === auditConst.status.checkCancel) { %>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
|
|
|
+ <% } else if (group.audit_status === auditConst.status.checking) { %>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
|
|
|
+ <% } else { %>
|
|
|
+ <div class="timeline-item-icon bg-secondary text-light"></div>
|
|
|
+ <% } %>
|
|
|
+ <div class="timeline-item-content">
|
|
|
+ <div class="py-1">
|
|
|
+ <span class="text-black-50">
|
|
|
+ <%- group.auditName %>
|
|
|
+ <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
|
|
|
+ </span>
|
|
|
+ <% if (group.audit_order === 0) { %>
|
|
|
+ <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ <% } else if (group.audit_status !== auditConst.status.uncheck) { %>
|
|
|
+ <span class="pull-right <%- auditConst.statusClass[group.audit_status] %>"><%- auditConst.statusString[group.audit_status] %></span>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-body px-3 py-0">
|
|
|
+ <% for (const [i, auditor] of group.auditors.entries()) { %>
|
|
|
+ <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
|
|
|
+ <div class="col">
|
|
|
+ <span class="h6"><%- auditor.name %></span>
|
|
|
+ <span class="text-muted ml-1"><%- auditor.role %></span>
|
|
|
+ </div>
|
|
|
+ <div class="col">
|
|
|
+ <% if (auditor.audit_status === auditConst.status.checked) { %>
|
|
|
+ <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
|
|
|
+ <% } if (auditor.audit_status === auditConst.status.checkNo || auditor.audit_status === auditConst.status.checkNoPre || auditor.audit_status === auditConst.status.checkCancel) { %>
|
|
|
+ <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
|
|
|
+ <% } else if (auditor.audit_status === auditConst.status.checking) { %>
|
|
|
+ <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <% if (auditor.audit_status !== auditConst.status.uncheck && auditor.opinion) { %>
|
|
|
+ <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
|
|
|
+ <% } %>
|
|
|
+ <% if (auditor.audit_status === auditConst.status.checking && auditor.audit_id === ctx.session.sessionUser.accountId) { %>
|
|
|
+ <div class="col-12 py-1 bg-light">
|
|
|
+ <textarea class="form-control form-control-sm" name="opinion">不同意</textarea>
|
|
|
+ <div id="reject-process" class="alert alert-warning mt-1 mb-0 p-2">
|
|
|
+ <div class="form-check form-check-inline">
|
|
|
+ <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>">
|
|
|
+ <label class="form-check-label" for="inlineRadio1">退回原报 <%- ctx.phasePay.user.name %></label>
|
|
|
+ </div>
|
|
|
+ <% if (auditor.audit_order > 1) { %>
|
|
|
+ <div class="form-check form-check-inline">
|
|
|
+ <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>">
|
|
|
+ <label class="form-check-label" for="inlineRadio2">退回上一审批人
|
|
|
+ <% const pre = his.find(x => { return x.audit_order === auditor.audit_order - 1}); %>
|
|
|
+ <%- ( pre ? pre.name : '') %>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% }) %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <% }) %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
|
|
|
+ <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% } %>
|
|
|
+<% if (ctx.phasePay && ctx.phasePay.finalAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0 && ctx.phasePay.audit_status === auditConst.status.checked && ctx.phasePay.phase_order === ctx.phasePay.highOrder) { %>
|
|
|
+<% if (!authMobile && ctx.session.sessionUser.loginStatus === 0) { %>
|
|
|
+<!--终审重新审批-->
|
|
|
+<div class="modal fade" id="sp-down-back" data-backdrop="static">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">重新审批</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5>重新审批需要您的手机短信验证</h5>
|
|
|
+ <h5>您目前还没设置认证手机,请先设置。</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
|
|
|
+ <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
|
|
|
+ <a href="/profile/sms" class="btn btn-sm btn-primary">去设置</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% } else { %>
|
|
|
+<div class="modal fade" id="sp-down-back" data-backdrop="static">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <form class="modal-content" method="post" action="audit/checkAgain" name="pay-checkAgain">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">重新审批</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5>确认由「终审-<%= ctx.session.sessionUser.name %>」重新审批「第<%= ctx.phasePay.phase_order %>期」?
|
|
|
+ </h5>
|
|
|
+ <% if (ctx.session.sessionUser.loginStatus === 0) { %>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>重审需要验证码确认,验证码将发送至尾号<%- authMobile.slice(-4) %>的手机</label>
|
|
|
+ <div class="input-group input-group-sm mb-3">
|
|
|
+ <input class="form-control" type="text" readonly="readonly" name="code"
|
|
|
+ placeholder="输入短信中的6位验证码" />
|
|
|
+ <div class="input-group-append">
|
|
|
+ <button class="btn btn-outline-secondary" type="button" id="get-code">获取验证码</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
+ <button <% if (ctx.session.sessionUser.loginStatus === 0) { %>disabled<% } %> id="re-shenpi-btn" class="btn btn-warning btn-sm" type="submit">确定重审</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% } %>
|
|
|
+<% } %>
|
|
|
+<% if (ctx.phasePay && ctx.phasePay.create_user_id === ctx.session.sessionUser.accountId && ctx.phasePay.phase_order === ctx.phasePay.highOrder && (ctx.phasePay.audit_status === auditConst.status.checkNo || ctx.phasePay.audit_status === auditConst.status.uncheck)) { %>
|
|
|
+<div class="modal fade" id="del-qi" data-backdrop="static">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <form class="modal-content" action='/tender/<%= ctx.tender.id %>/pay/delete' method="post">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">删除期</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5>确认删除「第<%= ctx.phasePay.phase_order %>期」?</h5>
|
|
|
+ <h5>删除后,数据无法恢复,请谨慎操作。</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <input type="hidden" name="phase_id" value="<%= ctx.phasePay.id %>">
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
|
|
|
+ <button type="submit" class="btn btn-danger btn-sm">确定删除</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% } %>
|
|
|
+<% if (ctx.phasePay && ctx.phasePay.cancancel) { %>
|
|
|
+<div class="modal fade" id="sp-down-cancel" data-backdrop="static">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">撤回</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5>确定撤回?</h5>
|
|
|
+ </div>
|
|
|
+ <form class="modal-footer" action="audit/checkCancel" method="post">
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
|
|
|
+ <button type="submit" class="btn btn-danger btn-sm" type="submit">确定撤回</button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% } %>
|
|
|
+<% if (ctx.phasePay && ctx.phasePay.audit_status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
|
|
|
+<!--上报审批-->
|
|
|
+<div class="modal fade" id="sub-sp2" data-backdrop="static">
|
|
|
+ <div class="modal-dialog" style="max-width: 650px" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">修改审批流程</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="card mt-1">
|
|
|
+ <div class="modal-height-500" style="overflow: auto">
|
|
|
+ <style>
|
|
|
+ #admin-edit-shenpi thead th {
|
|
|
+ border-bottom: 0;
|
|
|
+ }
|
|
|
+ #admin-edit-shenpi td, #admin-edit-shenpi th {
|
|
|
+ padding: 0.75rem;
|
|
|
+ }
|
|
|
+ #admin-edit-shenpi th {
|
|
|
+ background: none;
|
|
|
+ color: #212529;
|
|
|
+ border-top: 0;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <table class="table table-hover" id="admin-edit-shenpi">
|
|
|
+ <thead>
|
|
|
+ <tr class="card-header text-center">
|
|
|
+ <th width="100px">审批流程</th>
|
|
|
+ <th>审批人员</th>
|
|
|
+ <th width="80" style="text-align: center">审批状态</th>
|
|
|
+ <th width="200" style="text-align: center">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="admin-edit-shenpi-list">
|
|
|
+ <% for (const [i, group] of ctx.phasePay.userGroups.entries()) { %>
|
|
|
+ <% if (i === 0) continue; %>
|
|
|
+ <% for (const [j, auditor] of group.entries()) { %>
|
|
|
+ <tr>
|
|
|
+ <td class="text-left d-flex">
|
|
|
+ <% if (j === 0) { %>
|
|
|
+ <%- i + '审' %>
|
|
|
+ <% if (auditor.audit_type !== auditType.key.common) { %>
|
|
|
+ <span class="ml-2 badge badge-pill badge-<%- auditType.info[auditor.audit_type].class %> p-1"><small><%- auditType.info[auditor.audit_type].short %></small></span>
|
|
|
+ <% } %>
|
|
|
+ <% } %>
|
|
|
+ </td>
|
|
|
+ <td></span> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small></td>
|
|
|
+ <td style="text-align: center"><span class="<%- auditConst.auditStringClass[auditor.audit_status] %>"><%- auditor.audit_status !== auditConst.status.uncheck ? auditConst.auditString[auditor.audit_status] : '待审批' %></span></td>
|
|
|
+ <td style="text-align: center">
|
|
|
+ <% if (auditor.audit_status === auditConst.status.checking && j === group.length - 1) { %>
|
|
|
+ <span class="dropdown mr-2">
|
|
|
+ <a href="javascript: void(0)" class="add-audit" id="<%- auditor.audit_id %>_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">增加</a>
|
|
|
+ <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.audit_id %>_add_dropdownMenu" aria-labelledby="<%- auditor.audit_id %>_add_dropdownMenuButton" style="width:220px">
|
|
|
+ <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
|
|
|
+ placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.audit_id %>_add"></div>
|
|
|
+ <dl class="list-unstyled book-list" data-aid="<%- auditor.audit_id %>" data-operate="add">
|
|
|
+ <% accountGroup.forEach((group, idx) => { %>
|
|
|
+ <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
|
|
|
+ data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
|
|
|
+ <div class="dd-content" data-toggleid="<%- idx %>">
|
|
|
+ <% group.groupList.forEach(item => { %>
|
|
|
+ <% if (item.id !== ctx.phasePay.create_user_id) { %>
|
|
|
+ <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
|
|
|
+ <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
|
|
|
+ class="ml-auto"><%- item.mobile %></span></p>
|
|
|
+ <span class="text-muted"><%- item.role %></span>
|
|
|
+ </dd>
|
|
|
+ <% } %>
|
|
|
+ <% });%>
|
|
|
+ </div>
|
|
|
+ <% }) %>
|
|
|
+ </dl>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ <% } %>
|
|
|
+ <% if (auditor.audit_status === auditConst.status.uncheck) { %>
|
|
|
+ <% if (j === group.length - 1) { %>
|
|
|
+ <span class="dropdown mr-2">
|
|
|
+ <a href="javascript: void(0)" class="add-audit" id="<%- auditor.audit_id %>_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">增加</a>
|
|
|
+ <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.audit_id %>_add_dropdownMenu" aria-labelledby="<%- auditor.audit_id %>_add_dropdownMenuButton" style="width:220px">
|
|
|
+ <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
|
|
|
+ placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.audit_id %>_add"></div>
|
|
|
+ <dl class="list-unstyled book-list" data-aid="<%- auditor.audit_id %>" data-operate="add">
|
|
|
+ <% accountGroup.forEach((group, idx) => { %>
|
|
|
+ <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
|
|
|
+ data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
|
|
|
+ <div class="dd-content" data-toggleid="<%- idx %>">
|
|
|
+ <% group.groupList.forEach(item => { %>
|
|
|
+ <% if (item.id !== ctx.phasePay.create_user_id) { %>
|
|
|
+ <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
|
|
|
+ <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
|
|
|
+ class="ml-auto"><%- item.mobile %></span></p>
|
|
|
+ <span class="text-muted"><%- item.role %></span>
|
|
|
+ </dd>
|
|
|
+ <% } %>
|
|
|
+ <% });%>
|
|
|
+ </div>
|
|
|
+ <% }) %>
|
|
|
+ </dl>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ <% if (auditor.audit_type !== auditType.key.common) { %>
|
|
|
+ <span class="dropdown mr-2">
|
|
|
+ <a href="javascript: void(0)" class="add-audit" id="<%- auditor.audit_id %>_add-sibling_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">平级</a>
|
|
|
+ <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.audit_id %>_add-sibling_dropdownMenu" aria-labelledby="<%- auditor.audit_id %>_add-sibling_dropdownMenuButton" style="width:220px">
|
|
|
+ <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
|
|
|
+ placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.audit_id %>_add-sibling"></div>
|
|
|
+ <dl class="list-unstyled book-list" data-aid="<%- auditor.audit_id %>" data-operate="add-sibling">
|
|
|
+ <% accountGroup.forEach((group, idx) => { %>
|
|
|
+ <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
|
|
|
+ data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
|
|
|
+ <div class="dd-content" data-toggleid="<%- idx %>">
|
|
|
+ <% group.groupList.forEach(item => { %>
|
|
|
+ <% if (item.id !== ctx.phasePay.create_user_id) { %>
|
|
|
+ <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
|
|
|
+ <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
|
|
|
+ class="ml-auto"><%- item.mobile %></span></p>
|
|
|
+ <span class="text-muted"><%- item.role %></span>
|
|
|
+ </dd>
|
|
|
+ <% } %>
|
|
|
+ <% });%>
|
|
|
+ </div>
|
|
|
+ <% }) %>
|
|
|
+ </dl>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ <% } %>
|
|
|
+ <% } %>
|
|
|
+ <span class="dropdown mr-2">
|
|
|
+ <a href="javascript: void(0)" class="change-audit" id="<%- auditor.audit_id %>_change_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">更换</a>
|
|
|
+ <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.audit_id %>_change_dropdownMenu" aria-labelledby="<%- auditor.audit_id %>_change_dropdownMenuButton" style="width:220px">
|
|
|
+ <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
|
|
|
+ placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.audit_id %>_change"></div>
|
|
|
+ <dl class="list-unstyled book-list" data-aid="<%- auditor.audit_id %>" data-operate="change">
|
|
|
+ <% accountGroup.forEach((group, idx) => { %>
|
|
|
+ <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
|
|
|
+ data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
|
|
|
+ <div class="dd-content" data-toggleid="<%- idx %>">
|
|
|
+ <% group.groupList.forEach(item => { %>
|
|
|
+ <% if (item.id !== ctx.phasePay.create_user_id) { %>
|
|
|
+ <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
|
|
|
+ <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
|
|
|
+ class="ml-auto"><%- item.mobile %></span></p>
|
|
|
+ <span class="text-muted"><%- item.role %></span>
|
|
|
+ </dd>
|
|
|
+ <% } %>
|
|
|
+ <% });%>
|
|
|
+ </div>
|
|
|
+ <% }) %>
|
|
|
+ </dl>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ <span class="dropdown">
|
|
|
+ <a href="javascript: void(0)" class="text-danger" title="移除" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">移除</a>
|
|
|
+ <div class="dropdown-menu">
|
|
|
+ <span class="dropdown-item" href="javascript:void(0);">确认移除审批人?</span>
|
|
|
+ <div class="dropdown-divider"></div>
|
|
|
+ <div class="px-2 py-1 text-center">
|
|
|
+ <button class="remove-audit btn btn-sm btn-danger" data-id="<%- auditor.audit_id %>">移除</button>
|
|
|
+ <button class="btn btn-sm btn-secondary">取消</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ <% } %>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <% } %>
|
|
|
+ <% } %>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <form class="modal-footer">
|
|
|
+ <div class="mr-auto text-warning">
|
|
|
+ <span class="mr-3">增加:后级审核人</span>
|
|
|
+ <span class="">平级:会签/或签增加平级审核人</span>
|
|
|
+ </div>
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% } %>
|
|
|
<script>
|
|
|
const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
|
|
|
const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
|
|
|
const shenpi_status = <%- ctx.tender.info.shenpi.phasePay %>;
|
|
|
const shenpiConst = JSON.parse('<%- JSON.stringify(shenpiConst) %>');
|
|
|
+ const phaseUserId = parseInt('<%= ctx.phasePay.create_user_id %>');
|
|
|
+</script>
|
|
|
+<script>
|
|
|
+ $('[name=phase-start]').submit(function (e) {
|
|
|
+ if (checkAuditorFrom()) {
|
|
|
+ $(this).parent().parent().parent().modal('hide');
|
|
|
+ $('#hide-all').hide();
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#audit-check-no').submit(function (e) {
|
|
|
+ const checkType = parseInt($('[name=checkType]:checked').val());
|
|
|
+ if ($('#warning-text').length) $('#warning-text').remove();
|
|
|
+ if (!checkType && !$('#warning-text').length) {
|
|
|
+ $('#reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $('#hide-all').hide();
|
|
|
+ });
|
|
|
+
|
|
|
+ $('.sp-location-list').on('shown.bs.modal', function () {
|
|
|
+ const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
|
|
|
+ const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
|
|
|
+ scrollBox.scrollTop(0);
|
|
|
+ const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
|
|
|
+ const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
|
|
|
+ if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 200 && hdheight - bdiv > 200) {
|
|
|
+ scrollBox.scrollTop(hdheight - bdiv);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ function divSearch(div) {
|
|
|
+ if (div.length > 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 展开历史审核记录
|
|
|
+ $('.modal-body #fold-btn').click(function () {
|
|
|
+ const type = $(this).data('target')
|
|
|
+ const auditCard = $(this).parent().parent()
|
|
|
+ if (type === 'show') {
|
|
|
+ $(this).data('target', 'hide')
|
|
|
+ auditCard.find('.fold-card').slideDown('swing', () => {
|
|
|
+ auditCard.find('#fold-btn').text('收起历史审核记录')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ $(this).data('target', 'show')
|
|
|
+ auditCard.find('.fold-card').slideUp('swing', () => {
|
|
|
+ auditCard.find('#fold-btn').text('展开历史审核记录')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 重新审批
|
|
|
+ $('[name=phase-checkAgain]').submit(function (e) {
|
|
|
+ <% if (ctx.session.sessionUser.loginStatus === 0) { %>
|
|
|
+ const code = $("#sp-down-back input[name='code']").val();
|
|
|
+ if ($(this).hasClass('disabled')) return false;
|
|
|
+ if (code.length < 6) {
|
|
|
+ toast('请填写正确的验证码', 'error');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ <% } %>
|
|
|
+ $('#hide-all').hide();
|
|
|
+ });
|
|
|
</script>
|