|
@@ -31,7 +31,7 @@
|
|
|
<div class="col-auto p-0">
|
|
|
<div class="card text-center">
|
|
|
<div class="card-body">
|
|
|
- <h5 class="card-title"><%- scheduleInfo ? ctx.helper.formatNum(scheduleInfo.plan_tp, '#,##0.######') : '' %> <small class="text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占设计比例">20%</small></h5>
|
|
|
+ <h5 class="card-title"><%- scheduleInfo ? ctx.helper.formatNum(scheduleInfo.plan_tp, '#,##0.######') : '' %> <small class="text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占设计比例"><%- scheduleInfo && scheduleInfo.total_tp !== 0 ? ctx.helper.round(ctx.helper.div(scheduleInfo.plan_tp, scheduleInfo.total_tp)*100, 0) + '%' : '' %></small></h5>
|
|
|
<p class="card-text text-muted">计划完成金额</p>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -47,7 +47,7 @@
|
|
|
<div class="col-auto pr-0">
|
|
|
<div class="card text-center">
|
|
|
<div class="card-body">
|
|
|
- <h5 class="card-title"><%- scheduleInfo ? ctx.helper.formatNum(scheduleInfo.sj_tp, '#,##0.######') : '' %> <small class="text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占设计比例">15%</small></h5>
|
|
|
+ <h5 class="card-title"><%- scheduleInfo ? ctx.helper.formatNum(scheduleInfo.sj_tp, '#,##0.######') : '' %> <small class="text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占设计比例"><%- scheduleInfo && scheduleInfo.total_tp !== 0 ? ctx.helper.round(ctx.helper.div(scheduleInfo.sj_tp, scheduleInfo.total_tp)*100, 0) + '%' : '' %></small></h5>
|
|
|
<p class="card-text text-muted">实际完成金额</p>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -57,16 +57,18 @@
|
|
|
<div id="tp" class="tab-pane fade show active" role="tabpanel" aria-labelledby="tp-tab">
|
|
|
<!--进度条-->
|
|
|
<div class="mb-3">
|
|
|
+ <% if (scheduleInfo && scheduleInfo.total_tp !== 0) { %>
|
|
|
计划金额进度(元)
|
|
|
<div class="progress">
|
|
|
- <div class="progress-bar bg-success" style="width:24%;" data-placement="bottom" data-toggle="tooltip" data-original-title="计划完成金额:¥300.00">24%</div>
|
|
|
- <div class="progress-bar bg-gray" style="width:76%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未计划:¥930.00">66%</div>
|
|
|
+ <div class="progress-bar bg-success" style="width:<%- ctx.helper.round(ctx.helper.div(scheduleInfo.plan_tp, scheduleInfo.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="计划完成金额:¥<%- ctx.helper.formatNum(scheduleInfo.plan_tp, '#,##0.######') %>"><%- ctx.helper.round(ctx.helper.div(scheduleInfo.plan_tp, scheduleInfo.total_tp)*100, 0) %>%</div>
|
|
|
+ <div class="progress-bar bg-gray" style="width:<%- 100 - ctx.helper.round(ctx.helper.div(scheduleInfo.plan_tp, scheduleInfo.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未计划:¥<%- ctx.helper.formatNum(ctx.helper.sub(scheduleInfo.total_tp, scheduleInfo.plan_tp), '#,##0.######') %>"><%- 100 - ctx.helper.round(ctx.helper.div(scheduleInfo.plan_tp, scheduleInfo.total_tp)*100, 0) %>%</div>
|
|
|
</div>
|
|
|
<p class="mt-2 mb-0">实际金额进度哦(元)</p>
|
|
|
<div class="progress">
|
|
|
- <div class="progress-bar bg-success" style="width: 18%;" data-placement="bottom" data-toggle="tooltip" data-original-title="实际完成金额:¥400.00">18%</div>
|
|
|
- <div class="progress-bar bg-gray" style="width:82%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未完成:¥930.00">72%</div>
|
|
|
+ <div class="progress-bar bg-success" style="width:<%- ctx.helper.round(ctx.helper.div(scheduleInfo.sj_tp, scheduleInfo.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="实际完成金额:¥<%- ctx.helper.formatNum(scheduleInfo.sj_tp, '#,##0.######') %>"><%- ctx.helper.round(ctx.helper.div(scheduleInfo.sj_tp, scheduleInfo.total_tp)*100, 0) %>%</div>
|
|
|
+ <div class="progress-bar bg-gray" style="width:<%- 100 - ctx.helper.round(ctx.helper.div(scheduleInfo.sj_tp, scheduleInfo.total_tp)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未完成:¥<%- ctx.helper.formatNum(ctx.helper.sub(scheduleInfo.total_tp, scheduleInfo.sj_tp), '#,##0.######') %>"><%- 100 - ctx.helper.round(ctx.helper.div(scheduleInfo.sj_tp, scheduleInfo.total_tp)*100, 0) %>%</div>
|
|
|
</div>
|
|
|
+ <% } %>
|
|
|
</div>
|
|
|
<div class="card mb-3">
|
|
|
<div class="card-body">
|
|
@@ -78,16 +80,18 @@
|
|
|
</div>
|
|
|
<div id="gcl" class="tab-pane fade" role="tabpanel" aria-labelledby="gcl-tab">
|
|
|
<div class="mb-3">
|
|
|
+ <% if (scheduleInfo && scheduleInfo.total_gcl !== 0) { %>
|
|
|
计划工程量进度
|
|
|
<div class="progress">
|
|
|
- <div class="progress-bar bg-info" style="width:24%;" data-placement="bottom" data-toggle="tooltip" data-original-title="计划完成工程量:30,000.00">24%</div>
|
|
|
- <div class="progress-bar bg-gray" style="width:76%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未计划:930,00.00">66%</div>
|
|
|
+ <div class="progress-bar bg-info" style="width:<%- ctx.helper.round(ctx.helper.div(scheduleInfo.plan_gcl, scheduleInfo.total_gcl)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="计划完成工程量:¥<%- ctx.helper.formatNum(scheduleInfo.plan_gcl, '#,##0.######') %>"><%- ctx.helper.round(ctx.helper.div(scheduleInfo.plan_gcl, scheduleInfo.total_gcl)*100, 0) %>%</div>
|
|
|
+ <div class="progress-bar bg-gray" style="width:<%- 100 - ctx.helper.round(ctx.helper.div(scheduleInfo.plan_gcl, scheduleInfo.total_gcl)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未计划:¥<%- ctx.helper.formatNum(ctx.helper.sub(scheduleInfo.total_gcl, scheduleInfo.plan_gcl), '#,##0.######') %>"><%- 100 - ctx.helper.round(ctx.helper.div(scheduleInfo.plan_gcl, scheduleInfo.total_gcl)*100, 0) %>%</div>
|
|
|
</div>
|
|
|
<p class="mt-2 mb-0">实际工程量进度</p>
|
|
|
<div class="progress">
|
|
|
- <div class="progress-bar bg-info" style="width: 18%;" data-placement="bottom" data-toggle="tooltip" data-original-title="实际完成工程量:40,000.00">18%</div>
|
|
|
- <div class="progress-bar bg-gray" style="width:82%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未完成:930,00.00">72%</div>
|
|
|
+ <div class="progress-bar bg-info" style="width:<%- ctx.helper.round(ctx.helper.div(scheduleInfo.sj_gcl, scheduleInfo.total_gcl)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="实际完成工程量:¥<%- ctx.helper.formatNum(scheduleInfo.sj_gcl, '#,##0.######') %>"><%- ctx.helper.round(ctx.helper.div(scheduleInfo.sj_gcl, scheduleInfo.total_gcl)*100, 0) %>%</div>
|
|
|
+ <div class="progress-bar bg-gray" style="width:<%- 100 - ctx.helper.round(ctx.helper.div(scheduleInfo.sj_gcl, scheduleInfo.total_gcl)*100, 0) %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="合同未完成:¥<%- ctx.helper.formatNum(ctx.helper.sub(scheduleInfo.total_gcl, scheduleInfo.sj_gcl), '#,##0.######') %>"><%- 100 - ctx.helper.round(ctx.helper.div(scheduleInfo.sj_gcl, scheduleInfo.total_gcl)*100, 0) %>%</div>
|
|
|
</div>
|
|
|
+ <% } %>
|
|
|
</div>
|
|
|
<!--图表-->
|
|
|
<div class="card mb-3">
|
|
@@ -105,6 +109,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<script src="/public/js/echarts/echarts.min.js"></script>
|
|
|
+<% if (scheduleInfo && scheduleInfo.total_tp !== 0 && scheduleInfo.total_gcl !== 0) { %>
|
|
|
<script type="text/javascript">
|
|
|
var charts = new Array();
|
|
|
//计划进度//
|
|
@@ -187,7 +192,11 @@
|
|
|
type:'line',
|
|
|
tooltip : {trigger: 'axis',formatter: "{b}占合同比例<br/>{a}:{c} %"},
|
|
|
yAxisIndex: 1,
|
|
|
- data:[10, 15, 20, 13, 11,]
|
|
|
+ data:[<% if (scheduleMonth.length > 0) { %>
|
|
|
+ <% for (const sm of scheduleMonth) { %>
|
|
|
+ '<%- ctx.helper.round(ctx.helper.div(sm.sj_gcl, scheduleInfo.total_gcl)*100, 2) %>',
|
|
|
+ <% } %>
|
|
|
+ <% } %>]
|
|
|
},
|
|
|
]
|
|
|
};
|
|
@@ -273,7 +282,11 @@
|
|
|
type:'line',
|
|
|
tooltip : {trigger: 'axis',formatter: "{b}占合同比例<br/>{a}:{c} %"},
|
|
|
yAxisIndex: 1,
|
|
|
- data:[10, 15, 20, 13, 11,]
|
|
|
+ data:[<% if (scheduleMonth.length > 0) { %>
|
|
|
+ <% for (const sm of scheduleMonth) { %>
|
|
|
+ '<%- ctx.helper.round(ctx.helper.div(sm.sj_tp, scheduleInfo.total_tp)*100, 2) %>',
|
|
|
+ <% } %>
|
|
|
+ <% } %>]
|
|
|
},
|
|
|
]
|
|
|
};
|
|
@@ -285,64 +298,14 @@
|
|
|
<!--sjs-->
|
|
|
<script>
|
|
|
$(document).ready(function () {
|
|
|
- const data = [
|
|
|
- {
|
|
|
- 单位:'稍等',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'km',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'m',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'m2',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'m3',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'kg',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'个',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'台',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'套',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'棵',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'组',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'总额',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'系统',
|
|
|
- 精度:3,
|
|
|
- },{
|
|
|
- 单位:'其他未列单位',
|
|
|
- 精度:3,
|
|
|
- }
|
|
|
- ];
|
|
|
-
|
|
|
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
|
|
|
for(var i = 0; i < charts.length; i++) {
|
|
|
charts[i].resize();
|
|
|
}
|
|
|
});
|
|
|
- // const spread = new GC.Spread.Sheets.Workbook($('#option-spread1')[0], {
|
|
|
- // sheetCount: 1
|
|
|
- // });
|
|
|
- // spread.getActiveSheet().setDataSource(data);
|
|
|
- // spread.options.tabStripVisible = false;
|
|
|
})
|
|
|
</script>
|
|
|
+<% } %>
|
|
|
<script src="/public/js/sub_menu.js"></script>
|
|
|
<script>
|
|
|
$.subMenu({
|