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
4482baa5
Commit
4482baa5
authored
Jun 21, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善利润图表,增加Ebay上架费页面
parent
82184d0d
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
607 additions
and
25 deletions
+607
-25
dc_base_finance_ebay.cs
Bailun.DC.Models/dc_base_finance_ebay.cs
+123
-0
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+145
-2
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+75
-3
AmazonSaleStatistics.cshtml
...eb/Areas/Reports/Views/Orders/AmazonSaleStatistics.cshtml
+3
-3
EbayPutAwayFee.cshtml
...n.DC.Web/Areas/Reports/Views/Orders/EbayPutAwayFee.cshtml
+213
-0
EbaySaleStatistics.cshtml
....Web/Areas/Reports/Views/Orders/EbaySaleStatistics.cshtml
+11
-3
EbayStatisticsByWebsite.cshtml
...Areas/Reports/Views/Orders/EbayStatisticsByWebsite.cshtml
+11
-9
FBASaleStatistics.cshtml
...C.Web/Areas/Reports/Views/Orders/FBASaleStatistics.cshtml
+8
-3
OrderProfitGraph.cshtml
...DC.Web/Areas/Reports/Views/Orders/OrderProfitGraph.cshtml
+1
-1
OrderSalesGraph.cshtml
....DC.Web/Areas/Reports/Views/Orders/OrderSalesGraph.cshtml
+1
-1
PlatformProfitCount.cshtml
...Web/Areas/Reports/Views/Orders/PlatformProfitCount.cshtml
+11
-0
Main.cshtml
Bailun.DC.Web/Views/Home/Main.cshtml
+5
-0
No files found.
Bailun.DC.Models/dc_base_finance_ebay.cs
0 → 100644
View file @
4482baa5
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
/// <summary>
/// ebay费用详情
/// </summary>
public
class
dc_base_finance_ebay
{
/// <summary>
///
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
/// 数据中心创建时间
/// </summary>
public
DateTime
bj_create
{
get
;
set
;
}
/// <summary>
/// 数据中心更新时间
/// </summary>
public
DateTime
bj_modified
{
get
;
set
;
}
/// <summary>
/// 费用类型
/// </summary>
public
string
account_entry_type
{
get
;
set
;
}
/// <summary>
/// 费用描述
/// </summary>
public
string
description
{
get
;
set
;
}
/// <summary>
/// 费用产生时间,以GMT格式指示条目过帐到帐户的日期和时间
/// </summary>
public
DateTime
?
gmt_date
{
get
;
set
;
}
/// <summary>
/// 费用产生时间,以GMT+8格式指示条目过帐到帐户的日期和时间
/// </summary>
public
DateTime
?
bj_date
{
get
;
set
;
}
/// <summary>
/// ebay评估的总费用,包括净费用和增值税
/// </summary>
public
decimal
gross_amount
{
get
;
set
;
}
/// <summary>
/// item id
/// </summary>
public
string
item_id
{
get
;
set
;
}
/// <summary>
/// 费用条目的备注行
/// </summary>
public
string
memo
{
get
;
set
;
}
/// <summary>
/// ebay评估的净费用
/// </summary>
public
decimal
net_amount
{
get
;
set
;
}
/// <summary>
/// 帐户条目的唯一标识符
/// </summary>
public
string
ref_number
{
get
;
set
;
}
/// <summary>
/// 计算交易增值税(增值税)的适用税率
/// </summary>
public
decimal
vat_percent
{
get
;
set
;
}
/// <summary>
/// eBay用户帐户的货币交易或管理操作的描述或评论
/// </summary>
public
string
title
{
get
;
set
;
}
/// <summary>
/// eBay订单行项目的唯一标识符
/// </summary>
public
string
order_line_id
{
get
;
set
;
}
/// <summary>
/// 订单行项目的唯一标识符
/// </summary>
public
string
transaction_id
{
get
;
set
;
}
/// <summary>
/// 公司id
/// </summary>
public
int
company_id
{
get
;
set
;
}
/// <summary>
/// 是否有顶级折扣
/// </summary>
public
int
received_top_rated_discount
{
get
;
set
;
}
/// <summary>
/// 账号ID
/// </summary>
public
int
account_id
{
get
;
set
;
}
/// <summary>
/// 币种
/// </summary>
public
string
currency
{
get
;
set
;
}
/// <summary>
/// 汇率,根据bj_date取值
/// </summary>
public
decimal
exchange_rate
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
decimal
gross_amount_rmb
{
get
;
set
;
}
}
}
Bailun.DC.Services/OrdersServices.cs
View file @
4482baa5
...
...
@@ -2623,6 +2623,140 @@ namespace Bailun.DC.Services
}
}
/// <summary>
/// 获取Ebay的费用
/// </summary>
/// <param name="parameter"></param>
/// <param name="companyid"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="total"></param>
/// <param name="feetype">费用类型</param>
/// <returns></returns>
public
List
<
dc_base_finance_ebay
>
ListEbayFee
(
BtTableParameter
parameter
,
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
ref
int
total
,
string
[]
feetype
,
string
orderno
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select t1.id,t1.account_entry_type,t1.description,t1.gmt_date,t1.gross_amount,t1.item_id,t1.net_amount,t1.vat_percent,t1.order_line_id,t1.currency,t1.exchange_rate,(t1.exchange_rate*t1.gross_amount) gross_amount_rmb from dc_base_finance_ebay t1 "
;
sql
+=
" where 1=1 "
;
if
(
start
.
HasValue
)
{
sql
+=
" and t1.gmt_date>=@start"
;
sqlparam
.
Add
(
"start"
,
start
.
Value
);
}
if
(
end
.
HasValue
)
{
sql
+=
" and t1.gmt_date<@end"
;
sqlparam
.
Add
(
"end"
,
end
.
Value
);
}
if
(
companyid
.
HasValue
&&
companyid
.
Value
>
0
)
{
sql
+=
" and t1.company_id=@companyid"
;
sqlparam
.
Add
(
"companyid"
,
companyid
.
Value
);
}
if
(!
string
.
IsNullOrEmpty
(
orderno
))
{
sql
+=
" and t1.order_line_id=@orderno"
;
sqlparam
.
Add
(
"orderno"
,
orderno
);
}
if
(
feetype
!=
null
&&
feetype
.
Length
>
0
)
{
sql
+=
" and t1.account_entry_type in ('"
+
string
.
Join
(
"','"
,
feetype
)
+
"')"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
parameter
.
sort
))
{
sql
+=
" order by t1."
+
parameter
.
sort
+
" "
+
parameter
.
order
;
}
else
{
sql
+=
" order by t1.gmt_date desc"
;
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
try
{
var
obj
=
cn
.
Page
<
dc_base_finance_ebay
>(
parameter
.
pageIndex
,
parameter
.
limit
,
sql
,
ref
total
,
sqlparam
);
return
obj
.
ToList
();
}
catch
(
Exception
ex
)
{
throw
ex
;
}
}
}
/// <summary>
/// 获取Ebay的费用统计
/// </summary>
/// <param name="companyid"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="total"></param>
/// <param name="feetype"></param>
/// <returns></returns>
public
dc_base_finance_ebay
EbayFeeCount
(
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
string
[]
feetype
,
string
orderno
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select sum(t1.gross_amount) gross_amount,sum(t1.net_amount) net_amount,sum(t1.exchange_rate*t1.gross_amount) gross_amount_rmb from dc_base_finance_ebay t1 "
;
sql
+=
" where 1=1 "
;
if
(
start
.
HasValue
)
{
sql
+=
" and t1.gmt_date>=@start"
;
sqlparam
.
Add
(
"start"
,
start
.
Value
);
}
if
(
end
.
HasValue
)
{
sql
+=
" and t1.gmt_date<@end"
;
sqlparam
.
Add
(
"end"
,
end
.
Value
);
}
if
(
companyid
.
HasValue
&&
companyid
.
Value
>
0
)
{
sql
+=
" and t1.company_id=@companyid"
;
sqlparam
.
Add
(
"companyid"
,
companyid
.
Value
);
}
if
(!
string
.
IsNullOrEmpty
(
orderno
))
{
sql
+=
" and t1.order_line_id=@orderno"
;
sqlparam
.
Add
(
"orderno"
,
orderno
);
}
if
(
feetype
!=
null
&&
feetype
.
Length
>
0
)
{
sql
+=
" and t1.account_entry_type in ('"
+
string
.
Join
(
"','"
,
feetype
)
+
"')"
;
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
obj
=
cn
.
QueryFirstOrDefault
<
dc_base_finance_ebay
>(
sql
,
sqlparam
);
return
obj
;
}
}
#
endregion
#
region
退款单
...
...
@@ -3272,7 +3406,7 @@ namespace Bailun.DC.Services
/// <param name="warehoursetype"></param>
/// <param name="warehousecode"></param>
/// <returns></returns>
public
List
<
Models
.
OrderChart
.
ProformProfitChart
>
ListOrderSalesGraph
(
string
col
,
string
platform
,
DateTime
?
start
,
DateTime
?
end
,
string
website
,
string
account
,
int
?
companyid
,
string
skucategoryids
,
string
warehoursetype
,
string
warehousecode
)
public
List
<
Models
.
OrderChart
.
ProformProfitChart
>
ListOrderSalesGraph
(
string
col
,
string
platform
,
DateTime
?
start
,
DateTime
?
end
,
string
website
,
string
account
,
int
?
companyid
,
string
skucategoryids
,
string
warehoursetype
,
string
warehousecode
,
bool
websiteGroup
=
false
)
{
var
sqlparam
=
new
DynamicParameters
();
...
...
@@ -3382,7 +3516,16 @@ namespace Bailun.DC.Services
sqlparam
.
Add
(
"end"
,
end
.
Value
.
AddDays
(
1
));
}
fromsql
+=
" group by t1.seller_account,t1.website,t1.platform_type,DATE_FORMAT(t1.paid_time,'%Y-%m-%d')"
;
if
(!
websiteGroup
)
//按账号+站点+平台+日期 进行分组
{
fromsql
+=
" group by t1.seller_account,t1.website,t1.platform_type,DATE_FORMAT(t1.paid_time,'%Y-%m-%d')"
;
}
else
//按站点+平台+日期 进行分组
{
fromsql
+=
" group by t1.website,t1.platform_type,DATE_FORMAT(t1.paid_time,'%Y-%m-%d')"
;
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
...
...
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
4482baa5
...
...
@@ -1018,6 +1018,77 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
return
File
(
"~/Files/Report/"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"/"
+
filename
+
".csv"
,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
,
filename
+
".csv"
);
}
/// <summary>
/// Ebay上架费
/// </summary>
/// <returns></returns>
public
ActionResult
EbayPutAwayFee
()
{
return
View
();
}
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
public
string
EbayPutAwayFeeJson
(
BtTableParameter
parameter
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
sku
,
string
skucategoryid
)
{
var
_service
=
new
Services
.
OrdersServices
();
var
companyid
=
HttpContextHelper
.
Current
?.
User
?.
GetCompanyId
().
ToInt32
();
var
total
=
0
;
var
feeType
=
new
string
[]
{
"BuyItNowFee"
,
"CreditAuctionEndEarly"
,
"CreditCardOnFile"
,
"CreditInsertion"
,
"ExtendedDurationFee"
,
"FeeAuctionEndEarly"
,
"FeeBold"
,
"FeeFinalValueShipping"
,
"FeeGalleryPlus"
,
"FeeInsertion"
,
"FeeLargePicture"
,
"FeePicturePack"
,
"FeeReserve"
,
"FeeReturnShipping"
,
"PaymentCC"
,
"PaypalOnFile"
,
"PayPalOTPSucc"
,
"PrivateListing"
,
"SubscriptionSMBasic"
,
"SubtitleFee"
};
var
obj
=
_service
.
ListEbayFee
(
parameter
,
companyid
,
start
,
end
,
ref
total
,
feeType
,
orderno
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
id
,
a
.
account_entry_type
,
a
.
description
,
gmt_date
=
a
.
gmt_date
.
HasValue
?
a
.
gmt_date
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
):
""
,
gross_amount
=
a
.
gross_amount
.
ToString
(
"N2"
),
a
.
item_id
,
net_amount
=
a
.
net_amount
.
ToString
(
"N2"
),
a
.
vat_percent
,
a
.
order_line_id
,
a
.
currency
,
a
.
exchange_rate
,
gross_amount_rmb
=
a
.
gross_amount_rmb
.
ToString
(
"N2"
)
});
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
,
count_row
=
new
{
order_line_id
=
"总计"
,
gross_amount
=
countObj
.
gross_amount
.
ToString
(
"N2"
),
gross_amount_rmb
=
countObj
.
gross_amount_rmb
.
ToString
(
"N2"
)
}
});
}
#
endregion
...
...
@@ -1751,7 +1822,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// 平台销售统计曲线图
/// </summary>
/// <returns></returns>
public
ActionResult
OrderSalesGraph
(
string
col
,
string
platform
,
string
sellaccount
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
warehousetype
,
string
warehousecode
,
string
skucategoryids
,
string
titlename
)
public
ActionResult
OrderSalesGraph
(
string
col
,
string
platform
,
string
sellaccount
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
warehousetype
,
string
warehousecode
,
string
skucategoryids
,
string
titlename
,
int
websitegroup
=
0
)
{
ViewBag
.
col
=
col
;
ViewBag
.
platform
=
platform
;
...
...
@@ -1764,13 +1835,14 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ViewBag
.
skucategoryids
=
skucategoryids
;
ViewBag
.
titlename
=
titlename
;
ViewBag
.
websitegroup
=
websitegroup
;
return
View
();
}
[
HttpPost
]
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
public
JsonResult
OrderSalesGraphJson
(
string
col
,
string
platform
,
string
sellaccount
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
warehousetype
,
string
warehousecode
,
string
skucategoryids
)
public
JsonResult
OrderSalesGraphJson
(
string
col
,
string
platform
,
string
sellaccount
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
warehousetype
,
string
warehousecode
,
string
skucategoryids
,
int
websitegroup
=
0
)
{
var
companyid
=
HttpContextHelper
.
Current
?.
User
?.
GetCompanyId
().
ToInt32
();
var
_service
=
new
Services
.
OrdersServices
();
...
...
@@ -1785,7 +1857,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
});
}
list
=
_service
.
ListOrderSalesGraph
(
col
,
platform
,
start
,
end
,
website
,
sellaccount
,
companyid
,
skucategoryids
,
warehousetype
,
warehousecode
);
list
=
_service
.
ListOrderSalesGraph
(
col
,
platform
,
start
,
end
,
website
,
sellaccount
,
companyid
,
skucategoryids
,
warehousetype
,
warehousecode
,
websitegroup
==
1
);
return
Json
(
new
{
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/AmazonSaleStatistics.cshtml
View file @
4482baa5
...
...
@@ -123,12 +123,12 @@
{ field: 'website', title: '站点', width: '80', sortable: false, iscount: true },
{
field: 'amount_sales', title: '销售额', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'销售额\',\'amount_sales\',1)">' + data.amount_sales + '</span><img style="width:16px;margin-left:3px" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'amount_sales\',\'销售额\');" title="点击查看曲线图">';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'销售额\',\'amount_sales\',1)">' + data.amount_sales + '</span><img style="width:16px;margin-left:3px
;cursor:pointer;
" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'amount_sales\',\'销售额\');" title="点击查看曲线图">';
}
},
{
field: 'order_count', title: '销售数量', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'订单数\',\'\',0)">' + data.order_count + '</span><img style="width:16px;margin-left:3px" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'order_count\',\'订单数\');" title="点击查看曲线图">';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'订单数\',\'\',0)">' + data.order_count + '</span><img style="width:16px;margin-left:3px
;cursor:pointer;
" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'order_count\',\'订单数\');" title="点击查看曲线图">';
}
},
{
...
...
@@ -183,7 +183,7 @@
//{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true },
{
field: 'profit_total', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'实际利润\',\'profit_total\',1)">' + data.profit_total + '</span><img style="width:16px;margin-left:3px" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'profit_total\',\'利润\');" title="点击查看曲线图">';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'实际利润\',\'profit_total\',1)">' + data.profit_total + '</span><img style="width:16px;margin-left:3px
;cursor:pointer;
" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'profit_total\',\'利润\');" title="点击查看曲线图">';
}
},
{ field: 'profit_rate', title: '总实际利润率%', width: '130', sortable: true, iscount: true },
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/EbayPutAwayFee.cshtml
0 → 100644
View file @
4482baa5
@{
ViewData["Title"] = "Ebay上架费";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
ViewBag.Nav = new string[] { "统计", "Ebay", "订单流水" };
}
<div class="row">
<div class="col-sm-12">
<div id="leftcontain" style="position:relative;float:left;width:215px;margin-right:-220px;background-color:#fff;height:780px;border-top:solid 1px #E7EAEC;display:none;">
<div id="ztree" class="ztree" style="margin:5px 10px;max-height: 800px;overflow: auto;">
</div>
</div>
<div style="float:right;width:100%;">
<div id="rightcontain">
<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>
<button type="button" class="btn btn-success" onclick="showleft();">分类筛选</button>
</div>*@
<div class="form-group">
<label>费用时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"))" />
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
</div>
<div class="form-group">
<label> </label>
<input id="orderno" name="orderno" class="form-control" style="width:130px;" placeholder="平台订单号" />
</div>
<div class="form-group">
<label> </label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
</div>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
</div>
</div>
</div>
</div>
</div>
@section css{
<link href="~/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
<link href="~/css/bootstrap-table-fixed-columns.css" rel="stylesheet" />
<style>
.mules {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
}
@section scripts{
<script src="~/js/jquery.ztree.core.min.js"></script>
<script src="~/js/jquery.ztree.excheck.min.js"></script>
<script src="~/js/bootstrap-table-fixed-columns.js" type="text/javascript"></script>
<script type="text/javascript">
var tb;
$(document).ready(function () {
laydate.render({ elem: '#start' });
laydate.render({ elem: '#end' });
var height = document.body.clientHeight;
$("#roletable").attr("data-height", (height - 170));
list();
//listAccount();
//listWebsite();
//listcategory12();
})
function list() {
var columns = [
{
field: 'order_line_id', title: '订单号', width: '200', formatter: function (idx, data) {
return '<div class="mules" title="' + data.order_line_id + '">' + data.order_line_id + '</div>';
}
},
{ field: 'account_entry_type', title: '费用类型', width: '120' },
{ field: 'description', title: '费用名称', width: '130' },
{ field: 'gross_amount', title: '总费用', width: '100', sortable: true, iscount: true},
{ field: 'currency', title: '币种', width: '100' },
{ field: 'exchange_rate', title: '汇率', width: '100' },
{ field: 'gross_amount_rmb', title: 'RMB金额', width: '130', iscount: true },
{ field: 'item_id', title: 'item_id', width: '130', sortable: true },
{ field: 'gmt_date', title: '费用时间', width: '120', sortable: true }
];
var s = '';
try {
s = getChkNode();
} catch (e) {
s = '';
}
var url = '@Url.Content("~/Reports/Orders/EbayPutAwayFeeJson")' + '?' + $("#toolbar").serialize() + '&skucategoryids=' + s;
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {
showfooter: true, loadsuccess: function (d) {
//替换汇总行的相关列值
var tr = $('.fixed-table-footer').find('tr');
for (var c in columns) {
var key = columns[c].field;
if (columns[c].iscount) {
for (var v in d.count_row) {
if (key == v) {
tr.find('td').eq(c).children('div').first().html(d.count_row[v]);
break;
}
}
}
}
}
}, {
fixedcol: true,
fixedcolnum:1
});
}
else {
tb.bootstrapTable('refresh', { url: url });
}
}
function listAccount() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListAccount")',
type:'POST',
paramData: 'platform=@(ViewBag.platform)',
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 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>
}
Bailun.DC.Web/Areas/Reports/Views/Orders/EbaySaleStatistics.cshtml
View file @
4482baa5
...
...
@@ -125,12 +125,12 @@
//{ field: 'website', title: '站点', width: '80', sortable: false, iscount: true },
{
field: 'order_count', title: '订单数量', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'订单数量\',\'\',0)">' + data.order_count + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'订单数量\',\'\',0)">' + data.order_count + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'order_count\',\'订单数\');" title="点击查看曲线图">
';
}
},
{
field: 'amount_sales', title: '销售额', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'销售额\',\'amount_sales\',1)">' + data.amount_sales + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'销售额\',\'amount_sales\',1)">' + data.amount_sales + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'amount_sales\',\'销售额\');" title="点击查看曲线图">
';
}
},
{
...
...
@@ -190,7 +190,7 @@
//{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true },
{
field: 'profit_total', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'实际利润\',\'profit_total\',1)">' + data.profit_total + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'实际利润\',\'profit_total\',1)">' + data.profit_total + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'profit_total\',\'利润\');" title="点击查看曲线图">
';
}
},
{ field: 'profit_rate', title: '总实际利润率%', width: '130', sortable: true, iscount: true },
...
...
@@ -335,6 +335,14 @@
return s;
}
function ShowChart(platform, website, account, colval,title)
{
var warehousetype = $('#warehousetype').val();
var warehousecode = $('#warehousecode').val();
layer_show(platform + " " + website + " " + account + ' 曲线图', '@Url.Content("~/Reports/Orders/OrderSalesGraph?platform=")' + platform + '&website=' + website + '&sellaccount=' + account + '&start=' + $('#start').val() + '&end=' + $('#end').val() + '&col=' + colval + '&titlename=' + title + '&warehousetype=' + warehousetype + '&warehousecode=' + warehousecode, '90%', '90%');
}
</script>
}
Bailun.DC.Web/Areas/Reports/Views/Orders/EbayStatisticsByWebsite.cshtml
View file @
4482baa5
...
...
@@ -116,21 +116,15 @@
function list() {
var columns = [
{ field: 'platform_type', title: '平台', width: '100', sortable: false },
//{
// field: 'seller_account', title: '销售帐号', width: '130', sortable: false, iscount: true, formatter: function (idx, data) {
// var str = '<p class="mules" title="' + data.seller_account + '">' + data.seller_account + '</p>';
// return str;
// }
//},
{ field: 'website', title: '站点', width: '80', sortable: false, iscount: true },
{
field: 'order_count', title: '订单数量', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'订单数量\',\'\',0)">' + data.order_count + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'订单数量\',\'\',0)">' + data.order_count + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'order_count\',\'订单数\');" title="点击查看曲线图">
';
}
},
{
field: 'amount_sales', title: '销售额', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'销售额\',\'amount_sales\',1)">' + data.amount_sales + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'销售额\',\'amount_sales\',1)">' + data.amount_sales + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'amount_sales\',\'销售额\');" title="点击查看曲线图">
';
}
},
{
...
...
@@ -185,7 +179,7 @@
//{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true },
{
field: 'profit_total', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'实际利润\',\'profit_total\',1)">' + data.profit_total + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'实际利润\',\'profit_total\',1)">' + data.profit_total + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'profit_total\',\'利润\');" title="点击查看曲线图">
';
}
},
{ field: 'profit_rate', title: '总实际利润率%', width: '130', sortable: true, iscount: true },
...
...
@@ -333,6 +327,14 @@
return s;
}
function ShowChart(platform, website, account, colval,title)
{
var warehousetype = $('#warehousetype').val();
var warehousecode = $('#warehousecode').val();
layer_show(platform + " " + website + ' 曲线图', '@Url.Content("~/Reports/Orders/OrderSalesGraph?platform=")' + platform + '&website=' + website + '&sellaccount=&start=' + $('#start').val() + '&end=' + $('#end').val() + '&col=' + colval + '&titlename=' + title + '&warehousetype=' + warehousetype + '&warehousecode=' + warehousecode +'&websitegroup=1', '90%', '90%');
}
</script>
}
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/FBASaleStatistics.cshtml
View file @
4482baa5
...
...
@@ -110,12 +110,12 @@
{ field: 'website', title: '站点', width: '80', sortable: false, iscount: true },
{
field: 'amount_product', title: '销售额', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'商品收入\',\'amount_sales\',1)">' + data.amount_product + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'商品收入\',\'amount_sales\',1)">' + data.amount_product + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'amount_sales\',\'销售额\');" title="点击查看曲线图">
';
}
},
{
field: 'order_count', title: '销售数量', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'订单数\',\'\',0)">' + data.order_count + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'订单数\',\'\',0)">' + data.order_count + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'order_count\',\'订单数\');" title="点击查看曲线图">
';
}
},
{
...
...
@@ -170,7 +170,7 @@
//{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true },
{
field: 'profit_count', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'实际利润\',\'profit_total\',1)">' + data.profit_count + '</span>';
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'实际利润\',\'profit_total\',1)">' + data.profit_count + '</span>
<img style="width:16px;margin-left:3px;cursor:pointer;" src="@Url.Content("~/img/chart-icon.png")" onclick="ShowChart(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account +'\',\'profit_total\',\'利润\');" title="点击查看曲线图">
';
}
},
{ field: 'profit_rate', title: '总实际利润率%', width: '130', sortable: true, iscount: true },
...
...
@@ -272,6 +272,11 @@
return s;
}
function ShowChart(platform, website, account, colval,title)
{
layer_show(platform + " " + website + " " + account + ' 曲线图', '@Url.Content("~/Reports/Orders/OrderSalesGraph?platform=")' + platform + '&website=' + website + '&sellaccount=' + account + '&start=' + $('#start').val() + '&end=' + $('#end').val() + '&col=' + colval + '&titlename=' + title + '&warehousetype=&warehousecode=', '90%', '90%');
}
</script>
}
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/OrderProfitGraph.cshtml
View file @
4482baa5
...
...
@@ -16,7 +16,7 @@
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(ViewBag.end)" placeholder="付款结束时间" />
</div>
<div class="form-group">
<div class="form-group"
style="display:none;"
>
<label>发货时间</label>
<input id="shipstart" name="shipstart" type="text" class="form-control" style="width:130px;" value="@(ViewBag.shipstart)" placeholder="发货开始时间" />
<span>至</span>
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/OrderSalesGraph.cshtml
View file @
4482baa5
...
...
@@ -59,7 +59,7 @@
$.submit({
type:'POST',
url: '@Url.Content("~/Reports/Orders/OrderSalesGraphJson")',
paramData: 'col=@(ViewBag.col)&platform=@(ViewBag.platform)&sellaccount=@(ViewBag.sellaccount)&website=@(ViewBag.website)&skucategoryids=@(ViewBag.skucategoryids)&start=' + start + '&end=' + end +'&warehousetype=@ViewBag.warehousetype&warehousecode=@(ViewBag.warehousecode)',
paramData: 'col=@(ViewBag.col)&platform=@(ViewBag.platform)&sellaccount=@(ViewBag.sellaccount)&website=@(ViewBag.website)&skucategoryids=@(ViewBag.skucategoryids)&start=' + start + '&end=' + end +'&warehousetype=@ViewBag.warehousetype&warehousecode=@(ViewBag.warehousecode)
&websitegroup=@(ViewBag.websitegroup)
',
func: function (result) {
layer.close(load_index);
if (result.success) {
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/PlatformProfitCount.cshtml
View file @
4482baa5
...
...
@@ -307,6 +307,17 @@
s = '';
}
var shipstart = $('#shipstart').val();
var shipend = $('#shipend').val();
var start = $('#start').val();
var end = $('#end').val();
if (start == '' && end == '') {
layer.alert('请选择付款时间。');
return false;
}
layer_show(platform + " " + title+"曲线图", '@Url.Content("~/Reports/Orders/OrderProfitGraph?platform=")' + platform + '&start=' + $('#start').val() + '&end=' + $('#end').val() + '&col=' + colval + '&shipstart=' + $('#shipstart').val() + '&shipend=' + $('#shipend').val() + '¤cy=' + $('#currency').val() + '&skucategoryids=' + s + '&titlename=' + title, '90%', '90%');
}
...
...
Bailun.DC.Web/Views/Home/Main.cshtml
View file @
4482baa5
...
...
@@ -251,6 +251,11 @@
<span>
Ebay平台费用流水
</span>
</a>
</li>
<li>
<a
class=
"J_menuItem"
href=
"@Url.Content("
~/
Reports
/
Orders
/
EbayPutAwayFee
")"
data-index=
"0"
style=
"padding-left:74px"
>
<span>
上架费列表
</span>
</a>
</li>
</ul>
</li>
<li>
...
...
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