Skip to content

接口

接口

/admin/user --员工账号管理

接口名
    /admin/user
描述
    编辑员工的部门,角色,权限等信息
Method
    POST
请求
    id  O   int 用户id,传了该字段表示更新,否则表示创建新用户
    username    O   string  登录用户名
    password    O   string  密码
    role_id     O   int 角色id
    name        O   string  用户名
    telephone   O   string  用户电话
    email       O   string  邮件
    is_valid    O   int     是否激活用户
    page        O   int 页码
    num         O   int 数目
    limit_stations O  list   可见站点列表,例如:["T002"]
响应
    request
        {
            id: 567,
            username: test,
            role_id: 88,
            name:   小钟,
            is_valid: 1,
            limit_stations: ["T002"]
        }
    response
        {
          "data": {
            "88": {
              "limit_station": true,  #新增返回字段,是否限制站点可见
              "limit_station_list": [{
                name: "SZ-总仓-K10",
                id: "T002"
              }],    #新增字段,限制站点列表
              "email": "",
              "username": "xuqiang",
              "role_id": 212,
              "telephone": "13750043664",
              "name": "许强",
              "id": 88,
              "is_valid": 1
            },
          },
          "count": 26,
          "code": 0,
          "msg": "保存成功"
        }

/finance/order/update/arrival -- 订单到账

接口名
    /finance/order/update/arrival
描述
    修改订单、增加到账、或者改为未支付
Method
    GET
请求
    // session部分
    user            M   string      django user object
响应

示例
    request
        {
          "user_id": "28884",
          "order_id": "PL308426",
          "pay_status": 1,
          "real_pay": 187.05,
          "arrival_time": "2016-10-17",
          "arrival_channel": "民生对私(广州)",
          "arrival_account": "8825",
          "deal_code": "DDDDDDDDDDDDD",
          "remark": "dddd "
        }
    response
        {
          "code": 0,
          "data": null,
          "msg": "ok"
        }
逻辑
    公共逻辑 -- 见查询邀请码
    校验edit_settle、edit_chongzhang、add_chongzhang权限
    查询数据
        商户表 tbl_user
        订单支付表   tbl_order_deal
        订单表     order[mongo]
    已支付 -> 未支付
        取消到账记录 // 修改最新一条冲账记录    tbl_strike_balance
            balance += real_pay
            strike_money -= real_pay
        修改订单状态  order[mongo]
            status = 已签收
        删除order_deal记录   // 删除tbl_order_deal表中的对应记录
    未支付 -> 已支付
        查询到账表
        如果到账记录存在
            是当前订单的到账记录
                更新到账记录:主要是更新金额字段
                更新订单支付表:这一步看着好像没啥用、因为更新前后的记录值没有什么变化
                更新订单:状态修改为已支付
            不是当前订单的到账记录
                报错
        如果到账记录不存在
            撤销订单支付记录关联的原有到账记录的到账信息
            添加新的到账记录
            更新订单支付表
            更新订单表:状态改为已支付
    返回
remark

/custommanage/bill -- 商户对账单批量查询

接口名
    /custommanage/bill
Method
    POST
请求
    cityValue      M    int         城市代码
    saleEmployee   M    int         销售经理id
    saleBoss       M    int         销售上司id
    sid            O    int         sid
    name           O    string      姓名
    station        O    string      站点
    type           M    int         类型
响应
    code            M   int         错误码。0为成功、其他为错误。
    cout            M   int         统计数据
    data            M   int         返回信息

    --code=0时候有以下字段--

    ---会话更新字段---

    ---contact checksum字段---

    ---配置更新字段---

示例
    request
        http://0.0.0.0:8889/custommanage/bill

    response
        {
            "data":{
                    "56":{
                        "pay_method":2,
                        "payment_telephone":"18898591551",
                        "current_total":0,
                        "sale_employee_name":"梁桥平",
                        "current_lack":0,
                        "username":"18576766958",
                        "payment_name":"张家嘉",
                        "resname":"深企联接待处",
                        "boss_name":"观麦开放平台",
                        "KID":"K000095",
                        "consignee_name":"张家琪",
                        "early_lack":0,
                        "consignee_phone":"18898591551",
                        "sale_employee_id":668,
                        "district_code":"440300",
                        "district_name":"深圳市",
                        "SID":"S000056",
                        "addr_detail":"福田区新闻路侨福大厦12楼"
                    }
                },
            "code":0,
            "count":23966
        }
逻辑
    校验所有参数长度、与格式符合要求。
    获取用户权限区域和站点
    商品分类信息
    查询分类信息
    查询商户信息
    归类数据
    返回

/custommanage/ (GET) -- 商户管理首页查询 -- 已改写

接口名
    /custommanage/
描述
    商户管理首页查询
    只返回区域内的数据
Method
    GET
请求
    // session部分
    user            M   string      django user object
响应 // 影响是个模板、下面是变量
    area            M   dict        层级化的area
    station         M   dict        地区内stations
    district        M   list        地区列表
    create_employee M   dict        域内的员工
    sale_employee   M   dict        区域内的销售经理
    salemenu        M   dict        区域内的销售单
示例
    request
        http://localhost//custommanage/
    response    // 下面只列出模板里的变量值
逻辑
    公共逻辑 -- 见查询邀请码
    校验view_customer权限
    查询
    返回

/custommanage/list (GET) -- 商户管理-店铺查询 - --已改写

接口名
    /custommanage/list
描述
    商户管理页面、按照条件查询商户
    绑定本group下的报价单即为本group的商户
Method
    GET
请求
    firstMenu       O   bigint      一级标签
    secondMenu      O   bigint      二级标签
    stationMenu     O   string      站点id
    num             O   int         返回数据量
    page            O   int         页数
    check_out       O   int         审核状态
    city            O   int         城市district_code
    crtManeger      O               开户经理
    saleManager     O               销售经理
    salemenu        O               销售单id
    pay_method      O   int         结算周期
    settle_way      O   int         结款方式
    search_text     O   str         搜索关键字
    customer_type   O   int         商户类型(1:店铺,2:个人)
    address_label_idO   int         商户标签(无:-1)
    export          O               是否导出excel(1为导出)
响应
    code            M   int         返回码、0:成功、其他:失败。
    count           M   int         返回商户数量
    data            M   list        商户信息
        KID                         M   str         商户账户id(user_id)
        cname                       M   str         公司名
        SID                         M   str         商户id(address_id)
        create_time                 M   str         商户注册日期
        username                    M   str         登录账号
        resname                     M   str         店铺名
        settle_way                  M   int         结款方式
        pay_method                  M   int         结算周期
        city                        M   str         城市名
        area_l1                     M   str         一级区域     
        area_l2                     M   str         二级区域
        addr_detail                 M   str         店铺地址
        name                        M   str         店铺联系人
        telephone                   M   str         电话
        create_employee_name        M   str         开户经理
        create_employee_phone       M   str         开户经理电话
        sales_employee_name         M   str         销售经理 
        sales_employee_phone        M   str         销售经理电话
        whitelist                   M   int         是否白名单
        balance                     M   float       余额
        service_station             M   str         从属站点列表
        address_label               M   str/None    商户标签
        customer_type               M   int         商户类型(1:店铺,2:个人)
        point                       M   int         积分
示例
    {
          "code": 0,
          "data": [{
                "check_out": 1,
                "user_id": 73655,
                "address_label": null,
                "create_time": "2019-08-19",
                "KID": "K073655",
                "customer_type": 1,
                "cname": "商户1",
                "create_employee_phone": "--",
                "resname": "1",
                "telephone": "134",
                "pay_method": "周结",
                "sales_employee_phone": "--",
                "addr_detail": "123",
                "settle_way": "先货后款",
                "create_employee_name": "--",
                "finance_status": 0,
                "whitelist": 1,
                "keycustomer": 0,
                "area_l2": "下沙村",
                "city": "东莞市",
                "area_l1": "石排镇",
                "sales_employee_name": "(待定)",
                "service_station": ["喵喵总仓"],
                "username": "mmsh01",
                "point": 0,
                "balance": 6885.93,
                "name": "测试删除",
                "SID": "S281196"
          }],
          "count": 1
    }

