Skip to content

入库和退货批量

入库和退货批量

功能点

  • 提供入库和退货模板接口(模板中带当前站点的所有可录入sku规格)
  • 提供一个批量入库接口以及批量退货接口, 满足客户一次性多个供应商商品单次入库的需求和退货的需求

接口设计

/station/stock/in_stock_sheet/download_template 入库模板下载

接口名 /station/stock/in_stock_sheet/download_template
Method: get
响应:
    code M int 0为成功, 其它为失败
    msg M 提示信息
    in_stock_sheet_template.xlsx 入库模板文件
逻辑:
    提供当前站点的sku规格模板文件, 以供导入入库单使用

/station/stock/in_stock_sheet/import 批量导入入库单

接口名: /station/stock/in_stock_sheet/import
Method: post
请求:
    in_stock_list M 入库单列表
    [
        {
            supplier_id         M   str  供应商站点id
            purchase_sku_id     M   str  入库的sku_id
            in_stock_amount     M   int  sku入库数目
            unit_price          M   double 商品入库单价
            sku_money           M   double 对应sku入库总金额
        },
        ...
    ]
响应:
    code M  int     0为成功, 其他为失败
    msg  M  str     提示信息
    data M  list    检验失败返回错误数据
    data:[
        {
            supplier_id         M   str  供应商站点id
            purchase_sku_id     M   str  入库的sku_id
            sku_name            M   str  入库的商品名称
            spu_name            M   str  商品分类名称
            in_stock_amount     M   int  sku入库数目
            unit_price          M   double 商品入库单价
            unit_name           M   str  商品基本单位
            sku_money           M   double 对应sku入库总金额
            error_fields        M   list  错误字段列表
            error_fields:[field01,field02]
        },
        ...
    ]
逻辑:
    批量导入入库单

/station/stock/return_stock_sheet/download_template 退货模板下载

接口名: /station/stock/return_stock_sheet/download_template
Method: get
响应:
    code M int 0为成功, 其它为失败
    msg  M str 提示信息
    return_stock_sheet_template.xlsx 退货模板文件
逻辑:
    提供当前站点的sku规格模板文件, 以供批量退货使用

/station/stock/return_stock_sheet/import 批量导入退货单

接口名: /station/stock/return_stock_sheet/download_template
Method: post
请求:
    return_stock_list M  list  退货单列表
    [
        {
            supplier_id             M   str  供应商站点id
            return_sku_id           M   str  退货的sku_id
            return_stock_amount     M   int  sku退货数目
            unit_price              M   double 商品退退货单价
            sku_money               M   double 对应sku退货总金额
        }
        ...
    ]
响应:
    code M int   0为成功, 其它为失败
    msg  M str   提示信息
    data M list  检验失败返回错误数据
    data:[
        {
            supplier_id             M   str  供应商站点id
            return_sku_id           M   str  退货的sku_id
            sku_name                M   str  退货的商品名称
            spu_name                M   str  商品分类名称
            return_stock_amount     M   int  sku退货数目
            unit_price              M   double 商品退货单价
            unit_name               M   商品基本单位
            sku_money               M   double 对应sku退货总金额
            error_fields        M   list  错误字段列表
            error_fields:[field01,field02]
        },
        ...
    ]
逻辑:
    批量导入退货单