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
72718138
Commit
72718138
authored
Jan 15, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加OMS发货明细
parent
73a6c0dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
293 additions
and
0 deletions
+293
-0
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+24
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+80
-0
ShippingIncoming.cshtml
...C.Web/Areas/Reports/Views/Finance/ShippingIncoming.cshtml
+189
-0
No files found.
Bailun.DC.Services/FinanceReportServices.cs
View file @
72718138
...
...
@@ -7351,5 +7351,29 @@ group by currency";
}
#
endregion
#
region
OMS
发货收入
/// <summary>
/// oms发货收入列表
/// </summary>
/// <param name="month"></param>
/// <returns></returns>
public
List
<
dc_month_shipping_incoming
>
ListMonthShippingIncoming
(
string
month
)
{
var
sql
=
$"select * from dc_month_shipping_incoming where month='
{
month
}
'"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
list
=
cn
.
Query
<
dc_month_shipping_incoming
>(
sql
,
null
,
null
,
true
,
2
*
60
).
ToList
();
return
list
;
}
}
#
endregion
}
}
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
72718138
...
...
@@ -9510,6 +9510,86 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
#
endregion
#
region
oms
发货收入
/// <summary>
/// oms发货收入
/// </summary>
/// <returns></returns>
public
ActionResult
ShippingIncoming
()
{
return
View
();
}
/// <summary>
/// oms发货收入
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
JsonResult
ShippingIncomingJson
(
string
month
)
{
try
{
var
result
=
new
List
<
dc_month_shipping_incoming
>();
var
list
=
new
Services
.
FinanceReportServices
().
ListMonthShippingIncoming
(
month
);
//组装数据
list
=
list
.
OrderBy
(
a
=>
a
.
platform_type
).
ToList
();
var
groupPlatform
=
list
.
GroupBy
(
a
=>
a
.
platform_type
);
foreach
(
var
item
in
groupPlatform
)
{
var
platform
=
item
.
Key
;
var
groupCurrency
=
item
.
GroupBy
(
a
=>
a
.
currency
);
foreach
(
var
c
in
groupCurrency
)
{
var
currency
=
c
.
Key
;
foreach
(
var
o
in
c
)
{
result
.
Add
(
new
dc_month_shipping_incoming
{
platform_type
=
platform
,
currency
=
currency
,
financecategoryname
=
o
.
financecategoryname
,
amount
=
o
.
amount
,
month
=
o
.
month
,
});
}
result
.
Add
(
new
dc_month_shipping_incoming
{
platform_type
=
"合计"
,
currency
=
""
,
financecategoryname
=
""
,
amount
=
c
.
Sum
(
a
=>
a
.
amount
),
month
=
c
.
FirstOrDefault
().
month
,
});
}
}
return
Json
(
new
{
success
=
true
,
msg
=
""
,
data
=
result
,
});
}
catch
(
Exception
ex
)
{
return
Json
(
new
{
success
=
false
,
msg
=
ex
.
Message
,
});
}
}
#
endregion
}
class
mHappenAmount
{
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/ShippingIncoming.cshtml
0 → 100644
View file @
72718138
@{
ViewData["Title"] = "OMS发货收入";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
ViewBag.Nav = new string[] { "财务报表", "OMS发货收入" };
}
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning" style="display:none;">
说明:数据从2019年9月份开始
</div>
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>请选择开始月份</label>
<input id="month" name="month" class="form-control" style="width:130px;" placeholder="年.月" value="@(DateTime.Now.AddMonths(-1).ToString("yyyy-MM"))" />
</div>
<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>*@
</div>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<h2 style="text-align:center;">OMS发货收入</h2>
<div class="bootstrap-table">
<div class="fixed-table-container">
<div class="fixed-table-body">
<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>原始币种</td>
<td>中文分类</td>
<td>订单总金额</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@section css{
<style>
a {
margin-left: 10px;
}
</style>
}
@section scripts{
<script src="~/css/Layer-2.1/extend/layer.ext.js"></script>
<script type="text/javascript">
$(document).ready(function () {
laydate.render({ elem: '#month', type: 'month' });
list();
})
function list() {
$.submit({
url: '@Url.Content("~/Reports/Finance/ShippingIncomingJson")',
type: 'POST',
paramData: $("#toolbar").serialize(),
func: function (result) {
if (result.success) {
$('#tb').find('tbody').html('');
if (result.data.length > 0) {
//组装行
var rows = '';
for (var i in result.data) {
var obj = result.data[i];
rows += '<tr>';
rows += '<td>' + obj.platform_type + '</td>';
rows += '<td>' + obj.currency + '</td>';
rows += '<td>' + obj.financecategoryname + '</td>';
rows += '<td>' + obj.amount + '</td>';
rows += '</tr>';
}
$('#tb').find('tbody').append(rows);
}
else {
layer.msg('没有' + $('#month').val()+'月份的OMS发货收入数据。');
}
}
else {
layer.msg(result.msg);
}
return false;
}
})
}
function EditFee(name, col,v,mon) {
layer.prompt({ title: '编辑' + name, value:v}, function (text, index) {
layer.close(index);
Save(col, text, mon);
});
}
function Save(col, val, mon) {
$.submit({
url: '@Url.Content("~/Reports/Finance/SaveMonthSaleProfitNew")',
paramData: 'month=' + mon+'&'+col+'='+val,
type:'POST',
func: function (result) {
if (result.success) {
layer.msg('提交成功');
setTimeout(function () {
list();
}, 1.5 * 1000);
}
else {
layer.msg(result.msg);
}
}
})
}
function EditDescription(col, val, mon, name) {
layer.prompt({ title: '编辑 ' + name, value: val }, function (text, index) {
layer.close(index);
SaveDescription(col, text, mon);
});
}
function SaveDescription(col, val, mon) {
$.submit({
url: '@Url.Content("~/Reports/Finance/UpdateMonthSaleProfitDescription")',
paramData: 'month=' + mon+'&'+col+'='+val,
type:'POST',
func: function (result) {
if (result.success) {
layer.msg('提交成功');
setTimeout(function () {
list();
}, 1.5 * 1000);
}
else {
layer.msg(result.msg);
}
}
})
}
function ShowDetail(col, mon, name) {
layer_show(mon + ' ' + name + "的明细", '@Url.Content("~/Reports/Finance/MonthSaleProfitDetails")' + '?month=' + mon + '&col=' + col + '&colname=' + name, '95%', '95%');
}
function exportxls() {
var mon = $('#month').val();
if (mon == '') {
alert('请选择月份');
return;
}
window.open('@Url.Content("~/Reports/Finance/ExportMonthSaleProfitNew?month=")' + mon, '_blank');
}
function clearHtml(s) {
// 去除 富文本格式
s = s.replace(/(\n)/g, "");
s = s.replace(/(\t)/g, "");
s = s.replace(/(\r)/g, "");
s = s.replace(/<\/?[^>]*>/g, "");
s = s.replace(/\s*/g, "");
return s;
}
</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