123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585 |
- <!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/list" class="mr-2 text-white show-loading"><i class="fa fa-chevron-left"></i>标段概况</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">
- <!--标签-->
- <ul class="nav nav-tabs nav-fill">
- <li class="nav-item">
- <a class="nav-link active" data-toggle="tab" href="#gaikuang" role="tab">概况</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" data-toggle="tab" href="#jlqi" role="tab">计量期</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" data-toggle="tab" href="#shenpi" role="tab">期审批</a>
- </li>
- </ul>
- <div class="tab-content">
- <div class="tab-pane active" id="gaikuang">
- <!--图表-->
- <div class="card mb-3 mr-1 mt-3">
- <div class="card-body">
- <h5 class="card-title">期进度表</h5>
- <div style="overflow-x:scroll;padding-bottom: 10px">
- <div id="chartContainer4" style="height: 300px; width: 250%;">
- </div>
- </div>
- <p class="text-center text-muted m-0">左右滑动</p>
- </div>
- </div>
- <div class="card mb-3 mr-1">
- <div class="card-body">
- <h5 class="card-title">月进度表</h5>
- <div style="overflow-x:scroll;padding-bottom: 10px">
- <div id="chartContainer3" style="height: 300px; width: 320%;">
- </div>
- </div>
- <p class="text-center text-muted m-0">左右滑动</p>
- </div>
- </div>
- </div>
- <div class="tab-pane" id="jlqi">
- <!--期列表-->
- <dl class="mb-2 mt-3">
- <% for (const s of stages) { %>
- <dt class="bg-light p-2 d-flex justify-content-between"><span>第<%- s.order %>期</span>
- <span class="<%- auditConst.auditStringClass[s.status] %>">
- <% if (s.curAuditor && s.status !== auditConst.status.checked) { %>
- <%- s.curAuditor.name %><%if (s.curAuditor.role !== '' && s.curAuditor.role !== null) { %>-<%- s.curAuditor.role %><% } %>
- <% } %>
- <%- s.status === auditConst.status.checked ? '审批完成' : auditConst.auditProgress[s.status] %>
- </span>
- </dt>
- <dd>
- <table class="table table-hover">
- <tbody><tr>
- <td>
- <p class="mb-0">本期合同计量</p>
- <b>¥<%- s.contract_tp ? s.contract_tp : 0 %></b>
- </td>
- <td>
- <p class="mb-0">本期数量变更计量</p>
- <b>¥<%- s.qc_tp ? s.qc_tp : 0 %></b>
- </td>
- </tr>
- <tr>
- <td>
- <p class="mb-0">本期完成计量</p>
- <b>¥<%- s.tp ? s.tp : 0 %></b>
- </td>
- <td>
- <p class="mb-0">截止上期完成计量</p>
- <b>¥<%- s.pre_tp ? s.pre_tp : 0 %></b>
- </td>
- </tr>
- <tr>
- <td>
- <p class="mb-0">截止本期完成计量</p>
- <b>¥<%- s.end_tp ? s.end_tp : 0 %></b>
- </td>
- <td>
- <p class="mb-0">本期应付</p>
- <b>¥<%- s.yf_tp ? s.yf_tp : 0 %></b>
- </td>
- </tr>
- </tbody></table>
- </dd>
- <% } %>
- </dl>
- </div>
- <div class="tab-pane" id="shenpi">
- <!--最新期-->
- <% let audit = 0; %>
- <% if (stages.length > 0 && stage) { %>
- <dl class="mb-2 mt-3">
- <dt class="bg-light p-2 d-flex justify-content-between"><span>第<%- stage.order %>期</span>
- <span class="<%- auditConst.auditStringClass[stage.status] %>">
- <% if (stage.curAuditor && stage.status !== auditConst.status.checked) { %>
- <%- stage.curAuditor.name %><%if (stage.curAuditor.role !== '' && stage.curAuditor.role !== null) { %>-<%- stage.curAuditor.role %><% } %>
- <% } %>
- <%- stage.status === auditConst.status.checked ? '审批完成' : auditConst.auditProgress[stage.status] %>
- </span>
- </dt>
- <dd>
- <table class="table table-hover">
- <tbody><tr>
- <td>
- <p class="mb-0">本期合同计量</p>
- <b>¥<%- stage.contract_tp ? stage.contract_tp : 0 %></b>
- </td>
- <td>
- <p class="mb-0">本期数量变更计量</p>
- <b>¥<%- stage.qc_tp ? stage.qc_tp : 0 %></b>
- </td>
- </tr>
- <tr>
- <td>
- <p class="mb-0">本期完成计量</p>
- <b>¥<%- stage.tp ? stage.tp : 0 %></b>
- </td>
- <td>
- <p class="mb-0">截止上期完成计量</p>
- <b>¥<%- stage.pre_tp ? stage.pre_tp : 0 %></b>
- </td>
- </tr>
- <tr>
- <td>
- <p class="mb-0">截止本期完成计量</p>
- <b>¥<%- stage.end_tp ? stage.end_tp : 0 %></b>
- </td>
- <td>
- <p class="mb-0">本期应付</p>
- <b>¥<%- stage.yf_tp ? stage.yf_tp : 0 %></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 (stage.status === auditConst.status.uncheck) { %>
- <span class="pull-right"> 上报中</span>
- <% } else { %>
- <span class="text-success pull-right"><small><%- stage.auditors[0].begin_time.toLocaleDateString() %></small> 上报</span>
- <% } %>
- <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- stage.user.name %><small class="text-muted"><%- stage.user.role %></small></h5>
- </li>
- <% for (let iA = 0; iA < stage.auditors.length; iA++) { %>
- <% const auditors = stage.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].aid === 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.checkNoPre) { %>
- <% const auditorIndex = stage.auditors2.findIndex(function (item) { return item.aid === auditors[iA].aid }) %>
- <span class="text-warning pull-right"><small><%- auditors[iA].end_time.toLocaleDateString() %></small>审批退回 <%- stage.auditors2[auditorIndex-1].name %></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 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 if (auditors[iA].status === auditConst.status.checkAgain) { %>
- <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>
- </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>
- <% if (audit !== 0) { %>
- <!--审批通过弹窗-->
- <div class="modal" tabindex="-1" role="dialog" id="sp-done">
- <div class="modal-dialog" role="document">
- <form class="modal-content" action="/tender/<%- stage.tid %>/measure/stage/<%- stage.order %>/audit/check" method="post" id="audit-check0">
- <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" 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/<%- stage.tid %>/measure/stage/<%- stage.order %>/audit/check" method="post" id="audit-check1">
- <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.aid === stage.auditors[0].aid) { %>checked<% } %>>
- <label class="custom-control-label" for="customRadioInline1">退回上报 <%- stage.user.name %></label>
- </div>
- <% if (audit.order > 1 && audit.aid !== stage.auditors[0].aid) { %>
- <% const auditorIndex = stage.auditors2.findIndex(function (item) { return item.aid === audit.aid }) %>
- <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">退回上一审批人 <%- stage.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" 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 type="text/javascript">
- //4 标段期数计量进度//
- var myChart = echarts.init(document.getElementById('chartContainer4'));
- var option = {
- color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
- '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
- '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
- '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
- title : {
- text: ''
- },
- tooltip : {
- trigger: 'axis'
- },
- calculable : true,
- legend: {
- data:['本期合同计量','本期数量变更计量','截止上期累计完成','本期完成计量','完成度']
- },
- dataZoom: [
- {show: true,start: 0, end: 100}
- ],
- xAxis : [
- {
- type : 'category',
- splitLine : {show : true},
- data : [
- <% for (const s of stagesEcharts) {%>
- '第<%- s.order %>期',
- <% } %>
- ]
- }
- ],
- yAxis : [
- {
- type : 'value',
- name : '金额',
- position:'left',
- axisLabel : {
- formatter: '{value} 元'
- },
- splitArea : {show : true},
- splitLine : {show : true},
- },
- {
- type : 'value',
- name:'完成度',
- axisLabel : {
- formatter: '{value} %'
- },
- position: 'right',
- splitArea : {show : false},
- splitLine : {show : false},
- }
- ],
- series : [
- {
- name:'本期合同计量',
- type:'bar',
- tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
- stack: '合同',
- data:[
- <% for (const s of stagesEcharts) {%>
- <%- s.contract_tp %>,
- <% } %>
- ]
- },
- {
- name:'本期数量变更计量',
- type:'bar',
- tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
- stack: '变更',
- data:[
- <% for (const s of stagesEcharts) {%>
- <%- s.qc_tp %>,
- <% } %>
- ]
- },
- {
- name:'截止上期累计完成',
- type:'bar',
- tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
- stack: '完成',
- data:[
- <% for (const s of stagesEcharts) {%>
- <%- ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp) %>,
- <% } %>
- ]
- },
- {
- name:'本期完成计量',
- type:'bar',
- tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
- stack: '完成',
- data:[
- <% for (const s of stagesEcharts) {%>
- <%- ctx.helper.add(s.contract_tp, s.qc_tp) %>,
- <% } %>
- ]
- },
- {
- name:'完成度',
- type:'line',
- tooltip : {trigger: 'axis',formatter: "{b}占总标段<br/>{a}:{c} %"},
- yAxisIndex: 1,
- data:[
- <% for (const s of stagesEcharts) {%>
- <%- ctx.helper.mul(ctx.helper.div(ctx.helper.add(s.contract_tp, s.qc_tp), tender.sum, 2), 100) %>,
- <% } %>
- ]
- },
- ]
- };
- // 为echarts对象加载数据
- myChart.setOption(option);
- //4 标段期数计量进度//
- //3 标段月进度//
- // 基于准备好的dom,初始化echarts图表
- var myChart = echarts.init(document.getElementById('chartContainer3'));
- var option = {
- color:["#e9af68","#57b7b6"],
- title : {
- text: ''
- },
- tooltip : {
- trigger: 'axis',
- formatter: function (params, ticket, callback) {
- let sHint = '';
- for (const param of params) {
- if (sHint !== '') {
- sHint += '<br>';
- }
- if (sHint === '' && param.name !== '') {
- sHint = param.name + '<br>';
- }
- sHint += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + param.color +'"></span>';
- if (param.data) {
- sHint += param.seriesName + ': ' + param.data + ' %';
- } else {
- sHint += param.seriesName + ': -';
- }
- }
- return sHint;
- },
- },
- legend: {
- data:['截止本月完成','本月完成']
- },
- toolbox: {
- show : true,
- feature : {
- magicType : {show: true, type: ['line', 'bar']}
- }
- },
- dataZoom : {
- show : true,
- start : 50,
- end : 100
- },
- xAxis : [
- {
- type : 'category',
- boundaryGap : true,
- data : [
- <% for (const mp of monthProgress) { %>
- '<%- mp.month %>',
- <% } %>
- ]
- }
- ],
- yAxis : [
- {
- type : 'value',
- axisLabel : {
- formatter: '{value} %'
- },
- splitArea : {show : true}
- }
- ],
- series : [
- {
- name:'截止本月完成',
- type:'line',
- itemStyle: {
- normal: {
- lineStyle: {
- shadowColor : 'rgba(0,0,0,0.4)',
- shadowBlur: 5,
- shadowOffsetX: 3,
- shadowOffsetY: 3
- }
- }
- },
- data:[
- <% for (const mp of monthProgress) { %>
- <%- mp.end_ratio %>,
- <% } %>
- ]
- },
- {
- name:'本月完成',
- type:'line',
- itemStyle: {
- normal: {
- lineStyle: {
- shadowColor : 'rgba(0,0,0,0.4)',
- shadowBlur: 5,
- shadowOffsetX: 3,
- shadowOffsetY: 3
- }
- }
- },
- data:[
- <% for (const mp of monthProgress) { %>
- <%- mp.ratio %>,
- <% } %>
- ]
- }
- ]
- };
- // 为echarts对象加载数据
- myChart.setOption(option);
- //3 标段月进度//
- </script>
- <!--sjs-->
- <script>
- $(document).ready(function () {
- if (window.location.hash && window.location.hash === '#shenpi') {
- $('#gaikuang').removeClass('active');
- $('#jlqi').removeClass('active');
- $('.nav-item a[href="#gaikuang"]').removeClass('active');
- $('.nav-item a[href="#jlqi"]').removeClass('active');
- $('#shenpi').addClass('active');
- $('.nav-item a[href="#shenpi"]').addClass('active');
- }
- $('#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>
|