|
@@ -0,0 +1,254 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
|
|
|
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
|
+ <title>标段概况-计量支付</title>
|
|
|
+ <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
|
|
|
+ <link rel="stylesheet" href="/public/css/wap/main.css">
|
|
|
+ <link rel="stylesheet" href="/public/css/toast.css">
|
|
|
+ <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
|
|
|
+ <script src=/public/js/echarts/echarts.min.js></script>
|
|
|
+ <link rel="shortcut icon" href="/public/images/favicon.ico">
|
|
|
+ <style>
|
|
|
+ body {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="container">
|
|
|
+ <!--顶部-->
|
|
|
+ <nav class="fixed-top bg-dark">
|
|
|
+ <div class="my-2 d-flex justify-content-between">
|
|
|
+ <span class="text-white ml-3"><a href="/wap/tender/<%- tender.id %>/advance#<%- advanceConst.typeCol[advance.type].key %>" class="mr-2 text-white show-loading"><i class="fa fa-chevron-left"></i><%- advanceConst.typeCol[advance.type].name %></a></span>
|
|
|
+ <a tabindex="0" href="javascript:void(0)" class="text-white text-truncate text-center"
|
|
|
+ style="width:150px" data-toggle="popover" data-placement="top"
|
|
|
+ data-content="<%- tender.name %>" data-trigger="focus"><%- tender.name %></a>
|
|
|
+ <div class="mr-3">
|
|
|
+ <div class="dropdown">
|
|
|
+ <button class="btn btn-sm btn-light dropdown-toggle" type="button" data-toggle="dropdown">
|
|
|
+ <%- ctx.session.sessionUser.name.substr(ctx.session.sessionUser.name.length > 2 ? ctx.session.sessionUser.name.length - 2 : 0) %>
|
|
|
+ </button>
|
|
|
+ <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
|
|
+ <a class="dropdown-item" href="/wap/logout">退出登录</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </nav>
|
|
|
+ <!--标段概况-->
|
|
|
+ <div class="py-6">
|
|
|
+ <!--最新期-->
|
|
|
+ <% let audit = 0; %>
|
|
|
+ <% if (advance) { %>
|
|
|
+ <dl class="mb-2 mt-3">
|
|
|
+ <dt class="bg-light p-2 d-flex justify-content-between"><span><%- advanceConst.typeCol[advance.type].name %>-第<%- advance.order %>期</span>
|
|
|
+ <span class="<%- auditConst.statusClass[advance.status] %>">
|
|
|
+ <% if (advance.curAuditor) { %>
|
|
|
+ <%- advance.curAuditor.name %><%if (advance.curAuditor.role !== '' && advance.curAuditor.role !== null) { %>-<%- advance.curAuditor.role %><% } %>
|
|
|
+ <% } %>
|
|
|
+ <%- auditConst.statusString[advance.status] %>
|
|
|
+ </span>
|
|
|
+ </dt>
|
|
|
+ <dd>
|
|
|
+ <table class="table table-hover">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <p class="mb-0">签约预付款</p>
|
|
|
+ </td>
|
|
|
+ <td class="text-right">
|
|
|
+ <b><%- advance.advancePayTotal %></b>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <p class="mb-0">本期支付比例</p>
|
|
|
+ </td>
|
|
|
+ <td class="text-right">
|
|
|
+ <b><%- advance.pay_ratio %>%</b>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <p class="mb-0">本期金额</p>
|
|
|
+ </td>
|
|
|
+ <td class="text-right">
|
|
|
+ <b><%- advance.cur_amount %></b>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <p class="mb-0">截止本期金额</p>
|
|
|
+ </td>
|
|
|
+ <td class="text-right">
|
|
|
+ <b><%- advance.prev_total_amount %></b>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody></table>
|
|
|
+ </dd>
|
|
|
+ </dl>
|
|
|
+ <!--审批流程-->
|
|
|
+ <div class="card mt-3">
|
|
|
+ <ul class="list-group list-group-flush">
|
|
|
+ <li class="list-group-item">
|
|
|
+ <% if (advance.status === auditConst.status.uncheck) { %>
|
|
|
+ <span class="pull-right"> 上报中</span>
|
|
|
+ <% } else { %>
|
|
|
+ <span class="text-success pull-right"><small><%- advance.auditors[0].create_time.toLocaleDateString() %></small> 上报</span>
|
|
|
+ <% } %>
|
|
|
+ <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- advance.user.name %><small class="text-muted"><%- advance.user.role %></small></h5>
|
|
|
+ </li>
|
|
|
+ <% for (let iA = 0; iA < advance.auditors.length; iA++) { %>
|
|
|
+ <% const auditors = advance.auditors; %>
|
|
|
+ <li class="list-group-item">
|
|
|
+ <% if (auditors[iA].status === auditConst.status.checked) { %>
|
|
|
+ <span class="text-success pull-right"><small><%- auditors[iA].end_time.toLocaleDateString() %></small> 审批通过</span>
|
|
|
+ <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-success' : 'fa fa-stop-circle text-success') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
|
|
|
+ <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
+ <% } else if (auditors[iA].status == auditConst.status.checking) { %>
|
|
|
+ <span class="pull-right">审批中</span>
|
|
|
+ <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
|
|
|
+ <% if (auditors[iA].audit_id === ctx.session.sessionUser.accountId) { %>
|
|
|
+ <% audit = auditors[iA]; %>
|
|
|
+ <div class="form-group">
|
|
|
+ <div class="text-center">
|
|
|
+ <button class="btn btn-success" data-toggle="modal" data-target="#sp-done" >审批通过</button>
|
|
|
+ <button class="btn btn-warning" data-toggle="modal" data-target="#sp-back" >审批退回</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <% } else if (auditors[iA].status === auditConst.status.checkNo) { %>
|
|
|
+ <span class="text-warning pull-right"><small><%- auditors[iA].end_time.toLocaleDateString() %></small>审批退回</span>
|
|
|
+ <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-warning' : 'fa fa-stop-circle text-warning') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
|
|
|
+ <p class="card-text"><%- auditors[iA].opinion %></p>
|
|
|
+ <% } else { %>
|
|
|
+ <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
|
|
|
+ <% } %>
|
|
|
+ </li>
|
|
|
+ <% } %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <!--底栏菜单-->
|
|
|
+ <nav class="fixed-bottom navbar-dark bg-light border-top">
|
|
|
+ <ul class="nav nav-fill my-2">
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link text-muted show-loading" href="/wap/dashboard"><i class="fa fa-check-square-o"></i> 待审批</a>
|
|
|
+ </li>
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link active show-loading" href="/wap/list"><i class="fa fa-list-ul"></i> 项目</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+</div>
|
|
|
+<!--审批通过弹窗-->
|
|
|
+<div class="modal" tabindex="-1" role="dialog" id="sp-done">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <form class="modal-content" action="/tender/<%- tender.id %>/advance/<%- advance.id %>/audit/check" method="post" id="audit-check0" onsubmit="auditCheck(0)">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">审批通过</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>审批意见</label>
|
|
|
+ <textarea class="form-control" rows="8" name="opinion">同意</textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-secondary" 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">审批通过</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<!--审批退回弹窗-->
|
|
|
+<div class="modal" tabindex="-1" role="dialog" id="sp-back">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <form class="modal-content" action="/tender/<%- advance.tid %>/advance/<%- advance.id %>/audit/check" method="post" id="audit-check1" onsubmit="auditCheck(1)">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">审批退回</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>审批意见</label>
|
|
|
+ <textarea class="form-control" rows="8" name="opinion">不同意</textarea>
|
|
|
+ </div>
|
|
|
+ <div class="alert alert-warning">
|
|
|
+ <div class="custom-control custom-radio custom-control-inline">
|
|
|
+ <input type="radio" id="customRadioInline1" name="checkType" class="custom-control-input" value="<%- auditConst.status.checkNo %>" <% if (audit.order === 1 || audit.audit_id === advance.auditors[0].audit_id) { %>checked<% } %>>
|
|
|
+ <label class="custom-control-label" for="customRadioInline1">退回原报 <%- advance.user.name %></label>
|
|
|
+ </div>
|
|
|
+ <% if (audit.order > 1 && audit.audit_id !== advance.auditors[0].audit_id) { %>
|
|
|
+ <% const auditorIndex = advance.auditors2.findIndex(function (item) { return item.audit_id === audit.audit_id }) %>
|
|
|
+ <div class="custom-control custom-radio custom-control-inline">
|
|
|
+ <input class="custom-control-input" type="radio" name="checkType" id="customRadioInline2" value="<%- auditConst.status.checkNoPre %>" checked>
|
|
|
+ <label class="custom-control-label" for="customRadioInline2">退回上一审批人 <%- advance.auditors2[auditorIndex-1].name %></label>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
|
|
|
+ <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
|
|
|
+ <button type="submit" class="btn btn-warning">确认退回</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<!-- JS. -->
|
|
|
+<script src="/public/js/jquery/jquery-3.2.1.min.js"></script>
|
|
|
+<script src="/public/js/popper/popper.min.js"></script>
|
|
|
+<script src="/public/js/bootstrap/bootstrap.min.js"></script>
|
|
|
+<script src="/public/js/cookies.js"></script>
|
|
|
+<script src="/public/js/wap/global.js"></script>
|
|
|
+<script>
|
|
|
+ // $(document).ready(function () {
|
|
|
+ // $('#audit-check0').submit(function (e) {
|
|
|
+ // if (auditCheck(0)) {
|
|
|
+ // const data = {
|
|
|
+ // opinion: $('[name=opinion]', this).val(),
|
|
|
+ // checkType: parseInt($('[name=checkType]', this).val()),
|
|
|
+ // };
|
|
|
+ // postData(this.action, data, function () {
|
|
|
+ // window.location.reload();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // return false;
|
|
|
+ // });
|
|
|
+ // $('#audit-check1').submit(function (e) {
|
|
|
+ // if (auditCheck(1)) {
|
|
|
+ // const data = {
|
|
|
+ // opinion: $('[name=opinion]', this).val(),
|
|
|
+ // checkType: parseInt($('[name=checkType]:checked', this).val()),
|
|
|
+ // };
|
|
|
+ // postData(this.action, data, function () {
|
|
|
+ // window.location.reload();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // return false;
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+
|
|
|
+ // texterea换行
|
|
|
+
|
|
|
+ function auditCheck(i) {
|
|
|
+ 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);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|