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
2b3b632e
Commit
2b3b632e
authored
Apr 15, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产负债表增加科目趋势图
parent
4a6f3ca0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
4 deletions
+127
-4
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+15
-0
Index2.cshtml
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2.cshtml
+41
-0
Index2TrendChart.cshtml
...C.Web/Areas/Reports/Views/Finance/Index2TrendChart.cshtml
+71
-4
No files found.
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
2b3b632e
...
...
@@ -3347,6 +3347,21 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
return
View
();
}
/// <summary>
/// 资产负债表-子项趋势图
/// </summary>
/// <param name="colname">子项名称</param>
/// <param name="head">日期</param>
/// <param name="vals">值</param>
/// <returns></returns>
public
ActionResult
Index2TrendChart
(
string
colname
,
string
head
,
string
vals
)
{
ViewBag
.
colname
=
colname
;
ViewBag
.
head
=
head
;
ViewBag
.
vals
=
vals
;
return
View
();
}
public
ActionResult
BalanceSheetSubDetail
(
string
type
,
DateTime
day
)
{
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2.cshtml
View file @
2b3b632e
...
...
@@ -1424,6 +1424,8 @@
<script src="@Url.Content("~/css/chosen_v1.6.2/chosen.jquery.min.js")"></script>
<script type="text/javascript">
var tb;
var _data=[];
$(document).ready(function () {
//计算表格高度
var height = document.body.clientHeight;
...
...
@@ -1462,6 +1464,41 @@
GetData();
$('.item-row').each(function () {
var _this = $(this);
var first = _this.find(":eq(0)");
var _html = first.html();
if (_html != '数值' && _html.indexOf('<') <= 0) {
first.click(function () {
var colname = _this.find(":eq(7)").children(":eq(0)").attr('id');
//alert(colname);
var _head = '';
var _val = '';
for (var i in _data) {
_head += (_data[i].statistical_time.replace('T', ' ').replace('00:00:00', '')+',');
for (var key in _data[i]) {
if (key == colname) {
_val += (_data[i][key] + ',');
continue;
}
}
}
//alert(_head + ":::::" + _val);
if (_head != '') {
_head = _head.substring(0, _head.length - 1);
_val = _val.substring(0, _val.length - 1);
}
layer_show(_html, '@Url.Content("~/Reports/Finance/Index2TrendChart?colname=")' + _html + '&head=' + _head + '&vals=' + _val,'90%','90%');
})
}
})
}
function GetData() {
...
...
@@ -1492,6 +1529,8 @@
func: function (result) {
if (result.success) {
var list = result.data;
_data = [];
var obj = list[list.length - 1];
var day = obj.statistical_time.replace('T', ' ').replace('00:00:00', '');
...
...
@@ -1517,6 +1556,8 @@
}
for (var i = 0; i < list.length; i++) {
_data.push(list[i]);
var obj = list[i];
var day = obj.statistical_time.replace('T', ' ').replace('00:00:00', '');
$('#c' + (i)).html(day);
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2TrendChart.cshtml
View file @
2b3b632e
@{
ViewData["Title"] = "Index2TrendChart";
@{
ViewData["Title"] = "资产负债表明细趋势图";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
ViewBag.Nav = new string[] { "报表管理", "资产负债表", ViewBag.colname + " 趋势图" };
}
<h2>Index2TrendChart</h2>
<div class="row">
<div class="col-sm-12">
@*<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<input id="start" class="form-control" name="start" type="text" style="width:120px;" value="@ViewBag.start" />
<input id="end" name="end" class="form-control" type="text" style="width:120px;" value="@ViewBag.end" />
<button type="button" class="btn btn-sm btn-primary" onclick="init();"><i class="fa fa-search"></i> 查询</button>
<button id="btnexport" type="button" class="btn btn-sm btn-success" onclick="ExportXsl();">导出</button>
</div>
</div>
</form>
</div>*@
<div class="ibox-content m-b-sm border-bottom">
<div id="chart_content" style="height:600px;width:100%;">
</div>
</div>
</div>
</div>
@section scripts{
<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'));
init();
})
function init() {
var strhead = '@ViewBag.head';
var strval = '@ViewBag.vals';
var arrhead = strhead.split(',');
var arrval = strval.split(',');
var option = {
title: {
text: ''
},
tooltip: {},
legend: {
data: ['环比%']
},
xAxis: {
data: arrhead
},
yAxis: {},
series: [{
name: '金额',
type: 'bar',
barWidth: '30%',
data: arrval
}]
};
myChart.setOption(option);
}
</script>
}
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