| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566 | 
							- <% if (tender.ledger_status === auditConst.status.checking && curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
 
- <!--审批通过-->
 
- <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="<%- preUrl %>/ledger/audit/check" method="post" onsubmit="return auditCheck(0);">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">审批通过</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="row">
 
-                     <div class="col-4">
 
-                         <div class="card mt-3">
 
-                             <ul class="list-group list-group-flush">
 
-                                 <% 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>
 
-                                 <% } %>
 
-                                 <% }) %>
 
-                             </ul>
 
-                         </div>
 
-                     </div>
 
-                     <div class="col-8 modal-height-500" style="overflow: auto">
 
-                         <% auditHistory.forEach((auditors, idx) => { %>
 
-                             <!-- 展开/收起历史流程 -->
 
-                         <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
 
-                             <div class="text-right">
 
-                                 <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
 
-                             </div>
 
-                             <% } %>
 
-                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
 
-                             <div class="text-center text-muted"><%- 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>
 
-                                         </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>
 
-                                             <!--审批意见-->
 
-                                             <% 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>
 
-                                             <% } %>
 
-                                         </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>
 
-                                             <% } %>
 
-                                         </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="<%- preUrl %>/ledger/audit/check" method="post"
 
-             onsubmit="return auditCheck(1);">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">审批退回</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="row">
 
-                     <div class="col-4">
 
-                         <div class="card mt-3">
 
-                             <ul class="list-group list-group-flush">
 
-                                 <% 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>
 
-                                 <% } %>
 
-                                 <% }) %>
 
-                             </ul>
 
-                         </div>
 
-                     </div>
 
-                     <div class="col-8 modal-height-500" style="overflow: auto">
 
-                         <% auditHistory.forEach((auditors, idx) => { %>
 
-                             <!-- 展开/收起历史流程 -->
 
-                         <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
 
-                             <div class="text-right">
 
-                                 <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
 
-                             </div>
 
-                             <% } %>
 
-                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
 
-                             <div class="text-center text-muted"><%- 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>
 
-                                         </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>
 
-                                             <!--审批意见-->
 
-                                             <% 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>
 
-                                             <% } %>
 
-                                         </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.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>
 
-                                             <% } %>
 
-                                         </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.checkNo %>" />
 
-                 <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
 
-             </div>
 
-         </form>
 
-     </div>
 
- </div>
 
- <% } %>
 
- <% if (tender.ledger_status === auditConst.status.checked && auditors[auditors.length - 1].audit_id === ctx.session.sessionUser.accountId && !tender.hasStage && !tender.hasRevise) { %>
 
- <% 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">
 
-                 <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" action="<%- preUrl %>/ledger/audit/check/again" method="post"
 
-               onsubmit="return auditAgainCheck();">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">重新审批</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <h5>确认由「终审-<%= auditors[auditors.length-1].name %>」重新审批 ?
 
-                 </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">
 
-                 <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                 <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
 
-                 <button <% if (ctx.session.sessionUser.loginStatus === 0) { %>disabled<% } %> id="re-shenpi-btn"
 
-                         class="btn btn-warning btn-sm">确定重审</button>
 
-             </div>
 
-         </form>
 
-     </div>
 
- </div>
 
- <% } %>
 
- <% } %>
 
- <script>
 
-     $('.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('展开历史审核记录')
 
-             })
 
-         }
 
-     });
 
-     // 重新审批获取手机验证码
 
-     // 获取验证码
 
-     let isPosting = false;
 
-     $("#get-code").click(function() {
 
-         if (isPosting) {
 
-             return false;
 
-         }
 
-         const btn = $(this);
 
-         $.ajax({
 
-             url: '/profile/code?_csrf_j=<%= ctx.csrf %>',
 
-             type: 'post',
 
-             data: { mobile: '<%- authMobile %>', type: 'shenpi' },
 
-             dataTye: 'json',
 
-             error: function() {
 
-                 isPosting = false;
 
-             },
 
-             beforeSend: function() {
 
-                 isPosting = true;
 
-             },
 
-             success: function(response) {
 
-                 isPosting = false;
 
-                 if (response.err === 0) {
 
-                     codeSuccess(btn);
 
-                     $("input[name='code']").removeAttr('readonly');
 
-                     $("#re-shenpi-btn").removeAttr('disabled');
 
-                 } else {
 
-                     toast(response.msg, 'error');
 
-                 }
 
-             }
 
-         });
 
-     });
 
-     /**
 
-      * 获取成功后的操作
 
-      *
 
-      * @param {Object} btn - 点击的按钮
 
-      * @return {void}
 
-      */
 
-     function codeSuccess(btn) {
 
-         let counter = 60;
 
-         btn.addClass('disabled').text('重新获取 ' + counter + 'S');
 
-         btn.parent().siblings('input').removeAttr('readonly').attr('placeholder', '输入短信中的6位验证码');
 
-         const bindBtn = $("#bind-btn");
 
-         bindBtn.removeClass('btn-secondary disabled').addClass('btn-primary');
 
-         const countDown = setInterval(function() {
 
-             const countString = counter - 1 <= 0 ? '' : ' ' + (counter - 1) + 'S';
 
-             // 倒数结束后
 
-             if (countString === '') {
 
-                 clearInterval(countDown);
 
-                 btn.removeClass('disabled');
 
-             }
 
-             const text = '重新获取' + countString;
 
-             btn.text(text);
 
-             counter -= 1;
 
-         }, 1000);
 
-     }
 
-     // 重新审批按钮
 
-     $("#re-shenpi-btn").click(function () {
 
-         const data = {
 
-         };
 
-         $.ajax({
 
-             url: '<%- preUrl %>/audit/check/again',
 
-             type: 'get',
 
-             data: data,
 
-             dataTye: 'json',
 
-             success: function (response) {
 
-                 if (response.err === 0) {
 
-                     window.location.href = response.url;
 
-                 } else {
 
-                     toast(response.msg, 'error');
 
-                 }
 
-             }
 
-         });
 
-     });
 
-     function auditAgainCheck() {
 
-         <% 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) {
 
-             toastr.error('请填写正确的验证码');
 
-             return false;
 
-         }
 
-         <% } %>
 
-         return true;
 
-     }
 
- </script>
 
 
  |