123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <% if (tender.ledger_status === auditConst.status.checking && curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
- <!--审批通过-->
- <div class="modal fade" id="sp-done" data-backdrop="static">
- <div class="modal-dialog modal-lg" role="document">
- <form class="modal-content" action="/tender/<%- tender.id %>/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">
- <li class="list-group-item">
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
- </li>
- <% for (let i = 0; i < auditors.length; i++) { %>
- <li class="list-group-item">
- <% if (i < auditors.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1)%>审</span>
- <% } else {%>
- <i class="fa fa fa-stop-circle"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right">终审</span>
- <% } %>
- </li>
- <% } %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% if (tender.ledger_status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <li class="list-group-item">
- <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span></h5>
- <div class="ml-3">
- <span class="text-success"><small><%- auditors[0].begin_time.toLocaleDateString() %></small> <% if (tender.ledger_times > 1) { %>重新<% } %>上报</span>
- </div>
- </li>
- <% for (let iA = 0; iA < auditors.length; iA++) { %>
- <li class="list-group-item">
- <% if (auditors[iA].status === auditConst.status.checked) { %>
- <h5 class="card-title">
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-success' : 'fa fa-stop-circle text-success') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- auditors[iA].end_time.toLocaleDateString() %></small> 审批通过</span>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- <% } else if (auditors[iA].stauts == auditConst.status.checking) { %>
- <h5 class="card-title">
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <span>审批中</span>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- <% } else { %>
- <h5 class="card-title">
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- <% } %>
- <% 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" action="/tender/<%- tender.id %>/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">
- <li class="list-group-item">
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
- </li>
- <% for (let i = 0; i < auditors.length; i++) { %>
- <li class="list-group-item">
- <% if (i < auditors.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1)%>审</span>
- <% } else {%>
- <i class="fa fa fa-stop-circle"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right">终审</span>
- <% } %>
- </li>
- <% } %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% if (tender.ledger_status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <li class="list-group-item">
- <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span></h5>
- <div class="ml-3">
- <span class="text-success"><small><%- auditors[0].begin_time.toLocaleDateString() %></small> <% if (tender.ledger_times > 1) { %>重新<% } %>上报</span>
- </div>
- </li>
- <% for (let iA = 0; iA < auditors.length; iA++) { %>
- <li class="list-group-item">
- <% if (auditors[iA].status === auditConst.status.checked) { %>
- <h5 class="card-title">
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-success' : 'fa fa-stop-circle text-success') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- auditors[iA].end_time.toLocaleDateString() %></small> 审批通过</span>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- <% } else if (auditors[iA].stauts == auditConst.status.checking) { %>
- <h5 class="card-title">
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <span>审批中</span>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- <% } else { %>
- <h5 class="card-title">
- <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- <% } %>
- <% 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 class="alert alert-warning">审批退回,将直接退回给上报人。</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> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
- </li>
- <% for (let i = 0; i < auditors.length; i++) { %>
- <li class="list-group-item">
- <% if (i < auditors.length - 1) { %>
- <i class="fa fa-chevron-circle-down"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1)%>审</span>
- <% } else {%>
- <i class="fa fa fa-stop-circle"></i> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small><span class="pull-right">终审</span>
- <% } %>
- </li>
- <% } %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% for (const ah of auditHistory) { %>
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <% for (let iA = 0; iA < ah.length; iA++) { %>
- <% if (iA === 0) { %>
- <li class="list-group-item">
- <h5 class="card-title">
- <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
- </h5>
- <div class="ml-3">
- <span class="text-success"><small><%- ah[iA].begin_time.toLocaleDateString() %></small> <% if (auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
- </div>
- </li>
- <li class="list-group-item">
- <h5 class="card-title">
- <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } else if (iA === ah.length - 1) { %>
- <li class="list-group-item">
- <h5 class="card-title">
- <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
- </h5>
- <div class="ml-3">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <li class="list-group-item">
- <h5 class="card-title">
- <i class="fa fa-chevron-circle-down <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <% if (ah[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- ah[iA].opinion %></p>
- </div>
- </li>
- <% } %>
- <% } %>
- </ul>
- </div>
- <% } %>
- <% if (tender.ledger_status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <% for (let iA = 0; iA < auditors.length; iA++) { %>
- <% if (iA === 0) { %>
- <li class="list-group-item">
- <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span></h5>
- <div class="ml-3">
- <span class="text-success"><small><%- auditors[iA].begin_time.toLocaleDateString() %></small> <% if (tender.ledger_times > 1) { %>重新<% } %>上报</span>
- </div>
- </li>
- <li class="list-group-item">
- <h5 class="card-title">
- <i class="fa <%if (iA === auditors.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%- auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[auditors[iA].status] %>"> <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- auditors[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- </li>
- <% } else if (iA === auditors.length - 1) { %>
- <li class="list-group-item">
- <h5 class="card-title">
- <i class="fa fa-stop-circle <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right">终审</span>
- </h5>
- <div class="ml-3">
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[auditors[iA].status] %>"> <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- auditors[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
- <% } %>
- <p class="card-text"><%- auditors[iA].opinion %></p>
- </div>
- </li>
- <% } else { %>
- <li class="list-group-item">
- <h5 class="card-title">
- <i class="fa fa-chevron-circle-down <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%- auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
- </h5>
- <div class="ml-3">
- <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
- <span class="<%- auditConst.statusClass[auditors[iA].status] %>"> <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- auditors[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
- <% } %>
- <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>
- <% } %>
|