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
66241d1d
Commit
66241d1d
authored
Jun 06, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加物流供应商筛选
parent
77c5e8a5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
3 deletions
+59
-3
LogisticsServices.cs
Bailun.DC.Services/LogisticsServices.cs
+26
-2
LogisticsController.cs
...n.DC.Web/Areas/Reports/Controllers/LogisticsController.cs
+14
-0
SupplierTrancationReport.cshtml
...s/Reports/Views/Logistics/SupplierTrancationReport.cshtml
+19
-1
No files found.
Bailun.DC.Services/LogisticsServices.cs
View file @
66241d1d
...
...
@@ -16,6 +16,9 @@ namespace Bailun.DC.Services
/// </summary>
public
class
LogisticsServices
{
#
region
往来报表
/// <summary>
/// 物流供应商往来统计报表
/// </summary>
...
...
@@ -112,12 +115,12 @@ namespace Bailun.DC.Services
cn
.
Open
();
}
var
obj
=
cn
.
QueryFirstOrDefault
<
dc_daily_logistics_supplier_transaction
>(
sql
+
sqlwhere
);
var
obj
=
cn
.
QueryFirstOrDefault
<
dc_daily_logistics_supplier_transaction
>(
sql
+
sqlwhere
,
sqlparam
);
//获取满足条件的供应商列表
sql
=
"select suppliername from dc_daily_logistics_supplier_transaction t1 "
;
var
listsupplier
=
cn
.
Query
<
string
>(
sql
+
sqlwhere
+
" group by suppliername"
);
var
listsupplier
=
cn
.
Query
<
string
>(
sql
+
sqlwhere
+
" group by suppliername"
,
sqlparam
);
//获取期初
...
...
@@ -219,5 +222,26 @@ namespace Bailun.DC.Services
}
#
endregion
/// <summary>
/// 物流供应商列表
/// </summary>
/// <returns></returns>
public
List
<
string
>
ListSupplier
()
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
obj
=
cn
.
Query
<
string
>(
"select suppliername from dc_daily_logistics_supplier_transaction group by suppliername"
).
ToList
();
return
obj
;
}
}
}
}
Bailun.DC.Web/Areas/Reports/Controllers/LogisticsController.cs
View file @
66241d1d
...
...
@@ -92,5 +92,18 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
msg
=
obj
});
}
/// <summary>
/// 物流供应商
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
JsonResult
ListLogisticsSupplier
()
{
var
list
=
new
Services
.
LogisticsServices
().
ListSupplier
();
return
Json
(
list
);
}
}
}
\ No newline at end of file
Bailun.DC.Web/Areas/Reports/Views/Logistics/SupplierTrancationReport.cshtml
View file @
66241d1d
...
...
@@ -56,6 +56,8 @@
$("#roletable").attr("data-height", (height - 170));
list();
listsupplier();
})
function list() {
...
...
@@ -87,7 +89,7 @@
{ field: 'amount_end', title: '期末金额', width: '120', iscount: true }
];
var url = '@Url.Content("~/Reports/Logistics/SupplierTrancationReportJson")' + '?start=' + start + '&end=' + end;
var url = '@Url.Content("~/Reports/Logistics/SupplierTrancationReportJson")' + '?start=' + start + '&end=' + end
+ '&suppliername=' + $('#suppliername').val()
;
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {
...
...
@@ -150,6 +152,22 @@
})
}
function listsupplier() {
$.submit({
url: '@Url.Content("~/Reports/Logistics/ListLogisticsSupplier")',
paramData: '',
type: 'POST',
func: function (result) {
$('#suppliername').html('<option value="">请选择物流供应商</option>');
if (result) {
for (var i in result) {
$('#suppliername').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
})
}
function exportFile() {
var start = $('#start').val();
var end = $('#end').val();
...
...
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