Commit 33fe2b77 by guanzhenshan

增加待收款明细报表,退款明细报表

parent b1e0da58
......@@ -594,7 +594,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var list = result.Select(p => new {
p.platform_type,
customerprice = p.customerprice > 0 ? p.customerprice.ToString("N2") : "0",
customerprice = (p.amount_sales/p.order_count).ToString("N2"),
p.order_count,
cost_platform_fee = p.cost_platform_fee > 0 ? p.cost_platform_fee.ToString("N2") : "0",
profit_total = p.profit_total.ToString("N2"),
......@@ -736,6 +736,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var countM = service.ListPlatformProfitOrdersCount(platform, website, account, start, end, orderno);
countM.bailun_order_id = "总计";
countM.amount_sales = Math.Round(countM.amount_sales, 2, MidpointRounding.AwayFromZero);
countM.amount_total = Math.Round((countM.amount_total), 2, MidpointRounding.AwayFromZero);
countM.amount_product = Math.Round((countM.amount_product), 2, MidpointRounding.AwayFromZero);
countM.amount_shipping = Math.Round((countM.amount_shipping), 2, MidpointRounding.AwayFromZero);
......@@ -759,6 +760,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
countM.cost_tail = Math.Round(countM.cost_tail, 2, MidpointRounding.AwayFromZero);
countM.profit_total = Math.Round(countM.profit_total, 2, MidpointRounding.AwayFromZero);
countM.amount_prepaid = Math.Round(countM.amount_prepaid, 2, MidpointRounding.AwayFromZero);
countM.profit_rate = countM.amount_sales > 0 ? Math.Round((countM.profit_total / countM.amount_sales)*100,2,MidpointRounding.AwayFromZero) : 0;
var list = obj.Select(p => new
{
......@@ -769,30 +771,31 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
p.seller_account,
p.order_currency,
amount_total = Math.Round((p.amount_total * p.seller_order_exchange_rate),2,MidpointRounding.AwayFromZero),
amount_product = Math.Round((p.amount_product * p.seller_order_exchange_rate),2,MidpointRounding.AwayFromZero),
amount_shipping = Math.Round((p.amount_shipping * p.seller_order_exchange_rate),2,MidpointRounding.AwayFromZero),
amount_tax = Math.Round((p.amount_tax * p.seller_order_exchange_rate),2,MidpointRounding.AwayFromZero),
amount_adjustment = Math.Round((p.amount_adjustment * p.seller_order_exchange_rate),2,MidpointRounding.AwayFromZero),
amount_gift_wrap = Math.Round((p.amount_gift_wrap * p.seller_order_exchange_rate),2,MidpointRounding.AwayFromZero),
amount_refund = Math.Round((p.amount_refund * p.seller_order_exchange_rate),2,MidpointRounding.AwayFromZero),
cost_total = Math.Round(p.cost_total,2,MidpointRounding.AwayFromZero),
cost_promotion = Math.Round(p.cost_promotion * p.seller_order_exchange_rate,2,MidpointRounding.AwayFromZero),
cost_platform_fee = Math.Round(p.cost_platform_fee * p.seller_order_exchange_rate,2,MidpointRounding.AwayFromZero),
cost_product = Math.Round(p.cost_product,2,MidpointRounding.AwayFromZero),
cost_shipping = Math.Round(p.cost_shipping,2,MidpointRounding.AwayFromZero),
cost_package = Math.Round(p.cost_package,2,MidpointRounding.AwayFromZero),
cost_fba_fee = Math.Round(p.cost_fba_fee * p.seller_order_exchange_rate,2,MidpointRounding.AwayFromZero),
cost_paypal_fee = Math.Round(p.cost_paypal_fee*p.seller_order_exchange_rate,2,MidpointRounding.AwayFromZero),
cost_refund_commisson = Math.Round(p.cost_refund_commisson*p.seller_order_exchange_rate,2,MidpointRounding.AwayFromZero),
cost_handle_bailun = Math.Round(p.cost_handle_bailun,2,MidpointRounding.AwayFromZero),
cost_handle_platform = Math.Round(p.cost_handle_platform,2,MidpointRounding.AwayFromZero),
cost_first = Math.Round(p.cost_first,2,MidpointRounding.AwayFromZero),
cost_tail = Math.Round(p.cost_tail,2,MidpointRounding.AwayFromZero),
profit_total = Math.Round(p.profit_total,2,MidpointRounding.AwayFromZero),
profit_rate = Math.Round(p.profit_rate*100,2,MidpointRounding.AwayFromZero),
amount_prepaid = Math.Round(p.amount_prepaid,2,MidpointRounding.AwayFromZero),
amount_total = p.amount_total.ToString("N2"),
amount_sales = p.amount_sales.ToString("N2"),
amount_product = p.amount_product.ToString("N2"),
amount_shipping = p.amount_shipping.ToString("N2"),
amount_tax = p.amount_tax.ToString("N2"),
amount_adjustment = p.amount_adjustment.ToString("N2"),
amount_gift_wrap = p.amount_gift_wrap.ToString("N2"),
amount_refund = p.amount_refund.ToString("N2"),
cost_total = p.cost_total.ToString("N2"),
cost_promotion = p.cost_promotion.ToString("N2"),
cost_platform_fee = p.cost_platform_fee.ToString("N2"),
cost_product = p.cost_product.ToString("N2"),
cost_shipping = p.cost_shipping.ToString("N2"),
cost_package = p.cost_package.ToString("N2"),
cost_fba_fee = p.cost_fba_fee.ToString("N2"),
cost_paypal_fee = p.cost_paypal_fee.ToString("N2"),
cost_refund_commisson = p.cost_refund_commisson.ToString("N2"),
cost_handle_bailun = p.cost_handle_bailun.ToString("N2"),
cost_handle_platform = p.cost_handle_platform.ToString("N2"),
cost_first = p.cost_first.ToString("N2"),
cost_tail = p.cost_tail.ToString("N2"),
profit_total = p.profit_total.ToString("N2"),
profit_rate = (p.profit_rate*100).ToString("N2"),
amount_prepaid = p.amount_prepaid.ToString("N2"),
create_time = p.create_time.ToString("yyyy-MM-dd HH:mm:ss"),
paid_time = p.paid_time.ToString("yyyy-MM-dd HH:mm:ss"),
......@@ -1152,7 +1155,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
[HttpPost]
public JsonResult ListAccount(string platform)
{
var result = Services.CommonServices.ListAccount(platform);
var result = Services.CommonServices.ListAccount(platform).Where(a=>!string.IsNullOrEmpty(a));
return Json(result);
}
......@@ -1164,7 +1167,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
[HttpPost]
public JsonResult ListWebSite(string platform)
{
var result = Services.CommonServices.ListWebSite(platform);
var result = Services.CommonServices.ListWebSite(platform).Where(a => !string.IsNullOrEmpty(a));
return Json(result);
}
......
......@@ -8,7 +8,6 @@
<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>
......@@ -167,9 +166,9 @@
paramData: 'platform=FBA',
func: function (result) {
if (result != null && result != undefined) {
$('#saleaccount').html('<option value="">选择帐号</option>');
$('#account').html('<option value="">选择帐号</option>');
for (var i = 0; i < result.length; i++) {
$('#saleaccount').append('<option value="' + result[i] + '">' + result[i]+'</option>');
$('#account').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
......
......@@ -26,6 +26,8 @@
<label>仓库类型:</label>
<select id="warehousetype" name="warehousetype" class="form-control">
<option value="">选择仓库类型</option>
<option value="自发货仓">自发货仓</option>
<option value="第三方仓">第三方仓</option>
</select>
</div>
<div class="form-group">
......@@ -84,7 +86,7 @@
//listWebsite();
listwarehousetype();
//listwarehousetype();
listwarehouse();
......@@ -231,19 +233,22 @@
}
function listwarehouse() {
var wtype = $('#warehousetype').val();
var type = $('#warehousetype').val();
if (type == '') {
$('#warehousecode').html('<option value="">请选择仓库</option>');
return false;
}
$.submit({
url: '@Url.Content("~/Home/ListWareHouse")',
paramData: 'warehousetype=' + wtype,
type:'POST',
url: '@Url.Content("~/Home/ListWarehouseByExtType")',
type: 'POST',
paramData: 'type=' + type,
func: function (result) {
if (result != null && result != undefined) {
$('#warehousecode').html('<option value="">仓库不限</option>');
$('#warehousecode').html('<option value="">请选择仓库</option>');
for (var i = 0; i < result.length; i++) {
if (result[i].warehouse_name.indexOf('FBA') < 0) {
$('#warehousecode').append('<option value="' + result[i].warehouse_code + '">' + result[i].warehouse_name + '</option>');
}
$('#warehousecode').append('<option value="' + result[i].code + '">' + result[i].name + '</option>');
}
}
}
......
......@@ -89,7 +89,7 @@
{ field: 'website', title: '站点', width: '90' },
{ field: 'seller_account', title: '销售帐号', width: '110', sortable: false },
{
field: 'amount_total', title: '总收入', width: '90', sortable: true, iscount: true
field: 'amount_sales', title: '销售额', width: '90', sortable: true, iscount: true
},
{ field: 'amount_product', title: '产品收入', width: '110', sortable: true, iscount: true },
{
......@@ -103,7 +103,6 @@
{ field: 'cost_promotion', title: '促销费用', width: '110', sortable: true, iscount: true },
{ field: 'cost_platform_fee', title: '平台费用', width: '100', sortable: true, iscount: true },
{ field: 'cost_product', title: '产品成本', width: '100', sortable: true, iscount: true },
{ field: 'cost_shipping', title: '发货费用', width: '100', sortable: true, iscount: true },
{ field: 'cost_package', title: '包装费用', width: '100', sortable: true, iscount: true },
{ field: 'cost_fba_fee', title: 'FBA费用', width: '100', sortable: true, iscount: true },
{ field: 'cost_paypal_fee', title: 'Paypal费用', width: '120', sortable: true, iscount: true },
......@@ -113,7 +112,8 @@
{ field: 'cost_first', title: '头程费', width: '100', sortable: true, iscount: true },
{ field: 'cost_tail', title: '尾程费', width: '100', sortable: true, iscount: true },
{ field: 'profit_total', title: '利润', width: '100', sortable: true, iscount: true },
{ field: 'profit_rate', title: '利润率', width: '100', sortable: true },
{ field: 'profit_rate', title: '利润率', width: '100', sortable: true, iscount: true },
{ field: 'amount_prepaid', title: '预收款', width: '100', sortable: true,iscount: true },
{ field: 'create_time', title: '下单时间', width: '150', sortable: true },
{ field: 'paid_time', title: '付款时间', width: '150', sortable: true }
];
......
......@@ -9,7 +9,6 @@
<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>
......@@ -147,22 +146,24 @@
$('#platform').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
listWebsite();
//listWebsite();
}
}
})
}
function listAccount() {
var platform = $('#platform').val();
$.submit({
url: '@Url.Content("~/Reports/Orders/ListAccount")',
type:'POST',
paramData: 'platform=FBA',
paramData: 'platform=' + platform,
func: function (result) {
if (result != null && result != undefined) {
$('#saleaccount').html('<option value="">选择帐号</option>');
$('#account').html('<option value="">选择帐号</option>');
for (var i = 0; i < result.length; i++) {
$('#saleaccount').append('<option value="' + result[i] + '">' + result[i]+'</option>');
$('#account').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
......@@ -170,10 +171,11 @@
}
function listWebsite() {
var platform = $('#platform').val();
$.submit({
url: '@Url.Content("~/Reports/Orders/ListWebSite")',
type:'POST',
paramData: 'platform=FBA',
paramData: 'platform=' + platform,
func: function (result) {
if (result != null && result != undefined) {
$('#website').html('<option value="">选择站点</option>');
......
......@@ -94,7 +94,7 @@
for (var i = 0; i < result.length; i++) {
var s = '<tr><td class="platform"><a href="javascript:;" onclick="ShowWebsite(\'' + result[i].platform_type + '\');">' + result[i].platform_type + '</a></td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'订单数\',\'\',0)">' + result[i].order_count + '</td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'销售额\',\'amount_sales\',1)">' + result[i].amount_sales + '</td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'销售额\',\'0\',0)">' + result[i].amount_sales + '</td>';
s += '<td>' + result[i].customerprice + '</td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'平台费用\',\'cost_platform_fee\',1)">' + result[i].cost_platform_fee + '</td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'头程费\',\'cost_first\',1)">' + result[i].cost_first + '</td>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment