Skip to content

销售单接口修改

获取售卖单详情

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

创建售卖单

接口名: /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
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
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
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
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 错误提示信息