/custommanage/restaurant/add 新建店铺 --已改写

描述
    新建单个店铺
Method
    POST
请求
    kid                O          str       user_id
    username           O          str       用户名
    password           O          str       密码
    payer_name         O          str       结算人
    payer_telephone    O          str       结算电话
    telephone          O          str       手机号
    pay_method         O          int       结算周期
    settle_way         O          int       结款方式
    finance_status     O          int       
    whitelist          O          int       是否白名单
    company_name       O          str       公司名
    restaurant_name    M          str       店铺名称
    receiver_name      M          str       收货人
    receiver_telephone M          str       收货电话
    district_code      M          str       城市code
    area_level1        M          int       一级地址id
    area_level2        M          int       二级地址id
    restaurant_address M          str       店铺地址
    create_employee_id O          str       开户经理id
    sale_employee_id   O          str       销售经理id
    salemenu_ids       O          list      报价单
    check_out          O          bool      审核状态
    is_credit          O          int       是否授信
    credit_limit       O          float     授信额度
    lat                O          float     纬度  
    lng                O          float     经度
    map_address        O          str       地图地址
    settle_date_type   O          int       结款方式
    address_label_id   O          int       商户标签id
响应
    {
        code:0      M           int             0为成功,其他为失败
        msg:"ok"    M           str             错误提示信息
        data:{      M           dict            响应信息容器
            "SID": S124422      M       str     商户id
        }     
    }

/custommanage/get --单个商户详情

接口名
    /custommanage/get   
描述
    单个商户详情信息
Method
    GET
请求
    id     M     str      商户id(address_id)
    示例:
    id: S23442
