123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971 |
- <!--批量添加清单部位-->
- <div class="modal fade" id="batch" 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>
- <div class="modal-body">
- <div class="custom-control custom-checkbox mb-2">
- <label class="form-check-label">
- <input class="form-check-input" type="checkbox" name="batch-filter">
- 过滤无计量单元的清单
- </label>
- </div>
- <div class="row">
- <div class="col-6">
- <h6>清单信息</h6>
- <div class="batch-l-t">
- </div>
- <h6>计量单元数量复核表</h6>
- <div class="batch-l-b">
- </div>
- </div>
- <div class="col-6">
- <h6>签约清单</h6>
- <div class="batch-r">
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
- <button type="button" class="btn btn-primary btn-sm" id="batch-ok">确定</button>
- </div>
- </div>
- </div>
- </div>
- <% if ((revise.status === audit.status.uncheck || revise.status === audit.status.checkNo) && ctx.session.sessionUser.accountId === revise.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="dropdown text-right">
- <% if (ctx.tender.info.shenpi.revise !== shenpiConst.sp_status.gdspl) { %>
- <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
- data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- 添加审批流程
- </button>
- <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"
- style="width:220px">
- <div class="mb-2 p-2"><input class="form-control form-control-sm" placeholder="姓名/手机 检索"
- id="gr-search" autocomplete="off"></div>
- <dl class="list-unstyled book-list">
- <% accountGroup.forEach((group, idx) => { %>
- <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
- data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
- <div class="dd-content" data-toggleid="<%- idx %>">
- <% group.groupList.forEach(item => { %>
- <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
- <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
- class="ml-auto"><%- item.mobile %></span></p>
- <span class="text-muted"><%- item.role %></span>
- </dd>
- <% });%>
- </div>
- <% }) %>
- </dl>
- </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 = auditorList.length; i < iLen; i++) { %>
- <li class="list-group-item" auditorId="<%- auditorList[i].audit_id %>">
- <% if (ctx.tender.info.shenpi.revise === shenpiConst.sp_status.sqspr ||
- (ctx.tender.info.shenpi.revise === shenpiConst.sp_status.gdzs && i+1 !== iLen)) { %>
- <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
- <% } %>
- <span><%- auditorList[i].audit_order %> <%- auditorList[i].name %></span>
- <small class="text-muted"><%- auditorList[i].role %></small>
- </li>
- <% } %>
- </ul>
- </div>
- </div>
- </div>
- <form class="modal-footer" method="post" action="/tender/<%- ctx.tender.id %>/revise/audit/start"
- name="revise-start">
- <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 (revise.status === auditConst.status.checking) { %>
- <% if (curAuditor && curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
- <<!--审批通过-->
- <div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
- <div class="modal-dialog modal-lg" role="document">
- <form class="modal-content" action="<%- preUrl %>/revise/audit/check" method="post"
- onsubmit="return auditCheck(0);">
- <div class="modal-header">
- <h5 class="modal-title">审批通过</h5>
- </div>
- <div class="modal-body">
- <div class="row">
- <div class="col-4">
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <% auditors.forEach((item, idx) => { %>
- <% if (idx === 0) { %>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right">原报</span>
- </li>
- <% } else if(idx === auditors.length -1 && idx !== 0) { %>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa fa-stop-circle"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right">终审</span>
- </li>
- <% } else {%>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% auditHistory.forEach((auditors, idx) => { %>
- <!-- 展开/收起历史流程 -->
- <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
- <div class="text-right">
- <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
- </div>
- <% } %>
- <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
- <div class="text-center text-muted"><%- idx+1 %>#</div>
- <ul class="timeline-list list-unstyled mt-2">
- <% auditors.forEach((auditor, index) => { %>
- <% if (index === 0) { %>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.begin_time) %>
- </div>
- <div class="timeline-item-tail"></div>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-caret-down"></i>
- </div>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- user.name %></span><span
- class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
- </p>
- <p class="text-muted mb-0"><%- user.role %></p>
- </div>
- </div>
- </div>
- </div>
- </li>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.end_time) %>
- </div>
- <% if(index < auditors.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if(auditor.status === auditConst.status.checked) { %>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-check"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-level-up"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-ellipsis-h"></i>
- </div>
- <% } else {%>
- <div class="timeline-item-icon bg-secondary text-light">
- </div>
- <% } %>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
- class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
- </p>
- <p class="text-muted mb-0"><%- auditor.role %></p>
- </div>
- </div>
- <!--审批意见-->
- <% if(auditor.status !== auditConst.status.uncheck) { %>
- <div class="card-body p-3 border-top">
- <% if (revise.times === idx + 1 && auditor.status === auditConst.status.checking) { %>
- <label>审批意见<b class="text-danger">*</b></label>
- <textarea class="form-control form-control-sm"
- name="opinion">同意</textarea>
- <% } else { %>
- <p style="margin: 0;"><%- auditor.opinion %></p>
- <% } %>
- </div>
- <% } %>
- </div>
- </div>
- </li>
- <% } else {%>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.end_time) %>
- </div>
- <% if(index < auditors.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if(auditor.status === auditConst.status.checked) { %>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-check"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-level-up"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-ellipsis-h"></i>
- </div>
- <% } else { %>
- <div class="timeline-item-icon bg-secondary text-light">
- </div>
- <% } %>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- auditor.name %></span>
- <span
- class="pull-right
- <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
- <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
- <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
- </span>
- </p>
- <p class="text-muted mb-0"><%- auditor.role %></p>
- </div>
- </div>
- <!--审批意见-->
- <% if(auditor.status !== auditConst.status.uncheck) { %>
- <div class="card-body p-3 border-top">
- <% if (revise.times === idx + 1 && auditor.status === auditConst.status.checking) { %>
- <label>审批意见<b class="text-danger">*</b></label>
- <textarea class="form-control form-control-sm"
- name="opinion">同意</textarea>
- <% } else { %>
- <p style="margin: 0;"><%- auditor.opinion %></p>
- <% } %>
- </div>
- <% } %>
- </div>
- </div>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- <% }) %>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
- <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
- <button type="submit" class="btn btn-success btn-sm">确认通过</button>
- </div>
- </form>
- </div>
- </div>
- <!--审批退回-->
- <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
- <div class="modal-dialog modal-lg" role="document">
- <form class="modal-content modal-lg" action="<%- preUrl %>/revise/audit/check" method="post"
- onsubmit="return auditCheck(1);">
- <div class="modal-header">
- <h5 class="modal-title">审批退回</h5>
- </div>
- <div class="modal-body">
- <div class="row">
- <div class="col-4">
- <div class="card mt-3">
- <ul class="list-group list-group-flush">
- <% auditors.forEach((item, idx) => { %>
- <% if (idx === 0) { %>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right">原报</span>
- </li>
- <% } else if(idx === auditors.length -1 && idx !== 0) { %>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa fa-stop-circle"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right">终审</span>
- </li>
- <% } else {%>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% auditHistory.forEach((auditors, idx) => { %>
- <!-- 展开/收起历史流程 -->
- <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
- <div class="text-right">
- <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
- </div>
- <% } %>
- <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
- <div class="text-center text-muted"><%- idx+1 %>#</div>
- <ul class="timeline-list list-unstyled mt-2">
- <% auditors.forEach((auditor, index) => { %>
- <% if (index === 0) { %>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.begin_time) %>
- </div>
- <div class="timeline-item-tail"></div>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-caret-down"></i>
- </div>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- user.name %></span><span
- class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
- </p>
- <p class="text-muted mb-0"><%- user.role %></p>
- </div>
- </div>
- </div>
- </div>
- </li>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.end_time) %>
- </div>
- <% if(index < auditors.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if(auditor.status === auditConst.status.checked) { %>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-check"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-level-up"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-ellipsis-h"></i>
- </div>
- <% } else {%>
- <div class="timeline-item-icon bg-secondary text-light">
- </div>
- <% } %>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
- class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
- </p>
- <p class="text-muted mb-0"><%- auditor.role %></p>
- </div>
- </div>
- <!--审批意见-->
- <% if(auditor.times === revise.times && auditor.status !== auditConst.status.uncheck) { %>
- <div class="card-body p-3 border-top">
- <% if (revise.times === idx + 1 && auditor.status === auditConst.status.checking) { %>
- <label>审批意见<b class="text-danger">*</b></label>
- <textarea class="form-control form-control-sm"
- name="opinion">不同意</textarea>
- <% if (curAuditor.audit_id === auditor.audit_id) { %>
- <div id="reject-process" class="alert alert-warning"
- style="margin-top: 15px;">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="radio"
- name="checkType" id="inlineRadio1"
- value="<%- auditConst.status.checkNo %>">
- <label class="form-check-label" for="inlineRadio1">退回原报
- <%- user.name %></label>
- </div>
- <% if (auditor.order > 1 && auditor.audit_id !== auditors[0].audit_id) { %>
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="radio"
- name="checkType" id="inlineRadio2"
- value="<%- auditConst.status.checkNoPre %>">
- <label class="form-check-label" for="inlineRadio2">退回上一审批人
- <%- auditors[index-1].name %></label>
- </div>
- <% } %>
- </div>
- <% } %>
- <% } else if(auditor.status === auditConst.status.checked){ %>
- <p style="margin: 0;"><%- auditor.opinion %></p>
- <% } %>
- </div>
- <% } %>
- </div>
- </div>
- </li>
- <% } else {%>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.end_time) %>
- </div>
- <% if(index < auditors.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if(auditor.status === auditConst.status.checked) { %>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-check"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-level-up"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-ellipsis-h"></i>
- </div>
- <% } else { %>
- <div class="timeline-item-icon bg-secondary text-light">
- </div>
- <% } %>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- auditor.name %></span>
- <span
- class="pull-right
- <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
- <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
- <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
- </span>
- </p>
- <p class="text-muted mb-0"><%- auditor.role %></p>
- </div>
- </div>
- <!--审批意见-->
- <% if(auditor.times === revise.times && auditor.status !== auditConst.status.uncheck) { %>
- <div class="card-body p-3 border-top">
- <% if (revise.times === idx + 1 && auditor.status === auditConst.status.checking) { %>
- <label>审批意见<b class="text-danger">*</b></label>
- <textarea class="form-control form-control-sm"
- name="opinion">不同意</textarea>
- <% if (curAuditor.audit_id === auditor.audit_id ) { %>
- <div id="reject-process" class="alert alert-warning"
- style="margin-top: 15px;">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="radio"
- name="checkType" id="inlineRadio1"
- value="<%- auditConst.status.checkNo %>">
- <label class="form-check-label" for="inlineRadio1">退回原报
- <%- user.name %></label>
- </div>
- <% if (auditor.order > 1 && auditor.audit_id !== auditors[0].audit_id) { %>
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="radio"
- name="checkType" id="inlineRadio2"
- value="<%- auditConst.status.checkNoPre %>">
- <label class="form-check-label" for="inlineRadio2">退回上一审批人
- <%- auditors[index-1].name %></label>
- </div>
- <% } %>
- </div>
- <% } %>
- <% } else { %>
- <p style="margin: 0;"><%- auditor.opinion %></p>
- <% } %>
- </div>
- <% } %>
- </div>
- </div>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- <% }) %>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
- <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
- </div>
- </form>
- </div>
- </div>
- <% } %>
- <% } %>
- <!--审批流程/结果-->
- <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"><%- revise.status === auditConst.status.checking ? '审批流程' : '重新上报' %></h5>
- </div>
- <div class="modal-body">
- <div class="row">
- <div class="col-4">
- <% if(revise.status === auditConst.status.checkNo) { %>
- <a class="sp-list-item" 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" id="auditors-list">
- <% auditors.forEach((item, idx) => { %>
- <% if (idx === 0) { %>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right">原报</span>
- </li>
- <% } else if(idx === auditors.length -1 && idx !== 0) { %>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa fa-stop-circle"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right">终审</span>
- </li>
- <% } else {%>
- <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
- <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
- <small class="text-muted"><%- item.role %></small>
- <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto">
- <% auditHistory.forEach((auditors, idx) => { %>
- <!-- 展开/收起历史流程 -->
- <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
- <div class="text-right">
- <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
- </div>
- <% } %>
- <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
- <div class="text-center text-muted"><%- idx+1 %>#</div>
- <ul class="timeline-list list-unstyled mt-2">
- <% auditors.forEach((auditor, index) => { %>
- <% if (index === 0) { %>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.begin_time) %>
- </div>
- <div class="timeline-item-tail"></div>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-caret-down"></i>
- </div>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- user.name %></span><span
- class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
- </p>
- <p class="text-muted mb-0"><%- user.role %></p>
- </div>
- </div>
- </div>
- </div>
- </li>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.end_time) %>
- </div>
- <% if(index < auditors.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if(auditor.status === auditConst.status.checked) { %>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-check"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-level-up"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-ellipsis-h"></i>
- </div>
- <% } else {%>
- <div class="timeline-item-icon bg-secondary text-light">
- </div>
- <% } %>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
- class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
- </p>
- <p class="text-muted mb-0"><%- auditor.role %></p>
- </div>
- </div>
- <!--审批意见-->
- <% if (auditor.opinion) { %>
- <div class="card-body p-3 border-top">
- <p style="margin: 0;"><%- auditor.opinion %></p>
- </div>
- <% } %>
- </div>
- </div>
- </li>
- <% } else {%>
- <li class="timeline-list-item pb-2">
- <div class="timeline-item-date">
- <%- ctx.helper.formatDate(auditor.end_time) %>
- </div>
- <% if(index < auditors.length - 1) { %>
- <div class="timeline-item-tail"></div>
- <% } %>
- <% if(auditor.status === auditConst.status.checked) { %>
- <div class="timeline-item-icon bg-success text-light">
- <i class="fa fa-check"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-level-up"></i>
- </div>
- <% } else if(auditor.status === auditConst.status.checking) { %>
- <div class="timeline-item-icon bg-warning text-light">
- <i class="fa fa-ellipsis-h"></i>
- </div>
- <% } else { %>
- <div class="timeline-item-icon bg-secondary text-light">
- </div>
- <% } %>
- <div class="timeline-item-content">
- <div class="card">
- <div class="card-body p-3">
- <div class="card-text">
- <p class="mb-1"><span class="h5"><%- auditor.name %></span>
- <span
- class="pull-right
- <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
- <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
- <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
- </span>
- </p>
- <p class="text-muted mb-0"><%- auditor.role %></p>
- </div>
- </div>
- <!--审批意见-->
- <% if (auditor.opinion) { %>
- <div class="card-body p-3 border-top">
- <p style="margin: 0;"><%- auditor.opinion %></p>
- </div>
- <% } %>
- </div>
- </div>
- </li>
- <% } %>
- <% }) %>
- </ul>
- </div>
- <% }) %>
- </div>
- </div>
- </div>
- <form class="modal-footer" method="post" action="<%- preUrl %>/revise/audit/start"
- name="revise-start">
- <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- <% if(revise.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === revise.uid) { %>
- <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
- <% } %>
- </form>
- </div>
- </div>
- </div>
- <% include ../shares/merge_peg_modal.ejs %>
- <% include ../shares/import_excel_modal.ejs %>
- <% include ../shares/delete_hint_modal.ejs %>
- <% include ../shares/check_data_modal.ejs %>
- <% include ../shares/ledger_check_modal.ejs %>
- <% if(ctx.session.sessionUser.accountId === revise.uid && (revise.status === auditConst.status.uncheck || revise.status === auditConst.status.checkNo)) { %>
- <script>
- const cur_uid = '<%- ctx.session.sessionUser.accountId %>';
- const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
- const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup )) %>'));
- const shenpi_status = <%- ctx.tender.info.shenpi.revise %>;
- const shenpiConst = JSON.parse('<%- JSON.stringify(shenpiConst) %>');
- let timer = null;
- let oldSearchVal = null;
- $('#gr-search').bind('input propertychange', function (e) {
- oldSearchVal = e.target.value
- timer && clearTimeout(timer)
- timer = setTimeout(() => {
- const newVal = $('#gr-search').val()
- let html = ''
- if (newVal && newVal === oldSearchVal) {
- accountList.filter(item => item && (item.name.indexOf(newVal) !== -1 || (item.mobile && item.mobile.indexOf(newVal) !== -1))).forEach(item => {
- html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
- <p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
- class="ml-auto">${item.mobile || ''}</span></p>
- <span class="text-muted">${item.role || ''}</span>
- </dd>`
- })
- $('.book-list').empty()
- $('.book-list').append(html)
- } else {
- if (!$('.acc-btn').length) {
- accountGroup.forEach((group, idx) => {
- if (!group) return
- html += `<dt><a href="javascript: void(0);" class="acc-btn" data-groupid="${idx}" data-type="hide"><i class="fa fa-plus-square"></i>
- </a> ${group.groupName}</dt>
- <div class="dd-content" data-toggleid="${idx}">`
- group.groupList.forEach(item => {
- if (item.id !== cur_uid) {
- html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
- <p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
- class="ml-auto">${item.mobile || ''}</span></p>
- <span class="text-muted">${item.role || ''}</span>
- </dd>`
- }
- });
- html += '</div>'
- })
- $('.book-list').empty()
- $('.book-list').append(html)
- }
- }
- }, 400);
- });
- $('dl').on('click', 'dd', function () {
- const auditorId = parseInt($(this).data('id'))
- if (auditorId) {
- postData('/tender/<%- ctx.tender.id %>/revise/audit/add', { auditorId }, (datas) => {
- const html = [];
- // 如果是重新上报,添加到重新上报列表中
- const auditorshtml = [];
- for (const [index,data] of datas.entries()) {
- if (index !== 0) {
- html.push('<li class="list-group-item" auditorId="' + data.audit_id + '">');
- if (shenpi_status === shenpiConst.sp_status.sqspr || (shenpi_status === shenpiConst.sp_status.gdzs && index+1 !== datas.length)) {
- html.push('<a href="javascript: void(0)" class="text-danger pull-right">移除</a>');
- }
- html.push('<span>');
- html.push(data.audit_order + ' ');
- html.push(data.name + ' ');
- html.push('</span>');
- html.push('<small class="text-muted">');
- html.push(data.role);
- html.push('</small></li>');
- }
- auditorshtml.push('<li class="list-group-item" ' + (index !== 0 ? 'data-auditorid="' + data.audit_id + '"' : '') + '>');
- auditorshtml.push('<i class="fa ' + (index+1 === datas.length ? 'fa-stop-circle' : 'fa-chevron-circle-down') + '"></i> ');
- auditorshtml.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
- if (index === 0) {
- auditorshtml.push('<span class="pull-right">原报</span>');
- } else if (index+1 === datas.length) {
- auditorshtml.push('<span class="pull-right">终审</span>');
- } else {
- auditorshtml.push('<span class="pull-right">'+ transFormToChinese(index) +'审</span>');
- }
- auditorshtml.push('</li>');
- }
- $('#auditors').html(html.join(''));
- $('#auditors-list').html(auditorshtml.join(''));
- });
- }
- });
- $('body').on('click', '#auditors li>a', function () {
- const li = $(this).parent();
- const data = {
- auditorId: parseInt(li.attr('auditorId')),
- };
- postData('/tender/<%- ctx.tender.id %>/revise/audit/remove', data, (data2) => {
- li.remove();
- for (const a of data2) {
- const aLi = $('li[auditorId=' + a.audit_id + ']');
- $('span', aLi).text(a.audit_order + ' ' + a.name + ' ');
- }
- // 如果是重新上报
- // 令最后一个图标转换
- $('#auditors-list li[data-auditorid="' + data.auditorId + '"]').remove();
- if ($('#auditors-list li').length !== 0 && !$('#auditors-list li i').hasClass('fa-stop-circle')) {
- $('#auditors-list li').eq($('#auditors-list li').length - 1).children('i')
- .removeClass('fa-chevron-circle-down').addClass('fa-stop-circle');
- }
- // $('#auditors-list2 li[data-auditid="' + data.auditorId + '"]').remove();
- // if ($('#auditors-list2 li').length !== 0 && !$('#auditors-list2 li i').hasClass('fa-stop-circle')) {
- // $('#auditors-list2 li').eq($('#auditors-list2 li').length - 1).children('i')
- // .removeClass('fa-chevron-circle-down').addClass('fa-stop-circle');
- // }
- for (let i = 0; i < $('#auditors-list li').length; i++) {
- $('#auditors-list li').eq(i).find('.pull-right').text(i === 0 ? '原报' : (i+1 === $('#auditors-list li').length ? '终' : transFormToChinese(i)) + '审');
- // $('#auditors-list2 li').eq(i).find('.pull-right').text((i + 1 === $('#auditors-list2 li').length ? '终' : transFormToChinese(i + 1)) + '审');
- }
- });
- });
- // 添加审批流程按钮逻辑
- $('.book-list').on('click', 'dt', function () {
- const idx = $(this).find('.acc-btn').attr('data-groupid')
- const type = $(this).find('.acc-btn').attr('data-type')
- if (type === 'hide') {
- $(this).parent().find(`div[data-toggleid="${idx}"]`).show(() => {
- $(this).children().find('i').removeClass('fa-plus-square').addClass('fa-minus-square-o')
- $(this).find('.acc-btn').attr('data-type', 'show')
- })
- } else {
- $(this).parent().find(`div[data-toggleid="${idx}"]`).hide(() => {
- $(this).children().find('i').removeClass('fa-minus-square-o').addClass('fa-plus-square')
- $(this).find('.acc-btn').attr('data-type', 'hide')
- })
- }
- return false
- });
- $('#hideSp').click(function () {
- $('#sub-sp').modal('hide');
- });
- // 多层modal关闭后的滚动bug修复
- $('#sub-sp').on('hidden.bs.modal', function (e) {
- $(document.body).addClass('modal-open');
- });
- </script>
- <% } %>
- <script>
- $('.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('重新上报')
- }
- });
- // 检查上报情况
- function checkAuditorFrom() {
- const content = $('#content').val();
- const orgContent = $('#content').attr('org-value');
- if (!content || content === '') {
- toastr.error('请先填写修订内容,再上报数据');
- return false;
- } else if (orgContent !== content) {
- toastr.warning('修订内容未保存,请先保存,再上报数据');
- return false;
- }
- if ($('#auditors li').length === 0) {
- if(shenpi_status === shenpiConst.sp_status.gdspl) {
- toastr.error('请联系管理员添加审批人');
- } else {
- toastr.error('请先选择审批人,再上报数据');
- }
- return false;
- }
- $('#hide-all').show();
- return true;
- }
- // texterea换行
- function auditCheck(i) {
- const inlineRadio1 = $('#inlineRadio1:checked').val()
- const inlineRadio2 = $('#inlineRadio2:checked').val()
- const opinion = $('textarea[name="opinion"]').eq(i).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' ');
- $('textarea[name="opinion"]').eq(i).val(opinion);
- if (i === 1) {
- if (!inlineRadio1 && !inlineRadio2) {
- if (!$('#warning-text').length) {
- $('#reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
- }
- return false;
- }
- if ($('#warning-text').length) $('#warning-text').remove()
- }
- return true;
- }
- $('.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;
- }
- // 退回选择修改审批人流程
- $('#hideSp').click(function () {
- $('#sp-list').modal('hide');
- });
- $('a[f-target]').click(function () {
- $($(this).attr('f-target')).modal('show');
- });
- // 多层modal关闭后的滚动bug修复
- $('#sp-list').on('hidden.bs.modal', function (e) {
- $(document.body).addClass('modal-open');
- });
- // 展开历史审核记录
- $('.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('展开历史审核记录')
- })
- }
- });
- </script>
|