|
@@ -1,8 +1,8 @@
|
|
|
<% if (tender.ledger_status === auditConst.status.checking && curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
|
|
|
<!--审批通过-->
|
|
|
-<div class="modal fade" id="sp-done" data-backdrop="static">
|
|
|
+<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="/tender/<%- tender.id %>/ledger/audit/check" method="post" onsubmit="return auditCheck(0);">
|
|
|
+ <form class="modal-content" action="<%- preUrl %>/ledger/audit/check" method="post" onsubmit="return auditCheck(0);">
|
|
|
<div class="modal-header">
|
|
|
<h5 class="modal-title">审批通过</h5>
|
|
|
</div>
|
|
@@ -11,122 +11,173 @@
|
|
|
<div class="col-4">
|
|
|
<div class="card mt-3">
|
|
|
<ul class="list-group list-group-flush">
|
|
|
- <li class="list-group-item">
|
|
|
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
|
|
|
+ <% auditors.forEach((item, idx) => { %>
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right">原报</span>
|
|
|
+ </li>
|
|
|
+ <% } else if(idx === auditors.length -1 && idx !== 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa fa-stop-circle"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right">终审</span>
|
|
|
+ </li>
|
|
|
+ <% } else {%>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
|
|
|
</li>
|
|
|
- <% for (let i = 0; i < auditors.length; i++) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <% if (i < auditors.length - 1) { %>
|
|
|
- <i class="fa fa-chevron-circle-down"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1)%>审</span>
|
|
|
- <% } else {%>
|
|
|
- <i class="fa fa fa-stop-circle"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right">终审</span>
|
|
|
- <% } %>
|
|
|
- </li>
|
|
|
<% } %>
|
|
|
+ <% }) %>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-8 modal-height-500" style="overflow: auto">
|
|
|
- <% for (const ah of auditHistory) { %>
|
|
|
- <div class="card mt-3">
|
|
|
- <ul class="list-group list-group-flush">
|
|
|
- <% for (let iA = 0; iA < ah.length; iA++) { %>
|
|
|
- <% if (iA === 0) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span class="text-success"><small><%- ah[iA].begin_time.toLocaleDateString() %></small> <% if (auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <% } else if (iA === ah.length - 1) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
+ <% auditHistory.forEach((auditors, idx) => { %>
|
|
|
+ <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
|
|
|
+ <div class="text-center text-muted"
|
|
|
+ <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
|
|
|
+ <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
|
|
|
+ <ul class="timeline-list list-unstyled mt-2">
|
|
|
+ <% auditors.forEach((auditor, index) => { %>
|
|
|
+ <% if (index === 0) { %>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.begin_time) %>
|
|
|
+ </div>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-caret-down"></i>
|
|
|
+ </div>
|
|
|
+ <div class="timeline-item-content">
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span
|
|
|
+ class="h5"><%- user.name %></span><span
|
|
|
+ class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- user.role %></p>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% } else { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-chevron-circle-down <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <% } %>
|
|
|
- <% } %>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <% } %>
|
|
|
- <% if (tender.ledger_status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
|
|
|
- <div class="card mt-3">
|
|
|
- <ul class="list-group list-group-flush">
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span></h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span class="text-success"><small><%- auditors[0].begin_time.toLocaleDateString() %></small> <% if (tender.ledger_times > 1) { %>重新<% } %>上报</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% for (let iA = 0; iA < auditors.length; iA++) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <% if (auditors[iA].status === auditConst.status.checked) { %>
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-success' : 'fa fa-stop-circle text-success') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span class="text-success"><small><%- auditors[iA].end_time.toLocaleDateString() %></small> 审批通过</span>
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- <% } else if (auditors[iA].stauts == auditConst.status.checking) { %>
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span>审批中</span>
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- <% } else { %>
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.end_time) %>
|
|
|
+ </div>
|
|
|
+ <% if(index < auditors.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if(auditor.status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light">
|
|
|
+ <i class="fa fa-level-up"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.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="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
|
|
|
+ class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- auditor.role %></p>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <!--审批意见-->
|
|
|
+ <% if(auditor.status !== auditConst.status.uncheck) { %>
|
|
|
+ <div class="card-body p-3 border-top">
|
|
|
+ <% if (tender.ledger_times === idx + 1 && auditor.status === auditConst.status.checking) { %>
|
|
|
+ <label>审批意见<b class="text-danger">*</b></label>
|
|
|
+ <textarea class="form-control form-control-sm"
|
|
|
+ name="opinion">同意</textarea>
|
|
|
+ <% } else { %>
|
|
|
+ <p style="margin: 0;"><%- auditor.opinion %></p>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
<% } %>
|
|
|
- <% if (auditors[iA].status === auditConst.status.checked) { %>
|
|
|
- <% } else if (auditors[iA].status === auditConst.status.checking) { %>
|
|
|
- <div class="form-group">
|
|
|
- <label>审批意见<b class="text-danger">*</b></label>
|
|
|
- <textarea class="form-control form-control-sm" name="opinion">同意</textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% } else {%>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.end_time) %>
|
|
|
+ </div>
|
|
|
+ <% if(index < auditors.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if(auditor.status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light">
|
|
|
+ <i class="fa fa-level-up"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.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="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span class="h5"><%- auditor.name %></span>
|
|
|
+ <span
|
|
|
+ class="pull-right
|
|
|
+ <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
|
|
|
+ <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
|
|
|
+ <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- auditor.role %></p>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <!--审批意见-->
|
|
|
+ <% if(auditor.status !== auditConst.status.uncheck) { %>
|
|
|
+ <div class="card-body p-3 border-top">
|
|
|
+ <% if (tender.ledger_times === idx + 1 && auditor.status === auditConst.status.checking) { %>
|
|
|
+ <label>审批意见<b class="text-danger">*</b></label>
|
|
|
+ <textarea class="form-control form-control-sm"
|
|
|
+ name="opinion">同意</textarea>
|
|
|
+ <% } else { %>
|
|
|
+ <p style="margin: 0;"><%- auditor.opinion %></p>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
<% } %>
|
|
|
- </li>
|
|
|
- <% } %>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% } %>
|
|
|
+ <% }) %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === auditHistory.length - 1 && 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>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -134,15 +185,16 @@
|
|
|
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
<input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
|
|
|
<input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
|
|
|
- <button type="submit" class="btn btn-success btn-sm" >确认通过</button>
|
|
|
+ <button type="submit" class="btn btn-success btn-sm">确认通过</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--审批退回-->
|
|
|
-<div class="modal fade" id="sp-back" data-backdrop="static">
|
|
|
+<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" action="/tender/<%- tender.id %>/ledger/audit/check" method="post" onsubmit="return auditCheck(1);">
|
|
|
+ <form class="modal-content modal-lg" action="<%- preUrl %>/ledger/audit/check" method="post"
|
|
|
+ onsubmit="return auditCheck(1);">
|
|
|
<div class="modal-header">
|
|
|
<h5 class="modal-title">审批退回</h5>
|
|
|
</div>
|
|
@@ -151,123 +203,176 @@
|
|
|
<div class="col-4">
|
|
|
<div class="card mt-3">
|
|
|
<ul class="list-group list-group-flush">
|
|
|
- <li class="list-group-item">
|
|
|
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
|
|
|
+ <% auditors.forEach((item, idx) => { %>
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right">原报</span>
|
|
|
+ </li>
|
|
|
+ <% } else if(idx === auditors.length -1 && idx !== 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa fa-stop-circle"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right">终审</span>
|
|
|
+ </li>
|
|
|
+ <% } else {%>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
|
|
|
</li>
|
|
|
- <% for (let i = 0; i < auditors.length; i++) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <% if (i < auditors.length - 1) { %>
|
|
|
- <i class="fa fa-chevron-circle-down"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1)%>审</span>
|
|
|
- <% } else {%>
|
|
|
- <i class="fa fa fa-stop-circle"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right">终审</span>
|
|
|
- <% } %>
|
|
|
- </li>
|
|
|
<% } %>
|
|
|
+ <% }) %>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-8 modal-height-500" style="overflow: auto">
|
|
|
- <% for (const ah of auditHistory) { %>
|
|
|
- <div class="card mt-3">
|
|
|
- <ul class="list-group list-group-flush">
|
|
|
- <% for (let iA = 0; iA < ah.length; iA++) { %>
|
|
|
- <% if (iA === 0) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span class="text-success"><small><%- ah[iA].begin_time.toLocaleDateString() %></small> <% if (auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <% } else if (iA === ah.length - 1) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
+ <% auditHistory.forEach((auditors, idx) => { %>
|
|
|
+ <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
|
|
|
+ <div class="text-center text-muted"
|
|
|
+ <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
|
|
|
+ <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
|
|
|
+ <ul class="timeline-list list-unstyled mt-2">
|
|
|
+ <% auditors.forEach((auditor, index) => { %>
|
|
|
+ <% if (index === 0) { %>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.begin_time) %>
|
|
|
+ </div>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-caret-down"></i>
|
|
|
+ </div>
|
|
|
+ <div class="timeline-item-content">
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span
|
|
|
+ class="h5"><%- user.name %></span><span
|
|
|
+ class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- user.role %></p>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% } else { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-chevron-circle-down <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <% } %>
|
|
|
- <% } %>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <% } %>
|
|
|
- <% if (tender.ledger_status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
|
|
|
- <div class="card mt-3">
|
|
|
- <ul class="list-group list-group-flush">
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span></h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span class="text-success"><small><%- auditors[0].begin_time.toLocaleDateString() %></small> <% if (tender.ledger_times > 1) { %>重新<% } %>上报</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% for (let iA = 0; iA < auditors.length; iA++) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <% if (auditors[iA].status === auditConst.status.checked) { %>
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-success' : 'fa fa-stop-circle text-success') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span class="text-success"><small><%- auditors[iA].end_time.toLocaleDateString() %></small> 审批通过</span>
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- <% } else if (auditors[iA].stauts == auditConst.status.checking) { %>
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span>审批中</span>
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- <% } else { %>
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.end_time) %>
|
|
|
+ </div>
|
|
|
+ <% if(index < auditors.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if(auditor.status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light">
|
|
|
+ <i class="fa fa-level-up"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.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="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
|
|
|
+ class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- auditor.role %></p>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!--审批意见-->
|
|
|
+ <% if(auditor.times === tender.ledger_times && auditor.status !== auditConst.status.uncheck) { %>
|
|
|
+ <div class="card-body p-3 border-top">
|
|
|
+ <% if (tender.ledger_times === idx + 1 && auditor.status === auditConst.status.checking) { %>
|
|
|
+ <label>审批意见<b class="text-danger">*</b></label>
|
|
|
+ <textarea class="form-control form-control-sm"
|
|
|
+ name="opinion">不同意</textarea>
|
|
|
+ <% } else if(auditor.status === auditConst.status.checked){ %>
|
|
|
+ <p style="margin: 0;"><%- auditor.opinion %></p>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
<% } %>
|
|
|
- <% if (auditors[iA].status === auditConst.status.checked) { %>
|
|
|
- <% } else if (auditors[iA].status === auditConst.status.checking) { %>
|
|
|
- <div class="form-group">
|
|
|
- <label>审批意见<b class="text-danger">*</b></label>
|
|
|
- <textarea class="form-control form-control-sm" name="opinion">不同意</textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% } else {%>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.end_time) %>
|
|
|
+ </div>
|
|
|
+ <% if(index < auditors.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if(auditor.status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light">
|
|
|
+ <i class="fa fa-level-up"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.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="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span class="h5"><%- auditor.name %></span>
|
|
|
+ <span
|
|
|
+ class="pull-right
|
|
|
+ <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
|
|
|
+ <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
|
|
|
+ <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- auditor.role %></p>
|
|
|
</div>
|
|
|
- <div class="alert alert-warning">审批退回,将直接退回给原报人。</div>
|
|
|
+ </div>
|
|
|
+ <!--审批意见-->
|
|
|
+ <% if(auditor.times === tender.ledger_times && auditor.status !== auditConst.status.uncheck) { %>
|
|
|
+ <div class="card-body p-3 border-top">
|
|
|
+ <% if (tender.ledger_times === idx + 1 && auditor.status === auditConst.status.checking) { %>
|
|
|
+ <label>审批意见<b class="text-danger">*</b></label>
|
|
|
+ <textarea class="form-control form-control-sm"
|
|
|
+ name="opinion">不同意</textarea>
|
|
|
+ <% } else { %>
|
|
|
+ <p style="margin: 0;"><%- auditor.opinion %></p>
|
|
|
+ <% } %>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
<% } %>
|
|
|
- </li>
|
|
|
- <% } %>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% } %>
|
|
|
+ <% }) %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === auditHistory.length - 1 && 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>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -275,7 +380,7 @@
|
|
|
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
<input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
|
|
|
<input type="hidden" name="checkType" value="<%= auditConst.status.checkNo %>" />
|
|
|
- <button type="submit" class="btn btn-warning btn-sm" >确认退回</button>
|
|
|
+ <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
@@ -286,140 +391,222 @@
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
- <h5 class="modal-title">审批流程</h5>
|
|
|
+ <h5 class="modal-title"><%- tender.ledger_status === auditConst.status.checked ? '审批流程' : '重新上报' %></h5>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
<div class="row">
|
|
|
<div class="col-4">
|
|
|
+ <% if(tender.ledger_status === auditConst.status.checkNo) { %>
|
|
|
+ <a class="sp-list-item" href="#sub-sp" data-toggle="modal" data-target="#sub-sp" id="hideSp">修改审批流程</a>
|
|
|
+ <% } %>
|
|
|
<div class="card mt-3">
|
|
|
<ul class="list-group list-group-flush">
|
|
|
- <li class="list-group-item">
|
|
|
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
|
|
|
+ <% auditors.forEach((item, idx) => { %>
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right">原报</span>
|
|
|
</li>
|
|
|
- <% for (let i = 0; i < auditors.length; i++) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <% if (i < auditors.length - 1) { %>
|
|
|
- <i class="fa fa-chevron-circle-down"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1)%>审</span>
|
|
|
- <% } else {%>
|
|
|
- <i class="fa fa fa-stop-circle"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right">终审</span>
|
|
|
- <% } %>
|
|
|
+ <% } else if(idx === auditors.length -1 && idx !== 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa fa-stop-circle"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right">终审</span>
|
|
|
+ </li>
|
|
|
+ <% } else {%>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
|
|
|
+ <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
|
|
|
+ <small class="text-muted"><%- item.role %></small>
|
|
|
+ <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
|
|
|
</li>
|
|
|
<% } %>
|
|
|
+ <% }) %>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-8 modal-height-500" style="overflow: auto">
|
|
|
- <% for (const ah of auditHistory) { %>
|
|
|
- <div class="card mt-3">
|
|
|
- <ul class="list-group list-group-flush">
|
|
|
- <% for (let iA = 0; iA < ah.length; iA++) { %>
|
|
|
- <% if (iA === 0) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span class="text-success"><small><%- ah[iA].begin_time.toLocaleDateString() %></small> <% if (auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
+ <% auditHistory.forEach((auditors, idx) => { %>
|
|
|
+ <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
|
|
|
+ <div class="text-center text-muted"
|
|
|
+ <%- idx === auditHistory.length - 1 ? `id="end-target"` : "" %>>
|
|
|
+ <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#</div>
|
|
|
+ <ul class="timeline-list list-unstyled mt-2">
|
|
|
+ <% auditors.forEach((auditor, index) => { %>
|
|
|
+ <% if (index === 0) { %>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.begin_time) %>
|
|
|
+ </div>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-caret-down"></i>
|
|
|
+ </div>
|
|
|
+ <div class="timeline-item-content">
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span
|
|
|
+ class="h5"><%- user.name %></span><span
|
|
|
+ class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- user.role %></p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% } else if (iA === ah.length - 1) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.end_time) %>
|
|
|
+ </div>
|
|
|
+ <% if(index < auditors.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if(auditor.status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light">
|
|
|
+ <i class="fa fa-level-up"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.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="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
|
|
|
+ class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- auditor.role %></p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% } else { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-chevron-circle-down <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- ah[iA].opinion %></p>
|
|
|
+
|
|
|
+ <!--审批意见-->
|
|
|
+ <% if (auditor.opinion) { %>
|
|
|
+ <div class="card-body p-3 border-top">
|
|
|
+ <p style="margin: 0;"><%- auditor.opinion %></p>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% } %>
|
|
|
- <% } %>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <% } %>
|
|
|
- <% if (tender.ledger_status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
|
|
|
- <div class="card mt-3">
|
|
|
- <ul class="list-group list-group-flush">
|
|
|
- <% for (let iA = 0; iA < auditors.length; iA++) { %>
|
|
|
- <% if (iA === 0) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span></h5>
|
|
|
- <div class="ml-3">
|
|
|
- <span class="text-success"><small><%- auditors[iA].begin_time.toLocaleDateString() %></small> <% if (tender.ledger_times > 1) { %>重新<% } %>上报</span>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa <%if (iA === auditors.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%- auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[auditors[iA].status] %>"> <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- auditors[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
<% } %>
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% } else if (iA === auditors.length - 1) { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-stop-circle <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right">终审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[auditors[iA].status] %>"> <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- auditors[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
- <% } %>
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <% } else {%>
|
|
|
+ <li class="timeline-list-item pb-2">
|
|
|
+ <div class="timeline-item-date">
|
|
|
+ <%- ctx.helper.formatDate(auditor.end_time) %>
|
|
|
+ </div>
|
|
|
+ <% if(index < auditors.length - 1) { %>
|
|
|
+ <div class="timeline-item-tail"></div>
|
|
|
+ <% } %>
|
|
|
+ <% if(auditor.status === auditConst.status.checked) { %>
|
|
|
+ <div class="timeline-item-icon bg-success text-light">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light">
|
|
|
+ <i class="fa fa-level-up"></i>
|
|
|
+ </div>
|
|
|
+ <% } else if(auditor.status === auditConst.status.checking) { %>
|
|
|
+ <div class="timeline-item-icon bg-warning text-light">
|
|
|
+ <i class="fa fa-ellipsis-h"></i>
|
|
|
+ </div>
|
|
|
<% } else { %>
|
|
|
- <li class="list-group-item">
|
|
|
- <h5 class="card-title">
|
|
|
- <i class="fa fa-chevron-circle-down <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%- auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
|
|
|
- </h5>
|
|
|
- <div class="ml-3">
|
|
|
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
|
|
|
- <span class="<%- auditConst.statusClass[auditors[iA].status] %>"> <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- auditors[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
|
|
|
+ <div class="timeline-item-icon bg-secondary text-light">
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <div class="timeline-item-content">
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-body p-3">
|
|
|
+ <div class="card-text">
|
|
|
+ <p class="mb-1"><span class="h5"><%- auditor.name %></span>
|
|
|
+ <span
|
|
|
+ class="pull-right
|
|
|
+ <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
|
|
|
+ <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
|
|
|
+ <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- auditor.role %></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--审批意见-->
|
|
|
+ <% if (auditor.opinion) { %>
|
|
|
+ <div class="card-body p-3 border-top">
|
|
|
+ <p style="margin: 0;"><%- auditor.opinion %></p>
|
|
|
+ </div>
|
|
|
<% } %>
|
|
|
- <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <% } %>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
<% } %>
|
|
|
+ <% }) %>
|
|
|
</ul>
|
|
|
</div>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === auditHistory.length - 1 && 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>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="modal-footer">
|
|
|
+ <form class="modal-footer" method="post" action="<%- preUrl %>/ledger/audit/start" onsubmit="return checkAuditorFrom()">
|
|
|
+ <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
|
|
|
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
- </div>
|
|
|
+ <% if(tender.ledger_status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === tender.user_id) { %>
|
|
|
+ <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
|
|
|
+ <% } %>
|
|
|
+ </form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<% } %>
|
|
|
+<script>
|
|
|
+ const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');
|
|
|
+ $('.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 > 390 && hdheight - bdiv > 390) {
|
|
|
+ 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('#end-target').text($(this).data('idx') + '#')
|
|
|
+ auditCard.find('#fold-btn').text('收起历史审核记录')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ $(this).data('target', 'show')
|
|
|
+ auditCard.find('.fold-card').slideUp('swing', () => {
|
|
|
+ auditCard.find('#end-target').text('1#')
|
|
|
+ auditCard.find('#fold-btn').text('展开历史审核记录')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+</script>
|