Commit 2aa47dee by guanzhenshan

增加统计列

parent b694257f
......@@ -68,6 +68,7 @@ namespace Bailun.DC.DailyPlatformReceivable
union all
select platform_type,sum(amount_sales*seller_order_exchange_rate) amount,sum(cost_platform_fee*seller_order_exchange_rate) cost_platform_fee,sum(cost_fba_fee*seller_order_exchange_rate) cost_fba_fee from dc_base_oms_order where platform_type='FBA' and create_time>='{day.ToString("yyyy-MM-dd")}' and create_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' and company_id=1 and bailun_order_status!='Canceled' and has_scalp=0 and has_innersale=0
) tb";
var listAmount = cn.Query<platformamount>(sql);
var listPlatform = cn.Query<string>("select platform_type from dc_base_oms_order group by platform_type").Where(a=>a.ToLower()!= "amazon2b" && a.ToLower()!= "fba" && a.ToLower()!="ebay").ToList();
......@@ -81,8 +82,6 @@ namespace Bailun.DC.DailyPlatformReceivable
where t1.status=2 and daozhang_time>='{day.ToString("yyyy-MM-dd")}' and daozhang_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' group by salesl_platform";
var listIncome = cn.Query<platformamount>(sql);
var listAmount = cn.Query<platformamount>(sql);
var listM = new List<dc_daily_receivable>() { m_ebay };
foreach (var item in listPlatform)
{
......@@ -135,6 +134,8 @@ namespace Bailun.DC.DailyPlatformReceivable
m.amount_platformfee += ad;
}
//放款金额
var objIncome = listIncome.Where(a => a.platform_type == item).FirstOrDefault();
if (item.ToLower() == "amazon")
......@@ -177,6 +178,8 @@ namespace Bailun.DC.DailyPlatformReceivable
listM.Add(m);
}
cn.Execute("delete from dc_daily_receivable where day='" + day.ToString("yyyy-MM-dd") + "'");
//保存数据
foreach (var item in listM)
{
......
......@@ -74,16 +74,16 @@
var columns = [
{ field: 'day', title: '统计日期', width: '110' },
{ field: 'platform', title: '平台类型', width: '110' },
{ field: 'amount_start', title: '期初应收余额', width: '130' },
{ field: 'platform', title: '平台类型', width: '110', iscount: true },
{ field: 'amount_start', title: '期初应收余额', width: '130', iscount: true },
{ field: 'amount_sale_pay', title: '本期收款', width: '110', iscount: true },
{ field: 'amount_shipping', title: '发货发生额', width: '110',iscount: true },
{ field: 'amount_refund', title: '退款金额', width: '100', iscount: true },
{ field: 'amount_sale_shipping', title:'发货收款',width:'110',iscount:true},
{ field: 'amount_platformfee', title: '平台费', width: '110' },
{ field: 'amount_incoming', title: '放款金额', width: '110' },
{ field: 'amount_other', title: '其他金额', width: '110' },
{ field: 'amount_end', title: '期末应收账款', width: '130' }
{ field: 'amount_platformfee', title: '平台费', width: '110', iscount: true },
{ field: 'amount_incoming', title: '放款金额', width: '110', iscount: true },
{ field: 'amount_other', title: '其他金额', width: '110', iscount: true },
{ field: 'amount_end', title: '期末应收账款', width: '130', iscount: true }
];
var url = '@Url.Content("~/Reports/Finance/PlatformReceivableJson")' + '?' + $("#toolbar").serialize();
......
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