出库差异单
接口改动
station工程
station/stock/list
修改
按商品盘点增加库存的过滤条件
Method: GET
请求:
新增
remain_status int 库存过滤条件(1:库存大于0;2:库存等于0; 3:库存小于0) ,不传就是all
响应:
不变
station/stock/check/list
新增
待盘点商品列表
Method: GET
请求:
all M int 0/1 是否跨页全选,传1时跨页全选,需要传入筛选条件字段,传0时为只选当前页,spu_ids 必传
spu_ids list spuID列表
筛选条件:
category_id_1 string 一级分类ID
category_id_2 string 二级分类ID
text string 商品名或者商品ID
remain_status int 库存过滤条件(1:库存大于0;2:库存等于0; 3:库存小于0) ,不传就是all
使用新分页
page_obj O string 起始页(不包含),默认第0页
reverse O bool 是否反向查询。1:是,0:不是。默认为否。
limit O int 返回条数,默认10。传0表示返回所有数据。
offset O int 查询起点偏移条数,默认 0
peek O int 是否需要 peek,默认不需要 peek。peek 必须大于 limit。
count O bool 是否需要 count,默认不需要 count
响应:
{
'data': [{
'spu_id' M string 商品ID
'name' M string 商品名
'category_name_1' M string 一级分类名称
'category_name_2' M string 二级分类名称
'std_unit_name' M string 单位
'remain' M float 抄盘数
}],
'msg': 'ok',
'code': 0,
'pagination': { M dict
"peek": 100, O int 前端传 peek 的话,后端就会返回这个字段
"more": true, M bool 是否有更多数据
"page_obj": "gtyuhb", M string
"count": 2000 O int 前端传 count 的话,后端就会返回这个字段
}
}
/station/stock/check/batch
修改
批量盘点
Method: POST
请求:
stock_details list M 库存信息
新增一个类型
[{
batch_number str M 批次号
delta float M 报溢报损数(正数为报溢,负数为报损)
remark str O 备注
}]
响应:
不变
station/stock/check/batch_number/list
新建
报损报溢批次列表
Method: GET
请求:
spu_id M spuID
begin M 开始时间
end M 结束时间
q O 搜索
使用新分页
page_obj O string 起始页(不包含),默认第0页
reverse O bool 是否反向查询。1:是,0:不是。默认为否。
limit O int 返回条数,默认10。传0表示返回所有数据。
offset O int 查询起点偏移条数,默认 0
peek O int 是否需要 peek,默认不需要 peek。peek 必须大于 limit。
count O bool 是否需要 count,默认不需要 count
响应:
{
'data': [{
batch_number M str 批次号
remain M int 库存数
settle_supplier_id M str 供应商id
supplier_name M str 供应商名称
create_time M date 入库时间
}],
'msg': 'ok',
'code': 0,
'pagination': { M dict
"peek": 100, O int 前端传 peek 的话,后端就会返回这个字段
"more": true, M bool 是否有更多数据
"page_obj": "gtyuhb", M string
"count": 2000 O int 前端传 count 的话,后端就会返回这个字段
}
}
station/stock/check/result
新建
获取盘点失败的列表
Method: GET
请求:
task_id M task_id
limit O int 返回条数,默认10。
offset O int 查询起点偏移条数,默认 0
响应:
{
'data': [{
'spu_id' M string 商品ID
'name' M string 商品名
'category_name_1' M string 一级分类名称
'category_name_2' M string 二级分类名称
'reason_type' M 失败的原因
}],
'msg': 'ok',
'code': 0,
'pagination': {
'limit':10
'offset':0
'count': 2000
}
}