Commit 7cf651cd by guanzhenshan

增加预收款订单数

parent a1161a89
...@@ -413,5 +413,10 @@ namespace Bailun.DC.Models.Orders ...@@ -413,5 +413,10 @@ namespace Bailun.DC.Models.Orders
/// </summary> /// </summary>
public decimal loss_withdrawal { get; set; } public decimal loss_withdrawal { get; set; }
/// <summary>
/// 未发货订单数
/// </summary>
public int noshippingcount { get; set; }
} }
} }
...@@ -513,5 +513,10 @@ namespace Bailun.DC.Models.Orders ...@@ -513,5 +513,10 @@ namespace Bailun.DC.Models.Orders
/// </summary> /// </summary>
public decimal profitrate { get; set; } public decimal profitrate { get; set; }
/// <summary>
/// 未发货订单数
/// </summary>
public int noshippingcount { get; set; }
} }
} }
...@@ -149,6 +149,11 @@ namespace Bailun.DC.Models.Orders ...@@ -149,6 +149,11 @@ namespace Bailun.DC.Models.Orders
/// </summary> /// </summary>
public decimal cost_package { get; set; } public decimal cost_package { get; set; }
/// <summary>
/// 未发货订单数
/// </summary>
public int noshippingcount { get; set; }
} }
......
...@@ -154,7 +154,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -154,7 +154,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
cost_product = p.cost_product.ToString("N2"), cost_product = p.cost_product.ToString("N2"),
platform_fee = p.platform_fee.ToString("N2"), platform_fee = p.platform_fee.ToString("N2"),
head_fee = p.head_fee>0?p.head_fee.ToString("N2"):"0", head_fee = p.head_fee>0?p.head_fee.ToString("N2"):"0",
p.order_count, order_count = p.order_count.ToString("N0"),
loss_withdrawal = (p.amount_product * (objwithdraw == null ? 0 : objwithdraw.Loss_withdrawal_percent ?? 0))>0? (p.amount_product * (objwithdraw == null ? 0 : objwithdraw.Loss_withdrawal_percent ?? 0)).ToString("N2"):"0", loss_withdrawal = (p.amount_product * (objwithdraw == null ? 0 : objwithdraw.Loss_withdrawal_percent ?? 0))>0? (p.amount_product * (objwithdraw == null ? 0 : objwithdraw.Loss_withdrawal_percent ?? 0)).ToString("N2"):"0",
cost_count = p.cost_count.ToString("N2"), cost_count = p.cost_count.ToString("N2"),
forecast_profit_count = p.forecast_profit_count.ToString("N2"), forecast_profit_count = p.forecast_profit_count.ToString("N2"),
...@@ -166,6 +166,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -166,6 +166,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
p.order_currency, p.order_currency,
amount_prepaid = p.amount_prepaid.ToString("N2"), amount_prepaid = p.amount_prepaid.ToString("N2"),
amount_refund = p.amount_refund>0?p.amount_refund.ToString("N2"):"0", amount_refund = p.amount_refund>0?p.amount_refund.ToString("N2"):"0",
noshippingcount = p.noshippingcount.ToString("N0")
}); });
return JsonConvert.SerializeObject(new { total = total, rows = obj,count_row=new { return JsonConvert.SerializeObject(new { total = total, rows = obj,count_row=new {
...@@ -186,6 +187,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -186,6 +187,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
countM.order_currency, countM.order_currency,
amount_prepaid = countM.amount_prepaid.ToString("N2"), amount_prepaid = countM.amount_prepaid.ToString("N2"),
amount_refund = countM.amount_refund > 0 ? countM.amount_refund.ToString("N2") : "0", amount_refund = countM.amount_refund > 0 ? countM.amount_refund.ToString("N2") : "0",
noshippingcount = countM.noshippingcount.ToString("N0")
} }
}); });
} }
...@@ -264,6 +266,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -264,6 +266,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
cost_fba_fee = p.cost_fba_fee>0?p.cost_fba_fee.ToString("N2"):"0", cost_fba_fee = p.cost_fba_fee>0?p.cost_fba_fee.ToString("N2"):"0",
cost_paypal_fee = p.cost_paypal_fee>0?p.cost_paypal_fee.ToString("N2"):"0", cost_paypal_fee = p.cost_paypal_fee>0?p.cost_paypal_fee.ToString("N2"):"0",
cost_package = p.cost_package>0?p.cost_package.ToString("N2"):"0", cost_package = p.cost_package>0?p.cost_package.ToString("N2"):"0",
noshippingcount = p.noshippingcount.ToString("N0"),
}); });
return JsonConvert.SerializeObject(new { total = total, rows = obj, return JsonConvert.SerializeObject(new { total = total, rows = obj,
...@@ -289,6 +292,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -289,6 +292,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
cost_fba_fee = countM.cost_fba_fee > 0 ? countM.cost_fba_fee.ToString("N2") : "0", cost_fba_fee = countM.cost_fba_fee > 0 ? countM.cost_fba_fee.ToString("N2") : "0",
cost_paypal_fee = countM.cost_paypal_fee > 0 ? countM.cost_paypal_fee.ToString("N2") : "0", cost_paypal_fee = countM.cost_paypal_fee > 0 ? countM.cost_paypal_fee.ToString("N2") : "0",
cost_package = countM.cost_package > 0 ? countM.cost_package.ToString("N2") : "0", cost_package = countM.cost_package > 0 ? countM.cost_package.ToString("N2") : "0",
noshippingcount = countM.noshippingcount.ToString("N0"),
} }
}); });
} }
...@@ -565,9 +569,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -565,9 +569,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="end">付款结束时间</param> /// <param name="end">付款结束时间</param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public JsonResult PlatformProfitCountJson(string platform,DateTime? start,DateTime? end) public JsonResult PlatformProfitCountJson(string platform,DateTime? start,DateTime? end,DateTime? shipstart,DateTime? shipend)
{ {
var result = new Services.OrdersServices().ListPlatformProfit(platform, start, end); var result = new Services.OrdersServices().ListPlatformProfit(platform, start, end,shipstart,shipend);
if (result.Count > 0) if (result.Count > 0)
{ {
...@@ -588,6 +592,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -588,6 +592,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
cost_tail = result.Sum(a => a.cost_tail), cost_tail = result.Sum(a => a.cost_tail),
amount_prepaid = result.Sum(a=>a.amount_prepaid), amount_prepaid = result.Sum(a=>a.amount_prepaid),
cost_product = result.Sum(a=>a.cost_product), cost_product = result.Sum(a=>a.cost_product),
noshippingcount = result.Sum(a=>a.noshippingcount)
}; };
result.Add(m); result.Add(m);
} }
...@@ -609,7 +614,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -609,7 +614,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
cost_handle_platform = p.cost_handle_platform.ToString("N2"), cost_handle_platform = p.cost_handle_platform.ToString("N2"),
cost_tail = p.cost_tail.ToString("N2"), cost_tail = p.cost_tail.ToString("N2"),
amount_prepaid = p.amount_prepaid.ToString("N2"), amount_prepaid = p.amount_prepaid.ToString("N2"),
cost_product = p.cost_product.ToString("N2") cost_product = p.cost_product.ToString("N2"),
noshippingcount = p.noshippingcount.ToString("N0")
}); });
return Json(list); return Json(list);
...@@ -956,6 +962,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -956,6 +962,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
profit_rate = (100 * p.profit_rate).ToString("N2"), profit_rate = (100 * p.profit_rate).ToString("N2"),
cost_tail = p.cost_tail.ToString("N2"), cost_tail = p.cost_tail.ToString("N2"),
cost_handle_bailun = p.cost_handle_bailun.ToString("N2"), cost_handle_bailun = p.cost_handle_bailun.ToString("N2"),
noshippingcount = p.noshippingcount.ToString("N0"),
}); });
return JsonConvert.SerializeObject(new return JsonConvert.SerializeObject(new
...@@ -984,6 +991,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -984,6 +991,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
profit_rate = (100 * countM.profit_rate).ToString("N2"), profit_rate = (100 * countM.profit_rate).ToString("N2"),
cost_tail = countM.cost_tail.ToString("N2"), cost_tail = countM.cost_tail.ToString("N2"),
cost_handle_bailun = countM.cost_handle_bailun.ToString("N2"), cost_handle_bailun = countM.cost_handle_bailun.ToString("N2"),
noshippingcount = countM.noshippingcount.ToString("N0"),
} }
}); });
} }
...@@ -1064,6 +1072,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -1064,6 +1072,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
profit_rate = (100 * p.profit_rate).ToString("N2"), profit_rate = (100 * p.profit_rate).ToString("N2"),
cost_tail = p.cost_tail.ToString("N2"), cost_tail = p.cost_tail.ToString("N2"),
cost_handle_bailun = p.cost_handle_bailun.ToString("N2"), cost_handle_bailun = p.cost_handle_bailun.ToString("N2"),
noshippingcount = p.noshippingcount.ToString("N0")
}); });
return JsonConvert.SerializeObject(new return JsonConvert.SerializeObject(new
...@@ -1092,6 +1101,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -1092,6 +1101,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
profit_rate = (100 * countM.profit_rate).ToString("N2"), profit_rate = (100 * countM.profit_rate).ToString("N2"),
cost_tail = countM.cost_tail.ToString("N2"), cost_tail = countM.cost_tail.ToString("N2"),
cost_handle_bailun = countM.cost_handle_bailun.ToString("N2"), cost_handle_bailun = countM.cost_handle_bailun.ToString("N2"),
noshippingcount = countM.noshippingcount.ToString("N0"),
} }
}); });
} }
......
...@@ -109,6 +109,11 @@ ...@@ -109,6 +109,11 @@
} }
}, },
{ {
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>';
}
},
{
field: 'cost_product', title: '产品成本', width: '100', sortable: true, iscount: true, formatter: function (idx, data) { field: 'cost_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 + '\',\'产品成本\',\'cost_product\',1)">' + data.cost_product + '</span>'; return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'产品成本\',\'cost_product\',1)">' + data.cost_product + '</span>';
} }
...@@ -123,11 +128,6 @@ ...@@ -123,11 +128,6 @@
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'头程费\',\'cost_first\',1)">' + data.head_fee + '</span>'; return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'头程费\',\'cost_first\',1)">' + data.head_fee + '</span>';
} }
}, },
{
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>';
}
},
{ field: 'loss_withdrawal', title: '提现损耗', width: '100', sortable: false, iscount: true }, { field: 'loss_withdrawal', title: '提现损耗', width: '100', sortable: false, iscount: true },
{ {
field: 'cost_count', title: '总支出', width: '110', sortable: true, iscount: true, formatter: function (idx, data) { field: 'cost_count', title: '总支出', width: '110', sortable: true, iscount: true, formatter: function (idx, data) {
...@@ -149,6 +149,9 @@ ...@@ -149,6 +149,9 @@
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'预收金额\',\'amount_prepaid\',1)">' + data.amount_prepaid + '</span>'; return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'预收金额\',\'amount_prepaid\',1)">' + data.amount_prepaid + '</span>';
} }
}, },
{
field: 'noshippingcount', title: '预收订单数', width: '120', sortable: true, iscount: true
},
//{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true }, //{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true },
{ {
field: 'profit_count', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) { field: 'profit_count', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
......
...@@ -161,6 +161,9 @@ ...@@ -161,6 +161,9 @@
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'预收金额\',\'amount_prepaid\',1)">' + data.amount_prepaid + '</span>'; return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'预收金额\',\'amount_prepaid\',1)">' + data.amount_prepaid + '</span>';
} }
}, },
{
field: 'noshippingcount', title: '预收订单数', width: '120', sortable: true, iscount: true
},
//{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true }, //{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true },
{ {
field: 'profit_total', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) { field: 'profit_total', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
......
...@@ -161,6 +161,9 @@ ...@@ -161,6 +161,9 @@
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'预收金额\',\'amount_prepaid\',1)">' + data.amount_prepaid + '</span>'; return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'预收金额\',\'amount_prepaid\',1)">' + data.amount_prepaid + '</span>';
} }
}, },
{
field: 'noshippingcount', title: '预收订单数', width: '120', sortable: true, iscount: true
},
//{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true }, //{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true },
{ {
field: 'profit_total', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) { field: 'profit_total', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
......
...@@ -89,8 +89,13 @@ ...@@ -89,8 +89,13 @@
}, },
{ field: 'website', title: '站点', width: '80', sortable: false, iscount: true }, { field: 'website', title: '站点', width: '80', sortable: false, iscount: true },
{ {
field: 'amount_product', title: '商品收入', width: '100', sortable: true, iscount: true, formatter: function (idx, data) { 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_product\',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>';
}
},
{
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>';
} }
}, },
{ {
...@@ -118,11 +123,6 @@ ...@@ -118,11 +123,6 @@
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'头程费\',\'cost_first\',1)">' + data.head_fee + '</span>'; return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'头程费\',\'cost_first\',1)">' + data.head_fee + '</span>';
} }
}, },
{
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>';
}
},
{ field: 'loss_withdrawal', title: '提现损耗', width: '100', sortable: false, iscount: true }, { field: 'loss_withdrawal', title: '提现损耗', width: '100', sortable: false, iscount: true },
{ {
field: 'cost_count', title: '总支出', width: '110', sortable: true, iscount: true, formatter: function (idx, data) { field: 'cost_count', title: '总支出', width: '110', sortable: true, iscount: true, formatter: function (idx, data) {
...@@ -144,6 +144,9 @@ ...@@ -144,6 +144,9 @@
return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'预收金额\',\'amount_prepaid\',1)">' + data.amount_prepaid + '</span>'; return '<span class="alink" onclick="ShowDetail(\'' + data.platform_type + '\',\'' + data.website + '\',\'' + data.seller_account + '\',\'预收金额\',\'amount_prepaid\',1)">' + data.amount_prepaid + '</span>';
} }
}, },
//{
// field: 'noshippingcount', title: '预收订单数', width: '120', sortable: true, iscount: true
//},
//{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true }, //{ field: 'forecast_profit_rate', title: '预测利润率%', width: '120', sortable: true },
{ {
field: 'profit_count', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) { field: 'profit_count', title: '实际利润', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<th>处理费(百伦)</th> <th>处理费(百伦)</th>
<th>平台操作费</th> <th>平台操作费</th>
<th>预收金额</th> <th>预收金额</th>
<th>预收订单数</th>
<th>利润</th> <th>利润</th>
<th>利润率%</th> <th>利润率%</th>
<th>退款</th> <th>退款</th>
...@@ -104,6 +105,7 @@ ...@@ -104,6 +105,7 @@
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'处理费(百伦)\',\'cost_handle_bailun\',1)">' + result[i].cost_handle_bailun + '</td>'; s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'处理费(百伦)\',\'cost_handle_bailun\',1)">' + result[i].cost_handle_bailun + '</td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'平台操作费\',\'cost_handle_platform\',1)">' + result[i].cost_handle_platform + '</td>'; s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'平台操作费\',\'cost_handle_platform\',1)">' + result[i].cost_handle_platform + '</td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'预收款\',\'amount_prepaid\',1)">' + result[i].amount_prepaid + '</td>'; s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'预收款\',\'amount_prepaid\',1)">' + result[i].amount_prepaid + '</td>';
s += '<td class="alink">' + result[i].noshippingcount + '</td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'利润\',\'profit_total\',1)">' + result[i].profit_total + '</td>'; s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'利润\',\'profit_total\',1)">' + result[i].profit_total + '</td>';
s += '<td>' + result[i].profit_rate + '</td>'; s += '<td>' + result[i].profit_rate + '</td>';
s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'退款金额\',\'amount_refund\',1)">' + result[i].amount_refund + '</td>'; s += '<td class="alink" onclick="ShowDetail(\'' + result[i].platform_type + '\',\'退款金额\',\'amount_refund\',1)">' + result[i].amount_refund + '</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