采购行情V3.0
station/purchase_spec/statistics 获取采购规格的统计记录
接口描述
获取采购规格的统计记录
Method
GET
request
spec_id M string 采购规格
query_type M int 数据类型。1:采购价;2:询价;3:入库记录
settle_supplier_id M string 供应商ID
reponse
{
"code": 0,
"msg": "ok",
"data": { M dict
"station_day_avg_price": [{ M list 站点每日均价(7天的)
"static_date": "2018-10-30" M string 统计日期
"avg_price": "100.00" M string 均价
},...],
"supplier_day_avg_price":[{ M list 供应商每日均价(7天的)
"static_date": "2018-10-30" M string 统计日期
"avg_price": "100.00” M string 均价
},...],
"station_avg_price":"100.00”, M string 站点7天均价
"supplier_avg_price":"100.00", M string 供应商7天均价
"query_type":1, M int 数据类型。1:采购价;2:询价;3:入库记录
"latest_price":[{ M list 近三条最新价格
"supplier_name": "六六" M string 供应商名字
"datetime":"2018-10-30 12:33" M string 时间
"price":"100.00" M string 商品单价
},...],
"max_price":{ M dict 最高价格
"supplier_name": "六六" M string 供应商名字
"price":"100.00" M string 商品单价
},
"min_price":{
"supplier_name": "六六" M string 供应商名字
"price":"100.00" M string 商品单价
},
percentage_change M string 环比变化率
}
station/stock/purchase_sheet/details 获取采购单据详情
接口描述
获取采购单据详情
Method
GET
request
不变
reponse
新增字段: station_purchase_avg_price M string 站点7天采购均价
示例:
{
"code": 0,
"msg": "ok",
"data": {
purchase_sheet: {
submit_time: "2018-10-29T20:03:10.397",
settle_supplier_id: "T13384",
ref_price_type: 1,
create_time: "2018-10-29T20:02:58.150",
supplier_name: "综合供应商",
status: 2,
operator: "miaomiao",
station_name: "喵喵总仓"
},
tasks:[{
station_purchase_avg_price: "100.00" M string 站点7天采购均价(新增)
purchase_unit_name: "斤",
ref_price: 213,
already_purchased_amount: 72,
release_id: 35958336,
release_time: "2018-10-29T20:01:47",
purchase_price: 213, category_name_1: "蔬果类",
stock: 10,
category_name_2: "根茎类",
spec_name: "红头葱",
ratio: 1,
status: 3,
spec_id: "D4208909",
purchase_amount: 72,
suggest_purchase_num: 62,
plan_amount: 72,
id: "5bd6f6f2e8ed3f204bda7631",
std_unit_name: "斤",
address:[{
plan_amount: 12,
res_name: "汉虾王(大冲店)",
suggest_purchase_num: 62,
remark: ""
}],
},...]
}
station/stock/in_stock_sheet/material/new_detail 获取入库单详情
接口描述
获取采购单据详情
Method
GET
request
不变
reponse
新增字段: station_stock_avg_price M string 站点7天入库均价
示例:
{
"code": 0,
"msg": "ok",
"data": {
settle_supplier_id: "T13251",
purchase_sheet_id: null,
type: 1,
supplier_customer_id: "SGGYS",
discount: [ ],
sku_money: "4.00",
submit_time: "2018-10-30",
supplier_name: "水果供应商",
delta_money: 0,
creator: "miaomiao",
station_id: "T7936",
status: 2,
share: [ ],
id: "T7936-JHD-2018-10-30-00001",
date_time: "2018-10-30T10:20:47.990"
details: [{
station_stock_avg_price: "100.00" M string 站点7天入库均价(新增)
money: "4.00",
quantity: 2,
batch_number: "T7936-JHD-2018-10-30-00001-00001",
purchase_unit: "斤",
shelf_name: null,
spu_id: "C1376358",
id: "D4210477",
operator: "miaomiao",
shelf_id: null,
category: "农产干货",
ratio: 1,
desc: null,
std_unit: "斤",
life_time: "2018-10-30",
name: "散装甜梅菜",
unit_price: "2.00"
},...,]
}