|
@@ -0,0 +1,742 @@
|
|
|
+<!--添加附件-->
|
|
|
+<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>大小限制:30MB,支持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" data-dismiss="modal">取消</button>
|
|
|
+ <button id="file-ok" type="button" class="btn btn-primary">添加</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% if ((ctx.change.status === auditConst.status.uncheck || ctx.change.status === auditConst.status.checkNo) && (ctx.session.sessionUser.accountId === ctx.change.uid || ctx.tender.isTourist)) { %>
|
|
|
+ <!--上报审批-->
|
|
|
+ <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">
|
|
|
+ <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 => { %>
|
|
|
+ <% if (item.id !== ctx.session.sessionUser.accountId) { %>
|
|
|
+ <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 = ctx.change.auditorList.length; i < iLen; i++) { %>
|
|
|
+ <li class="list-group-item" auditorId="<%- ctx.change.auditorList[i].aid %>">
|
|
|
+ <% if (ctx.session.sessionUser.accountId === ctx.change.uid && !ctx.tender.isTourist) { %>
|
|
|
+ <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
|
|
|
+ <% } %>
|
|
|
+ <span><%- ctx.change.auditorList[i].order %> <%- ctx.change.auditorList[i].name %></span>
|
|
|
+ <small class="text-muted"><%- ctx.change.auditorList[i].role %></small>
|
|
|
+ </li>
|
|
|
+ <% } %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" onsubmit="return checkAuditorFrom()">
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
|
|
|
+ <% if (ctx.session.sessionUser.accountId === ctx.change.uid) { %>
|
|
|
+ <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
|
|
|
+ <% } %>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </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"><%- ctx.change.status === auditConst.status.checking ? '审批流程' : '重新上报' %></h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-4">
|
|
|
+ <% if(ctx.change.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">
|
|
|
+ <% ctx.change.auditors2.forEach((item, idx) => { %>
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.aid %>">
|
|
|
+ <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 === ctx.change.auditors2.length -1 && idx !== 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.aid %>">
|
|
|
+ <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.aid %>">
|
|
|
+ <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">
|
|
|
+ <% ctx.change.auditHistory.forEach((auditors, idx) => { %>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === ctx.change.auditHistory.length - 1 && ctx.change.auditHistory.length !== 1) { %>
|
|
|
+ <div class="text-right">
|
|
|
+ <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <div class="<%- idx < ctx.change.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"><%- ctx.change.user.name %></span><span
|
|
|
+ class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- ctx.change.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) {%>
|
|
|
+ <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) {%>
|
|
|
+ <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 ? ctx.change.user.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 %>/audit/start" onsubmit="return checkAuditorFrom()">
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
|
|
|
+ <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
+ <% if(ctx.change.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === ctx.change.uid) { %>
|
|
|
+ <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
|
|
|
+ <% } %>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% if (ctx.change.status === auditConst.status.checking) { %>
|
|
|
+ <% if (ctx.change.curAuditor && ctx.change.curAuditor.aid === 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 %>/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">
|
|
|
+ <% ctx.change.auditors2.forEach((item, idx) => { %>
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.aid %>">
|
|
|
+ <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 === ctx.change.auditors2.length -1 && idx !== 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.aid %>">
|
|
|
+ <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.aid %>">
|
|
|
+ <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">
|
|
|
+ <% ctx.change.auditHistory.forEach((auditors, idx) => { %>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === ctx.change.auditHistory.length - 1 && ctx.change.auditHistory.length !== 1) { %>
|
|
|
+ <div class="text-right">
|
|
|
+ <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <div class="<%- idx < ctx.change.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"><%- ctx.change.user.name %></span><span
|
|
|
+ class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- ctx.change.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) {%>
|
|
|
+ <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 (ctx.change.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) {%>
|
|
|
+ <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 ? ctx.change.user.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 (ctx.change.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 (auditors[auditors.length - 1].aid === auditor.aid) { %>
|
|
|
+ <!--终审填写批复编号-->
|
|
|
+ <div class="form-group mt-3">
|
|
|
+ <label><b class="text-danger">* </b>变更通知书</label>
|
|
|
+ <input class="form-control form-control-sm" value="BGTZ-<%- change.code %>" name="notice_code" type="text">
|
|
|
+ <input type="hidden" name="notice_uid" value="<%- auditor.aid %>">
|
|
|
+ </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_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="<%- preUrl %>/audit/check" method="post"
|
|
|
+ onsubmit="return auditCheck(1);">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">审批退回</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-4">
|
|
|
+ <div class="card mt-3">
|
|
|
+ <ul class="list-group list-group-flush">
|
|
|
+ <% ctx.change.auditors2.forEach((item, idx) => { %>
|
|
|
+ <% if (idx === 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.aid %>">
|
|
|
+ <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 === ctx.change.auditors2.length -1 && idx !== 0) { %>
|
|
|
+ <li class="list-group-item" data-auditorId="<%- item.aid %>">
|
|
|
+ <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.aid %>">
|
|
|
+ <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">
|
|
|
+ <% ctx.change.auditHistory.forEach((auditors, idx) => { %>
|
|
|
+ <!-- 展开/收起历史流程 -->
|
|
|
+ <% if(idx === ctx.change.auditHistory.length - 1 && ctx.change.auditHistory.length !== 1) { %>
|
|
|
+ <div class="text-right">
|
|
|
+ <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <div class="<%- idx < ctx.change.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"><%- ctx.change.user.name %></span><span
|
|
|
+ class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- ctx.change.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) {%>
|
|
|
+ <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 === ctx.change.times && auditor.status !== auditConst.status.uncheck) { %>
|
|
|
+ <div class="card-body p-3 border-top">
|
|
|
+ <% if (ctx.change.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 (ctx.change.curAuditor.aid === auditor.aid) { %>
|
|
|
+ <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 %>" checked>
|
|
|
+ <label class="form-check-label" for="inlineRadio1">退回原报
|
|
|
+ <%- ctx.change.user.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) {%>
|
|
|
+ <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 ? ctx.change.user.name : '' %>
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p class="text-muted mb-0"><%- auditor.role %></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--审批意见-->
|
|
|
+ <% if(auditor.times === ctx.change.times && auditor.status !== auditConst.status.uncheck) { %>
|
|
|
+ <div class="card-body p-3 border-top">
|
|
|
+ <% if (ctx.change.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 (ctx.change.curAuditor.aid === auditor.aid ) { %>
|
|
|
+ <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 %>" checked>
|
|
|
+ <label class="form-check-label" for="inlineRadio1">退回原报
|
|
|
+ <%- ctx.change.user.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_j" value="<%= ctx.csrf %>" />
|
|
|
+ <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+<% } %>
|
|
|
+<% if (ctx.session.sessionUser.accountId === ctx.change.uid && (ctx.change.status === auditConst.status.uncheck || ctx.change.status === auditConst.status.checkNo)) { %>
|
|
|
+ <script>
|
|
|
+ const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
|
|
|
+ const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
|
|
|
+ </script>
|
|
|
+<% } %>
|
|
|
+<script>const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');</script>
|
|
|
+<script>
|
|
|
+ $('.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>
|