Skip to content

销售单接口

销售单接口

/salemenu/list 获取销售单列表

接口名: /salemenu/list
Method: GET
请求:
    time_config_id O string 服务时间配置ID
    type O int 销售单类型(-1:已删除;1:供应商销售单;2:代售单;4:自售单)
    is_active O bool 销售单状态
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的销售单列表
    [{
        'id' M string 销售单ID
        'name' M string 销售单名
        'type' M int 销售单类型
        'is_active' M bool 是否激活
        'desc' M string 描述
        'supplier_name' M string 供应名称
        'time_config_id' M string 服务时间配置ID
        'time_config_name' M string 服务时间配置名称
    }]
逻辑:
    根据请求参数获取销售单
    返回销售单列表

/salemenu/purchase/list 获取站点的采购销售单

接口名: /salemenu/purchase/list
Method: GET
请求:
    q O string 销售单ID或名称
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的销售单列表
    [{
        'id' M string 销售单ID
        'station_id' M string 站点ID
        'name' M string 销售单名称
        'desc' M string 描述信息
        'is_active' M bool 是否激活
        'sku_num' M int 供应商品数量
    }]
逻辑:
    根据text匹配采购类型的销售单ID或销售单名称
    返回销售单列表

/salemenu/sale/list 获取出售商品的销售单

接口名: /salemenu/sale/list
Method: GET
请求:
    time_config_id O string 服务时间配置ID
    type O int 销售单类型
    is_active O bool 销售单状态
    q O string 销售单ID或销售单名称
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的销售单列表
    [{
        'id' M string 销售单ID
        'name' M string 销售单名
        'type' M int 销售单类型(2:代售单;4:自售单)
        'is_active' M bool 是否激活
        'desc' M string 描述
        'supplier_name' M string 供应名称
        'time_config_name' M string 运营时间
        'sku_num' M string 在售商品数
    }]
逻辑:
    根据请求参数获取自营或服务销售单
    返回销售单列表

/salemenu/sale/detail 获取售卖单详情

接口名: /salemenu/sale/detail
Method: GET
请求:
    id M string 销售单ID
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的销售单列表
    {
        'id' M string 销售单ID
        'name' M string 销售单名
        'is_active' M bool 是否激活
        'supplier_name' M string 供应名称
        'about' M string 描述
        'time_config' M dict 服务时间配置
        {
            'id' M string 服务时间配置ID
            'name' M string 服务时间配置名称
            'receive_time_limit' M dict 收货时间限制
            {
                'start' M string 开始时间
                's_span_time' M int 开始时间日期间隔
                'end' M string 结束时间
                'e_span_time' M int 结束时间日期间隔
            }
            'order_time_limit' M dict 下单时间限制
            {
                'start' M string 开始时间
                'end' M string 结束时间
                'e_span_time' M int 结束时间日期间隔
            }
            'final_distribute_time' M string 最晚出库时间
            'final_distribute_time_span' M 最晚出库时间日期间隔
        }
        'targets' M list 销售对象
        [{
            'id' M string 站点ID
            'name' M string 站点名称
        }]
    }

/salemenu/sale/targets 获取售卖单销售对象

接口名: /salemenu/sale/targets
Method: GET
请求:
    无
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的销售对象列表
    [{
        'id' M string 站点ID
        'name' M string 站点名称
    }]

/salemenu/sale/create 创建售卖单

接口名: /salemenu/sale/create
Method: POST
请求:
    'name' M string 销售单名
    'is_active' M bool 是否激活
    'supplier_name' M string 供应名称
    'about' O string 描述
    'time_config_id' M string 服务时间配置ID
    'targets' M list 销售对象ID列表
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M string 返回的创建的售卖单ID

/salemenu/sale/update 更新售卖单

接口名: /salemenu/sale/update
Method: POST
请求:
    'id' M string 销售单ID
    'name'O string 销售单名
    'is_active'O bool 是否激活
    'supplier_name'O string 供应名称
    'about' O string 描述
    'targets' O list 销售对象ID列表
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息

/salemenu/purchase/detail 获取采购报价单详情

接口名: /salemenu/purchase/detail
Method: GET
请求:
    station_id M string 站点ID
    salemenu_id M string 销售单ID
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的销售单列表
    {
        'id' M string 销售单ID
        'name' M string 销售单名
        'is_active' M bool 是否激活
        'about' O string 描述
    }

/salemenu/purchase/create 创建采购报价单

接口名: /salemenu/purchase/create
Method: POST
请求:
    'name' M string 销售单名
    'is_active' M bool 是否激活
    'about' O string 描述
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M dict 返回的创建的采购报价单信息
    {
        'station_id' M string 站点ID
        'salemenu_id' M string 销售单ID
    }

/salemenu/purchase/update 更新售卖单

接口名: /salemenu/purchase/update
Method: POST
请求:
    'station_id' M string 站点ID
    'salemenu_id' M string 销售单ID
    'name' O string 销售单名
    'is_active' O bool 是否激活
    'about' O string 描述
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息