123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628 |
- <% 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>
- <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>
- <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">
- <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>
- </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>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small>
- <% } %>
- </li>
- <% } %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <li class="list-group-item">
- <span class="text-success pull-right"><small><%- ctx.material.auditors[0].begin_time.toLocaleDateString() %></small> 上报</span>
- <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></h5>
- </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) { %>
- <span class="text-success pull-right"><small><%- auditors[iA].end_time.toLocaleString() %></small> 审批通过</span>
- <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>
- </h5>
- <% } else if (auditors[iA].stauts == auditConst.status.checking) { %>
- <span class="pull-right">审批中</span>
- <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>
- </h5>
- <% } 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>
- </h5>
- <% } %>
- <% if (auditors[iA].status === auditConst.status.checked) { %>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- <% } 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">
- <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>
- </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>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small>
- <% } %>
- </li>
- <% } %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <li class="list-group-item">
- <span class="text-success pull-right"><small><%- ctx.material.auditors[0].begin_time.toLocaleDateString() %></small> 上报</span>
- <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></h5>
- </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) { %>
- <span class="text-success pull-right"><small><%- auditors[iA].end_time.toLocaleString() %></small> 审批通过</span>
- <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>
- </h5>
- <% } else if (auditors[iA].stauts == auditConst.status.checking) { %>
- <span class="pull-right">审批中</span>
- <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>
- </h5>
- <% } 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>
- </h5>
- <% } %>
- <% if (auditors[iA].status === auditConst.status.checked) { %>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- <% } 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.checkNo %>" />
- <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>
- </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>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small>
- <% } %>
- </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">
- <span class="text-success pull-right"><% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
- <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></h5>
- <p class="card-text"><small class="text-muted"><%- ah[iA].begin_time.toLocaleDateString() %></small></p>
- </li>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else if (iA === ah.length - 1) { %>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else { %>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </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">
- <span class="text-success pull-right"><% if (ctx.material.times > 1) { %>重新<% } %>上报</span>
- <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></h5>
- <p class="card-text"><small class="text-muted"><%- auditors[iA].begin_time.toLocaleDateString() %></small></p>
- </li>
- <li class="list-group-item">
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[auditors[iA].status] %> pull-right"><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else if (iA === auditors.length - 1) { %>
- <li class="list-group-item">
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[auditors[iA].status] %> pull-right"><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else { %>
- <li class="list-group-item">
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[auditors[iA].status] %> pull-right"><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </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>
- </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>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small>
- <% } %>
- </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">
- <span class="text-success pull-right"><% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
- <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></h5>
- <p class="card-text"><small class="text-muted"><%- ah[iA].begin_time.toLocaleDateString() %></small></p>
- </li>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else if (iA === ah.length - 1) { %>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else { %>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </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>
- </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>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small>
- <% } %>
- </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">
- <span class="text-success pull-right"><% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
- <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></h5>
- <p class="card-text"><small class="text-muted"><%- ah[iA].begin_time.toLocaleDateString() %></small></p>
- </li>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else if (iA === ah.length - 1) { %>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else { %>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </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">
- <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>
- </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>
- <% } else { %>
- <i class="fa fa fa-stop-circle"></i> <%- auditorList[i].name %> <small class="text-muted"><%- auditorList[i].role %></small>
- <% } %>
- </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">
- <span class="text-success pull-right"><% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
- <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></h5>
- <p class="card-text"><small class="text-muted"><%- ah[iA].begin_time.toLocaleDateString() %></small></p>
- </li>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else if (iA === ah.length - 1) { %>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </li>
- <% } else { %>
- <li class="list-group-item">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
- <% } %>
- <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></h5>
- <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %>
- <p class="card-text mb-1"><%- ah[iA].opinion %></p>
- <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
- <% } %>
- </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">
- <span class="pull-right">重新上报中</span>
- <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></h5>
- <p class="card-text"><small class="text-muted"></small></p>
- </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></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></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>
- <% } %>
- <% } %>
|