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
a7f0bbff
Commit
a7f0bbff
authored
Nov 27, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加计算说明
parent
f6a8ba17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
74 deletions
+56
-74
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+10
-2
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+42
-0
ItemNoProfitOrderDetail.cshtml
...Areas/Reports/Views/Orders/ItemNoProfitOrderDetail.cshtml
+4
-72
No files found.
Bailun.DC.Services/OrdersServices.cs
View file @
a7f0bbff
...
...
@@ -7533,9 +7533,16 @@ namespace Bailun.DC.Services
cn
.
Open
();
}
var
obj
=
cn
.
Page
<
dc_mid_itemno_profit_order
>(
parameter
.
pageIndex
,
parameter
.
limit
,
sql
,
ref
total
);
if
(
parameter
.
limit
==
0
)
{
var
obj
=
cn
.
Page
<
dc_mid_itemno_profit_order
>(
parameter
.
pageIndex
,
parameter
.
limit
,
sql
,
ref
total
);
return
obj
.
ToList
();
return
obj
.
ToList
();
}
else
{
return
cn
.
Query
<
dc_mid_itemno_profit_order
>(
sql
,
null
,
null
,
true
,
6
*
60
).
ToList
();
}
}
}
...
...
@@ -7682,3 +7689,4 @@ namespace Bailun.DC.Services
}
}
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
a7f0bbff
...
...
@@ -4209,6 +4209,48 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
});
}
/// <summary>
/// 导出itemno 广告利润率计算的订单明细
/// </summary>
/// <param name="itemid"></param>
/// <param name="day"></param>
/// <returns></returns>
public
ActionResult
ExportItemNoProfitOrderDetail
(
string
itemid
,
DateTime
day
)
{
var
total
=
0
;
var
_service
=
new
Services
.
OrdersServices
();
var
obj
=
_service
.
ListItemNoOrder
(
new
BtTableParameter
{
offset
=
0
,
limit
=
0
},
itemid
,
day
,
ref
total
);
var
colNames
=
new
List
<
string
>
{
"平台订单号"
,
"发货状态"
,
"销售额"
,
"产品成本"
,
"头程费用"
,
"尾程费用"
,
"平台费用"
,
"操作费"
,
"处理费"
,
"paypal费"
,
"FBA费"
,
"提现损耗"
};
var
listVal
=
new
List
<
string
>();
foreach
(
var
item
in
obj
)
{
listVal
.
Add
(
item
.
origin_order_id
+
"|"
+
item
.
shipping_status
+
"|"
+
item
.
amount_sales
+
"|"
+
item
.
cost_product
+
"|"
+
item
.
cost_first
+
"|"
+
item
.
cost_logistics
+
"|"
+
item
.
cost_platform_fee
+
"|"
+
item
.
cost_handle_platform
+
"|"
+
item
.
cost_handle_bailun
+
"|"
+
item
.
cost_paypal_fee
+
"|"
+
item
.
cost_fba_fee
+
"|"
+
item
.
losswithdraw
);
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filename
=
"itemno:"
+
itemid
+
"的利润率的订单明细数据"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
);
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
ToCSV
(
listVal
,
colNames
,
guid
,
filepath
);
var
ms
=
new
System
.
IO
.
MemoryStream
();
using
(
var
f
=
new
System
.
IO
.
FileStream
(
filepath
+
guid
+
".csv"
,
System
.
IO
.
FileMode
.
Open
))
{
f
.
CopyTo
(
ms
);
}
ms
.
Position
=
0
;
return
File
(
ms
,
"text/csv"
,
filename
+
".csv"
);
}
#
endregion
#
region
private
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/ItemNoProfitOrderDetail.cshtml
View file @
a7f0bbff
...
...
@@ -10,7 +10,7 @@
<div style="float:right;width:100%;">
<div id="rightcontain">
<div class="ibox-content m-b-sm border-bottom">
<button type="button" class="btn btn-primary" onclick="exportxls();">导出订单明细</button>
</div>
<div class="ibox-content m-b-sm border-bottom">
...
...
@@ -50,7 +50,7 @@
<script type="text/javascript">
var tb;
$(document).ready(function () {
var height = document.body.clientHeight;
$("#roletable").attr("data-height", (height - 170));
...
...
@@ -110,79 +110,11 @@
}
}
function listAccount() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListAccount")',
type:'POST',
paramData: 'platform=Ebay',
func: function (result) {
if (result != null && result != undefined) {
$('#account').html('<option value="">选择帐号</option>');
for (var i = 0; i < result.length; i++) {
$('#account').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
})
}
function listWebsite() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListWebSite")',
type:'POST',
paramData: 'platform=@(ViewBag.platform)',
func: function (result) {
if (result != null && result != undefined) {
$('#website').html('<option value="">选择站点</option>');
for (var i = 0; i < result.length; i++) {
$('#website').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
})
}
function showleft() {
var c = $('#leftcontain').css('display');
if (c == 'none') {
$('#leftcontain').css('display', 'inline');
$("#rightcontain").animate({ marginLeft: "220px" });
}
else {
$('#leftcontain').css('display', 'none');
$("#rightcontain").animate({ marginLeft: "0px" });
}
}
function listcategory12() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListSkuCategoryOneAndSecondLevel")',
paramData: '',
type: 'POST',
func: function (result) {
var setting = {
check: {
chkStyle:'checkbox',
enable: true
}
};
zTreeObj = $.fn.zTree.init($("#ztree"), setting, eval('('+result+')'));
}
})
function exportxls() {
window.open('@Url.Content("~/Reports/Orders/ExportItemNoProfitOrderDetail")'+'?itemid=@(ViewBag.itemid)&day=@(ViewBag.day)', '_blank');
}
function getChkNode() {
var s = '';
var o = $.fn.zTree.getZTreeObj("ztree");
var nodes = o.getCheckedNodes();
for (var i in nodes) {
if (nodes[i].children == null || nodes[i].children.length <= 0) {
s += (nodes[i].id) + '|';
}
}
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