🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 通过门店查 ~~~[api] post:/statistics/sales string:begin=2018-10-10#筛选开始时间 string:end=2018-11-11#筛选结束时间 int:order=1,2,3,4,5,6#1->订单数,2->销售商品,3->客单价,4->销售额,5->复购 排序 <<< success { "code": 0, "info": "成功", "data":[ {"id": 0, "shop_name": "全部门店", "orderNum": 4, "goodsNum": 6, "salesNum": 9092,…}, {"id": 2, "shop_name": "京东店", "orderNum": 2, "goodsNum": 2, "salesNum": 8890,…}, {"id": 1, "shop_name": "淘宝店", "orderNum": 2, "goodsNum": 4, "salesNum": 202,…}, {"id": 3, "shop_name": "东大街店", "orderNum": 0, "goodsNum": 0, "salesNum": 0,…} ] } <<< error ~~~ ## 通过员工 ~~~[api] post:/statistics/salesbyuser *int:shop_id=1#门店id,0是全部门店 string:begin=2018-10-10#筛选开始时间 string:end=2018-11-11#筛选结束时间 <<< success { "code": 0, "info": "成功", "data":[ { "id": 0, "user_name": "全部员工", "countList":{"orderNum": 2, "goodsNum": 2, "salesNum": 8890, "avgNum": 4445} }, { "id": 1002, "user_name": "王伟", "countList":{"orderNum": 2, "goodsNum": 2, "salesNum": 8890, "avgNum": 4445} } ] } <<< error ~~~ ## 通过单个员工 ~~~[api] post:/statistics/salesuser *int:user_id=1#员工id,0是全部员工 *int:shop_id=1#门店id string:begin=2018-10-10#筛选开始时间 string:end=2018-11-11#筛选结束时间 *int:page=默认值1#分页 *int:limit=默认值5#每页显示条数 <<< success { "code": 0, "info": "成功", "data":[ {"id": 0, "goods_name": "全部商品", "countList":{"salesNum": 2, "salesPrice": 202,…}, {"id": 1, "goods_name": "11", "countList":{"salesNum": 2, "salesPrice": 202,…} ] } <<< error ~~~ ##订单列表 ~~~[api] post:/statistics/saleslist *int:user_id=1#员工id *int:goods_id=1#商品id string:begin=2018-10-10#筛选开始时间 string:end=2018-11-11#筛选结束时间 *int:page=默认值1#分页 *int:limit=默认值5#每页显示条数 <<< success { "code": 0, "info": "成功", "data":{ "list":[ { "id": 10012, "user_id": 1000, "create_date": "2018-11-09", "create_time": "2018-11-09 13:26:35", "cancel_time": 0, "shop_id": 2, "count": 3, "price": "101.00", "price_actual": "100.50", "state": 1, "member_id": 439, "evaluation": "11", "score": 1, "evaluation_time": 1541834369, "order_id": 10012, "goods_id": 1, "detail_price": "0.00", "detail_count": 2, "detail_state": 0, "goods_name": "11", "user":{"id": 1000, "name": "老板", "code": "", "token": "",…}, "member":{"id": 439, "phone": "13566663333", "member_name": "ww", "member_card": 123123,…} } ] } } <<< error ~~~