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
fd837313
Commit
fd837313
authored
Nov 05, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成月度利润报表增加多月份显示
parent
7d2480ba
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
24 deletions
+61
-24
Services.cs
Bailun.DC.DailyPurchaseSellStock/Services.cs
+1
-1
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+2
-2
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+0
-0
MonthSaleProfit.cshtml
...DC.Web/Areas/Reports/Views/Finance/MonthSaleProfit.cshtml
+58
-21
No files found.
Bailun.DC.DailyPurchaseSellStock/Services.cs
View file @
fd837313
...
...
@@ -232,7 +232,7 @@ namespace Bailun.DC.DailyPurchaseSellStock
}
else
{
Console
.
WriteLine
(
"出现异常次数大于"
+
count
+
"次,服务关闭重跑"
);
Console
.
WriteLine
(
"出现异常次数大于"
+
count
+
"次,服务关闭重跑"
);
}
}
}
...
...
Bailun.DC.Services/FinanceReportServices.cs
View file @
fd837313
...
...
@@ -3555,10 +3555,10 @@ group by currency";
if
(!
string
.
IsNullOrEmpty
(
end
))
{
sql
+=
(
" and month<='"
+
end
+
"'
order by month desc limit 6
"
);
sql
+=
(
" and month<='"
+
end
+
"'"
);
}
sql
+=
" order by month desc limit 6"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
...
...
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
fd837313
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Views/Finance/MonthSaleProfit.cshtml
View file @
fd837313
...
...
@@ -7,6 +7,9 @@
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning">
说明:数据从9月份开始
</div>
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
...
...
@@ -17,21 +20,21 @@
<div class="form-group">
<label> </label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
<button type="button" class="btn btn-danger" onclick="exportxls();">导出</button>
@*<button type="button" class="btn btn-danger" onclick="exportxls();">导出</button>*@
</div>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<h2
id="lbl_title" style="text-align:center;">X
月份销售利润表</h2>
<h2
style="text-align:center;">
月份销售利润表</h2>
<div class="bootstrap-table">
<div class="fixed-table-container">
<div class="fixed-table-body">
<table style="table-layout: fixed;" class="table table-border table-bordered table-hover table-bg table-sort form-inline">
<table
id="tb"
style="table-layout: fixed;" class="table table-border table-bordered table-hover table-bg table-sort form-inline">
<thead>
<tr>
<td>月份</td>
<td id="lbl_title" style="font-size:1.1em;font-weight:bold;">
X月份销售利润表
</td>
<td id="lbl_title" style="font-size:1.1em;font-weight:bold;"></td>
</tr>
</thead>
<tbody>
...
...
@@ -300,33 +303,69 @@
function list() {
$.submit({
url: '@Url.Content("~/Reports/Finance/ListMonthSaleProfit")',
type:'POST',
type:
'POST',
paramData: $("#toolbar").serialize(),
func: function (result) {
if (result.success) {
$('#tb').find('thead').html('');
$('#tb').find('tbody').html('');
if (result.data.length > 0) {
var obj = result.data[0];
var s = '';
for (var h in result.head) {
s = '<tr>' + result.head[h].item2; //项目名称
$('#lbl_title').html($('#month').val() + '月销售利润表');
for (var i in result.data) {
for (var i in obj) {
var _temp = i.substr(i.length - 1, 1);
if (_temp == '_') {
$('.' + i).attr('val', obj[i]);
$('.' + i).attr('mon', obj['month']);
}
else {
$('.lbl_' + i).html(obj[i]);
$('.lbl_' + i).attr('mon', obj['month']);
for (var c in result.data[i]) {
if (c == result.head[h].item1) {
var str_template = result.head[h].item3;
str_template = str_template.replace('{' + result.head[h].item1 + '}', result.data[i][c]);
str_template = str_template.replace('{' + result.head[h].item1 + '}', result.data[i][c]);
str_template = str_template.replace('{month}', result.data[i]['month']);
try {
$('.' + i).attr('val', obj[i]);
$('.' + i).attr('mon', obj['month']);
str_template = str_template.replace('{' + result.head[h].item1 + '_}', result.data[i][c+'_']);
} catch (e) {
}
s += ('<td>' + str_template + '</td>');
break;
}
}
}
s += '</tr>';
$('#tb').find('tbody').append(s);
}
var m = '<tr><th style="height:40px;text-align: center;line-height: 40px;">项目</th>';
for (var i in result.data) {
m += ('<th style="height:40px;text-align: center;line-height: 40px;">' + result.data[i]['month']+'</th>');
}
m += '</tr>';
$('#tb').find('thead').html(m);
//var obj = result.data[0];
//$('#lbl_title').html($('#month').val());
//for (var i in obj) {
// var _temp = i.substr(i.length - 1, 1);
// if (_temp == '_') {
// $('.' + i).attr('val', obj[i]);
// $('.' + i).attr('mon', obj['month']);
// }
// else {
// $('.lbl_' + i).html(obj[i]);
// $('.lbl_' + i).attr('mon', obj['month']);
// try {
// $('.' + i).attr('val', obj[i]);
// $('.' + i).attr('mon', obj['month']);
// } catch (e) {
// }
// }
//}
}
else {
layer.msg('没有' + $('#month').val()+'月份的销售利润数据。');
...
...
@@ -341,9 +380,7 @@
})
}
function Edit(col, name) {
var v = $('.' + col).attr('val');
var mon = $('.' + col).attr('mon');
function Edit(col, name,mon,v) {
layer.prompt({ title: '编辑' + name, value:v}, function (text, index) {
layer.close(index);
Save(col, text, mon);
...
...
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