商品页
/process/technic_flow/get 获取商品工艺流(新)
Method: GET
请求:
sku_id string M sku_id
响应:
code: 0
msg: ok
data: {'technic_flow': list M 工艺流
[
'id': int M 流ID,
'name': string M 工艺名,
'technic_id': int M 工艺ID,
'type' int M 类型(1普通,2分装),
'active': bool M 是否有分装工艺,是否激活,
'custom_cols': list M 自定义字段
[{
'name': string M 字段名
'desc': string M 描述
},]
,
]
'active': bool M 是否有分装工艺
}
/process/technic_flow/update_technic 修改商品工艺流中的工艺(新)
Method: POST
请求:
id int M 流ID
'type' int O类型(1普通,2分装)
'custom_cols': list O自定义字段
[{
'name': string M 字段名
'desc' string M 描述
}]
响应:
code: 0
msg: ok
data:
生成新的生产计划版本
/process/technic_flow/change_technic_order 修改商品工艺流中的工艺顺序(新)
Method: POST
请求:
id int M 流ID
next_id int M 后序工艺ID(最后一个传0)
响应:
code: 0
msg: ok
data:
生成新的生产计划版本
/process/technic_flow/delete_technic 删除商品工艺流中的工艺(新)
Method: POST
请求:
id int M 流ID
响应:
code: 0
msg: ok
data:
只能从后往前删除
/process/technic_flow/create_technic 添加商品工艺流中的工艺(新)
Method: POST
请求:
'sku_id' str M
'technic_id' int M 工艺ID
'type' int 类型(1普通,2分装)
'custom_cols': list O自定义字段
[{
'name': string M 字段名
'desc' string M 描述
}]
响应:
code: 0
msg: ok
data: {
id
}
插到最后一个
product/sku_sale/list 获取销售SKU列表(老)
修改读取库存的逻辑
工艺库
/process/technic/list 搜索工艺(新)
Method: GET
请求:
q string O 搜索内容
page_obj O string 起始页(不包含),默认第0页
reverse O bool 是否反向查询。1:是,0:不是
limit M int 分页限制(返回条数,默认10。传0表示返回所有数据)
响应:
code: 0
msg: ok
data: [{ M list 工艺信息
'id': int M 工艺ID
'custom_id': string M 自定义ID
'name': string M 工艺名称
'custom_cols': list M 自定义字段
'desc': string M 描述
}]
pagination: { M dict 分页信息
peek O int 实际peek到的条数。
more O bool 是否到头,1:没有更多数据,0:有更多(默认)
page_obj M string 当前页面对象,是一个字符串,作为下次查询的传入串,调用方不需要关心内容
}
/process/technic/get 工艺详情(新)
Method: GET
请求:
id int M 工艺id
响应:
code: 0
msg: ok
data:{
'id': int M 工艺ID
'custom_id' string M 自定义ID
'name' string M 工艺名
'desc' string M 描述
'default_role': int M 默认角色
'custom_cols': list M 自定义字段
[
string M 字段名
]
}
/process/technic/create 添加新的工艺(新)
Method: POST
请求:
'name': M string 工艺名
'custom_id' string M 自定义ID
'desc' string O 描述
'default_role': int O 默认角色
'custom_cols': list O自定义字段
[
string M 字段名
]
响应:
code: 0
msg: ok
data:{
'id': int 工艺ID
}
/process/technic/update 编辑工艺(新)
Method: POST
请求:
'id': int 工艺ID
'name': O string 工艺名
'desc' string O 描述
'default_role': int O 默认角色
'custom_cols': list O 自定义字段
[
string M 字段名
]
'force' bool O 是否强制执行更新(值是0或1),不传时默认是0
响应:
code: 0
msg: ok
data:
/process/technic/delete 删除工艺(新)
Method: POST
请求:
'id': int M 工艺ID
'force': bool O 是否强制执行删除(值是0或1),不传时默认是0
响应:
code: 0
msg: ok
data:
进销存
原入库单的url替换
/station/stock/in_stock_sheet/xxx换成/stock/in_stock_sheet/material/xxx(老)
一共有 8个 接口
/station/stock/in_stock_sheet/semi_product/list 搜索半成品及成品(新)
Method: GET
请求:
q string O 搜索内容
type int M 2半成品3成品
category1_id O string 一级分类
category2_id O string 二级分类
begin date M 开始日期
end date M 结束日期
page_obj O string 起始页(不包含),默认第0页
reverse O bool 是否反向查询。1:是,0:不是
limit int M 分页限制
响应:
code: 0
msg: ok
data: [
{
'id': M int 入库单号
'batch_num' M string 批次号
'spu_id' M string 商品ID
'sku_id' O string 商品ID
'name': M string 商品名称 sku/spu?
std_unit_name M string 单位
sale_unit_name O string 销售单位
'amount' M float 入库数 基本销售?
'unit_price' M int 入库单价
‘shelf_name’ M string 库位
'in_stock_time' M datetime 入库时间
'creator' M 操作人
}]
pagination: { M dict 分页信息
peek O int 实际peek到的条数。
more O bool 是否到头,1:没有更多数据,0:有更多(默认)
page_obj M string 当前页面对象,是一个字符串,作为下次查询的传入串,调用方不需要关心内容
}
/process/task/completed 批次工艺完成信息(新)
Method: GET
请求:
'batch_num' M string 批次号
响应:
code: 0
msg: ok
data: [
{
'id': M int 工艺ID
'name' M string 工艺名
'finish_time' M datetime 完成时间
'worker' M 操作人
}]
/station/stock/get 库存盘点(老)
url从/station/stock/get 换成 /station/stock/list
添加原料半成品成品字段
接口名: /station/stock/get
Method: GET
请求:
category_id_1 O string 一级分类ID
category_id_2 O string 二级分类ID
text O string 商品名或者商品ID
offset O int 偏移量 默认0
limit O int 限制数量 默认10
export O int 是否导出(1:导出;2:不导出) 默认0
响应:
code M int 0为成功,其它为失败
msg M string 错误提示信息
data M list 返回的库存信息
[{
spu_id M string 商品ID
name M string 商品名
station_id M string 站点ID
category_id_1 M string 一级分类ID
category_name_1 M string 一级分类名称
category_id_2 M string 二级分类ID
category_name_2 M string 二级分类名称
std_unit_name M string 单位
remain M float 剩余库存
avg_price M float 均价
material: { 原料
amount 剩余库存
avg_price 均价
},
semi: [{ 半成品
batch_num 批次号
amount 剩余库存
avg_price 均价
}],
product: [{ 成品
batch_num 批次号
amount 剩余库存
avg_price 均价
}],
}]
/station/stock/get 具体spu的库存情况(新)
Method: GET
请求:
'spu_id' M string spuid
响应:
code: 0
msg: ok
data:
{
spu_id M string
name M string 商品名
avg_price M int 库存均价
remain M int 库存
unit_name M string 单位名
'material [list 原料
{
amount M float 数量
avg_price M int 库存均价
batch_num M string 批次号
spec_id M string 采购规格ID
name M string 规格名
ratio M float 规格
purchase_unit_name M string 采购单位名
unit_name 基本单位
life_time 保质期
supplier_name M string 供应商名
self_name M string 库位
}
]
semi [list 半成品 基本单位还是销售单位商品id商品名
{
amount M float 数量
unit_name 基本单位
in_stock_time 入库时间
creator 操作人
avg_price M int 库存均价
batch_num M string 批次号
name M string SPU名
self_name M string 库位
}
]
product [list 成品 基本单位还是销售单位商品id商品名
{
amount M float 数量
unit_name 基本单位
in_stock_time 入库时间
creator 操作人
avg_price M int 库存均价
batch_num M string 批次号
name M string 商品名
self_name M string 库位
}
]
}
/station/stock/edit 盘库(老)
添加参数区别原料半成品成品
/station/stock/in_stock_sku 入库记录(老)
添加字段区别原料半成品成品
/station/stock/increase 报溢记录(老)
添加字段区别原料半成品成品
/station/stock/loss 报损记录(老)
添加字段区别原料半成品成品
/station/stock/warning 安全库存(老)
修改读取库存的逻辑
/station/refund/edit 退货入库
修改入库逻辑
/station/stock/in_stock_sku 原料入库(原成品入库) url?
修改入库逻辑
采购
/station/task/purchase/search 采购任务搜索(老)
读取库存的逻辑修改
station/stock/out_stock_sheet/detail 出库单详情
detail 字段 加 sale_quantity表示销售单位的出库数
加工
/process/process_order/list 加工计划或加工单搜索(新)
Method: GET
请求:
date_type int M 日期类型(1计划开始时间,2计划完成时间,3开始时间,4完成时间,5创建时间,6下达时间)
begin date M 开始日期
end date M 结束日期
q string O 搜索内容
status int O 状态 (加工计划下1未下达2已下达3已完成)(加工单下2未完成3已完成)
page_obj O string 起始页(不包含),默认第0页
reverse O bool 是否反向查询。1:是,0:不是
limit int M 分页限制
响应:
code: 0
msg: ok
data: [
{
id M int ID
create_time datetime M 创建时间
plan_recv_amount float M 计划投入物料数
real_recv_amount float M 实际投入物料数
spu_id M string spu
spu_name M string spu名
batch_num M string 批次号
sku_id string M SKU
sku_name string M sku名
std_unit_name string M 基本单位名
sale_unit_name string M 销售单位名
plan_amount float M 计划生产数量
finish_amount float M 已完成生产数量
status int M 状态(加工计划下1未下达2已下达3已完成)(加工单下2未完成3已完成)
creator string M 操作人
start_time datetime M 开始时间
release_time datetime M 下达时间
plan_finish_time datetime M 计划完成时间
tasks M list[
{
id M int 任务ID
technic_flow_name M string 工艺流程名
plan_worker O string 分配工人
real_worker O string 实际工人
in_amount O float 加工前数量
out_amount O float 加工后数量
status M int 1未开始2已完成
type int M 类型(1原料,2半成品)
role_name int M 角色ID
plan_finish_time M datetime 计划完成时间
}
]
}]
pagination: { M dict 分页信息
peek O int 实际peek到的条数。
more O bool 是否到头,1:没有更多数据,0:有更多(默认)
page_obj M string 当前页面对象,是一个字符串,作为下次查询的传入串,调用方不需要关心内容
}
/process/process_order/task/list 加工计划对应的任务信息(新)
Method: GET
请求:
proc_order_ids list M 加工计划ID
响应:
code: 0
msg: ok
data: [
{
proc_order_id M int 加工单ID
id M int 任务ID
spu_id M str
spu_name M str
material_type M 物料类型
batch_num M str 批次号
technic_flow_name M string 工艺流程名
worker_id O int 分配工人
plan_recv_amount O float 计划领料数量
role_id int M 角色ID
plan_finish_time M datetime 计划完成时间
}
]
/process/process_order/print 加工计划或加工单打印(新)
Method: GET
请求:
ids list M 加工计划ID
响应:
code: 0
msg: ok
data: [
{
id M int ID
plan_recv_amount float M 计划投入物料数
real_recv_amount float M 实际投入物料数
spu_id M string spu
spu_name M string spu名
batch_num M string 批次号
sku_id string M SKU
sku_name string M sku名
std_unit_name string M 基本单位名
sale_unit_name string M 销售单位名
plan_amount float M 计划生产数量
finish_amount float M 已完成生产数量
status int M 状态(加工计划下1未下达2已下达3已完成)(加工单下2未完成3已完成)
start_time datetime M 计划开始时间
plan_finish_time datetime M 计划完成时间
tasks M list[
{
id M int 任务ID
technic_flow_name M string 工艺流程名
technic_flow_desc M 工艺描述
}
]
}]
/process/process_order/get 加工计划详情(新)
Method: GET
请求:
id O int ID
code O int 二维码
响应:
code: 0
msg: ok
data
{
id M int ID
code M int 条形码
create_time datetime M 创建时间
plan_recv_amount float M 计划投入物料数
real_recv_amount float M 实际投入物料数
spu_id M string spu
spu_name M string spu名
batch_num M string 批次号
shelf_name M string 库位
sku_id string M SKU
sku_name string M sku名
std_unit_name string M 基本单位名
sale_unit_name string M 销售单位名
material_type int M 物料类型1原料2半成品
plan_amount float M 计划生产数量
finish_amount float M 已完成生产数量
status int M 状态(加工计划下1未下达2已下达3已完成)(加工单下2未完成3已完成)
creator string M 操作人
start_time datetime M 计划开始时间
plan_finish_time datetime M 计划完成时间
tasks list M[{
id int M 任务ID
technic_flow_id int M 工艺流ID
technic_flow_name string M 工艺流名
technic_flow_type int M 工艺类型1普通2分装
desc string M 工艺描述
custom_cols dict M 自定义字段
in_amount float M 工艺前数量
out_amount float M 工艺后数量
status int 状态1未完成2已完成
}]
}
/process/process_order/create 新建加工计划(新)
Method: POST
请求:
recv_amount float M 投入物料数
custom_id string M 计划编号
sku_id string M SKU
plan_amount float M 计划生产数量
type int M 类型(1原料,2半成品)
batch_num string M 批次号
plan_finish_time M datetime 计划完成时间
finish_technics [ list O 同步完成的工艺
{
technic_id int M 工艺ID
index int M 顺序
}
]
响应:
code: 0
msg: ok
data
{
id M int ID
}
/process/process_order/update 编辑加工计划(新)
Method: POST
请求:
id M int ID
recv_amount float O 投入物料数
sku_id string O SKU
plan_amount float O 计划生产数量
recv_amount float O 领料数量
type int O 类型(1原料,2半成品)
batch_num string O 批次号
plan_finish_time O datetime 计划完成时间
finish_technics [ list O 同步完成的工艺
{
technic_id int M 工艺ID
index int M 顺序
}
]
响应:
code: 0
msg: ok
data
/process/process_order/delete 删除加工计划(新)
Method: POST
请求:
id M int ID
响应:
code: 0
msg: ok
data
/product/sku/list 通用搜索商品接口
Method: GET
请求:
q M 搜索内容
limit O 限制返回条数(默认10)
响应:
code: 0
msg: ok
data
[
{
sku信息(全部都返回了)
}
]
/process/process_order/stock/get 加工计划商品当前库存(新)
Method: GET
请求:
sku_id M string SKUID
响应:
code: 0
msg: ok
data
{
std_frozen_stock float M 待出库数(标准单位)
sale_frozen_stock float M 待出库数(销售单位)
std_product_stock float M 成品库存(标准单位)
sale_product_stock float M 成品库存(销售单位)
material_stock float M 原料库存
semi_stock float M 半成品库存
wip_stock float M 加工中库存
sale_unit_name string M 销售单位
std_unit_name string M 基本单位
ratio float M 规格
}
/process/process_order/material/avail_batch 加工计划商品原料可用批次(新)
Method: GET
请求:
sku_id M string SKUID
响应:
code: 0
msg: ok
data {
technic_flow list M [ 工艺流列表
{
id int M 工艺流ID
version int M 工艺流版本
name int M 工艺流名字
}
]
batchs list M [
{
shelf_name string M 库位
batch_num string M 批次号
life_time datetime M 保质期(先进先出才有)
supplier_name string O 供应商名(原料才有)
stock_num float M 库存数
}
]
}
/process/process_order/semi/avail_batch 加工计划商品半成品可用批次(新)
Method: GET
请求:
sku_id M string SKUID
响应:
code: 0
msg: ok
data {
technic_flow list M [ 工艺流列表
{
id int M 工艺流ID
version int M 工艺流版本
name int M 工艺流名字
technic_id int M 工艺ID
}
]
batchs list M [ 批次列表
{
shelf_name string M 库位
batch_num string M 批次号
std_unit_name string M 基本单位
stock_num float M 库存数
technic_flows_done list M[
{
id int M 工艺流程ID
name string M 工艺流程名字
worker int M 加工人
finish_time datetime M 完成时间
technic_id int M 工艺ID
}
]
}
]
}
/process/process_order/submit 下达加工单(新)
Method: POST
请求:
tasks M list [
{
proc_order_id M 加工计划ID
id M int 任务ID
role_id O int 角色ID
worker_id O int 工人ID
plan_start_time O datetime 计划开工时间
plan_finish_time O datetime 计划完成时间
}
]
响应:
code: 0
msg: ok
data
/process/process_order/finish 手动完成加工单(新)
Method: POST
请求:
id M 加工计划ID
响应:
code: 0
msg: ok
data
/process/process_order/material_recv/list 领料搜索(新)
Method: GET
请求:
q string O 搜索内容
type int O 类型 1原料2半成品
page_obj O string 起始页(不包含),默认第0页
reverse O bool 是否反向查询。1:是,0:不是
limit int M 分页限制
响应:
code: 0
msg: ok
data: [
{
id M int ID
spu_id M string spu
spu_name M string spu名
batch_num M string 批次号
type int M 类型 1原料2半成品
proc_order_id M int 加工单ID
plan_recv_amount float M 计划领取数
real_recv_amount float M 实际领取数
unit_name string M 单位
shelf_name string M 货位
}
]
pagination: { M dict 分页信息
peek O int 实际peek到的条数。
more O bool 是否到头,1:没有更多数据,0:有更多(默认)
page_obj M string 当前页面对象,是一个字符串,作为下次查询的传入串,调用方不需要关心内容
}
/process/process_order/material_return/list 退料搜索(新)
Method: GET
请求:
q string O 搜索内容
type int O 类型 1原料2半成品
page_obj O string 起始页(不包含),默认第0页
reverse O bool 是否反向查询。1:是,0:不是
limit int M 分页限制
响应:
code: 0
msg: ok
data: [
{
id M int ID
recv_id int M 领料ID
spu_id M string spu
spu_name M string spu名
batch_num M string 批次号
type int M 类型 1原料2半成品
proc_order_id M int 加工单ID
return_amount float M 退领数
unit_name string M 单位
shelf_name string M 退货货位
}
]
pagination: { M dict 分页信息
peek O int 实际peek到的条数。
more O bool 是否到头,1:没有更多数据,0:有更多(默认)
page_obj M string 当前页面对象,是一个字符串,作为下次查询的传入串,调用方不需要关心内容
}
/process/process_order/material_recv/create 新建领料(新)
Method: POST
请求:
proc_order_id M int 加工单ID
amount M float 领料数
响应:
code: 0
msg: ok
data
/process/process_order/check 加工单检查
Method: GET
请求:
code M string 加工单扫码
响应:
code: 0
msg: ok
data {
type int M 领料类型 1原料2半成品
status int M 加工单状态 2未开始3已完成4加工中
first_recv bool M true,第一次领料,不用弹框,false,需要弹框
}
status为2未开始的可以领料,但type为2半成品的需要弹框
status为3已完成4加工中的可以加工,判断是否可以加工和type无关
/process/process_order/material_return/create 创建退料(新)
Method: POST
请求:
recv_id M int 领料ID
amount M float 退料数
响应:
code: 0
msg: ok
data {
id M int 退料ID
}
硬件
/process/task/finish 完成任务(新)
Method: POST
请求:
task_id int M 任务ID
recv_amount float M 加工前重量
out_amount float M 加工后重量
start_time datetime M 开始时间
响应:
code: 0
msg: ok
data:
/process/task/package 分装任务(新)
Method: POST
请求:
task_id int M 任务ID
recv_amount float M 加工前重量
out_amount float M 加工后重量
start_time datetime M 开始时间
响应:
code: 0
msg: ok
data: {
code string M 新的商品码
}
/process/task/in_stock 入库商品(半成品或成品)
Method: POST
请求:
proc_order_id int M 加工单ID
batch_num string M 商品批次号
amount float M 入库数
shelf_id int M 库位
type int 类型 (2半成品,3成品)
price float M 入库单价
packages list O 定重批次
响应:
code: 0
msg: ok
data:
/process/task/list 获取个人任务
Method: GET
请求:
search_type M int 类型1未完成2已完成
task_type O int 类型1自己的2未指派的
create_date M date 生成时间
响应:
code: 0
msg: ok
data: [
{
technic_flow_id int M 流程ID
technic_flow_name string M 流程名字
technic_flow_version int M 流程版本
tasks list M [ 任务
{
id M int 任务ID
recv_amount M float 领料数
out_amount M float 产出数
status M int 状态1未完成2已完成
spu_id string M spu_id
spu_name string M spu名字
}
]
}
]
/process/task/package_detail 定重明细
Method: GET
请求:
task_id int M 任务ID
响应:
code: 0
msg: ok
data: [
{
worker string M 操作人
package_time datetime M 定重时间
status int M 1入库前2已入库3已分拣
amount float M 重量
material_code str M 码
batch_num str M 批次号
order_id string O 订单号
}
]
/process/task/package_cancel 作废定重
Method: POST
请求:
material_code string M 码
响应:
code: 0
msg: ok
data: [
{
worker string M 操作人
package_time datetime M 定重时间
amount float M 重量
material_code str M 码
order_id string O 订单号
}
]
/process/task/repackage 重新定重
Method: POST
请求:
material_code string M 码
amount float M 重量
响应:
code: 0
msg: ok
data
/weight/skus 按订单分拣(老)
参数加clean_food bool 做过滤
skus 列表加字段
sale_weighting_quantity float 销售单位的分拣数
weight/sku/out_of_stock 批量缺货
可能要改逻辑
/process/sort/order/next_sku 分拣页下一个商品
Method: GET
请求:
sku_id str M 商品ID
order_id str M 订单ID
reverse bool M 翻转。1代表翻转,顺序向前;0代表不翻转,顺序向后。
响应:
code: 0
msg: ok
data: {
id str M sku_id
more bool 当前方向下,还有没有下一个
}
process/sort/sku/get 获取商品详情
Method: GET
请求:
sku_id str M 商品ID
order_id str M 订单ID
响应:
code: 0
msg: ok
data: {
id str M sku_id
sku_name str M 商品名
resname str M 商户名
ratio float M 规格
sale_unit_name str M 销售单位
std_unit_name str M 基本单位
quantity float 下单数
driver_name str M 司机名
address_id str M 商户id
telephone str M 客服电话
sort_id str M 分拣号
sort_batch list M 已分拣批次
[{
batch_num str M 批次号
amount float M 称重数
worker str M 操作人
}]
}
/process/sort/sku/code/get 分拣扫码信息
Method: GET
请求:
material_code string M 码
sku_id str M
order_id
响应:
code: 0
msg: ok
data: {
batch_num str M 批次号
amount float M 称重数
}
/process/sort/sku/submit 提交分拣
Method: POST
请求:
batch_nums list M 批次列表
sku_id str M
order_id
响应:
code: 0
msg: ok
data:
/process/sort/sku/cancel 取消分拣
Method: POST
请求:
batch_num list M 批次列表
sku_id str M
order_id
响应:
code: 0
msg: ok
data: