Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
204450eb
Commit
204450eb
authored
Apr 01, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
环比改为表格,增加一级项目
parent
548c21f7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
56 deletions
+65
-56
mFinanceDebtChain.cs
Bailun.DC.Models/mFinanceDebtChain.cs
+20
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+0
-0
Index2.cshtml
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2.cshtml
+1
-1
Index2Chart.cshtml
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2Chart.cshtml
+44
-55
No files found.
Bailun.DC.Models/mFinanceDebtChain.cs
0 → 100644
View file @
204450eb
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
public
class
mFinanceDebtChain
{
public
string
onelevelname
{
get
;
set
;
}
public
string
sencondlevelname
{
get
;
set
;
}
public
decimal
start
{
get
;
set
;
}
public
decimal
end
{
get
;
set
;
}
public
string
diff
{
get
;
set
;
}
}
}
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
204450eb
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2.cshtml
View file @
204450eb
...
...
@@ -33,7 +33,7 @@
<button type="button" class="btn btn-sm btn-primary" onclick="GetData();"><i class="fa fa-search"></i> 查询</button>
<button id="btnexport" style="display:none;" type="button" class="btn btn-sm btn-success" onclick="ExportXsl();">导出</button>
<button type="button" class="btn btn-sm btn-warning" onclick="showchart();">环比
图
表</button>
<button type="button" class="btn btn-sm btn-warning" onclick="showchart();">环比
报
表</button>
</div>
</div>
</form>
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2Chart.cshtml
View file @
204450eb
...
...
@@ -20,22 +20,36 @@
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<div id="chart_content" style="height:600px;width:100%;">
@*
<div id="chart_content" style="height:600px;width:100%;">
</div>
</div>*@
<table id="tb" class="table table-hover table-bordered" style="width:100%;">
<thead>
<tr>
<th>一级项目</th>
<th>二级项目</th>
<th>期初</th>
<th>期末</th>
<th>环比差值%</th>
</tr>
</thead>
<tbody id="tbody_">
</tbody>
</table>
</div>
</div>
</div>
@section scripts{
<script src="https://cdn.bootcss.com/echarts/3.6.2/echarts.min.js"></script>
@*<script src="https://cdn.bootcss.com/echarts/3.6.2/echarts.min.js"></script>*@
<script>
var myChart;
$(document).ready(function () {
laydate.render({ elem: '#start' });
laydate.render({ elem: '#end' });
myChart = echarts.init(document.getElementById('chart_content'));
//
myChart = echarts.init(document.getElementById('chart_content'));
init();
})
...
...
@@ -53,66 +67,41 @@
url: '@Url.Content("~/Reports/Finance/FinanceDebtChainChartJson")',
paramData: 'start=' + start + '&end=' + end,
func: function (result) {
$('#tbody_').html('');
if (result.success) {
//var option = {
//
color: ['#3398DB'],
//
tooltip: {
//
trigger: 'axis'
,
//
axisPointer: { // 坐标轴指示器,坐标轴触发有效
//
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
//
}
//
title: {
//
text: ''
//
}
,
//
tooltip: {},
//
legend: {
//
data: ['环比%']
// },
// grid: {
// left: '3%',
// right: '4%',
// bottom: '3%',
// containLabel: true
// xAxis: {
// data: result.data.col
// },
// xAxis: [
// {
// type: 'category',
// data: result.data.s,
// axisTick: {
// alignWithLabel: true
// }
// }
// ],
// yAxis: [
// {
// type: 'value'
// }
// ],
// series: [
// {
// name: '数值项',
// yAxis: {},
// series: [{
// name: '环比',
// type: 'bar',
// barWidth: '60%',
// data: result.data.val
// }
// ]
// }]
//};
var option = {
title: {
text: ''
},
tooltip: {},
legend: {
data: ['环比%']
},
xAxis: {
data: result.data.col
},
yAxis: {},
series: [{
name: '环比',
type: 'bar',
barWidth: '60%',
data: result.data.val
}]
};
myChart.setOption(option);
//myChart.setOption(option);
for (var i = 0; i < result.data.length; i++) {
if (result.data[i].sencondlevelname.indexOf('合计') > 0) {
var s = '<tr><td style="text-align:right;width:190px;background:#eee;">' + result.data[i].onelevelname + '</td><td style="background:#eee;">' + result.data[i].sencondlevelname + '</td><td style="background:#eee;">' + result.data[i].start + '</td><td style="background:#eee;">' + result.data[i].end + '</td><td style="background:#eee;">' + result.data[i].diff + '</td><tr>';
}
else {
var s = '<tr><td style="text-align:right;width:190px;">' + result.data[i].onelevelname + '</td><td>' + result.data[i].sencondlevelname + '</td><td>' + result.data[i].start + '</td><td>' + result.data[i].end + '</td><td>' + result.data[i].diff + '</td><tr>';
}
$('#tbody_').append(s);
}
}
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment