123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758 |
- <% include ../shares/delete_hint_modal.ejs %>
- <!--添加附件-->
- <div class="modal fade" id="addfujian">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="myModalLabel">上传附件</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <p>单个文件大小限制:f0MB,支持office等文档格式、图片格式、压缩包格式</p>
- <!-- <p><a href="javascript: void(0);" class="btn btn-primary" id="file-modal-target">选择文件</a></p> -->
- <input type="file" id="file-modal" multiple="multiple">
- </div>
- <div class="modal-footer">
- <button id="file-cancel" type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
- <button id="file-ok" type="button" class="btn btn-primary btn-sm">添加</button>
- </div>
- </div>
- </div>
- </div>
- <!--附件-->
- <div class="modal fade" id="pay-contract-file" data-backdrop="static" style="z-index: 1049">
- <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">
- <% if (financialPay.filePermission) { %>
- <div class="form-group upload-permission">
- <label for="formGroupExampleInput">单个文件大小限制:50MB,支持<span data-toggle="tooltip" data-placement="bottom" title="doc,docx,xls,xlsx,ppt,pptx,pdf">office等文档格式</span>、<span data-toggle="tooltip" data-placement="bottom" title="jpg,png,bmp">图片格式</span>、<span data-toggle="tooltip" data-placement="bottom" title="rar,zip">压缩包格式</span></label>
- <br>
- <input type="file" class="" multiple>
- </div>
- <div>
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="radio" name="type" id="file_type_0" value="0" checked>
- <label class="form-check-label" for="file_type_0">普通附件</label>
- </div>
- <% if (!financialPay.readOnly) { %>
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="radio" name="type" id="file_type_1" value="1">
- <label class="form-check-label" for="file_type_1">发票</label>
- </div>
- <% } %>
- </div>
- <% } %>
- <div class="mt-2 modal-height-500" style="overflow:auto;">
- <table class="table table-sm table-bordered text-center" style="word-break:break-all; table-layout: fixed">
- <thead>
- <tr><th width="5%">序号</th><th>名称</th><th width="8%">上传人</th><th width="20%">发票号<th width="20%">上传时间</th><th width="15%">操作</th></tr>
- </thead>
- <tbody id="contract-files">
- </tbody>
- </table>
- </div>
- </div>
- <div class="modal-footer">
- <input value="" type="hidden" id="file-contract-id">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- </div>
- </div>
- </div>
- </div>
- <% if ((financialPay.status === auditConst.status.uncheck || financialPay.status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === financialPay.uid) { %>
- <!--上报审批-->
- <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="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 = financialPay.auditorGroups.length; i < iLen; i++) { %>
- <li class="list-group-item d-flex" auditorId="<%- financialPay.auditorGroups[i][0].aid %>">
- <div class="col-auto"><%- i+1 %></div>
- <div class="col">
- <% for (const auditor of financialPay.auditorGroups[i]) { %>
- <div class="d-inline-block mx-1" auditorId="<%- auditor.aid %>">
- <i class="fa fa-user text-muted"></i> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small>
- </div>
- <% } %>
- </div>
- <div class="col-auto">
- <% if (financialPay.auditorGroups[i][0].audit_type !== auditType.key.common) { %>
- <span class="badge badge-pill badge-<%- auditType.info[financialPay.auditorGroups[i][0].audit_type].class %> badge-bg-small"><small><%- auditType.info[financialPay.auditorGroups[i][0].audit_type].long%></small></span>
- <% } %>
- </div>
- </li>
- <% } %>
- </ul>
- </div>
- </div>
- </div>
- <form class="modal-footer" method="post" action="<%- preUrl2 %>/audit/start" onsubmit="return checkStartFrom()">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
- <% if (ctx.session.sessionUser.accountId === financialPay.uid) { %>
- <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
- <% } %>
- </form>
- </div>
- </div>
- </div>
- <!-- 添加合同 -->
- <div class="modal fade show" id="add-deal" data-backdrop="static">
- <div class="modal-dialog modal-xl" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title">添加合同</h5>
- <div class="ml-auto"><strong><%- financialPay.tenderName %></strong> </div>
- </div>
- <div class="modal-body">
- <div class="mb-2">
- <div class="d-inline-block">
- <h6 class="mt-1 col-auto px-0">合同分类:</h6>
- </div>
- <div class="d-inline-block col-4">
- <select class="form-control form-control-sm col-auto" id="contract-tree">
- <option value="">劳务</option>
- <option value="" selected>材料</option>
- <option value="">机械</option>
- <option value="">其他</option>
- <option value="" selected>全部</option>
- </select>
- </div>
- <div class="d-inline-block col-5 px-0">
- <div class="input-group">
- <input placeholder="输入合同编号/名称可查询" type="text" id="contract-keyword" name="keyword" value="" class="form-control form-control-sm">
- <div class="input-group-append">
- <button class="btn btn-secondary btn-sm" id="search-contract-btn"><i aria-hidden="true" class="fa fa-search"></i></button>
- </div>
- </div>
- </div>
- </div>
- <div style="max-height: 500px;overflow: auto;">
- <table class="table table-bordered">
- <tr class="text-center">
- <th width="50px"><input type="checkbox" id="select-all-contract"></th>
- <th width="100px">合同类别</th>
- <th width="150px">合同编号</th>
- <th width="">合同名称</th>
- <th width="100px">合同金额</th>
- <th width="200px">收款单位</th>
- <th width="200px">收款账号</th>
- </tr>
- <tbody id="contract-list">
- </tbody>
- </table>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
- <button type="button" class="btn btn-sm btn-primary" id="add-contract-btn">确定添加</button>
- </div>
- </div>
- </div>
- </div>
- <% } %>
- <% if(financialPay && (financialPay.status !== auditConst.status.uncheck)) { %>
- <!--审批流程/结果-->
- <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"><%- financialPay.status === auditConst.status.checkNo ? '重新上报' : '审批流程' %></h5>
- </div>
- <div class="modal-body">
- <div class="row">
- <div class="col-4">
- <div class="card modal-height-500 mt-3" style="overflow: auto">
- <ul class="list-group list-group-flush auditors-list" id="auditors-list">
- <% financialPay.auditors2.forEach((item, idx) => { %>
- <% if (idx === 0) { %>
- <li class="list-group-item d-flex justify-content-between align-items-center">
- <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
- </li>
- <% } else if(idx === financialPay.auditors2.length -1 && idx !== 0) { %>
- <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
- <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <div class="d-flex ml-auto">
- <% if (item[0].audit_type !== auditType.key.common) { %>
- <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
- <% } %>
- <span class="badge badge-light badge-pill"><small>终审</small></span>
- </div>
- </li>
- <% } else {%>
- <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
- <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <div class="d-flex ml-auto">
- <% if (item[0].audit_type !== auditType.key.common) { %>
- <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
- <% } %>
- <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
- </div>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% financialPay.auditHistory.forEach((his, idx) => { %>
- <!-- 展开/收起历史流程 -->
- <% if(idx === financialPay.auditHistory.length - 1 && financialPay.auditHistory.length !== 1) { %>
- <div class="text-right">
- <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
- </div>
- <% } %>
- <div class="<%- idx < financialPay.auditHistory.length - 1 ? 'fold-card' : '' %>">
- <div class="text-center text-muted"><%- idx+1 %>#</div>
- <ul class="timeline-list list-unstyled mt-2 <% if (idx === financialPay.auditHistory.length - 1) { %>last-auditor-list<% } %>">
- <% his.forEach((group, index) => { %>
- <% if (index === 0) { %>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- group.beginYear %>
- <span><%- group.beginDate %></span>
- <span><%- group.beginTime %></span>
- </div>
- <div class="timeline-item-tail"></div>
- <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
- <div class="timeline-item-content">
- <div class="py-1">
- <span class="text-black-50">原报</span>
- <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
- </div>
- <div class="card">
- <div class="card-body px-3 py-0">
- <div class="card-text p-2 py-3 row">
- <div class="col">
- <span class="h6"><%- financialPay.user.name %></span>
- <span class="text-muted ml-1"><%- financialPay.user.role %></span>
- </div>
- <div class="col">
- <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </li>
- <% } %>
- <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === financialPay.auditHistory.length - 1) { %>is_uncheck<% } %>">
- <% if (group.endYear) { %>
- <div class="timeline-item-date">
- <%- group.endYear %>
- <span><%- group.endDate %></span>
- <span><%- group.endTime %></span>
- </div>
- <% } %>
- <% if (index < his.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if (group.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
- <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
- <% } else if (ctx.helper._.includes([auditConst.status.checkNo], group.status)) { %>
- <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
- <% } else if (group.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
- <% } else { %>
- <div class="timeline-item-icon bg-secondary text-light"></div>
- <% } %>
- <div class="timeline-item-content">
- <div class="py-1">
- <span class="text-black-50">
- <%- (group.audit_order === 0 ? '原报' : !group.is_final ? group.audit_order + '审' : '终审') %>
- <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
- </span>
- <% if (group.status !== auditConst.status.uncheck) { %>
- <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
- <% } %>
- </div>
- <div class="card">
- <div class="card-body px-3 py-0">
- <% for (const [i, auditor] of group.auditors.entries()) { %>
- <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
- <div class="col">
- <span class="h6"><%- auditor.name %></span>
- <span class="text-muted ml-1"><%- auditor.role %></span>
- </div>
- <div class="col">
- <% if (auditor.status === auditConst.status.checked) { %>
- <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
- <% } else if (ctx.helper._.includes([auditConst.status.checkNo], auditor.status)) { %>
- <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
- <% } else if (auditor.status === auditConst.status.checking) { %>
- <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
- <% } %>
- </div>
- <% if (auditor.opinion) { %>
- <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion %></div>
- <% } %>
- </div>
- <% } %>
- </div>
- </div>
- </div>
- </li>
- <% }) %>
- </ul>
- </div>
- <% }) %>
- </div>
- </div>
- </div>
- <form class="modal-footer" method="post" action="<%- preUrl2 %>/audit/start" onsubmit="return checkStartFrom()">
- <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- <% if(financialPay.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === financialPay.uid) { %>
- <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
- <% } %>
- </form>
- </div>
- </div>
- </div>
- <% } %>
- <% if (financialPay.status === auditConst.status.checking) { %>
- <% if (financialPay.curAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0) { %>
- <!--审批通过-->
- <div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
- <div class="modal-dialog modal-lg" role="document">
- <form class="modal-content" action="<%- preUrl2 %>/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 modal-height-500 mt-3" style="overflow: auto">
- <ul class="list-group list-group-flush auditors-list">
- <% financialPay.auditors2.forEach((item, idx) => { %>
- <% if (idx === 0) { %>
- <li class="list-group-item d-flex justify-content-between align-items-center">
- <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
- </li>
- <% } else if(idx === financialPay.auditors2.length -1 && idx !== 0) { %>
- <li class="list-group-item d-flex justify-content-between align-items-center">
- <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <div class="d-flex ml-auto">
- <% if (item[0].audit_type !== auditType.key.common) { %>
- <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
- <% } %>
- <span class="badge badge-light badge-pill"><small>终审</small></span>
- </div>
- </li>
- <% } else {%>
- <li class="list-group-item d-flex justify-content-between align-items-center">
- <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <div class="d-flex ml-auto">
- <% if (item[0].audit_type !== auditType.key.common) { %>
- <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1 ml-auto"><small><%- auditType.info[item[0].audit_type].short %></small></span>
- <% } %>
- <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
- </div>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% financialPay.auditHistory.forEach((his, idx) => { %>
- <!-- 展开/收起历史流程 -->
- <% if(idx === financialPay.auditHistory.length - 1 && financialPay.auditHistory.length !== 1) { %>
- <div class="text-right">
- <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
- </div>
- <% } %>
- <div class="<%- idx < financialPay.auditHistory.length - 1 ? 'fold-card' : '' %>">
- <div class="text-center text-muted"><%- idx+1 %>#</div>
- <ul class="timeline-list list-unstyled mt-2 <% if (idx === financialPay.auditHistory.length - 1) { %>last-auditor-list<% } %>">
- <% his.forEach((group, index) => { %>
- <% if (index === 0) { %>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- group.beginYear %>
- <span><%- group.beginDate %></span>
- <span><%- group.beginTime %></span>
- </div>
- <div class="timeline-item-tail"></div>
- <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
- <div class="timeline-item-content">
- <div class="py-1">
- <span class="text-black-50">原报</span>
- <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
- </div>
- <div class="card">
- <div class="card-body px-3 py-0">
- <div class="card-text p-2 py-3 row">
- <div class="col">
- <span class="h6"><%- financialPay.user.name %></span>
- <span class="text-muted ml-1"><%- financialPay.user.role %></span>
- </div>
- <div class="col">
- <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </li>
- <% } %>
- <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === financialPay.auditHistory.length - 1) { %>is_uncheck<% } %>">
- <% if (group.endYear) { %>
- <div class="timeline-item-date">
- <%- group.endYear %>
- <span><%- group.endDate %></span>
- <span><%- group.endTime %></span>
- </div>
- <% } %>
- <% if (index < his.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if (group.status === auditConst.status.checked) { %>
- <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
- <% } else if (ctx.helper._.includes([auditConst.status.checkNo], group.status)) { %>
- <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
- <% } else if (group.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
- <% } else { %>
- <div class="timeline-item-icon bg-secondary text-light"></div>
- <% } %>
- <div class="timeline-item-content">
- <div class="py-1">
- <span class="text-black-50">
- <%- (group.audit_order === 0 ? '原报' : !group.is_final ? group.audit_order + '审' : '终审') %>
- <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
- </span>
- <% if (group.status !== auditConst.status.uncheck) { %>
- <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
- <% } %>
- </div>
- <div class="card">
- <div class="card-body px-3 py-0">
- <% for (const [i, auditor] of group.auditors.entries()) { %>
- <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
- <div class="col">
- <span class="h6"><%- auditor.name %></span>
- <span class="text-muted ml-1"><%- auditor.role %></span>
- </div>
- <div class="col">
- <% if (auditor.status === auditConst.status.checked) { %>
- <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
- <% } else if (ctx.helper._.includes([auditConst.status.checkNo], auditor.status)) { %>
- <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
- <% } else if (auditor.status === auditConst.status.checking) { %>
- <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
- <% } %>
- </div>
- <% if (auditor.status !== auditConst.status.uncheck && auditor.opinion) { %>
- <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion %></div>
- <% } %>
- <% if (auditor.status === auditConst.status.checking && auditor.aid === ctx.session.sessionUser.accountId) { %>
- <div class="col-12 py-1 bg-light">
- <textarea class="form-control form-control-sm" name="opinion">同意</textarea>
- </div>
- <% } %>
- </div>
- <% } %>
- </div>
- </div>
- </div>
- </li>
- <% }) %>
- </ul>
- </div>
- <% }) %>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
- <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
- <button type="submit" class="btn btn-success btn-sm">确认通过</button>
- </div>
- </form>
- </div>
- </div>
- <!--审批退回-->
- <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
- <div class="modal-dialog modal-lg" role="document">
- <form class="modal-content modal-lg" action="<%- preUrl2 %>/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 modal-height-500 mt-3" style="overflow: auto">
- <ul class="list-group list-group-flush auditors-list">
- <% financialPay.auditors2.forEach((item, idx) => { %>
- <% if (idx === 0) { %>
- <li class="list-group-item d-flex justify-content-between align-items-center">
- <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
- </li>
- <% } else if(idx === financialPay.auditors2.length -1 && idx !== 0) { %>
- <li class="list-group-item d-flex justify-content-between align-items-center">
- <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <div class="d-flex ml-auto">
- <% if (item[0].audit_type !== auditType.key.common) { %>
- <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
- <% } %>
- <span class="badge badge-light badge-pill"><small>终审</small></span>
- </div>
- </li>
- <% } else {%>
- <li class="list-group-item d-flex justify-content-between align-items-center">
- <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
- <span class="text-muted">
- <% for (const u of item) { %>
- <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
- <% } %>
- </span>
- <div class="d-flex ml-auto">
- <% if (item[0].audit_type !== auditType.key.common) { %>
- <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
- <% } %>
- <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
- </div>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% financialPay.auditHistory.forEach((his, idx) => { %>
- <!-- 展开/收起历史流程 -->
- <% if(idx === financialPay.auditHistory.length - 1 && financialPay.auditHistory.length !== 1) { %>
- <div class="text-right">
- <a href="javascript: void(0);" id="fold-btn" data-target="show" data-idx="<%- idx + 1 %>">展开历史审批流程</a>
- </div>
- <% } %>
- <div class="<%- idx < financialPay.auditHistory.length - 1 ? 'fold-card' : '' %>">
- <div class="text-center text-muted"><%- idx+1 %>#</div>
- <ul class="timeline-list list-unstyled mt-2 <% if (idx === financialPay.auditHistory.length - 1) { %>last-auditor-list<% } %>">
- <% his.forEach((group, index) => { %>
- <% if (index === 0) { %>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- group.beginYear %>
- <span><%- group.beginDate %></span>
- <span><%- group.beginTime %></span>
- </div>
- <div class="timeline-item-tail"></div>
- <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
- <div class="timeline-item-content">
- <div class="py-1">
- <span class="text-black-50">原报</span>
- <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
- </div>
- <div class="card">
- <div class="card-body px-3 py-0">
- <div class="card-text p-2 py-3 row">
- <div class="col">
- <span class="h6"><%- financialPay.user.name %></span>
- <span class="text-muted ml-1"><%- financialPay.user.role %></span>
- </div>
- <div class="col">
- <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </li>
- <% } %>
- <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === financialPay.auditHistory.length - 1) { %>is_uncheck<% } %>">
- <% if (his.endYear) { %>
- <div class="timeline-item-date">
- <%- group.endYear %>
- <span><%- group.endDate %></span>
- <span><%- group.endTime %></span>
- </div>
- <% } %>
- <% if (index < his.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if (group.status === auditConst.status.checked) { %>
- <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
- <% } else if (ctx.helper._.includes([auditConst.status.checkNo], group.status)) { %>
- <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
- <% } else if (group.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
- <% } else { %>
- <div class="timeline-item-icon bg-secondary text-light"></div>
- <% } %>
- <div class="timeline-item-content">
- <div class="py-1">
- <span class="text-black-50">
- <%- (group.audit_order === 0 ? '原报' : !group.is_final ? group.audit_order + '审' : '终审') %>
- <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
- </span>
- <% if (group.status !== auditConst.status.uncheck) { %>
- <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
- <% } %>
- </div>
- <div class="card">
- <div class="card-body px-3 py-0">
- <% for (const [i, auditor] of group.auditors.entries()) { %>
- <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
- <div class="col">
- <span class="h6"><%- auditor.name %></span>
- <span class="text-muted ml-1"><%- auditor.role %></span>
- </div>
- <div class="col">
- <% if (auditor.status === auditConst.status.checked) { %>
- <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
- <% } else if (ctx.helper._.includes([auditConst.status.checkNo], auditor.status)) { %>
- <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
- <% } else if (auditor.status === auditConst.status.checking) { %>
- <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
- <% } %>
- </div>
- <% if (auditor.status !== auditConst.status.uncheck && auditor.opinion) { %>
- <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
- <% } %>
- <% if (auditor.status === auditConst.status.checking && auditor.aid === ctx.session.sessionUser.accountId) { %>
- <div class="col-12 py-1 bg-light">
- <textarea class="form-control form-control-sm" name="opinion">不同意</textarea>
- <div class="alert alert-warning mt-1 mb-0 p-2">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>" checked>
- <label class="form-check-label" for="inlineRadio1">退回原报 <%- financialPay.user.name %></label>
- </div>
- </div>
- </div>
- <% } %>
- </div>
- <% } %>
- </div>
- </div>
- </div>
- </li>
- <% }) %>
- </ul>
- </div>
- <% }) %>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
- <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
- </div>
- </form>
- </div>
- </div>
- <% } %>
- <% } %>
- <script>
- $(function () {
- $('.sp-location-list').on('shown.bs.modal', function () {
- const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
- const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
- scrollBox.scrollTop(0);
- const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
- const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
- if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 200 && hdheight - bdiv > 200) {
- scrollBox.scrollTop(hdheight - bdiv);
- }
- });
- function divSearch(div) {
- if (div.length > 0) {
- return true;
- }
- return false;
- }
- // 展开历史审核记录
- $('.modal-body #fold-btn').click(function () {
- const type = $(this).data('target')
- const auditCard = $(this).parent().parent()
- if (type === 'show') {
- $(this).data('target', 'hide')
- auditCard.find('.fold-card').slideDown('swing', () => {
- auditCard.find('#fold-btn').text('收起历史审核记录')
- })
- } else {
- $(this).data('target', 'show')
- auditCard.find('.fold-card').slideUp('swing', () => {
- auditCard.find('#fold-btn').text('展开历史审核记录')
- })
- }
- });
- $('.sp-list-btn').click(function () {
- const type = $(this).data('type')
- if (type === 'hide') {
- $('.sp-list-item').hide()
- $('.modal-title').text('审批流程')
- } else {
- $('.sp-list-item').show()
- $('.modal-title').text('重新上报')
- }
- });
- });
- </script>
|