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
0ef07f16
Commit
0ef07f16
authored
Apr 06, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月销售利润查看订单明细增加导出功能
parent
9c9feceb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
2 deletions
+75
-2
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+74
-1
MonthSaleProfitNew_OrderDetail.cshtml
...ports/Views/Finance/MonthSaleProfitNew_OrderDetail.cshtml
+1
-1
No files found.
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
0ef07f16
...
@@ -9717,6 +9717,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -9717,6 +9717,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
total_fee
=
(
a
.
total_fee
-
a
.
shipping
)
*
a
.
wms_to_cny_exchange_rate
*
a
.
quantity_shipped
,
//仓储费
total_fee
=
(
a
.
total_fee
-
a
.
shipping
)
*
a
.
wms_to_cny_exchange_rate
*
a
.
quantity_shipped
,
//仓储费
sale_profit
=
0
,
sale_profit
=
0
,
shipping_time
=
a
.
shipping_time
,
}).
ToList
();
}).
ToList
();
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
...
@@ -9729,10 +9732,80 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -9729,10 +9732,80 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
{
{
total
=
total
,
total
=
total
,
rows
=
list
,
rows
=
list
,
isexport
=
Services
.
UserAuthorityServices
.
checkUserExportAuthority
(
"ExportMonthSaleProfitOrderDetail"
,
HttpContextHelper
.
Current
.
User
.
GetUserName
())
,
isexport
=
1
,
});
});
}
}
public
ActionResult
ExportMonthSaleProfitNew_OrderDetail
(
string
month
,
string
financecategory
)
{
var
total
=
0
;
var
_service
=
new
Services
.
FinanceReportServices
();
var
obj
=
_service
.
ListMonthProfitOrderDetail
(
new
BtTableParameter
{
offset
=
0
,
limit
=
0
},
month
,
financecategory
,
ref
total
);
var
list
=
obj
.
Select
(
a
=>
new
dc_month_sales_profit_orderdetail
{
financecategoryname
=
a
.
financecategoryname
,
platform_type
=
a
.
platform_type
,
bailun_sku
=
a
.
bailun_sku
,
origin_order_id
=
a
.
origin_order_id
,
bailun_order_id
=
a
.
bailun_order_id
,
quantity_shipped
=
a
.
quantity_shipped
,
amount_sales
=
a
.
amount_sales
*
a
.
quantity_shipped
*
a
.
seller_order_exchange_rate
,
cost_fba_fee
=
a
.
cost_fba_fee
*
a
.
quantity_shipped
*
a
.
seller_order_exchange_rate
,
cost_first
=
a
.
cost_first
*
a
.
quantity_shipped
,
cost_handle_platform
=
a
.
cost_handle_platform
*
a
.
quantity_shipped
,
cost_logistics
=
a
.
cost_logistics
*
a
.
quantity_shipped
,
cost_paypal_fee
=
a
.
cost_paypal_fee
*
a
.
quantity_shipped
*
a
.
seller_order_exchange_rate
,
cost_platform_fee
=
a
.
cost_platform_fee
*
(
a
.
platform_type
.
ToLower
()
==
"ebay"
?
a
.
seller_other_exchange_rate
:
a
.
seller_order_exchange_rate
)
*
a
.
quantity_shipped
,
cost_product
=
a
.
cost_product
*
a
.
quantity_shipped
,
total_fee
=
(
a
.
total_fee
-
a
.
shipping
)
*
a
.
wms_to_cny_exchange_rate
*
a
.
quantity_shipped
,
//仓储费
sale_profit
=
0
,
shipping_time
=
a
.
shipping_time
,
}).
ToList
();
foreach
(
var
item
in
list
)
{
item
.
sale_profit
=
item
.
amount_sales
-
item
.
cost_fba_fee
-
item
.
cost_first
-
item
.
cost_handle_platform
-
item
.
cost_logistics
-
item
.
cost_paypal_fee
-
item
.
cost_platform_fee
-
item
.
cost_product
-
item
.
total_fee
;
}
var
colNames
=
new
List
<
string
>
{
"财务分类"
,
"平台类型"
,
"平台订单号"
,
"SKU"
,
"销售额"
,
"产品成本"
,
"平台费"
,
"Paypal费"
,
"FBA费"
,
"头程费"
,
"尾程费"
,
"仓储费"
,
"平台操作费"
,
"销售利润"
,
"发货数量"
,
"发货时间"
};
var
listval
=
new
List
<
string
>();
foreach
(
var
item
in
obj
)
{
listval
.
Add
(
item
.
financecategoryname
+
"|"
+
item
.
platform_type
+
"|"
+
item
.
origin_order_id
+
"|"
+
item
.
bailun_sku
+
"|"
+
item
.
amount_sales
+
"|"
+
item
.
cost_product
+
"|"
+
item
.
cost_platform_fee
+
"|"
+
item
.
cost_paypal_fee
+
"|"
+
item
.
cost_fba_fee
+
"|"
+
item
.
cost_first
+
"|"
+
item
.
cost_logistics
+
"|"
+
item
.
total_fee
+
"|"
+
item
.
cost_handle_platform
+
"|"
+
item
.
sale_profit
+
"|"
+
item
.
quantity_shipped
+
"|"
+
item
.
shipping_time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
);
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filename
=
" 订单明细"
+
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"
);
}
/// <summary>
/// <summary>
/// 新月销售利润-广告类型选择页面
/// 新月销售利润-广告类型选择页面
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/MonthSaleProfitNew_OrderDetail.cshtml
View file @
0ef07f16
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
function ExportCSV() {
function ExportCSV() {
var month = $('#month').val();
var month = $('#month').val();
window.open('@Url.Content("~/Reports/Finance/ExportMonthSaleProfitNew
FeeOrderDetail")' + '?month=' + month + '&col=@(ViewBag.col
)', '_blank');
window.open('@Url.Content("~/Reports/Finance/ExportMonthSaleProfitNew
_OrderDetail")' + '?month=' + month +'&financecategory=@(ViewBag.financecategory
)', '_blank');
}
}
...
...
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