123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892 |
- <% if ((ctx.material.status === auditConst.status.uncheck || ctx.material.status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === ctx.material.user_id) { %>
- <!--上报审批-->
- <div class="modal fade" id="sub-sp" 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">
- <div class="form-group">
- <label>选择审批人</label>
- <div class="input-group">
- <div class="input-group-prepend">
- <select class="form-control form-control-sm" id="account_group">
- <option value="0">所有分组</option>
- <% for (const dw in accountGroup) { %>
- <option value="<%= dw %>"><%= accountGroup[dw] %></option>
- <% } %>
- </select>
- </div>
- <select class="form-control form-control-sm" id="account_list">
- <option value="0">选择审批人</option>
- <% for (const account of accountList) { %>
- <option value="<%= account.id %>"><%= account.name %><% if (account.role !== '') { %>(<%= account.role %>)<% } %><% if (account.company !== '') { %> -<%= account.company %><% } %></option>
- <% } %>
- </select>
- </div>
- </div>
- <div class="card mt-3">
- <div class="card-header">
- 审批流程
- </div>
- <div class="modal-height-500" style="overflow: auto">
- <ul class="list-group list-group-flush" id="auditors">
- <% for (let i = 0, iLen = ctx.material.auditorList.length; i < iLen; i++) { %>
- <li class="list-group-item" auditorId="<%- ctx.material.auditorList[i].aid %>">
- <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
- <%- ctx.material.auditorList[i].order %> <%- ctx.material.auditorList[i].name %>
- <small class="text-muted"><%- ctx.material.auditorList[i].role %></small>
- </li>
- <% } %>
- </ul>
- </div>
- </div>
- </div>
- <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" onsubmit="return checkAuditorFrom()">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
- <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
- </form>
- </div>
- </div>
- </div>
- <% } %>
- <% if (ctx.material.status === auditConst.status.checking) { %>
- <% if (ctx.material.curAuditor && ctx.material.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
- <!--审批通过-->
- <div class="modal fade" id="sp-done" data-backdrop="static">
- <div class="modal-dialog modal-lg" role="document">
- <form class="modal-content" action="<%- preUrl %>/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">
- <li class="list-group-item">
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </li>
- <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
- <li class="list-group-item">
- <% if (i < ctx.material.auditors2.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[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 ctx.material.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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.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><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.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><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <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><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- <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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(ctx.material.auditors[0].begin_time) %></small> 上报</span>
- </div>
- </li>
- <% for (let iA = 0; iA < ctx.material.auditors.length; iA++) { %>
- <% const auditors = ctx.material.auditors; %>
- <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><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></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>
- <% } %>
- <% 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>
- <% } %>
- </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" 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" id="sp-back" data-backdrop="static">
- <div class="modal-dialog modal-lg" role="document">
- <form class="modal-content modal-lg" action="<%- preUrl %>/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">
- <li class="list-group-item">
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </li>
- <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
- <li class="list-group-item">
- <% if (i < ctx.material.auditors2.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[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 ctx.material.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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.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><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.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><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <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><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- <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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(ctx.material.auditors[0].begin_time) %></small> 上报</span>
- </div>
- </li>
- <% for (let iA = 0; iA < ctx.material.auditors.length; iA++) { %>
- <% const auditors = ctx.material.auditors; %>
- <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><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></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 if (auditors[iA].status === auditConst.status.checkNoPre) { %>
- <h5 class="card-title">
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-warning' : 'fa fa-stop-circle text-warning') %>"></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-warning"><small><%- ctx.helper.formatFullDate(auditors[iA].end_time)%></small> 审批退回</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>
- <% } %>
- <% 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 id="reject-process" class="alert alert-warning">
- <div class="form-check form-check-inline">
- <!-- <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>" <% if (auditors[iA].order === 1 || auditors[iA].aid === auditors[0].aid) { %>checked<% } %>> -->
- <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>">
- <label class="form-check-label" for="inlineRadio1">退回原报 <%- ctx.material.user.name %></label>
- </div>
- <% if (auditors[iA].order > 1 && auditors[iA].aid !== auditors[0].aid) { %>
- <% const auditorIndex = ctx.material.auditors.findIndex(function (item) { return item.aid === auditors[iA].aid }) %>
- <div class="form-check form-check-inline">
- <!-- <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>" checked> -->
- <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>" >
- <label class="form-check-label" for="inlineRadio2">退回上一审批人 <%- ctx.material.auditors[auditorIndex-1].name %></label>
- </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" value="<%= ctx.csrf %>" />
- <button type="submit" class="btn btn-warning btn-sm" >确认退回</button>
- </div>
- </form>
- </div>
- </div>
- <% } else { %>
- <!--审批流程/结果-->
- <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">
- <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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </li>
- <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
- <li class="list-group-item">
- <% if (i < ctx.material.auditors2.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[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 ctx.material.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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- <% if (ctx.material.status === auditConst.status.checking ) {%>
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <% const auditors = ctx.material.auditors; %>
- <% 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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(auditors[iA].begin_time) %></small> <% if (ctx.material.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 || auditors[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.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 || auditors[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <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 || auditors[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- </div>
- </div>
- </div>
- </div>
- <% } %>
- <% } else if (ctx.material.status === auditConst.status.checked) { %>
- <!--审批流程/结果-->
- <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">
- <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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </li>
- <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
- <li class="list-group-item">
- <% if (i < ctx.material.auditors2.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[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 ctx.material.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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <% const auditors = ctx.material.auditors; %>
- <% 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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(auditors[iA].begin_time) %></small> <% if (ctx.material.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 || auditors[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.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 || auditors[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <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 || auditors[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- </div>
- </div>
- </div>
- </div>
- <% } else if (ctx.material.status === auditConst.status.checkNo) { %>
- <!--审批流程/结果-->
- <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">
- <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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </li>
- <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
- <li class="list-group-item">
- <% if (i < ctx.material.auditors2.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[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 ctx.material.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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- </div>
- </div>
- </div>
- </div>
- <% if (ctx.session.sessionUser.accountId === ctx.material.user_id) { %>
- <!--重新上报-->
- <div class="modal fade" id="sp-list2" 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 modal-height-500" style="overflow: auto">
- <a 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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
- </li>
- </ul>
- <ul class="list-group list-group-flush" id="auditors-list">
- <% const auditorList = ctx.material.auditorList; %>
- <% for (let i = 0; i < auditorList.length; i++) { %>
- <li class="list-group-item" data-auditid="<%- auditorList[i].aid %>">
- <% if (i < auditorList.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- auditorList[i].name %> <small class="text-muted"><%- auditorList[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- auditorList[i].name %> <small class="text-muted"><%- auditorList[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 ctx.material.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> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span></h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
- <p class="card-text"></p>
- </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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <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 || ah[iA].status === auditConst.status.checkNoPre) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- <% if (ctx.material.status === auditConst.status.checkNo) {%>
- <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"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span></h5>
- <div class="ml-3">
- <span>重新上报中</span>
- <p class="card-text"><small class="text-muted"></small></p>
- </div>
- </li>
- </ul>
- <ul class="list-group list-group-flush" id="auditors-list2">
- <% const auditorList = ctx.material.auditorList; %>
- <% for (let iA = 0; iA < auditorList.length; iA++) { %>
- <% if (iA === auditorList.length - 1) { %>
- <li class="list-group-item" data-auditid="<%- auditorList[iA].aid %>">
- <h5 class="card-title"><i class="fa fa-stop-circle"></i> <%- auditorList[iA].name %> <small class="text-muted"><%- auditorList[iA].role %></small><span class="pull-right">终审</span></h5>
- </li>
- <% } else { %>
- <li class="list-group-item" data-auditid="<%- auditorList[iA].aid %>">
- <h5 class="card-title">
- <i class="fa fa-chevron-circle-down"></i> <%- auditorList[iA].name %> <small class="text-muted"><%- auditorList[iA].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(iA+1) %>审</span>
- </h5>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- </div>
- </div>
- </div>
- <form class="modal-footer" method="post" action="<%- preUrl %>/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>
- <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
- </form>
- </div>
- </div>
- </div>
- <% } %>
- <% } %>
- <script>
- $('.modal').on('shown.bs.modal', function () {
- const height = $(this)[0].scrollHeight;
- const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
- const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
- // 450是modal没有滚动条时的最大高度,超过则出现滚动条,需要自动下拉到底部
- // if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
- // scrollBox.scrollTop(height);
- // }
- scrollBox.scrollTop(0);
- const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
- const hdheight = hdiv ? hdiv.parents('.list-group-item').offset().top : null;
- if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 450 && hdheight - bdiv > 450) {
- scrollBox.scrollTop(hdheight - bdiv);
- }
- });
- function divSearch(div) {
- if (div.length > 0) {
- return true;
- }
- return false;
- }
- </script>
|