| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 | <% include ../tender/tender_sub_menu.ejs %><div class="panel-content">    <div class="panel-title">        <div class="title-main d-flex">            <% include ../tender/tender_sub_mini_menu.ejs %>            <h2>                <% if (planMonth) { %>计划至 <%- planMonth.split('-')[0] %>年<%- parseInt(planMonth.split('-')[1]) %>月 <% } %>            </h2>            <div class="ml-auto">                <a href="/tender/<%- ctx.tender.id %>/schedule/ledger" class="btn btn-sm btn-outline-primary">进度台账</a>            </div>        </div>    </div>    <div class="content-wrap">        <div class="c-body">            <div class="sjs-height-0">                <div class="m-3">                    <!--模式切换-->                    <div class="col-12 mb-4">                        <ul class="nav nav-tabs justify-content-center">                            <li class="nav-item">                                <a class="nav-link px-5 py-2 active" href="#tp" id="tp-tab" data-toggle="tab" role="tab" aria-controls="tp" aria-selected="false">金额模式</a>                            </li>                            <li class="nav-item">                                <a class="nav-link px-5 py-2" href="#gcl" id="gcl-tab" data-toggle="tab" role="tab" aria-controls="gcl" aria-selected="true">工程量模式</a>                            </li>                        </ul>                    </div>                    <div class="tab-content">                        <div id="tp" class="tab-pane fade show active" role="tabpanel" aria-labelledby="gcl-tab">                            <!--金额概况-->                            <div class="row mx-0 mb-3 justify-content-center">                                <div class="col-auto p-0">                                    <div class="card text-center">                                        <div class="card-body">                                            <h5 class="card-title"><%- schedule ? ctx.helper.formatNum(schedule.plan_tp, '#,##0.######') : '' %> <small class="text-danger"  data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占设计比例"><%- schedule && schedule.total_tp !== 0 && schedule.plan_tp ? ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100 !== 0 ? ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) + '%': '0%' : '0%' %></small></h5>                                            <p class="card-text text-muted">计划完成金额</p>                                        </div>                                    </div>                                </div>                                <div class="col-auto pr-0">                                    <div class="card text-center">                                        <div class="card-body">                                            <h5 class="card-title"><%- schedule ? ctx.helper.formatNum(schedule.stage_sj_tp, '#,##0.######') : '' %> <small class="text-danger"  data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占设计比例"><%- schedule && schedule.total_tp !== 0 && schedule.stage_sj_tp ? ctx.helper.round(ctx.helper.div(schedule.stage_sj_tp, schedule.total_tp)*100, 0) + '%' : '0%' %></small></h5>                                            <p class="card-text text-muted">实际完成金额</p>                                        </div>                                    </div>                                </div>                            </div>                            <div>                                <!--进度条-->                                <div class="mb-3">                                    <% if (schedule && schedule.total_tp !== 0) { %>                                        计划金额进度(元)                                        <div class="progress">                                            <div class="progress-bar bg-success" style="width:<%- ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="计划完成金额:¥<%- ctx.helper.formatNum(schedule.plan_tp, '#,##0.######') %>"><%- ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) %>%</div>                                            <div class="progress-bar bg-gray" style="width:<%- 100 - ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未计划:¥<%- ctx.helper.formatNum(ctx.helper.sub(schedule.total_tp, schedule.plan_tp), '#,##0.######') %>"><%- 100 - ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) %>%</div>                                        </div>                                        <p class="mt-2 mb-0">实际金额进度(元)</p>                                        <div class="progress">                                            <div class="progress-bar bg-success" style="width:<%- ctx.helper.round(ctx.helper.div(schedule.stage_sj_tp, schedule.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="实际完成金额:¥<%- ctx.helper.formatNum(schedule.stage_sj_tp, '#,##0.######') %>"><%- ctx.helper.round(ctx.helper.div(schedule.stage_sj_tp, schedule.total_tp)*100, 0) %>%</div>                                            <div class="progress-bar bg-gray" style="width:<%- 100 - ctx.helper.round(ctx.helper.div(schedule.stage_sj_tp, schedule.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未完成:¥<%- ctx.helper.formatNum(ctx.helper.sub(schedule.total_tp, schedule.stage_sj_tp), '#,##0.######') %>"><%- 100 - ctx.helper.round(ctx.helper.div(schedule.stage_sj_tp, schedule.total_tp)*100, 0) %>%</div>                                        </div>                                    <% } %>                                </div>                                <div class="card mb-3">                                    <div class="card-body">                                        <h5 class="card-title">完成金额进度表</h5>                                        <div id="chartContainer3" style="height: 300px; width: 100%;">                                        </div>                                    </div>                                </div>                            </div>                        </div>                        <div id="gcl" class="tab-pane" role="tabpanel" aria-labelledby="gcl-tab">                            <!--金额概况-->                            <div class="row mx-0 mb-3 justify-content-center">                                <div class="col-auto p-0">                                    <div class="card text-center">                                        <div class="card-body">                                            <h5 class="card-title"><%- schedule ? ctx.helper.formatNum(schedule.plan_tp, '#,##0.######') : '' %> <small class="text-danger"  data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占设计比例"><%- schedule && schedule.total_tp !== 0 && schedule.plan_tp ? ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100 !== 0 ? ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) + '%': '0%' : '0%' %></small></h5>                                            <p class="card-text text-muted">计划完成金额</p>                                        </div>                                    </div>                                </div>                                <div class="col-auto pr-0">                                    <div class="card text-center">                                        <div class="card-body">                                            <h5 class="card-title"><%- schedule ? ctx.helper.formatNum(schedule.sj_tp, '#,##0.######') : '' %> <small class="text-danger"  data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占设计比例"><%- schedule && schedule.total_tp !== 0 && schedule.sj_tp ? ctx.helper.round(ctx.helper.div(schedule.sj_tp, schedule.total_tp)*100, 0) + '%' : '0%' %></small></h5>                                            <p class="card-text text-muted">实际完成金额</p>                                        </div>                                    </div>                                </div>                            </div>                            <div>                                <!--进度条-->                                <div class="mb-3">                                    <% if (schedule && schedule.total_tp !== 0) { %>                                        计划金额进度(元)                                        <div class="progress">                                            <div class="progress-bar bg-success" style="width:<%- ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="计划完成金额:¥<%- ctx.helper.formatNum(schedule.plan_tp, '#,##0.######') %>"><%- ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) %>%</div>                                            <div class="progress-bar bg-gray" style="width:<%- 100 - ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未计划:¥<%- ctx.helper.formatNum(ctx.helper.sub(schedule.total_tp, schedule.plan_tp), '#,##0.######') %>"><%- 100 - ctx.helper.round(ctx.helper.div(schedule.plan_tp, schedule.total_tp)*100, 0) %>%</div>                                        </div>                                        <p class="mt-2 mb-0">实际金额进度(元)</p>                                        <div class="progress">                                            <div class="progress-bar bg-success" style="width:<%- ctx.helper.round(ctx.helper.div(schedule.sj_tp, schedule.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="实际完成金额:¥<%- ctx.helper.formatNum(schedule.sj_tp, '#,##0.######') %>"><%- ctx.helper.round(ctx.helper.div(schedule.sj_tp, schedule.total_tp)*100, 0) %>%</div>                                            <div class="progress-bar bg-gray" style="width:<%- 100 - ctx.helper.round(ctx.helper.div(schedule.sj_tp, schedule.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未完成:¥<%- ctx.helper.formatNum(ctx.helper.sub(schedule.total_tp, schedule.sj_tp), '#,##0.######') %>"><%- 100 - ctx.helper.round(ctx.helper.div(schedule.sj_tp, schedule.total_tp)*100, 0) %>%</div>                                        </div>                                    <% } %>                                </div>                                <div class="card mb-3">                                    <div class="card-body">                                        <h5 class="card-title">完成金额进度表</h5>                                        <div id="chartContainer4" style="height: 300px; width: 100%;">                                        </div>                                    </div>                                </div>                            </div>                        </div>                    </div>                </div>            </div>        </div>    </div></div><script src="/public/js/echarts/echarts.min.js"></script><% if (schedule && schedule.total_tp !== 0) { %><script type="text/javascript">    var charts = new Array();    var myChart2 = echarts.init(document.getElementById('chartContainer3'));    var option2 = {        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 : [<% if (scheduleStage.length > 0) { %>                    <% for (const ss of scheduleStage) { %>                    '<%- ss.yearmonth.split('-')[0] %>年<%- parseInt(ss.yearmonth.split('-')[1]) %>月(第<%- ss.order %>期)',                    <% } %>                    <% } %>]            }        ],        yAxis : [            {                type : 'value',                name : '金额',                position:'left',                axisLabel : {                    formatter: '{value} 元'                },                splitArea : {show : true}            },            {                type : 'value',                name:'完成度',                axisLabel : {                    formatter: '{value} %'                },                position: 'right',                splitArea : {show : true}            }        ],        series : [            {                name:'计划完成金额',                type:'bar',                tooltip : {trigger: 'item',formatter: "{b}<br/>{a}:{c}元"},                stack: '计划',                data:[<% if (scheduleStage.length > 0) { %>                    <% for (const ss of scheduleStage) { %>                    '<%- ss.plan_tp ? ss.plan_tp : 0  %>',                    <% } %>                    <% } %>]            },            {                name:'实际完成金额',                type:'bar',                tooltip : {trigger: 'item',formatter: "{b}<br/>{a}:{c}元"},                stack: '实际',                data:[<% if (scheduleStage.length > 0) { %>                    <% for (const ss of scheduleStage) { %>                    '<%- ss.tp ? ss.tp : 0  %>',                    <% } %>                    <% } %>]            },            {                name:'实际占合同比例',                type:'line',                tooltip : {trigger: 'axis',formatter: "{b}占合同比例<br/>{a}:{c} %"},                yAxisIndex: 1,                data:[<% if (scheduleMonth.length > 0) { %>                    <% for (const ss of scheduleStage) { %>                    '<%- ss.tp ? ctx.helper.round(ctx.helper.div(ss.tp, schedule.total_tp)*100, 2) : 0  %>',                    <% } %>                    <% } %>]            },        ]    };    // 为echarts对象加载数据    myChart2.setOption(option2);    charts.push(myChart2);    //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 : [<% if (scheduleMonth.length > 0) { %>                <% for (const sm of scheduleMonth) { %>                    <% if (sm.stage_gcl_used === 1) { %>                    '<%- sm.yearmonth.split('-')[0] %>年<%- parseInt(sm.yearmonth.split('-')[1]) %>月',                    <% } %>                <% } %>            <% } %>]            }        ],        yAxis : [            {                type : 'value',                name : '金额',                position:'left',                axisLabel : {                    formatter: '{value} 元'                },                splitArea : {show : true}            },            {                type : 'value',                name:'完成度',                axisLabel : {                    formatter: '{value} %'                },                position: 'right',                splitArea : {show : true}            }        ],        series : [            {                name:'计划完成金额',                type:'bar',                tooltip : {trigger: 'item',formatter: "{b}<br/>{a}:{c}元"},                stack: '计划',                data:[<% if (scheduleMonth.length > 0) { %>                    <% for (const sm of scheduleMonth) { %>                    <% if (sm.stage_gcl_used === 1) { %>                    '<%- sm.plan_tp ? sm.plan_tp : 0  %>',                    <% } %>                    <% } %>                    <% } %>]            },            {                name:'实际完成金额',                type:'bar',                tooltip : {trigger: 'item',formatter: "{b}<br/>{a}:{c}元"},                stack: '实际',                data:[<% if (scheduleMonth.length > 0) { %>                    <% for (const sm of scheduleMonth) { %>                    <% if (sm.stage_gcl_used === 1) { %>                    '<%- sm.sj_tp ? sm.sj_tp : 0  %>',                    <% } %>                    <% } %>                    <% } %>]            },            {                name:'实际占合同比例',                type:'line',                tooltip : {trigger: 'axis',formatter: "{b}占合同比例<br/>{a}:{c} %"},                yAxisIndex: 1,                data:[<% if (scheduleMonth.length > 0) { %>                    <% for (const sm of scheduleMonth) { %>                    <% if (sm.stage_gcl_used === 1) { %>                    '<%- sm.sj_tp ? ctx.helper.round(ctx.helper.div(sm.sj_tp, schedule.total_tp)*100, 2) : 0  %>',                    <% } %>                    <% } %>                    <% } %>]            },        ]    };    // 为echarts对象加载数据    myChart.setOption(option);    charts.push(myChart);</script><!--sjs--><script>    $(document).ready(function () {        $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {            for(var i = 0; i < charts.length; i++) {                charts[i].resize();            }        });    })</script><% } %><script src="/public/js/sub_menu.js"></script><script>    $.subMenu({        menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',        toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',        key: 'menu.1.0.0',        miniHint: '#sub-mini-hint', hintKey: 'menu.hint.1.0.1',        callback: function (info) {            if (info.mini) {                $('.panel-title').addClass('fluid');                $('#sub-menu').removeClass('panel-sidebar');            } else {                $('.panel-title').removeClass('fluid');                $('#sub-menu').addClass('panel-sidebar');            }            autoFlashHeight();        }    });</script>
 |