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
b1e0da58
Commit
b1e0da58
authored
Mar 22, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加退款明细,预收款明细报表
parent
f995ef5f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
854 additions
and
6 deletions
+854
-6
GlobalConfig.cs
Bailun.DC.Common/GlobalConfig.cs
+1
-1
dc_base_crm_refund.cs
Bailun.DC.Models/dc_base_crm_refund.cs
+98
-0
CommonServices.cs
Bailun.DC.Services/CommonServices.cs
+2
-2
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+195
-0
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+154
-0
DepositReceived.cshtml
....DC.Web/Areas/Reports/Views/Orders/DepositReceived.cshtml
+199
-0
OrderRefundDetails.cshtml
....Web/Areas/Reports/Views/Orders/OrderRefundDetails.cshtml
+192
-0
Index.cshtml
Bailun.DC.Web/Pages/Index.cshtml
+12
-2
Index.cshtml
Bailun.DC.Web/Views/Home/Index.cshtml
+1
-1
No files found.
Bailun.DC.Common/GlobalConfig.cs
View file @
b1e0da58
...
...
@@ -15,6 +15,6 @@ namespace Bailun.DC.Common
/// <summary>
/// sku分类url
/// </summary>
public
static
string
SkumsCategory
=
"http://
api.sku.bailuntec.com
/api/BailunCateData/GetAllCategoryList"
;
public
static
string
SkumsCategory
=
"http://
10.0.6.13:8001
/api/BailunCateData/GetAllCategoryList"
;
}
}
Bailun.DC.Models/dc_base_crm_refund.cs
0 → 100644
View file @
b1e0da58
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
/// <summary>
/// crm退款单明细
/// </summary>
public
class
dc_base_crm_refund
{
/// <summary>
///
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
/// 平台类型
/// </summary>
public
string
platform_type
{
get
;
set
;
}
/// <summary>
/// 百伦账号
/// </summary>
public
string
bailun_account
{
get
;
set
;
}
/// <summary>
/// 百伦账号id
/// </summary>
public
int
bailun_account_id
{
get
;
set
;
}
/// <summary>
/// 站点
/// </summary>
public
string
website
{
get
;
set
;
}
/// <summary>
/// 平台订单号
/// </summary>
public
string
origin_order_id
{
get
;
set
;
}
/// <summary>
/// 百伦SKU
/// </summary>
public
string
bailun_sku
{
get
;
set
;
}
/// <summary>
/// 平台SKU
/// </summary>
public
string
platform_sku
{
get
;
set
;
}
/// <summary>
/// 退款金额-原币种
/// </summary>
public
decimal
amount_refund
{
get
;
set
;
}
/// <summary>
/// 订单币种
/// </summary>
public
string
order_currency
{
get
;
set
;
}
/// <summary>
/// 订单退款时间
/// </summary>
public
DateTime
?
refund_time
{
get
;
set
;
}
/// <summary>
/// 百伦SKU退货数量
/// </summary>
public
int
bailun_sku_quantity_refund
{
get
;
set
;
}
/// <summary>
/// 百伦SKU单价
/// </summary>
public
decimal
bailun_sku_unit_price
{
get
;
set
;
}
/// <summary>
/// 数据中心-创建时间
/// </summary>
public
DateTime
gmt_create
{
get
;
set
;
}
/// <summary>
/// 数据中心-更新时间
/// </summary>
public
DateTime
gmt_modified
{
get
;
set
;
}
/// <summary>
/// 是否与订单关联
/// </summary>
public
int
linked
{
get
;
set
;
}
/// <summary>
/// 人民币金额
/// </summary>
public
decimal
amount_refund_rmb
{
get
;
set
;
}
}
}
Bailun.DC.Services/CommonServices.cs
View file @
b1e0da58
...
...
@@ -163,8 +163,8 @@ namespace Bailun.DC.Services
}
}
string
appId
=
"SystemDC"
;
string
appKey
=
"YmFpbHVuRE
M
="
;
string
appId
=
"SystemDC
UI
"
;
string
appKey
=
"YmFpbHVuRE
NVSQ=
="
;
string
url
=
Common
.
GlobalConfig
.
SkumsCategory
;
List
<
Models
.
Common
.
CategoryDto
>
result
=
new
List
<
Models
.
Common
.
CategoryDto
>();
...
...
Bailun.DC.Services/OrdersServices.cs
View file @
b1e0da58
...
...
@@ -1862,6 +1862,201 @@ namespace Bailun.DC.Services
}
#
endregion
#
region
退款单
/// <summary>
/// CRM退款单明细
/// </summary>
/// <param name="request"></param>
/// <param name="platform"></param>
/// <param name="website"></param>
/// <param name="account"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="total"></param>
/// <returns></returns>
public
List
<
dc_base_crm_refund
>
ListOrderRefund
(
BtTableParameter
request
,
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
ref
int
total
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select * from dc_base_crm_refund where 1=1 "
;
if
(!
string
.
IsNullOrEmpty
(
platform
))
{
sql
+=
" and platform_type=@platform_type"
;
sqlparam
.
Add
(
"platform_type"
,
platform
);
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" and website=@website"
;
sqlparam
.
Add
(
"website"
,
website
);
}
if
(!
string
.
IsNullOrEmpty
(
account
))
{
sql
+=
" and bailun_account=@bailun_account"
;
sqlparam
.
Add
(
"bailun_account"
,
account
);
}
if
(
start
.
HasValue
)
{
sql
+=
" and refund_time>=@refund_time_start"
;
sqlparam
.
Add
(
"refund_time_start"
,
start
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
if
(
end
.
HasValue
)
{
sql
+=
" and refund_time<@refund_time_end"
;
sqlparam
.
Add
(
"refund_time_end"
,
end
.
Value
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
if
(!
string
.
IsNullOrEmpty
(
request
.
sort
))
{
sql
+=
" order by "
+
request
.
sort
+
" "
+
request
.
order
;
}
else
{
sql
+=
" order by refund_time desc"
;
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
obj
=
cn
.
Page
<
dc_base_crm_refund
>(
request
.
pageIndex
,
request
.
limit
,
sql
,
ref
total
,
sqlparam
);
return
obj
.
AsList
();
}
}
/// <summary>
/// 退款明细统计
/// </summary>
/// <param name="platform"></param>
/// <param name="website"></param>
/// <param name="account"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns></returns>
public
dc_base_crm_refund
ListOrderRefundCount
(
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select sum(bailun_sku_quantity_refund) bailun_sku_quantity_refund,sum(amount_refund_rmb) amount_refund_rmb from dc_base_crm_refund where 1=1 "
;
if
(!
string
.
IsNullOrEmpty
(
platform
))
{
sql
+=
" and platform_type=@platform_type"
;
sqlparam
.
Add
(
"platform_type"
,
platform
);
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" and website=@website"
;
sqlparam
.
Add
(
"website"
,
website
);
}
if
(!
string
.
IsNullOrEmpty
(
account
))
{
sql
+=
" and bailun_account=@bailun_account"
;
sqlparam
.
Add
(
"bailun_account"
,
account
);
}
if
(
start
.
HasValue
)
{
sql
+=
" and refund_time>=@refund_time_start"
;
sqlparam
.
Add
(
"refund_time_start"
,
start
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
if
(
end
.
HasValue
)
{
sql
+=
" and refund_time<@refund_time_end"
;
sqlparam
.
Add
(
"refund_time_end"
,
end
.
Value
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
obj
=
cn
.
QueryFirstOrDefault
<
dc_base_crm_refund
>(
sql
,
sqlparam
);
return
obj
;
}
}
#
endregion
#
region
预收款
/// <summary>
/// 预收款明细
/// </summary>
/// <param name="request"></param>
/// <param name="platform"></param>
/// <param name="website"></param>
/// <param name="account"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="total"></param>
/// <returns></returns>
public
List
<
dc_base_oms_order
>
ListDepositReceived
(
BtTableParameter
request
,
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
ref
int
total
,
ref
dc_base_oms_order
m
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select origin_order_id,bailun_order_id,platform_type,website,seller_account,paid_time,(amount_sales*seller_order_exchange_rate) amount_sales,(amount_shipping*seller_order_exchange_rate) amount_shipping,(amount_product*seller_order_exchange_rate) amount_product,(amount_tax*seller_order_exchange_rate) amount_tax,(amount_adjustment*seller_order_exchange_rate) amount_adjustment,(amount_gift_wrap*seller_order_exchange_rate) amount_gift_wrap,(amount_refund*seller_order_exchange_rate) amount_refund,amount_prepaid,(cost_promotion*seller_order_exchange_rate) cost_promotion,(cost_platform_fee*seller_order_exchange_rate) cost_platform_fee,cost_product,cost_shipping,cost_package,(cost_fba_fee*seller_order_exchange_rate) cost_fba_fee,(cost_paypal_fee*seller_order_exchange_rate) cost_paypal_fee,(cost_refund_commisson*seller_order_exchange_rate) cost_refund_commisson,cost_handle_bailun,cost_handle_platform,cost_tail,cost_first,profit_total,profit_rate,(cost_total) cost_total from dc_base_oms_order where bailun_order_status='Handling' and bailun_shipping_status!='TotalShipping' and amount_prepaid>0"
;
var
sqlcount
=
"select sum(amount_sales*seller_order_exchange_rate) amount_sales,sum(amount_shipping*seller_order_exchange_rate) amount_shipping,sum(amount_product*seller_order_exchange_rate) amount_product,sum(amount_tax*seller_order_exchange_rate) amount_tax,sum(amount_adjustment*seller_order_exchange_rate) amount_adjustment,sum(amount_gift_wrap*seller_order_exchange_rate) amount_gift_wrap,sum(amount_refund*seller_order_exchange_rate) amount_refund,sum(amount_prepaid) amount_prepaid,sum(cost_promotion*seller_order_exchange_rate) cost_promotion,sum(cost_platform_fee*seller_order_exchange_rate) cost_platform_fee,sum(cost_product) cost_product,sum(cost_shipping) cost_shipping,sum(cost_package) cost_package,sum(cost_fba_fee*seller_order_exchange_rate) cost_fba_fee,sum(cost_paypal_fee*seller_order_exchange_rate) cost_paypal_fee,sum(cost_refund_commisson*seller_order_exchange_rate) cost_refund_commisson,sum(cost_handle_bailun) cost_handle_bailun,sum(cost_handle_platform) cost_handle_platform,sum(cost_tail) cost_tail,sum(cost_first) cost_first,sum(profit_total) profit_total,sum(cost_total) cost_total from dc_base_oms_order where bailun_order_status='Handling' and bailun_shipping_status!='TotalShipping' and amount_prepaid>0"
;
if
(!
string
.
IsNullOrEmpty
(
platform
))
{
sql
+=
" and platform_type=@platform_type"
;
sqlcount
+=
" and platform_type=@platform_type"
;
sqlparam
.
Add
(
"platform_type"
,
platform
);
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" and website=@website"
;
sqlcount
+=
" and website=@website"
;
sqlparam
.
Add
(
"website"
,
website
);
}
if
(!
string
.
IsNullOrEmpty
(
account
))
{
sql
+=
" and seller_account=@seller_account"
;
sqlcount
+=
" and seller_account=@seller_account"
;
sqlparam
.
Add
(
"seller_account"
,
account
);
}
if
(
start
.
HasValue
)
{
sql
+=
" and paid_time>=@paid_time_start"
;
sqlcount
+=
" and paid_time>=@paid_time_start"
;
sqlparam
.
Add
(
"paid_time_start"
,
start
.
Value
.
ToString
(
"yyyy-MM-dd"
));
}
if
(
end
.
HasValue
)
{
sql
+=
" and paid_time<@paid_time_end"
;
sqlcount
+=
" and paid_time<@paid_time_end"
;
sqlparam
.
Add
(
"paid_time_end"
,
end
.
Value
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd"
));
}
if
(!
string
.
IsNullOrEmpty
(
request
.
sort
))
{
sql
+=
" order by "
+
request
.
sort
+
" "
+
request
.
order
;
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
obj
=
cn
.
Page
<
dc_base_oms_order
>(
request
.
pageIndex
,
request
.
limit
,
sql
,
ref
total
,
sqlparam
);
m
=
cn
.
QueryFirstOrDefault
<
dc_base_oms_order
>(
sqlcount
,
sqlparam
);
return
obj
.
AsList
();
}
}
#
endregion
}
}
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
b1e0da58
...
...
@@ -978,6 +978,160 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
#
endregion
#
region
订单退款明细
public
ActionResult
OrderRefundDetails
()
{
return
View
();
}
/// <summary>
/// 订单退款明细
/// </summary>
/// <param name="request">分页信息</param>
/// <param name="platform">订单平台类型</param>
/// <param name="website">站点</param>
/// <param name="account">帐号</param>
/// <param name="start">退款开始时间</param>
/// <param name="end">退款结束时间</param>
/// <returns></returns>
public
string
OrderRefundDetailsJson
(
BtTableParameter
request
,
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
)
{
var
total
=
0
;
var
_services
=
new
Services
.
OrdersServices
();
var
obj
=
_services
.
ListOrderRefund
(
request
,
platform
,
website
,
account
,
start
,
end
,
ref
total
);
var
countM
=
_services
.
ListOrderRefundCount
(
platform
,
website
,
account
,
start
,
end
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
platform_type
,
a
.
website
,
a
.
bailun_account
,
a
.
origin_order_id
,
a
.
bailun_sku
,
a
.
platform_sku
,
amount_refund
=
a
.
amount_refund
.
ToString
(
"N2"
),
a
.
order_currency
,
a
.
bailun_sku_quantity_refund
,
bailun_sku_unit_price
=
a
.
bailun_sku_unit_price
.
ToString
(
"N2"
),
linked
=
(
a
.
linked
==
1
?
"是"
:
"否"
),
refund_time
=
a
.
refund_time
.
HasValue
?
a
.
refund_time
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
):
""
,
amount_refund_rmb
=
a
.
amount_refund_rmb
.
ToString
(
"N2"
),
});
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
,
count_row
=
new
{
platform_type
=
"合计"
,
bailun_sku_quantity_refund
=
countM
!=
null
?
countM
.
bailun_sku_quantity_refund
:
0
,
amount_refund_rmb
=
countM
!=
null
?
countM
.
amount_refund_rmb
.
ToString
(
"N2"
):
"0"
}
});
}
#
endregion
#
region
预收款
/// <summary>
/// 预收款明细
/// </summary>
/// <returns></returns>
public
ActionResult
DepositReceived
()
{
return
View
();
}
/// <summary>
/// 预收款明细数据
/// </summary>
/// <param name="request"></param>
/// <param name="platform"></param>
/// <param name="website"></param>
/// <param name="account"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns></returns>
public
string
DepositReceivedJson
(
BtTableParameter
request
,
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
)
{
var
total
=
0
;
var
countM
=
new
Models
.
Orders
.
dc_base_oms_order
();
var
obj
=
new
Services
.
OrdersServices
().
ListDepositReceived
(
request
,
platform
,
website
,
account
,
start
,
end
,
ref
total
,
ref
countM
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
origin_order_id
,
a
.
bailun_order_id
,
a
.
platform_type
,
a
.
website
,
a
.
seller_account
,
paid_time
=
a
.
paid_time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
amount_sales
=
a
.
amount_sales
.
ToString
(
"N2"
),
amount_shipping
=
a
.
amount_shipping
.
ToString
(
"N2"
),
amount_product
=
a
.
amount_product
.
ToString
(
"N2"
),
amount_tax
=
a
.
amount_tax
.
ToString
(
"N2"
),
amount_adjustment
=
a
.
amount_adjustment
.
ToString
(
"N2"
),
amount_gift_wrap
=
a
.
amount_gift_wrap
.
ToString
(
"N2"
),
amount_refund
=
a
.
amount_refund
.
ToString
(
"N2"
),
amount_prepaid
=
a
.
amount_prepaid
.
ToString
(
"N2"
),
cost_total
=
a
.
cost_total
.
ToString
(
"N2"
),
cost_promotion
=
a
.
cost_promotion
.
ToString
(
"N2"
),
cost_platform_fee
=
a
.
cost_platform_fee
.
ToString
(
"N2"
),
cost_product
=
a
.
cost_product
.
ToString
(
"N2"
),
cost_shipping
=
a
.
cost_shipping
.
ToString
(
"N2"
),
cost_package
=
a
.
cost_package
.
ToString
(
"N2"
),
cost_fba_fee
=
a
.
cost_fba_fee
.
ToString
(
"N2"
),
cost_paypal_fee
=
a
.
cost_paypal_fee
.
ToString
(
"N2"
),
cost_refund_commisson
=
a
.
cost_refund_commisson
.
ToString
(
"N2"
),
cost_handle_bailun
=
a
.
cost_handle_bailun
.
ToString
(
"N2"
),
cost_handle_platform
=
a
.
cost_handle_platform
.
ToString
(
"N2"
),
cost_tail
=
a
.
cost_tail
.
ToString
(
"N2"
),
cost_first
=
a
.
cost_first
.
ToString
(
"N2"
),
profit_total
=
a
.
profit_total
.
ToString
(
"N2"
),
profit_rate
=
(
a
.
profit_rate
*
100
).
ToString
(
"N2"
)
});
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
,
count_row
=
new
{
platform_type
=
"合计"
,
amount_sales
=
countM
.
amount_sales
.
ToString
(
"N2"
),
amount_shipping
=
countM
.
amount_shipping
.
ToString
(
"N2"
),
amount_product
=
countM
.
amount_product
.
ToString
(
"N2"
),
amount_tax
=
countM
.
amount_tax
.
ToString
(
"N2"
),
amount_adjustment
=
countM
.
amount_adjustment
.
ToString
(
"N2"
),
amount_gift_wrap
=
countM
.
amount_gift_wrap
.
ToString
(
"N2"
),
amount_refund
=
countM
.
amount_refund
.
ToString
(
"N2"
),
amount_prepaid
=
countM
.
amount_prepaid
.
ToString
(
"N2"
),
cost_total
=
countM
.
cost_total
.
ToString
(
"N2"
),
cost_promotion
=
countM
.
cost_promotion
.
ToString
(
"N2"
),
cost_platform_fee
=
countM
.
cost_platform_fee
.
ToString
(
"N2"
),
cost_product
=
countM
.
cost_product
.
ToString
(
"N2"
),
cost_shipping
=
countM
.
cost_shipping
.
ToString
(
"N2"
),
cost_package
=
countM
.
cost_package
.
ToString
(
"N2"
),
cost_fba_fee
=
countM
.
cost_fba_fee
.
ToString
(
"N2"
),
cost_paypal_fee
=
countM
.
cost_paypal_fee
.
ToString
(
"N2"
),
cost_refund_commisson
=
countM
.
cost_refund_commisson
.
ToString
(
"N2"
),
cost_handle_bailun
=
countM
.
cost_handle_bailun
.
ToString
(
"N2"
),
cost_handle_platform
=
countM
.
cost_handle_platform
.
ToString
(
"N2"
),
cost_tail
=
countM
.
cost_tail
.
ToString
(
"N2"
),
cost_first
=
countM
.
cost_first
.
ToString
(
"N2"
),
profit_total
=
countM
.
profit_total
.
ToString
(
"N2"
),
profit_rate
=
((
countM
.
profit_total
/
countM
.
cost_total
)
*
100
).
ToString
(
"N2"
)
}
});
}
#
endregion
#
region
Common
/// <summary>
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/DepositReceived.cshtml
0 → 100644
View file @
b1e0da58
@{
ViewData["Title"] = "预收款明细";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
}
<div class="row">
<div class="col-sm-12">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<input id="platform" name="platform" type="hidden" />
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>平台类型:</label>
<select id="platform" name="platform" class="form-control">
<option value="">选择平台</option>
</select>
</div>
<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
</div>
<div class="form-group">
<label>销售帐号:</label>
<select id="account" name="account" class="form-control" style="width:160px;">
<option value="">选择帐号</option>
</select>
</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>
<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>
@section css{
<style>
.mules {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
}
@section scripts{
<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();
listPlatform();
listAccount();
listWebsite();
})
function list() {
var columns = [
{ field: 'platform_type', title: '平台名称', width: '100', sortable: false, iscount: true },
{ field: 'website', title: '平台站点', width: '90', sortable: false },
{
field: 'seller_account', title: '销售帐号', width: '160', sortable: false, formatter: function (idx, data) {
return '<div class="mules" title="' + data.seller_account + '">' + data.seller_account+'</div>';
}
},
{
field: 'origin_order_id', title: '平台订单号', width: '180', sortable: false, formatter: function (idx, data) {
return '<div class="mules" title="' + data.origin_order_id + '">' + data.origin_order_id + '</div>';
}
},
{ field: 'amount_sales', title: '销售额', width: '110', sortable: true, iscount: true },
{ field: 'amount_shipping', title: '运费收入', width: '110', sortable: true, iscount: true },
{ field: 'amount_product', title: '产品收入', width: '110', sortable: true, iscount: true },
{ field: 'amount_prepaid', title: '预收款', width: '110', sortable: true, iscount: true },
//{ field: 'amount_tax', title: '税费', width: '110', sortable: true, iscount: true },
//{ field: 'amount_adjustment', title: '调整金额', width: '110', sortable: true, iscount: true },
//{ field: 'amount_gift_wrap', title: '礼品包装金额', width: '110', sortable: true, iscount: true },
{ field: 'amount_refund', title: '退款金额', width: '110', sortable: true, iscount: true },
{ field: 'cost_total', title: '总支出', width: '110', sortable: true, iscount: true },
{ field: 'cost_promotion', title: '促销费', width: '110', sortable: true, iscount: true },
{ field: 'cost_platform_fee', title: '平台费', width: '110', sortable: true, iscount: true },
{ field: 'cost_product', title: '产品成本', width: '110', sortable: true, iscount: true },
{ field: 'cost_package', title: '包装费', width: '110', sortable: true, iscount: true },
{ field: 'cost_fba_fee', title: 'Fba费', width: '110', sortable: true, iscount: true },
{ field: 'cost_paypal_fee', title: 'Paypal费', width: '110', sortable: true, iscount: true },
{ field: 'cost_refund_commisson', title: '退款佣金', width: '110', sortable: true, iscount: true },
{ field: 'cost_handle_bailun', title: '处理费', width: '110', sortable: true, iscount: true },
{ field: 'cost_handle_platform', title: '平台操作费', width: '110', sortable: true, iscount: true },
{ field: 'cost_tail', title: '尾程费', width: '90', sortable: true, iscount: true },
{ field: 'cost_first', title: '头程费', width: '90', sortable: true, iscount: true },
{ field: 'profit_total', title: '利润', width: '90', sortable: true, iscount: true },
{ field: 'profit_rate', title: '利润率', width: '90', sortable: true, iscount: true },
{ field: 'paid_time', title: '付款时间', width: '150', sortable: true, iscount: true }
];
var url = '@Url.Content("~/Reports/Orders/DepositReceivedJson")' + '?' + $("#toolbar").serialize();
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;
}
}
}
}
}
});
}
else {
tb.bootstrapTable('refresh', { url: url });
}
}
function listPlatform() {
var lindex = layer.load();
$.submit({
url: '@Url.Content("~/Reports/Orders/ListPlatform")',
type:'POST',
paramData: '',
func: function (result) {
layer.close(lindex);
if (result != null && result != undefined) {
$('#platform').html('<option value="">选择平台</option>');
for (var i = 0; i < result.length; i++) {
$('#platform').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
listWebsite();
}
}
})
}
function listAccount() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListAccount")',
type:'POST',
paramData: 'platform=FBA',
func: function (result) {
if (result != null && result != undefined) {
$('#saleaccount').html('<option value="">选择帐号</option>');
for (var i = 0; i < result.length; i++) {
$('#saleaccount').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
})
}
function listWebsite() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListWebSite")',
type:'POST',
paramData: 'platform=FBA',
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>');
}
}
}
})
}
</script>
}
Bailun.DC.Web/Areas/Reports/Views/Orders/OrderRefundDetails.cshtml
0 → 100644
View file @
b1e0da58
@{
ViewData["Title"] = "退款明细列表";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
ViewBag.Nav = new string[] { "退款单信息", "退款单明细" };
}
<div class="row">
<div class="col-sm-12">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<input id="platform" name="platform" type="hidden" />
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>平台类型:</label>
<select id="platform" name="platform" class="form-control">
<option value="">选择平台</option>
</select>
</div>
<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
</div>
<div class="form-group">
<label>销售帐号:</label>
<select id="account" name="account" class="form-control" style="width:160px;">
<option value="">选择帐号</option>
</select>
</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>
<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>
@section css{
<style>
.mules {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
}
@section scripts{
<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();
listPlatform();
listAccount();
listWebsite();
})
function list() {
var columns = [
{ field: 'platform_type', title: '平台名称', width: '100', sortable: true, iscount: true },
{ field: 'website', title: '平台站点', width: '90', sortable: true },
{
field: 'bailun_account', title: '卖家帐号', width: '160', sortable: true, formatter: function (idx, data) {
return '<div class="mules" title="' + data.bailun_account + '">' + data.bailun_account+'</div>';
}
},
{
field: 'origin_order_id', title: '平台订单号', width: '180', sortable: true, formatter: function (idx, data) {
return '<div class="mules" title="' + data.origin_order_id + '">' + data.origin_order_id + '</div>';
}
},
{
field: 'bailun_sku', title: '百伦SKU', width: '100', sortable: true, formatter: function (idx, data) {
return '<div class="mules" title="' + data.bailun_sku + '">' + data.bailun_sku + '</div>';
}
},
{
field: 'platform_sku', title: '平台SKU', width: '100', sortable: true, formatter: function (idx, data) {
return '<div class="mules" title="' + data.platform_sku + '">' + data.platform_sku + '</div>';
}
},
{ field: 'amount_refund_rmb', title: '退款金额RMB', width: '110', sortable: true, iscount: true },
{ field: 'bailun_sku_quantity_refund', title: '退货数量', width: '80', sortable: true, iscount: true },
{ field: 'bailun_sku_unit_price', title: 'Sku采购价', width: '100', sortable: true, iscount: false },
{ field: 'linked', title: '订单关联', width: '100', sortable: true, iscount: false },
{ field: 'refund_time', title: '退款时间', width: '160', sortable: true, iscount: false }
];
var url = '@Url.Content("~/Reports/Orders/OrderRefundDetailsJson")' + '?' + $("#toolbar").serialize();
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;
}
}
}
}
}
});
}
else {
tb.bootstrapTable('refresh', { url: url });
}
}
function listPlatform() {
var lindex = layer.load();
$.submit({
url: '@Url.Content("~/Reports/Orders/ListPlatform")',
type:'POST',
paramData: '',
func: function (result) {
layer.close(lindex);
if (result != null && result != undefined) {
$('#platform').html('<option value="">选择平台</option>');
for (var i = 0; i < result.length; i++) {
$('#platform').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
listWebsite();
}
}
})
}
function listAccount() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListAccount")',
type:'POST',
paramData: 'platform=FBA',
func: function (result) {
if (result != null && result != undefined) {
$('#saleaccount').html('<option value="">选择帐号</option>');
for (var i = 0; i < result.length; i++) {
$('#saleaccount').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
})
}
function listWebsite() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListWebSite")',
type:'POST',
paramData: 'platform=FBA',
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>');
}
}
}
})
}
</script>
}
Bailun.DC.Web/Pages/Index.cshtml
View file @
b1e0da58
...
...
@@ -124,6 +124,16 @@
<span>
订单汇总
</span>
</a>
</li>
<li>
<a
class=
"J_menuItem"
href=
"@Url.Content("
~/
Reports
/
Orders
/
OrderRefundDetails
")"
data-index=
"0"
>
<span>
退款单明细
</span>
</a>
</li>
<li>
<a
class=
"J_menuItem"
href=
"@Url.Content("
~/
Reports
/
Orders
/
DepositReceived
")"
data-index=
"0"
>
<span>
预收款明细
</span>
</a>
</li>
</ul>
</li>
<li>
...
...
@@ -267,7 +277,7 @@
</button>
<nav
class=
"page-tabs J_menuTabs"
style=
"margin-left: 80px;"
>
<div
class=
"page-tabs-content"
>
<a
href=
"javascript:;"
class=
"active J_menuTab"
data-id=
"@Url.Content("
~/
Reports
/
Finance
/
AdministrativeCost
")"
>
管理成本报表
</a>
<a
href=
"javascript:;"
class=
"active J_menuTab"
data-id=
"@Url.Content("
~/
Home
/
Index
")"
>
首页
</a>
</div>
</nav>
<button
class=
"roll-nav roll-right J_tabRight"
>
...
...
@@ -294,7 +304,7 @@
<a
href=
"login.html"
class=
"roll-nav roll-right J_tabExit"
><i
class=
"fa fa fa-sign-out"
></i>
退出
</a>
</div>
<div
class=
"row J_mainContent"
id=
"content-main"
>
<iframe
class=
"J_iframe"
name=
"iframe0"
width=
"100%"
height=
"100%"
src=
"@Url.Content("
~/
Reports
/
Finance
/
AdministrativeCost
")"
frameborder=
"0"
data-id=
"@Url.Content("
~/
Reports
/
Finance
/
AdministrativeCost
")"
seamless
></iframe>
<iframe
class=
"J_iframe"
name=
"iframe0"
width=
"100%"
height=
"100%"
src=
"@Url.Content("
~/
Home
/
Index
")"
frameborder=
"0"
data-id=
"@Url.Content("
~/
Home
/
Index
")"
seamless
></iframe>
</div>
<!-- <div class="footer">
<div class="pull-right">© 2018 广州百伦
...
...
Bailun.DC.Web/Views/Home/Index.cshtml
View file @
b1e0da58
...
...
@@ -3,5 +3,5 @@
ViewData["Title"] = "Index";
}
<
h2>Index</h2
>
<
div style="margin:30px;font-size:2em;">欢迎使用百伦数据中心</div
>
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