响应
    {
        code:0      M           int             0为成功,其他为失败
        msg:"ok"    M           str             错误提示信息
        data:{}     M           dict            响应信息容器
    }
    示例:
    data: {
        area: {
            "2120100000000": {
                        "name": "芙蓉区",
                        "child": [{
                            "2120100100000": "湘湖街道"
                            }, {
                            "2120100200000": "定王台街道"
                            },]
                    },
                },
        city: {
            "430100": {
                        "name": "长沙市",
                        "area": {
                            "2120100000000": {
                                    "name": "芙蓉区",
                                    "street": [{
                                        "2120100100000": "湘湖街道"
                                    }, {
                                          "2120100200000": "定王台街道"
                                    }]
                               },
                           },
                       },
        create_employee: {
            "1912": {
                        "name": "去采购管理员",
                        "district_code": null
                  },
                  "3688": {
                        "name": "肖一",
                        "district_code": null
                  }
        },
        data: {
            "check_out": 0,
                  "create_employee_id": 0,
                  "area_l1_code": "430100",
                  "endtime": null,
                  "telephone": "",
                  "SID": "S217837",
                  "is_credit": 0,
                  "cname": "",
                  "begintime": null,
                  "city": "长沙市",
                  "customer_type": 1,
                  "settle_date_type": 1,
                  "credit_limit": 0.0,
                  "settle_way": 1,
                  "create_employee_name": "--",
                  "available_credit": 0.0,
                  "keycustomer": 0,
                  "area_l2_id": "2120200100000",
                  "receivephone": "2312",
                  "sales_employee_name": "(待定)",
                  "finance_status": 0,
                  "map_address": "",
                  "bill_receiver": null,
                  "bill_address": null,
                  "area_l2_code": "430100",
                  "settle_day": null,
                  "area_detail": "2312312",
                  "receiveperson": "2312",
                  "district_code": "430100",
                  "begin_day": null,
                  "payment_name": "test",
                  "payment_telephone": "123456789",
                  "salemenus": [{
                        "service_station_name": "[去采购报价单] 分仓一",
                        "restaurant_id": 217837,
                        "msg": "",
                        "freight_id": "Y000001",
                        "id": 402492,
                        "service_station_id": "T7453",
                        "salemenu_id": "S12222",
                        "station_id": "T7453",
                        "salemenu_name": "【预售】蔬菜报价单"
                  }],
                 "pay_method": 1,
                 "settle_remind": -1,
                 "area_l1_id": "2120200000000",
                 "resname": "234213",
                 "username": "csd996",
                 "KID": "K189021",
                 "effective_date": "2019-02-17",
                 "area_l2": "坡子街街道",
                 "sales_employee_id": -1,
                 "lat": 0.0,
                 "is_whitelist": 0,
                 "area_l1": "天心区"
        },
        sale_employee: {
            "1912": {
                        "name": "去采购管理员",
                        "district_code": null
                  },
                  "3688": {
                        "name": "肖一",
                        "district_code": null
                  }
        },
        stations_salemenu: {
            "T7453": {
                        "name": "[去采购报价单] 分仓一",
                        "salemenu": [{
                              "salemenu_id": "S13146",
                              "salemenu_name": "自售单---不许删-[去采购报价单] 分仓一"
                        }, {
                              "salemenu_id": "S12222",
                              "salemenu_name": "【预售】蔬菜报价单"
                        }],
                "distribute_city_ids": ["440300", "430100"],
                "district_code": "440300",
                "key_url": "qcg"
            }
        },
        timereceive: {}
    }

/custommanage/edit 编辑单个商户 -- 已改写


/management/sales_report/search (GET)--销售报表

接口名
    /management/sales_report/search
描述
    销售报表
Method
    GET
请求
    search_date_type          M          int          搜索日期类型 1:下单日期 2:收货日期
    begin_date                M          datetime     搜索日期区间头
    end_date                  M          datetime     搜索日期区间尾
    sale_employee_ids         O          list         搜索的销售经理的id列表
    export                    M          bool         是否导出
    page_obj                  O          str
    reverse                   O          bool
    limit                     M          int
    sort_type                 O          str          默认按销售业排序
    sort_desc                 O          bool         排序是否逆序, 不传或者false为正序, true为逆序, 须配合 sort_type 使用
    示例:
    search_date_type: 1
    begin_date: 2019-07-03
    end_date: 2019-08-02
    limit: 10
    export: 0
    sale_employee_ids: [1,2]
    sort_type: total_pay_without_freight
    sort_desc: 1
响应
    {
        code:0      M           int             0为成功,其他为失败
        msg:"ok"    M           str             错误提示信息
        data:[]     M           list            响应信息容器
        pagination  M           dict            
    }
    示例:
    sale_employee_id              M    int     销售经理id
    sale_employee_username        M    str     销售经理账号
    sale_employee_name            M    str     销售经理名称
    order_address_num             M    int     下单商户数
    order_num                     M    int     下单商户数
    money_per_address             M    float   客单价
    money_per_order               M    float   笔单价
    total_price                   M    float   下单金额
    total_pay_without_freight     M    float   销售额(不含运费)
    new_address_num               M    int     新注册商户数
    all_address_num               M    int     总商户数
    data: [{
            "sale_employee_id": 1912,
            "sale_employee_name": "去采购管理员",
            "total_pay_without_freight": 0,
            "sale_employee_username": "qucaigou",
            "new_address_num": 1,
            "all_address_num": 14,
            "order_num": 0,
            "money_per_order": 0,
            "money_per_address": 0,
            "total_price": 0,
            "order_address_num": 0
    },...]
    pagination: {
        more: False
        page_obj: "1912|1912|0|0"
    }

/management/sales_report/detail (GET)--销售报表详情

接口名
    /management/sales_report/detail
描述
    销售报表详情
method
    GET
请求
    search_date_type M int  搜索日期类型 1:下单日期 2:收货日期
    begin_date       M date 搜索日期区间头
    end_date         M date 搜索日期区间尾
    sale_employee_id M int 搜索的销售经理的id
响应
    表示示例:
            orders M list[{
                order_id                    M      str     订单号 
                address_id                  M      int     商户id 
                address_name                M      str     商户名 
                settle_way                  M      int     结款方式( 1: 先货后款 2: 先款后货) 
                real_pay                    M      int     实付金额 
                total_pay_without_freight   M      int     销售额(不包含运费)
                total_price                 M      int     下单金额 
                refund_amount               M      int     已退金额 
                paid_amount                 M      int     已付金额 
                pay_status                  M      int     支付状态 1: 未支付 5: 部分支付 10: 已支付 15: 超时关闭               
                status                      M      int     订单状态 - 1 - 订单已删除,1 - 等待出库,5 - 正在分拣,10 - 正在配送,15 - 已签收,100 - 已支付 
                date_time                   M      datetime下单时间 
                receive_begin_time          M      datetime收货时间 
                sale_employee_name          M      str     销售经理名称 
                sale_employee_id            M      int     销售经理id 
                station_id                  M      str     
                station_name                M      str     
                skus M list[{                            
                    sku_id                  M      str     
                    sku_name                M      str     
                    spu_id                  M      str     
                    spu_name                M      str     
                    is_out_stock            M      bool    是否缺货 
                    abnormal_money          M      int     异常金额 
                    abnormal_quantity       M      int     异常数 
                    accept_std_count        M      int     记账数( 基本单位) 
                    category_id_1           M      str 
                    category_id_1_name      M      str 
                    category_id_2           M      str 
                    category_id_2_name      M      str 
                    pinlei_id               M      str 
                    pinlei_name             M      str 
                    cost                    M      int     单位出库成本( 基本单位) 
                    quantity                M      int     下单数量( 包含损耗) 
                    real_quantity           M      int     出库数( 销售单位) 
                    real_refund_amount      M      int     退货数量( 销售单价) 
                    real_refund_money       M      int     退货金额 
                    real_std_count          M      float   出库数( 基本单位) 
                    sale_price              M      int     销售单价 
                    sale_unit_name          M      str     销售单位 
                    sale_ratio              M      float   基本单位和销售单位的转换规格 
                    std_sale_price          M      int     基本单价 
                    std_unit_name           M      str     基本单位 
                    tax                     M      int     税额, 单位分
                    },
                ...
                ],
            no_order_addresses M list[{
                address_id                  M      str     商户ID 
                address_name                M      str     商户名称 
                register_time               M      datetime注册时间 
                fist_order_time             M      datetime首次下单时间 
                last_order_time             M      datetime最近订单下单时间 
                payment_name                M      str     结款联系人 
                payment_telephone           M      str     电话
                },
                ...
                ],
            order_addresses M list[{
                address_id                  M      int     商户id 
                address_name                M      str     商户名 
                register_time               M      datetime注册时间 
                fist_order_time             M      datetime首次下单时间 
                last_order_time             M      datetime最近订单下单时间
                },
                ...
                ]
    实际示例:
    {
        "code": 0,
        "msg": "ok",
        "data":[{
            "no_order_addresses": [{
                      "fist_order_time": "2019-05-24T18:21:30",
                      "payment_name": "aaa",
                      "address_name": "aaa",
                      "register_time": "2019-04-24T18:07:46",
                      "address_id": 208002,
                      "payment_telephone": "111111111",
                      "last_order_time": "2019-05-24T18:21:30"
                    },
                    ...
                ],
                "new_address_num": 0,
                "order_address": [{
                      "fist_order_time": "2018-09-19T15:46:59",
                      "address_id": 134574,
                      "address_name": "五店分店||",
                      "register_time": "2018-10-17T10:55:30",
                      "last_order_time": "2019-08-05T11:53:48"
                }],
                "all_address_num": 18,
                "orders": [{
                      "order_id": "PL7746747",
                      "station_id": "T7442",
                      "address_name": "五店分店||",
                      "refund_amount": 0,
                      "address_id": "134574",
                      "total_price": 75888.0,
                      "pay_status": 1,
                      "paid_amount": 0,
                      "sales_employee_name": "去采购管理员",
                      "station_name": "[去采购报价单] 总仓",
                      "settle_way": 1,
                      "status": 5,
                      "total_pay_without_freight": 75888.0,
                      "receive_begin_time": "2019-08-06 09:30",
                      "date_time": "2019-08-05 11:41:19",
                      "real_pay": 0,
                      "sale_employee_id": 1912
                      "skus": [{
                            "pinlei_name": "芹菜",
                            "accept_std_count": 7.52,
                            "sku_id": "D9798453",
                            "abnormal_quantity": 0,
                            "std_sale_price": 951.0,
                            "category_id_1_name": "蔬菜",
                            "sale_price": 951.0,
                            "sale_unit_name": "斤",
                            "category_id_2_name": "叶菜",
                            "category_id_1": "A3772",
                            "sku_name": "圆叶菠|斤",
                            "spu_name": "圆叶菠",
                            "spu_id": "C847637",
                            "real_std_count": 7.52,
                            "pinlei_id": "P354275",
                            "real_refund_amount": 0,
                            "tax": 0.0,
                            "quantity": 7.52,
                            "category_id_2": "B18242",
                            "real_refund_money": 0.0,
                            "abnormal_money": 0,
                            "std_unit_name": "斤",
                            "real_quantity": 7.52,
                            "sale_ratio": 1.0,
                            "cost": 0
                          },
                          ...
        },
        ...
        ]
   }

/custommanage/report (GET) -- 销售报表,按站点统计

接口名
    /management/report
描述
    获取基本信息
Method
    GET
请求
    无
响应
    示例:
    category       M       dict      
    district       M       list       可用城市列表
    sale_employee  M       dict       销售经理信息
    station        M       dict       

    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{},                M       dict            返回数据容器
        msg:"ok",               M       str             错误提示信息
    }
    具体示例:
    data: {
        "station": {
                  "T7442": {
                        "distribute_cities": ["440300"],
                        "name": "[去采购报价单] 总仓",
                        "_id": "T7442",
                        "district_code": "440300"
                  },
              ...
              },
              "district": [{
                  "code": "430100",
                  "name": "长沙市"
                },
             ...
             ],
             "sale_employee": {
                   "1912": {
                         "district_code": null,
                         "name": "去采购管理员"
                   },
               ...
               },
               "category": {
                   "A14062": "水发菜",
                   "A14069": "调味品",
                   "A14074": "南北干货",
                   ...
                   }
    }

/custommanage/report (POST) -- 销售报表,按站点统计

接口名
    /custommanage/report
描述          
    查询站点统计信息
Method
    POST
请求
    beginTime       M       str       起始时间
    endTime         M       str       结束时间
    saleEmployee    M       str       销售经理id
    station         M       str      
    export          M       str       是否导出,"1"为导出
    req_type        M       str     
    示例:
响应
   {
        code:0,                 M       int             0为成功, 其它为失败
        data:{},                M       dict            返回数据容器
    }
    示例:
    customer_new          O       dict        
        category_item     O       dict        
            A3978         O       int
            ...
        customer_num      O       int         
        order_num         O       int         订单数量
        price             O       int         金额
    customer_num          O       int         商户总数
    new_register_customer O       int         新注册商户总数
    customer_total        O       dict       
        category_item     O       dict
            A3978         O       int
            ...
        customer_num      O       int          
        order_num         O       int          订单数量
        price             O       int          金额
    data: {
       T7936: {
           customer_new: {
               category_item: {
                   A3978: 100,
                   A6834: 0,
                   A7661: 0,
                   A7662: 0,
                   A7663: 0,
                   ..
               },
               customer_num: 2,
               order_num: 2,
               price: 200
           },
           customer_num: 93,
           customer_total: {
               category_item: {
                   A3978: 100,
                   A6834: 0,
                   A7661: 0,
                   A7662: 0,
                   A7663: 0,
                   ..
               },
               customer_num: 2,
               order_num: 2,
               price: 200
           },
           new_register_customer: 9
       }
    }

/custommanage/report/detail (GET) -- 销售报表详情

接口名
    /management/report/detail
描述
    销售报表详情
Method
    GET
请求
    bt                 M       str        起始时间
    et                 M       str        结束时间
    id                 O       int        站点id
    statistics_type    
    export             O       str        是否导出,"1"为导出
    kind               O       str        
    示例
    TODO
响应
    beginTime           M       str        起始时间
    endTime             M       str        结束时间
    type                M       str
    categoryInfo        M       dict
        A3978           M       str
        ...
    customerInfo        M       dict
        267823          M       dict       商户信息字典
            SID         M       str        商户id
            coupon_amount    M    int 
            first_order_time M    str      第一次下单时间
            order_num   M       str        订单数量
            resname     M       str        店铺名称
            total_price M       int        总金额
            item        M       dict
                A20577  M       int
    noOrderCustomerInfo M       list
    {
        SID                  M          str         商户id
        coupon_amount        M          int
        last_order_id        
        last_order_pay
        last_order_time
        payment_name         M          str         付款人
        payment_telephone    M          str         付款电话
        resname              M          str         店铺名称
    },...
    saleEmployeeInfo    M       dict
        coupon_amount        M
        customer_num
        order_num
        price
        station_id
        station_name
    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{},                M       dict            返回数据容器
        msg:"ok",               M       str             错误提示信息
    }
    详情示例
    data: {
        beginTime: "2019-08-01 00:00",
        categoryInfo: {
            A7663: "调味制品", 
            A7666: "蔬果类", 
            A6834: "水果"
            …}
        customerInfo: {
            267823: {
                total_price: 100, 
                item: {
                    A20577: 100
                    }, 
                 SID: "S267823", 
                 coupon_amount: 0, 
                 order_num: 1,…}
            ,…}
        endTime: "2019-08-08 23:59"
        noOrderCustomerInfo: [{
            last_order_pay: 0, 
            last_order_id: null, 
            last_order_time: null, 
            payment_telephone: "123123",
            …},…]
        saleEmployeeInfo: {
            station_id: "T7936", 
            station_name: "喵喵总仓", 
            price: 200, 
            coupon_amount: 0, 
            order_num: 2,…}
        type: "1"
    }

/management/code (GET) -- 生成code码

接口名
    /management/code
描述
    进入生成邀请码页面显示信息
Method
    GET
请求
    // session部分
    user                         M   string      django user object
响应
    code_list                    M   dict        
        S6436                    M   list        对应报价单的邀请码
            code                 M   str         邀请码
            status               M   int
    fixed_code                   M   list        
        cms_key                  M   str
        code                     M   str
        customer_regist_type     M   int         商户可选注册类型(1店铺,2个人,3店铺+个人)
        salemenu_id              M   str         报价单id
    newest_fixed_code            M   dict   
        cms_key                  M   str
        code                     M   str
        customer_regist_type     M   int         商户可选注册类型(1店铺,2个人,3店铺+个人)
        salemenu_id              M   str         报价单id
    station                      M   dict        所有站点信息dict
        T7442                    M   dict        站点信息dict
            distribute_city_ids  M   list        可用城市codes
            district_code        M   str         站点所属城市
            key_url              M   str         
            name                 M   str         站点名字
            salemenu             M   list        所有报价单信息
                salemenu_id      M   str         报价单id
                salemenu_name    M   str         报价单名字
    示例
    {
        code:0,                 M       int             0为成功, 其它为失败
        msg:"ok",               M       str             错误提示信息
        data:{},                M       dict            返回数据容器
    }
    data: {
        "code_list": {
                  "S7824": [{
                        "code": "QJR7W72",
                        "status": 0
                  }],
              ...
        },
        "newest_fixed_code": {
                  "code": "QJR7W72",
                  "salemenu_id": "S7824",
                  "customer_regist_type": 3,
                  "cms_key": "qcg"
            },
            "fixed_code": [{
                  "code": "QJR7W72",
                  "salemenu_id": "S7824",
                  "customer_regist_type": 3,
                  "cms_key": "qcg"
            }],
            "station": {
                "T7442": {
                        "name": "[去采购报价单] 总仓",
                        "district_code": "440300",
                        "key_url": "qcg",
                        "salemenu": [{
                              "salemenu_name": "去采购鱼类报价单",
                              "salemenu_id": "S11678"
                        },...]
            },...
        }
    }

/management/code (POST) -- 生成code码

接口名
    /management/code
描述
    生成code码按钮点击调取接口
Method
    POST
请求
    salemenu       O       str        报价单id
    station        O       str        站点id
    code           O       str 
    is_fixed_code  O       bool       邀请码类型
    force          O       bool
响应
    {
        code:0,       M       int        0为成功, 其它为失败
        msg:"ok",     M       str        错误提示信息
        code_list:{}  M       dict       邀请码信息             
    }
    code              M       str        邀请码
    status            M       int        
    示例
    code_list: {
        S11678: [{
            code: "N6N7R61",
            status: 0
        },...
        ],...
    }

/ordermanage/order_new/search (GET)搜索订单

接口名
    ordermanage/order_new/search
描述
   搜索订单
Method
    GET
请求
    start_date          string          M           起始日期
    end_date            string          M           结束日期(最长2个月)
    search_text         string          O           搜索字符
    station_id          string          O           搜索站点ID
    salemenu_id         string          O           报价单ID
    search_area         string          O           地理位置信息(格式: 城市_区域_街道)
    order_status        int             O           订单状态(1:等待出库, 5:正在分拣, 10:正在配送, 15:已签收, 100:已支付, 不传拉除删除外的所有状态)
    carrier_id          int             O           承运商ID
    driver_id           int             O           司机ID
    is_exception        int             O           是否异常(0: 否, 1: 是, 不传都拉)
    limit               int             O           条数(默认20)
    offset              int             O           偏移量
    address_label_Id    int             O           商户标签id
响应
   {
        "code": 0,
        "msg": "ok",
        "data": {
            "in_query": false,                         bool        M           搜出的订单是否在搜索条件里
            "orders": [{
                "order_id": "PL123456",                string      M           订单ID
                "order_time": "2019-04-26 12:00:00",   string      M           下单时间
                "customer": {
                    "address_id": "11441",             string      M           商户ID
                    "resname": "商户名",                string      M           商户名
                    "uid": "73232",                    string      M           账户号
                    "username": "测试",                 string      M           账号
                    "address_label": "SVIP"            string      M           商户标签
                },
                "station_name": "去采购",               string      M           站点名
                "station_receiver_name": "tony",       string      M           站点联系人
                "station_receiver_phone": "110",       string      M           站点联系人电话
                "driver_name": "cxk",                  string      M           司机名
                "order_status": 1,                     int         M           订单状态(1:等待出库, 5:正在分拣, 10:正在配送, 15:已签收, 100:已支付)
                "pay_status": 1,                       int         M           支付状态(1:未支付 5:部分支付 10:已支付)
                "pay_method": 1,                       int         M           付款方式(1:到付, 2:线上支付)
                "area": "南山-蛇口"                     string      M           地理标签star
                "refunds": [{                          array       M           退货信息
                    "id": 12122,                       int         O           退货ID
                    "type_id": 1,                      int         O           退货类型ID
                    "type_text": "未按用户时间到达",      string      O           退货原因
                    "request_amount": 3,               float       O           退货数
                    "text": "123",                     string      O           描述
                    "real_amount": 1.00,               float       O           实退数
                    "state": 2                         int         O           退货状态(1: 待安排, 2:取货中, 3:已取货, 4:已入库, 5:已退货)(状态为4的不能修改)
                }, ...]
          }, ...],
      "pagination": {
          "page_obj": "123",
          "more": False,                              
       }
   },
}

/ordermanage/get -- 售后订单详情

接口名
    ordermanage/get
描述
    每日订单首页信息
Method
    GET
请求
    id       M       str        订单id
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        msg:"ok",               M       str             错误提示信息
        data:{},                M       dict            返回数据容器
    }
    base_info                      M           dict           
        department                 M           list
        driver                     M           list          司机列表
            id                     M           int           司机id
            name                   M           str           司机名称
            station_id             M           str           站点id
            station_name           M           str           站点名字
        nosku_exception_reason     M           dict          非sku异常原因
        nosku_exception_solution   M           dict          非sku解决办法
        order_remark_type          M           dict          
        refund_solution            M           dict
        sku_exception_reason       M           dict          sku异常原因
        sku_exception_solution     M           dict          sku解决方法
        station                    M           list          station信息
            role                   M           int
            name                   M           str           站点名称
            _id                    M           str           站点id
    edit_permission                M           bool          
    order_info                     M           dict          订单信息
        coupon_amount              M           int           
        date_time                  M           str
        district_code              M           str           城市code
        freight                    M           int           运费
        order_tax                  M           int
        origin_total_price         M           str
        real_price                 M           int              
        station_id                 M           str           站点id
        station_name               M           str           站点名称
        station_receiver_name      M           str
        station_receiver_phone     M           str
        status                     M           int
        total_pay                  M           int
        total_price                M           int
        _id                        M           str            订单id
        customer                   M           dict           下单商户信息
            address                M           str            收货地址
            address_id             M           str            商户id
            address_sign_id        M           str            二级地址id
            area                   M           str            
            area_id                M           int            二级地址id
            employee_id            M           int/None       销售经理id
            employee_name          M           str/None       销售经理名称
            employee_phone         M           str/None       销售经理电话
            extender               M           str 
            pay_method             M           int            借款方式
            pick_up_st_id          M           int            自提点id
            receive_begin_time     M           str            收货起始时间
            receive_end_time       M           str            收货结束时间
            receive_way            M           int            收货方式(1为配送,2为自提)
            receiver_name          M           str            收货人
            receiver_phone         M           str            收货人电话
            resname                M           str            店铺名称
            sales_employee_id      M           str/None       销售经理id
            supply_station_id      M           str            供应商id
            uid                    M           str            用户id
        details                    M           list           商品详情
            accept_quantity        M           int            
            attrition_rate         M           int
            clean_food             M           bool
            fake_item_price        M           int
            id                     M           str            
            is_exception_overdue   M           bool 
            is_price_timing        M           bool
            is_refund_overdue      M           bool
            name                   M           str
            origin_item_price      M           int
            origin_sale_price      M           int
            purchase_quantity      M           int
            quantity               M           int
            real_is_weight         M           bool
            real_item_price        M           int
            real_quantity          M           int
            sale_price             M           int
            sale_unit_name         M           str
            salemenu_id            M           str            报价单id
            search_text            M           list
            sort_station_ids       M           list
            sorting_saleunit_weighting_quantity     M       float
            spu_remark             M           str
            supply_station_id      M           str            供应商id
            sync_origin            M           str
            tax_rate               M           int
            total_item_pay         M           int
            total_item_price       M           int
            version                M           int
            weighting_quantity     M           int
            material               M           list
                accept_std_count   M           int
                real_std_count     M           int
                sale_ratio         M           int
                spu_id             M           str
                std_sale_price     M           int
                std_unit_name      M           str
    token                          M           int
    示例:
    "data": {
            "edit_permission": true,
            "token": "2591937994587974166",
            "order_info": {
                  "real_price": 3300.0,
                  "coupon_amount": 0.0,
                  "customer": {
                        "pay_method": 1,
                        "employee_name": null,
                        "address_sign_id": "30400400000",
                        "address": "11",
                        "sales_employee_id": null,
                        "uid": "189929",
                        "receiver_phone": "1111111121",
                        "employee_phone": null,
                       "extender": "{\"order_pay_method\": 2, \"resname\":\"\\u56de\\u5934\\u5ba2(\\u6c99\\u4e95\\u70b9\\u6865\\u5934)\"}",
                       "receive_begin_time": "2019-08-13 20:00",
                       "resname": "回头客(沙井点桥头)",
                       "receiver_name": "11111111111111111112",
                       "receive_end_time": "2019-08-13 23:30",
                       "receive_way": 1,
                       "supply_station_id": "",
                       "address_id": 177056,
                       "employee_id": null,
                       "pick_up_st_id": 0,
                       "area": "宝安区-沙井",
                       "area_id": 30400400000
                  },
                  "station_name": "先进先出01",
                  "status": 5,
                  "district_code": "440300",
                  "order_tax": 0.0,
                  "origin_total_price": 3300.0,
                  "date_time": "2019-08-12T11:29:43",
                  "station_receiver_phone": "15886534577",
                  "station_receiver_name": "xjxc01",
                  "details": [{
                        "is_price_timing": false,
                        "spu_remark": "",
                        "origin_item_price": 3300.0,
                        "material": [{
                              "sale_ratio": 1.0,
                              "std_sale_price": 300.0,
                              "accept_std_count": 11.0,
                              "std_unit_name": "斤",
                              "spu_id": "C1176202",
                              "real_std_count": 11.0
                        }],
                        "is_refund_overdue": false,
                        "name": "广东白菜",
                        "supply_station_name": "[先进先出] 蔬菜供应商yy",
                        "attrition_rate": 0.0,
                        "real_quantity": 11.0,
                        "real_item_price": 3300.0,
                        "accept_quantity": 11.0,
                        "fake_item_price": 3300.0,
                        "id": "D8991187",
                        "real_is_weight": true,
                        "sorting_saleunit_weighting_quantity": 11.0,
                        "search_text": ["GUANGDONGBAICAI", "GDBC", "广东白菜", null, "GUANGDONGBAICAI", "GDBC", "广东白菜"],
                       "version": 4,
                       "clean_food": false,
                       "weighting_quantity": 0,
                       "total_item_pay": 3300.0,
                       "origin_sale_price": 300,
                       "sort_station_ids": [],
                       "sync_origin": "D8991187",
                       "origins": [],
                       "supply_station_id": "T10006",
                       "quantity": 11.0,
                       "salemenu_id": "S13813",
                       "sale_unit_name": "斤",
                       "total_item_price": 3300.0,
                       "sale_price": 300.0,
                       "is_exception_overdue": false,
                       "purchase_quantity": 11.0,
                       "tax_rate": 0
                 }],
                 "total_pay": 3300.0,
                 "station_id": "T10001",
                 "total_price": 3300.0,
                 "freight": 0.0,
                 "_id": "PL7889041"
           },
        "base_info": {
            "driver": [{
                "station_id": "T10001",
                "id": 2047,
                "name": "liki",
                "station_name": "公司司机"
            },...],
            "department": [],
            "nosku_exception_reason": {
                "64": "补贴",
                "65": "付款问题",
                "67": "迟到",
                "15": "其它",
                "177": "需要备注",
                "178": "客户需要发票",
                "179": "逾期异常",
                "180": "系统问题",
                "182": "商品异常(需补货)",
                "183": "加单补单",
                "154": "采购问题",
                "188": "抹零",
                "190": "退菜筐押金"
            },
            "sku_exception_reason": {
                "1": "未按用户时间到达",
                "5": "漏单",
                "6": "送错货品",
                "7": "下错单",
                "8": "需要备注",
                "10": "斤两不对(用户发现)",
                "12": "质量问题",
                "176": "无法送达",
                "17": "规格问题",
                "22": "司机弄丢/弄坏",
                "153": "采购问题",
                "25": "市场缺货(未出库)",
                "27": "系统问题",
                "61": "其它"
            },
            "sku_exception_solution": {
                "2": "货品减免(质量问题)",
                "14": "客户沟通",
                "166": "市场缺货",
                "167": "换货",
                "9": "补货",
                "13": "核算账单",
                "62": "其它"
            },
            "station": [{
                "role": 0,
                "_id": "T10001",
                "name": "先进先出01"
            }, {
                "name": "先进先出03",
                "_id": "T14875",
                "role": 0
            }],
            "nosku_exception_solution": {
                "16": "客户沟通",
                "175": "仓库补货",
                "3": "核算账单",
                "185": "公司补贴",
                "184": "销售补贴",
                "169": "税点",
                "171": "系统问题(公司承担)",
                "172": "进行备注",
                "173": "减免",
                "174": "销售补货",
                "63": "其它"
            },
            "refund_solution": {
                "160": "二次销售",
                "161": "其他",
                "157": "放弃取货",
                "158": "商品损耗",
                "159": "退回供应商"
            },
            "order_remark_type": {
                "59": "客户沟通",
                "60": "补贴"
            }
        }
    }

/ordermanage/orders/print -- 售后订单打印

接口名
    ordermanage/orders/print
描述
    售后订单打印
Method
    GET
请求
    order_list          M          list          打印订单列表
响应 
    orders                             M          dict          订单信息
        skus                           M          list          商品信息
            refund
            sku_name                   M          str
            sku_abnormals
            sku_id                     M          str           spu_id
        origin_total_price
        real_refund_money
        customer                       M          dict          商户信息       
            username                   
            receive_name
            address
            address_id
            receive_begin_time
            receive_end_time
            receiver_phone
            resname
            area
            uid
            pay_method
        order_time
        station_receiver_name
        station_receiver_phone
        order_id
        real_price
        abnormals
        driver_name
        order_remark
        station_name
        total_price
        sale_money_with_freight
        abnormal_money
        station_id
        request_refund_money
    示例
    {
    "code": 0,
    "data": {
        "orders": [{
            "skus": [{
                "refund": {},
                "sku_name": "烧鸭",
                "sku_abnormals": {},
                "sku_id": "D13383391"
            }],
            "origin_total_price": "3.00",
            "real_refund_money": "0.00",
            "customer": {
                "username": "test0808",
                "receive_name": "二二",
                "address": "广东省深圳市福田区华强北街道上步中路1009工会工会大厦",
                "address_id": "269790",
                "receive_begin_time": "2019-08-15 10:30",
                "receiver_phone": "15976767898",
                "resname": "测试店铺0808",
                "receive_end_time": "2019-08-15 16:00",
                "area": "南山区-南山中心区",
                "uid": "284084",
                "pay_method": 1
            },
            "order_time": "2019-08-15 10:27:11",
            "station_receiver_name": "喵",
            "station_receiver_phone": "17688767678",
            "order_id": "PL7953689",
            "real_price": "3.00",
            "abnormals": [],
            "driver_name": None,
            "order_remark": [],
            "station_name": "喵喵总仓",
            "total_price": "3.00",
            "sale_money_with_freight": "3.00",
            "abnormal_money": "0.00",
            "station_id": "T7936",
            "request_refund_money": "0.00"
        }]
    },
    "msg": "ok"
}

/ordermanage/order_sku 拉取订单商品

接口描述
    拉取订单商品
Method
    GET
请求
    start_date                      string              M               起始日期
    end_date                        string              M               结束日期(最长2个月)
    search_text                     string              O               搜索字符
    station_id                      string              O               站点ID
    salemenu_id                     string              O               报价单ID
    limit                           string              O               条数(默认20)
    offset                          string              O               偏移量(默认0)
响应
    {
    "code": 0,
    "msg": "ok",
    "data": {
        "skus": [{
            "order_time": "2019-04-26 12:00:00",        string      M           下单时间
            "order_id": "PL123445",                     string      M           订单ID
            "sku_id": "D1234123",                       string      M           skuID
            "sku_name": "大白菜",                        string      M           sku名
            "station_id": "T7442",                      string      M           站点ID
            "station_name": "rap",                      string      M           站点名
            "salemenu_id": "S12345",                    string      M           报价单ID
            "salemenu_name": "去采购",                   string      M           报价单名
            "sale_price": 123.00,                       float       M           销售价(元)
            "quantity": 1.01,                           float       M           下单数(含损耗)
            "sale_unit_name": "斤",                     string      M           销售单位
            "address_id": 115892,                       int         M           商户ID
            "address_label": "123"                      str         M           商户标签
            "resname": "cxk",                           string      M           商户名
            "abnormal": {
                "final_amount": 9,                      float       O           记账数
                "money_delta": -200,                    int         O           金额变动
                "id": 123,                              int         O           异常ID
                "type_id": 1,                           int         O           异常原因ID
                "type_text": "未按用户时间到达",           string      O           异常原因
                "text": "123",                          string      O           描述
            }
            "refund": {
                "id": 12122,                            int         O           退货ID
                "type_id": 1,                           int         O           退货原因ID
                "type_text": "未按用户时间到达",           string      O           退货原因
                "request_amount": 3,                    float       O           退货数
                "text": "123",                          string      O           描述
                "real_amount": 1.00,                    float       O           实退数
                "state": 2                              int         O           退货状态(1: 待安排, 2:取货中, 3:已取货, 4:已入库, 5:已退货)(状态为4的不能修改)
            }
        }, ...]
        },
        "pagination": {
        "count": 1,
        "offset": 0,
        "limit": 20
    }
  }

/ordermanage/order_sku/exceptions 批量设置售后

描述
    批量设置售后
Method
    POST
请求
    "exception_type": 1,                    int                     M           异常类型(0:无异常, 1: 商品异常, 2:商品退货)
        "exception_reason": 1,              int                     M           异常/退货原因ID(无异常是不传)
        "solution": 1,                      int                     M           异常/退货解决方法ID
        "department_blame_name": "12",      string                  M           责任部门
        "department_to_name": "12",         string                  M           跟进部门
        "description": "123",               string                  M           描述
    "orders": [
        "order_id": "PL123",                string                  M           订单ID
        "station_store_id": "T7442",        string                  O           入库仓ID(如果为商品退货必须传这个字段)
        "skus": [
            "sku_id": "D123",               string                  M           skuID
        ]
    ]
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        msg:"ok",               M       str             错误提示信息
        data:{},                M       dict            返回数据容器
    }

/ordermanage/order_sku/exception 单个设置售后

描述
    单个设置售后
Method
    POST
请求
    sku_id              string            M               skuID
    order_id            string            M               订单ID
    exception_type      int               M               异常类型(0:无异常, 1: 商品异常, 2:商品退货)
    final_amount        float             O               记账数(如果为商品异常必须传这个字段)
    request_amount      float             O               退货数(如果为商品退货必须传这个字段)
    station_store_id    string            O               入库仓ID(如果为商品退货必须传这个字段)
    exception_reason    int               M               异常/退货原因ID   
    solution            int               M               处理方式ID
响应
    {
        "code": 0,
        "msg": "ok",
        "data": ""
    }

/ordermanage/skus/print 商品打印

接口描述
    商品打印
Method
    GET
请求
{
    "orders": [
        "order_id": "PL123",          string                  M               订单ID
        "skus": [{                                
            "sku_id": "D123",         string                  M               skuID
        }]
    ]
}
响应
    {
    "code": 0,
    "msg": "ok",
    "data": [{
        "sku_id": "D12341",                   string         M               skuID
        "sku_name": "练习生",                  string         M               sku名
        "station_id": "T7442",                string         M               站点ID
      "station_name": "去采购",                string         M               站点名
      "salemenu_id": "S123",                  string         M               报价单ID
      "salemenu_name": "1",                   string         M               报价单名
      "category_1": "水果",                    string         M               一级分类名
      "category_2": "进口水果",                 string         M               二级分类名
      "pinlei": "瓜果",                        string         M               品类名
      "std_unit_name": "斤",                   string         M               基本单位
      "sale_unit_name": "斤",                  string         M               销售单位
      "settle_supplier_id": "T1234",           string         M               默认供应商ID
      "settle_supplier_name": "时长2点半",      string         M               默认供应商
      "station_name": "去采购",                 string         M               站点名
      "quantity": 12.09,                       float          M               下单数
      "real_quantity": 12.00,                  float          M               出库数
      "real_price": 12.00,                     float          M               出库金额
      "tax": "12",                             string         M               商品税额
      "abnormal_money": "-12.00",              string         M               异常金额
      "request_refund_money": "12.00",         sring          M               应退金额
      "real_refund_money": "12.00",            string         M               实退金额
      "tax": "12.00",                          string         O               商品税率(有权限才有这个字段, 否则没有)
      "orders": [{
        "order_id": "PL1234",                  string         M               订单ID
        "order_time": "2019-04-12 03:12:11",   string         M               下单时间
        "resname": "ceshi",                    string         M               商户名
        "quantity": 12.09,                     float          M               下单数
        "real_quantity": 12.00,                float          M               出库数
        "real_item_price": "12.00",            string         M               出库金额
        "abnormal_money": "-12.00",            string         M               异常金额
        "request_refund_money": "12.00",       sring          M               应退金额
        "real_refund_money": "12.00",          string         M               实退金额
        "tax": "12",                           string         M               商品税额
        "abnormal": {
            "final_amount": 9,                 float           O              记账数
            "money_delta": -200,               int             O              金额变动
            "id": 123,                         int             O              异常ID
            "type_id": 1,                      int             O              异常类型ID
            "type_text": "未按用户时间到达",      string          O              异常原因
            "text":   "123",                   string          O              描述
        },
        "refund": {
              "id": 12122,                     int             O              退货ID
              "type_id": 1,                    int             O              退货类型ID
              "type_text": "未按用户时间到达",    string          O              退货原因
              "request_amount": 3,             float           O              退货数
              "text": "123",                   string          O              描述
              "real_amount": 1.00,             float           O           实退数
              "state": 2                       int             O           退货状态(1: 待安排, 2:取货中, 3:已取货, 4:已入库, 5:已退货)(状态为4的不能修改)
        }
        }, ...]
        }, ...]

/ordermanage/daily/search -- 每日订单搜索

接口名
    ordermanage/daily/search
描述
    每日订单搜索
Method
    GET
请求
    date                string       M           日期
    search_text         string       O           搜索字符
    search_area         string       O           地理位置信息(格式: 城市_区域_街道, 参照 station)
    num                 int          O           数量(默认20)
    page                int          O           页码
响应
    order_pay_method               int            M          付款方式
    address                        str            M          收货地址
    sales_employee_name            str            M          销售经理
    is_aggregation                 int            M
    station_id                     str            M          站点id
    area_id                        int            M          二级地址id
    address_id                     str            M          商户id
    station_name                   str            M          站点名称
    area_name                      str            M          地址名称
    total_pay                      int            M          
    total_price                    int            M            
    _id                            str            M          订单id
    source_order_id                str            M
    resname                        str            M          店铺名称
    uid                            int            M          user_id
    sales_employee_telephone       str            M          销售经理电话
    origin_total_price             float          M
示例
    {
          "code": 0,
          "data": [{
                "order_pay_method": 2,
                "address": "南山大道12号",
                "sales_employee_name": "喵神1",
                "is_aggregation": 0,
                "station_id": "T7936",
                "area_id": 30200100000,
                "address_id": "86562",
                "station_name": "喵喵总仓",
                "area_name": "南山区-南山中心区",
                "total_pay": 2400,
                "total_price": 2400,
                "_id": "PL8036448",
                "source_order_id": "PL8036448",
                "resname": "八合里(深圳总店)",
                "uid": 92662,
                "sales_employee_telephone": "13323233341",
                "origin_total_price": 19400.0
          },...],
          "msg": "ok"

/ordermanage/daily/export -- 每日订单导出

接口名
    ordermanage/daily/export
描述
    每日订单搜索
Method
    GET
请求
    date                string       M           日期
    search_text         string       O           搜索字符
    search_area         string       O           地理位置信息(格式: 城市_区域_街道, 参照 station)
    num                 int          O           数量(默认20)
    page                int          O           页码
响应
    search_result.xlsx

/ordermanage/lkorder/search 搜索站点订单异常

接口描述
  拉取站定订单异常
Method
    GET
请求
    date_from             string          M           起始时间
    date_end              string          M           结束时间
    search_text           string          O           搜索字符
    num                   int             O           数量(默认20)
    page                  int             O           页码
响应
    station_name              M         str             站点名称
    exception_count           M         int       
    date_time                 M         datetime      下单时间
    _id                       M         str           订单id
    station_id                M         str             站点id
    district_code             M         str           城市编码
    real_price                M         float         实际下单金额
    refund_count              M         int
    customer                  M         dict          商户信息
        receiver_name         M         str           收货人
        address               M         str           收货地址
        receiver_phone        M         str           收货电话
        extender              M         str
        receive_way           M         str           收货方式(1:配送,2:自提)
        supply_station_id     M         str           
        station_name          M         str           站点名称
        receive_end_time      M         str           收货结束时间
        receive_begin_time    M         str           开始收货时间
        address_id            M         str           站点id
        address_sign_id       M         str           二级地址id
        pick_up_st_id         M         str           自提点id(0表示没有自提点)
        uid                   M         str           站点id
    示例:
    {
          "code": 0,
          "data": [{
                "station_name": "喵喵总仓",
                "exception_count": 0,
                "date_time": "2019-08-01 16:55:57.000000",
                "_id": "LK1870534",
                "customer": {
                      "receiver_name": "喵喵一",
                      "address": "深圳市南山区南头街道",
                      "receiver_phone": "13455766782",
                      "extender": "{\"resname\": \"\\u55b5\\u55b5\\u5206\\u4ed3\\u4e00\"}",
                      "receive_way": 1,
                      "supply_station_id": null,
                      "station_name": "喵喵分仓一",
                      "receive_end_time": "2019-08-02 23:00",
                      "receive_begin_time": "2019-08-02 03:30",
                      "address_id": "T11660",
                      "address_sign_id": "30200700000",
                      "pick_up_st_id": 0,
                      "uid": "T11660"
                },
                "station_id": "T7936",
                "district_code": "440300",
                "real_price": 150.0,
                "refund_count": 0
           }],
           "msg": "ok"
    }

/ordermanage/get/lkorder Lk单商品异常详情编辑

描述
    Lk单商品异常详情编辑
Method
    GET
请求
    details            O            不定           是否详情查看
    id                 M            str            订单id
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        msg:"ok",               M       str             错误提示信息
        data:{},                M       dict            返回数据容器
    }
    传了details,响应如下
    details                        M           list          商品详情
        name                       M           str           商品名
    token                          M           str           
    "data": {
            "details": [{
                  "name": "级大风了222"
            }],
        "token": "6069024365908300340"
      }
    没传details,响应如下
    base_info                      M           dict           
        department                 M           list
        driver                     M           list          司机列表
            id                     M           int           司机id
            name                   M           str           司机名称
            station_id             M           str           站点id
            station_name           M           str           站点名字
        nosku_exception_reason     M           dict          非sku异常原因
        nosku_exception_solution   M           dict          非sku解决办法
        order_remark_type          M           dict          
        refund_solution            M           dict
        sku_exception_reason       M           dict          sku异常原因
        sku_exception_solution     M           dict          sku解决方法
        station                    M           list          station信息
            role                   M           int
            name                   M           str           站点名称
            _id                    M           str           站点id
    edit_permission                M           bool          
    order_info                     M           dict          订单信息    
        date_time                  M           str
        district_code              M           str           城市code
        freight                    M           int           运费
        origin_total_price         M           str
        real_price                 M           int              
        station_id                 M           str           站点id
        total_pay                  M           int
        total_price                M           int
        _id                        M           str            订单id
        customer                   M           dict           下单商户信息
            address                M           str            收货地址
            address_id             M           str            站点id
            address_sign_id        M           str            二级地址id
            extender               M           str 
            pick_up_st_id          M           int            自提点id
            receive_begin_time     M           str            收货起始时间
            receive_end_time       M           str            收货结束时间
            receive_way            M           int            收货方式(1为配送,2为自提)
            receiver_name          M           str            收货人
            receiver_phone         M           str            收货人电话
            send_station_name      M           str            目标站点名称
            supply_station_id      M           str            供应商id
            uid                    M           str            用户id
        details                    M           list           商品详情
            accept_quantity        M           int            
            attrition_rate         M           int
            clean_food             M           bool
            fake_item_price        M           int
            id                     M           str            
            is_price_timing        M           bool
            is_refund_overdue      M           bool
            name                   M           str
            origin_item_price      M           int
            origin_sale_price      M           int
            purchase_quantity      M           int
            quantity               M           int
            real_is_weight         M           bool
            real_item_price        M           int
            real_quantity          M           int
            sale_price             M           int
            sale_unit_name         M           str
            salemenu_id            M           str            报价单id
            search_text            M           list
            sort_station_ids       M           list
            sorting_saleunit_weighting_quantity     M       float
            sync_origin            M           str
            tax_rate               M           int
            total_item_pay         M           int
            total_item_price       M           int
            version                M           int
            weighting_quantity     M           int
            material               M           list
                accept_std_count   M           int
                real_std_count     M           int
                sale_ratio         M           int
                spu_id             M           str
                std_sale_price     M           int
                std_unit_name      M           str
            origins
                amount             M           int
                order_id           M           str             订单id
                real_is_weight     M           bool
                saleunit_weighting_amount      M      int
                sku_id             M           str             订单id
                split_flag         M           int             int
    token                          M           int
    示例:
    {
    "code": 0,
    "data": {
        "edit_permission": true,
        "base_info": {
            "station": [{
                "_id": "T7936",
                "role": 0,
                "name": "喵喵总仓"
            }, {
                "_id": "T14735",
                "name": "喵喵分仓4",
                "role": 0
            }],
            "nosku_exception_solution": {
                "16": "客户沟通",
                "175": "仓库补货",
                "3": "核算账单",
                "185": "公司补贴",
                "184": "销售补贴",
                "169": "税点",
                "171": "系统问题(公司承担)",
                "172": "进行备注",
                "173": "减免",
                "174": "销售补货",
                "63": "其它"
            },
            "refund_solution": {
                "160": "二次销售",
                "161": "其他",
                "157": "放弃取货",
                "158": "商品损耗",
                "159": "退回供应商"
            },
            "driver": [{
                "station_name": "公司司机",
                "station_id": "T14737",
                "id": 8084,
                "name": "Z5CECL"
            }, {
                "station_name": "公司司机",
                "station_id": "T14737",
                "id": 8085,
                "name": "2LX1EL"
            }],
            "sku_exception_solution": {
                "2": "货品减免(质量问题)",
                "14": "客户沟通",
                "166": "市场缺货",
                "167": "换货",
                "9": "补货",
                "13": "核算账单",
                "62": "其它"
            },
            "order_remark_type": {
                "59": "客户沟通",
                "60": "补贴"
            },
            "department": [],
            "sku_exception_reason": {
                "1": "未按用户时间到达",
                "5": "漏单",
                "6": "送错货品",
                "7": "下错单",
                "8": "需要备注",
                "10": "斤两不对(用户发现)",
                "12": "质量问题",
                "176": "无法送达",
                "17": "规格问题",
                "22": "司机弄丢/弄坏",
                "153": "采购问题",
                "25": "市场缺货(未出库)",
                "27": "系统问题",
                "61": "其它"
            },
            "nosku_exception_reason": {
                "64": "补贴",
                "65": "付款问题",
                "67": "迟到",
                "15": "其它",
                "177": "需要备注",
                "178": "客户需要发票",
                "179": "逾期异常",
                "180": "系统问题",
                "182": "商品异常(需补货)",
                "183": "加单补单",
                "154": "采购问题",
                "188": "抹零",
                "190": "退菜筐押金"
            }
        },
        "order_info": {
            "total_pay": 150.0,
            "total_price": 150.0,
            "_id": "LK1870534",
            "origin_total_price": 150.0,
            "details": [{
                "fake_item_price": 150.0,
                "origin_item_price": 150.0,
                "quantity": 0.5,
                "real_quantity": 0.5,
                "attrition_rate": 0.0,
                "tax_rate": 0,
                "origin_sale_price": 300,
                "salemenu_id": "S11544",
                "is_price_timing": false,
                "total_item_price": 150.0,
                "id": "D6032809",
                "sale_price": 300,
                "sorting_saleunit_weighting_quantity": 0.5,
                "name": "无籽西瓜abcd",
                "purchase_quantity": 0.5,
                "weighting_quantity": 0,
                "sync_origin": "D6032809",
                "clean_food": false,
                "sale_unit_name": "框",
                "sort_station_ids": [],
                "material": [{
                    "std_sale_price": 150.0,
                    "accept_std_count": 1.0,
                    "real_std_count": 1.0,
                    "std_unit_name": "斤",
                    "spu_id": "C1275633",
                    "sale_ratio": 2.0
                }],
                "version": 14,
                "total_item_pay": 150.0,
                "real_item_price": 150.0,
                "accept_quantity": 0.5,
                "search_text": ["WUZIXIGUAABCD", "WZXGABCD", "无籽西瓜ABCD", null, "WUZIXIGUA", "WZXG", "无籽西瓜"],
                "real_is_weight": true,
                "origins": [{
                    "saleunit_weighting_amount": 1.0,
                    "amount": 1.0,
                    "sku_id": "D8392731",
                    "split_flag": 0,
                    "order_id": "PL7666451",
                    "real_is_weight": true
                }]
            }],
            "station_id": "T7936",
            "customer": {
                "receiver_name": "喵喵一",
                "address": "深圳市南山区南头街道",
                "receiver_phone": "13455766782",
                "extender": "{\"resname\": \"\\u55b5\\u55b5\\u5206\\u4ed3\\u4e00\"}",
                "receive_way": 1,
                "supply_station_id": null,
                "station_name": "喵喵分仓一",
                "receive_end_time": "2019-08-02 23:00",
                "receive_begin_time": "2019-08-02 03:30",
                "address_id": "T11660",
                "address_sign_id": "30200700000",
                "send_station_name": "喵喵总仓",
                "pick_up_st_id": 0,
                "uid": "T11660"
            },
            "district_code": "440300",
            "freight": 0,
            "real_price": 150.0,
            "date_time": "2019-08-01T16:55:57"
        },
        "token": "17631835954926528815"
    },
    "msg": "ok"
}

/ordermanage/get/lkorder?details=&id=LK1870554

/ordermanage/get/ -- 订单管理-订单详情

接口名
    /ordermanage/get/<order_id>
描述
    在订单管理中编辑订单所需要的数据
Method
    POST
请求
    // session部分
响应
    data: {
        token:              M   int     session token
        order_info          M   dict    订单数据
        base_info:          M   dict    一些下拉菜单需要的数据
        edit_permission:    M   bool    是否有编辑权限
    }
示例
    http://localhost:8880/ordermanage/get/PL570914

/ordermanage/exception/ -- 订单管理-添加异常

接口名
    /ordermanage/get/<order_id>
描述
    在订单管理中编辑订单所需要的数据
Method
    POST
请求
    token           M   int     session token
    exception       M   dict    异常信息
    order_remark    M   list    订单备注
    refund          M   dict    退货信息 {
        "sku_id": "D1777232",
        "exception_reason": 5,
        "request_amount": 1,
        "department_blame_id": 0,
        "department_to_id": 0,
        "station_blame_id": "T066",
        "station_to_id": "T066",
        "station_store_id": "T066",
        "lose_money": "1000",  // 赔付金额 int
        "driver_id": 127,
        "state": 2,
        "description": "blablabla",
        "id": 4729, // 已有的退货id, 可选
        "ticket_id": 27897
    }

响应

示例
    request:
        token:11215100762829700345
        exception:[{"sku_id":"D802775","exception_reason":1,"solution":2,"money_delta":"-2142","department_blame_id":0,"department_to_id":0,"station_blame_id":"0","lose_money":"0","description":"","final_amount":"5.1","id":77329,"ticket_id":27896}]
        order_remark:[]
        refund:[{"sku_id":"D1777232","exception_reason":5,"request_amount":1,"department_blame_id":0,"department_to_id":0,"station_blame_id":"T066","station_to_id":"T066","station_store_id":"T066","lose_money":"1000","driver_id":127,"state":2,"description":"bla","id":4729,"ticket_id":27897}]

/custommanage/edit/S -- 修改商户信息

接口名
    /custommanage/edit/S<sid>
描述
    修改商户信息
Method
   POST
请求
    // session部分
    status  M  [modifycname,
                modifyPwd,
                modifyStatus,
                modifyWhite,
                modifyPayMethod,
                deleteSSM,
                modifySSM,
                modifyEmployee,
                modifyShop,
                modifyVip,
                modifyArea,
                modifyConsignee,
                modifyPaymentName,
                modifyPaymentTelephone]

    if status == 'modifycname':
        new_cname  M

    if status == 'modifyPwd':
        newPwd  M

    if status == 'modifyStatus':
        freezeState  M

    if status == 'modifyWhite':
        white  M

    if status == 'modifyPayMethod':
        payMethod  M

    if status == 'deleteSSM':
        id  M

    if status == 'modifySSM':
        id  C
        service_station_id  M
        salemenu_id  M

    if status == 'modifyEmployee':
        creatEmployeeValue  M
        saleEmployeeValue  M

    if status == 'modifyShop':
        shopName  M

    if status == 'modifyVip':
        receiver  M
        receiverPhone  M
        beginTime  M
        endTime  M

    if status == 'modifyArea':
        secondArea  M
        shopAddress  M

    if status == 'modifyConsignee':
        vip  M

    if status == 'modifyPaymentName':
        paymentName  M  string  新的结款人姓名

    if status == 'modifyPaymentTelephone':
        paymentTelephone  M  string  新的结款人手机
响应
    {
        "code": 0,
        "msg": "success"
    }
示例
    request:
    localhost:8880/custommanage/edit/S032746