销售汇总报表
统计数据
curl -i http://example.com/api/reports/sale_summaries.json?dimension_type=customer&start_date=2022-04-04&end_date=2022-04-10&chart_order_field=sale_out_amount&chart_order=desc&order_field=sale_out_amount&order=desc
{
"status": {
"code": 200
"message": "OK"
},
"reports": {
"customer_name": "customer",
"customer_number": "5000",
"customer_type": "一级客户",
"dimension_id": "321.00",
"product_attr_hroup_count": "1500",
"sale_gross_profit": "320",
"sale_in_amount": "500.00",
"sale_in_cost": "1500.00"
"sale_in_product_base_quantity": "1500.00"
"sale_in_tax_amount": "1500.00"
"sale_out_amount": "1500.00"
"sale_out_cost": "1500.00"
"sale_out_count": "1500.00"
"sale_out_gross_profit": "1500.00"
"sale_out_product_base_quantity": "1500.00"
"sale_out_tax_amount": "1500.00"
"sale_product_total_base_quantity": "1500.00"
"sale_total_amount": "1500.00"
"sale_total_tax_amount": "1500.00"
}
"total_summaries": {
"sale_gross_profit": "320",
"sale_in_amount": "500.00",
"sale_in_cost": "1500.00"
"sale_in_product_base_quantity": "1500.00"
"sale_in_tax_amount": "1500.00"
"sale_out_amount": "1500.00"
"sale_out_cost": "1500.00"
"sale_out_count": "1500.00"
"sale_out_gross_profit": "1500.00"
"sale_out_product_base_quantity": "1500.00"
"sale_out_tax_amount": "1500.00"
"sale_product_total_base_quantity": "1500.00"
"sale_total_amount": "1500.00"
"sale_total_tax_amount": "1500.00"
}
}
HTTP 请求
GET /api/reports/sale_summaries.json
请求参数
参数名 | 是否必填 | 默认值 | 说明 |
---|---|---|---|
dimension_type | 是 | product_attr_group | 销售汇总维度类型(product_attr_group, product, customer, seller, region) |
start_date | 是 | 默认本周一 | 开始日期 |
end_date | 是 | 默认本周日 | 截止日期 |
order_field | 是 | sale_total_amount | 排序字段(sale_total_amount, sale_product_total_base_quantit, sale_in_product_base_quantity, sale_product_total_base_quantity, sale_total_amount, sale_in_tax_amount, sale_out_tax_amount, sale_total_tax_amount, sale_out_cost, sale_in_cost, sale_out_gross_profit) |
order | 是 | desc | 排序方式 |
top_custom | 否 | 对地域统计默认值为3 | 对于销售地域统计汇总:自定义返回排行前几的统计 |
province_id | 是 | 按省份:by_province | 对于销售地域统计汇总:省份 |
city_id | 否 | 按城市:by_city | 对于销售地域统计汇总:城市 |
district_id | 否 | 按地区:by_district | 对于销售地域统计汇总:地区 |
- 返回字段说明
返回值字段 | 字段类型 | 说明 |
---|---|---|
product_attr_group_count | string | 产品项 |
sale_gross_profit | string | 销售毛利 |
sale_in_amount | string | 退货金额 |
sale_in_cost | string | 退货成本 |
sale_in_count | string | 退货单 |
sale_customer_count string | 客户合计 | |
sale_in_product_base_quantity | string | 退货基本数量 |
sale_in_tax_amount | string | 退货税价合计 |
sale_out_amount | string | 出库金额 |
sale_out_cost | string | 出库成本 |
sale_out_count | string | 出库单 |
sale_out_gross_profit | string | 出库毛利 |
sale_out_product_base_quantity | string | 出库基本数量 |
sale_out_tax_amount | string | 出库税价合计 |
sale_product_total_base_quantity | string | 基本数量合计(开启多单位时候对应的基本单位的数量,未开启时候跟数量一致) |
sale_total_amount | string | 金额合计 |
sale_total_tax_amount | string | 税价合计 |
文档更新时间: 2025-03-17 14:52 作者:张艳军