@@ -886,7 +886,7 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
...
@@ -886,7 +886,7 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
return;
return;
}
}
varsql=$@"select t1.id as pickid,t2.id as orderskuid,t2.bailun_sku,t2.amount_sales,t2.cost_product,t2.cost_platform_fee,t2.cost_paypal_fee,t2.cost_first,t2.cost_logistics,t2.cost_handle_platform,t2.total_fee,t2.seller_order_exchange_rate,t2.seller_other_exchange_rate,t2.wms_to_cny_exchange_rate,t2.shipping,t1.quantity_shipped,t1.shipping_time,t2.platform_type,t2.cost_fba_fee,if(t6.financecategoryname is null,'',t6.financecategoryname) as financecategoryname
varsql=$@"select t1.id as pickid,t2.id as orderskuid,t2.bailun_sku,t2.amount_sales,t2.cost_product,t2.cost_platform_fee,t2.cost_paypal_fee,t2.cost_first,t2.cost_logistics,t2.cost_handle_platform,t2.total_fee,t2.seller_order_exchange_rate,t2.seller_other_exchange_rate,t2.wms_to_cny_exchange_rate,t2.shipping,t1.quantity_shipped,t1.shipping_time,t2.platform_type,t2.cost_fba_fee,if(t6.financecategoryname is null,'',t6.financecategoryname) as financecategoryname,t2.order_currency
from dc_base_oms_pick t1
from dc_base_oms_pick t1
join dc_base_oms_sku t2 on t1.bailun_order_id = t2.bailun_order_id and t1.bailun_sku=t2.bailun_sku and t2.bailun_order_status != 'Canceled' and t2.has_scalp = 0 and ((t2.platform_type!='FBA' and t2.bailun_order_status!='CantHandle') or t2.platform_type='FBA') and t2.has_scalp = 0 and t2.has_innersale = 0 and t2.has_delete=0 and t2.company_id=1
join dc_base_oms_sku t2 on t1.bailun_order_id = t2.bailun_order_id and t1.bailun_sku=t2.bailun_sku and t2.bailun_order_status != 'Canceled' and t2.has_scalp = 0 and ((t2.platform_type!='FBA' and t2.bailun_order_status!='CantHandle') or t2.platform_type='FBA') and t2.has_scalp = 0 and t2.has_innersale = 0 and t2.has_delete=0 and t2.company_id=1
left join dc_base_sku t5 on t2.bailun_sku=t5.bailun_sku
left join dc_base_sku t5 on t2.bailun_sku=t5.bailun_sku
...
@@ -902,10 +902,10 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
...
@@ -902,10 +902,10 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
@@ -913,7 +913,7 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
...
@@ -913,7 +913,7 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
page++;
page++;
}
}
sql=$@"select 0 as pickid,tb.id as orderskuid,tb.bailun_sku,tb.amount_sales,tb.cost_product,tb.cost_platform_fee,tb.cost_paypal_fee,tb.cost_first,tb.cost_logistics,tb.cost_handle_platform,tb.total_fee,tb.seller_order_exchange_rate,tb.seller_other_exchange_rate,tb.wms_to_cny_exchange_rate,tb.shipping,tb.bailun_sku_quantity_ordered as quantity_shipped,tb.purchase_create_time as shipping_time,tb.platform_type,tb.cost_fba_fee,if(t6.financecategoryname is null,'',t6.financecategoryname) as financecategoryname
sql=$@"select 0 as pickid,tb.id as orderskuid,tb.bailun_sku,tb.amount_sales,tb.cost_product,tb.cost_platform_fee,tb.cost_paypal_fee,tb.cost_first,tb.cost_logistics,tb.cost_handle_platform,tb.total_fee,tb.seller_order_exchange_rate,tb.seller_other_exchange_rate,tb.wms_to_cny_exchange_rate,tb.shipping,tb.bailun_sku_quantity_ordered as quantity_shipped,tb.purchase_create_time as shipping_time,tb.platform_type,tb.cost_fba_fee,if(t6.financecategoryname is null,'',t6.financecategoryname) as financecategoryname,tb.order_currency
from dc_base_oms_sku tb left join dc_base_sku t5 on tb.bailun_sku=t5.bailun_sku
from dc_base_oms_sku tb left join dc_base_sku t5 on tb.bailun_sku=t5.bailun_sku
left join dc_base_sku_finance_category t6 on t6.bailuncategoryid=t5.bailun_category_id
left join dc_base_sku_finance_category t6 on t6.bailuncategoryid=t5.bailun_category_id
where tb.company_id=1 and tb.bailun_order_status!='Canceled' and tb.has_scalp=0 and tb.has_innersale=0 and tb.bailun_interception_status in ('None','Failed') and tb.platform_type='FBA' and tb.purchase_create_time>='{day.ToString("yyyy-MM-dd")}' and tb.purchase_create_time<'{day.AddMonths(1).ToString("yyyy-MM-dd")}'
where tb.company_id=1 and tb.bailun_order_status!='Canceled' and tb.has_scalp=0 and tb.has_innersale=0 and tb.bailun_interception_status in ('None','Failed') and tb.platform_type='FBA' and tb.purchase_create_time>='{day.ToString("yyyy-MM-dd")}' and tb.purchase_create_time<'{day.AddMonths(1).ToString("yyyy-MM-dd")}'
...
@@ -926,10 +926,10 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
...
@@ -926,10 +926,10 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
@@ -483,9 +483,10 @@ SUM(t1.cost_product * t1.quantity_shipped) AS total_amount_sales,COUNT(0) total_
...
@@ -483,9 +483,10 @@ SUM(t1.cost_product * t1.quantity_shipped) AS total_amount_sales,COUNT(0) total_
else
else
{
{
sql.Append(@"SELECT t1.platform_type, SUM(t1.amount_sales * t1.quantity_shipped) AS original_amount,
sql.Append(@"SELECT t1.platform_type, SUM(t1.amount_sales * t1.quantity_shipped) AS original_amount,
SUM(t1.amount_sales * t1.seller_order_exchange_rate * t1.quantity_shipped) AS total_amount_sales,COUNT(0)AS total_order FROM dc_month_sales_profit_orderdetail AS t1 ");
SUM(t1.amount_sales * (IFNULL(t3.exchange_rate,t1.seller_order_exchange_rate)) * t1.quantity_shipped) AS total_amount_sales,COUNT(0)AS total_order FROM dc_month_sales_profit_orderdetail AS t1 ");
}
}
sql.Append("INNER JOIN dc_base_oms_sku AS t2 ON t1.orderskuid = t2.id ");
sql.Append("INNER JOIN dc_base_oms_sku AS t2 ON t1.orderskuid = t2.id ");
sql.Append("LEFT JOIN dc_exchange_rate_finance t3 ON t1.order_currency = t3.`code` and t1.`month` = t3.`month` ");
{text: '今周',onClick:function(picker) {var date = new Date();picker.$emit('pick', [new Date(date.setDate(date.getDate()-date.getDay()+1)),new Date(date.setDate(date.getDate()-date.getDay()+7))])}},
{text: '今月',onClick:function(picker) {var date = new Date();picker.$emit('pick', [new Date(date.setDate(1)),new Date(date.setMonth(date.getMonth() + 1) - (24 * 60 * 60 * 1000))])}},
{text: '上周',onClick:function(picker) {var date = new Date();picker.$emit('pick', [new Date(date.setDate(date.getDate()-date.getDay()+1-7)),new Date(date.setDate(date.getDate()-date.getDay()+7))])}},