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
e019c3d0
Commit
e019c3d0
authored
Aug 02, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改退款数据,改为从CRM拿
parent
803a0196
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
25 deletions
+45
-25
dc_base_crm_refund.cs
Bailun.DC.Models/dc_base_crm_refund.cs
+5
-0
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+0
-0
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+28
-16
ListReturn.cshtml
Bailun.DC.Web/Areas/Reports/Views/Orders/ListReturn.cshtml
+8
-9
PlatformProfitCount.cshtml
...Web/Areas/Reports/Views/Orders/PlatformProfitCount.cshtml
+4
-0
No files found.
Bailun.DC.Models/dc_base_crm_refund.cs
View file @
e019c3d0
...
@@ -95,6 +95,11 @@ namespace Bailun.DC.Models
...
@@ -95,6 +95,11 @@ namespace Bailun.DC.Models
public
decimal
amount_refund_rmb
{
get
;
set
;
}
public
decimal
amount_refund_rmb
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 美元金额
/// </summary>
public
decimal
amount_refund_usd
{
get
;
set
;
}
/// <summary>
/// 发货状态
/// 发货状态
/// </summary>
/// </summary>
public
string
bailun_shipping_status
{
get
;
set
;
}
public
string
bailun_shipping_status
{
get
;
set
;
}
...
...
Bailun.DC.Services/OrdersServices.cs
View file @
e019c3d0
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
e019c3d0
...
@@ -1336,6 +1336,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1336,6 +1336,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
dtend
=
end
;
var
dtend
=
end
;
var
ebayADFee
=
new
dc_base_finance_ebay
();
//Ebay 广告费
var
ebayADFee
=
new
dc_base_finance_ebay
();
//Ebay 广告费
var
ebayPutAway
=
new
dc_base_finance_ebay
();
//Ebay 上架费
var
ebayPutAway
=
new
dc_base_finance_ebay
();
//Ebay 上架费
var
listRefund
=
new
List
<
Models
.
Orders
.
dc_base_oms_order
>();
var
ADfeeType
=
new
string
[]
{
var
ADfeeType
=
new
string
[]
{
"CustomCode"
"CustomCode"
};
};
...
@@ -1381,6 +1382,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1381,6 +1382,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
);
ebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
);
var
amazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
);
var
amazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
);
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
);
foreach
(
var
item
in
result
)
foreach
(
var
item
in
result
)
{
{
item
.
adfee
=
0
;
item
.
adfee
=
0
;
...
@@ -1403,10 +1407,20 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1403,10 +1407,20 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
item
.
profit_total
=
(
item
.
profit_total
-
item
.
adfee
??
0
);
item
.
profit_total
=
(
item
.
profit_total
-
item
.
adfee
??
0
);
item
.
profit_rate
=
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
);
item
.
profit_rate
=
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
);
}
}
item
.
amount_refund
=
0
;
item
.
amount_refund_rate
=
0
;
var
objRefund
=
listRefund
.
Where
(
a
=>
a
.
platform_type
==
item
.
platform_type
).
FirstOrDefault
();
if
(
objRefund
!=
null
)
{
item
.
amount_refund
=
objRefund
.
amount_refund
;
item
.
amount_refund_rate
=
(
item
.
amount_sales
>
0
?
item
.
amount_refund
/
item
.
amount_sales
:
0
);
}
//利润减去退款
//利润减去退款
item
.
profit_total
=
(
item
.
profit_total
-
item
.
amount_refund
);
item
.
profit_total
=
(
item
.
profit_total
-
item
.
amount_refund
);
item
.
profit_rate
=
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
);
item
.
profit_rate
=
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
);
}
}
if
(
result
.
Count
>
0
)
if
(
result
.
Count
>
0
)
...
@@ -2043,17 +2057,16 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -2043,17 +2057,16 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
a
.
platform_type
,
a
.
platform_type
,
a
.
website
,
a
.
website
,
a
.
origin_order_id
,
a
.
origin_order_id
,
a
.
seller_account
,
a
.
bailun_account
,
amount_refund
=
a
.
amount_refund
.
ToString
(
"N2"
),
amount_refund_rmb
=
a
.
amount_refund_rmb
.
ToString
(
"N2"
),
refundrmb
=
a
.
refundrmb
.
ToString
(
"N2"
),
amount_refund_usd
=
a
.
amount_refund_usd
.
ToString
(
"N2"
),
refund_time
=
a
.
refund_time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
refund_time
=
a
.
refund_time
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
a
.
refund_reference_id
});
});
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
,
count_row
=
new
{
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
,
count_row
=
new
{
seller
_account
=
"合计"
,
bailun
_account
=
"合计"
,
refundrmb
=
countOjb
.
refund
rmb
.
ToString
(
"N2"
),
amount_refund_rmb
=
countOjb
.
amount_refund_
rmb
.
ToString
(
"N2"
),
amount_refund
=
countOjb
.
amount_refun
d
.
ToString
(
"N2"
),
amount_refund
_usd
=
countOjb
.
amount_refund_us
d
.
ToString
(
"N2"
),
},
companyid
});
},
companyid
});
}
}
...
@@ -2075,23 +2088,22 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -2075,23 +2088,22 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
a
.
platform_type
,
a
.
platform_type
,
a
.
website
,
a
.
website
,
a
.
origin_order_id
,
a
.
origin_order_id
,
a
.
seller_account
,
a
.
bailun_account
,
amount_refund
=
a
.
amount_refund
.
ToString
(
"N2"
),
amount_refund_rmb
=
a
.
amount_refund_rmb
.
ToString
(
"N2"
),
refundrmb
=
a
.
refundrmb
.
ToString
(
"N2"
),
amount_refund_usd
=
a
.
amount_refund_usd
.
ToString
(
"N2"
),
refund_time
=
a
.
refund_time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
refund_time
=
a
.
refund_time
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
a
.
refund_reference_id
});
});
var
colNames
=
new
List
<
string
>
{
"平台订单号"
,
"平台名称"
,
"平台站点"
,
"卖家帐号"
,
"退款金额"
,
var
colNames
=
new
List
<
string
>
{
"平台订单号"
,
"平台名称"
,
"平台站点"
,
"卖家帐号"
,
"退款金额"
,
"退款
RMB"
,
"退款时间"
,
"退款交易号
"
"退款
USD"
,
"退款时间
"
};
};
var
listVal
=
new
List
<
string
>();
var
listVal
=
new
List
<
string
>();
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
listVal
.
Add
(
listVal
.
Add
(
item
.
origin_order_id
+
"|"
+
item
.
platform_type
+
"|"
+
item
.
website
+
"|"
+
item
.
seller_account
+
"|"
+
item
.
amount_refund
+
"|"
+
item
.
origin_order_id
+
"|"
+
item
.
platform_type
+
"|"
+
item
.
website
+
"|"
+
item
.
bailun_account
+
"|"
+
item
.
amount_refund_rmb
+
"|"
+
item
.
refundrmb
+
"|"
+
item
.
refund_time
+
"|"
+
item
.
refund_reference_id
item
.
amount_refund_usd
+
"|"
+
item
.
refund_time
);
);
}
}
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/ListReturn.cshtml
View file @
e019c3d0
...
@@ -27,17 +27,17 @@
...
@@ -27,17 +27,17 @@
<option value="">选择帐号</option>
<option value="">选择帐号</option>
</select>
</select>
</div>*@
</div>*@
<div class="form-group">
@*
<div class="form-group">
<label>付款时间</label>
<label>付款时间</label>
<input id="paystart" name="paystart" type="text" class="form-control" style="width:130px;" value="" placeholder="付款开始时间" />
<input id="paystart" name="paystart" type="text" class="form-control" style="width:130px;" value="" placeholder="付款开始时间" />
<span>至</span>
<span>至</span>
<input id="payend" name="payend" type="text" class="form-control" style="width:130px;" value="" placeholder="付款结束时间" />
<input id="payend" name="payend" type="text" class="form-control" style="width:130px;" value="" placeholder="付款结束时间" />
</div>
</div>
*@
<div class="form-group">
<div class="form-group">
<label>退款时间</label>
<label>退款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"))" placeholder="退款开始时间" />
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"))" placeholder="退款开始时间" />
<span>至</span>
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" placeholder="退款结束时间" />
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.
AddDays(-1).
ToString("yyyy-MM-dd"))" placeholder="退款结束时间" />
</div>
</div>
<div class="form-group">
<div class="form-group">
<label> </label>
<label> </label>
...
@@ -101,14 +101,13 @@
...
@@ -101,14 +101,13 @@
{ field: 'platform_type', title: '平台名称', width: '100', sortable: true },
{ field: 'platform_type', title: '平台名称', width: '100', sortable: true },
{ field: 'website', title: '平台站点', width: '90', sortable: true },
{ field: 'website', title: '平台站点', width: '90', sortable: true },
{
{
field: '
seller
_account', title: '卖家帐号', width: '160', sortable: true, iscount: true, formatter: function (idx, data) {
field: '
bailun
_account', title: '卖家帐号', width: '160', sortable: true, iscount: true, formatter: function (idx, data) {
return '<div class="mules" title="' + data.
seller_account + '">' + data.seller
_account+'</div>';
return '<div class="mules" title="' + data.
bailun_account + '">' + data.bailun
_account+'</div>';
}
}
},
},
{ field: 'amount_refund', title: '退款金额', width: '100', sortable: true, iscount: true },
{ field: 'amount_refund_rmb', title: '退款金额', width: '100', sortable: true, iscount: true },
{ field: 'refundrmb', title: '退款RMB', width: '100', sortable: false, iscount: true },
{ field: 'amount_refund_usd', title: '退款USD', width: '100', sortable: false, iscount: true },
{ field: 'refund_time', title: '退款时间', width: '150', sortable: true },
{ field: 'refund_time', title: '退款时间', width: '150', sortable: true }
{ field: 'refund_reference_id', title: '退款交易号', width: '150', sortable: false }
];
];
var url = '@Url.Content("~/Reports/Orders/ListReturnJson")' + '?' + $("#toolbar").serialize();
var url = '@Url.Content("~/Reports/Orders/ListReturnJson")' + '?' + $("#toolbar").serialize();
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/PlatformProfitCount.cshtml
View file @
e019c3d0
...
@@ -14,6 +14,10 @@
...
@@ -14,6 +14,10 @@
</div>
</div>
<div style="float:right;width:100%;">
<div style="float:right;width:100%;">
<div id="rightcontain">
<div id="rightcontain">
<div class="alert alert-warning">
说明:退款金额是根据页面的付款时间和发货时间匹配退款时间获取的,只匹配到订单维度。
</div>
<div class="ibox-content m-b-sm border-bottom">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-inline" style="line-height:40px;">
...
...
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