入库单
字段可选
M:must 必填
O:optional 选填
C: conditional 某些条件下必选
搜索入库单
接口名
/business/stock_in
Method
GET
请求
start_date M datetime 开始查询日期
end_date M datetime 结束查询日期
date_type M string 查询日期类型('operate_date'或'create_time')
offset O int 分页缩进,默认0
limit O int 分页每页数量,默认10
status O int 入库单状态(1:待提交;2:待审核;3:审核通过;4:审核未通过;5:已冲销)
query_data O string 查询内容,支持客户ID(K001或者1)和入库单号(RK001)
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
[
{
"status" M 入库单状态码(1:待提交;2:待审核;3:审核通过;4:审核未通过;5:已冲销)
"customer_cellphone" M 客户手机号
"customer_name" M 客户名
"create_time" M 'YYYY-MM-DD' 入库单创建时间
"id" M 入库单ID
"operate_date" M 'YYYY-MM-DD' 入库时间
"customer_id" M 客户ID
"in_count": 100 M 入库件数
}
]
示例
request
http://localhost:8888/business/stock_in?start_date=2016-08-04&end_date=2016-09-21&date_type=create_time&offset=0&limit=10&query_data=K001
response
{
"code": 0,
"pagination": {
"count": 1,
"limit": 10,
"offset": 0
},
"data": [
{
"status": 3,
"customer_cellphone": "1111111111",
"customer_name": "test1111",
"create_time": "2016-08-21",
"id": "RK00001",
"operate_date": "2016-08-10",
"customer_id": 1,
"in_count": 100
}
],
"msg": "ok"
}
入库单明细
接口名
/business/stock_in/detail
Method
GET
请求
id M string 入库单ID
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
"operate_date" M YYYY-MM-DD 入库日期
"customer_cellphone" M string 客户电话
"id" M 入库单ID
"details": [ M list 入库商品详情
{
"goods_category_1_name" M string 商品一级分类名
"goods_category_1_id" M string 商品一级分类ID
"name" M string 商品名
"batch_id" M string 批次号
"goods_category_3_name" M string 商品品类名
"goods_category_3_id" M string 商品品类名ID
"pallet_count" M int 板数
"contract_id" M string 合同ID
"goods_category_2_name" M string 商品二级分名
"goods_category_2_id" M string 商品二级分名ID
"ware_type" M int 仓库库存类别(1:公库;2:私库)
"in_count" M int 入库数
"ware_category_4_name" M string 通道名
"ware_category_4_id" M string 通道ID
"tail_pallet_count" M int 尾板数
"count_per_pallet" M int 每板件数
"ware_category_3_name" M string 库位名
"ware_category_2_name" M string 库区名
"ware_category_1_name" M string 仓库名
"ware_category_3_id" M string 库位ID
"ware_category_2_id" M string 库区ID
"ware_category_1_id" M string 仓库ID
"unit_weight" M int 件重(kg)
}
],
"storage_fee_detail": [{ M list 处置费详情
"real_count" M int 实际数量
"unit" M int 计费单位(1:件;2:吨;3:板)
"should_pay" M float 应付金额
"unit_name" M string 计费单位名
"unit_price" M float 单价
"charge_count" M int 计费数量
"name" M string 商品名
"batch_id" M string 批次号
}],
"carrying_fee_detail": [{ M list 搬运费详情
"real_count" M int 实际数量
"unit" M int 计费单位(1:件;2:吨;3:板)
"should_pay" M float 应付金额
"unit_name" M string 计费单位名
"unit_price" M float 单价
"charge_count" M int 计费数量
"name" M string 商品名
"batch_id" M string 批次号
}],
"total_should_pay" M float 全部应付金额
"task_should_pay" M float 作业单应付金额
"in_should_pay" M float 入库费用
"status" M int 入库单状态
"pre_batch_id" M string 批次号前缀
"customer_id" M 客户ID
"additional_task_details": [ O list 作业单详情
{
"follower_name" M string 跟进人名
"follower_id" M int 跟进人ID
"remark" M string 备注
"real_count" M float 实际数量
"name" M string 作业费用名
"fee_id" M int 作业费用ID
"charge_count" M float 计费数量
"unit_name" M string 单位名
"department_name" M string 跟进人部门名
"department_id" M int 跟进人部门ID
"unit_price" M float 单价
}
],
"customer_name" M string 客户名
示例
request
http://teststation.guanmai.cn:8888/business/stock_in/detail?id=RK00123
response
{
"code": 0,
"data": {
"customer_name": "北京客户001",
"id": "RK00125",
"storage_fee_detail": [{
"real_count": 1,
"unit": 1,
"should_pay": 222.5,
"unit_name": "件",
"unit_price": 222.5,
"charge_count": 1,
"name": "1",
"batch_id": "2314134-1"
}],
"pre_batch_id": "2314134",
"details": [{
"goods_category_1_name": "冻品",
"ware_type": 1,
"goods_category_3_id": "C000054",
"goods_category_1_id": "A000047",
"in_count": 1,
"goods_category_3_name": "清风牌",
"ware_category_1_name": "23321",
"ware_category_2_id": "WB000971",
"contract_id": "HT00109",
"ware_category_2_name": "123",
"pile_up_num": 1,
"goods_category_2_id": "B000051",
"count_per_pallet": 1,
"ware_category_1_id": "WA000970",
"goods_category_2_name": "冻牛肉",
"ware_category_4_name": "111",
"unit_weight": 10.0,
"ware_category_3_name": "123",
"ware_category_3_id": "WC000972",
"batch_id": "2314134-1",
"name": "1",
"ware_category_4_id": "WD000973"
}],
"customer_cellphone": "12312312312",
"carrying_fee_detail": [{
"real_count": 0.01,
"unit": 2,
"should_pay": 61.75,
"unit_name": "吨",
"unit_price": 123.5,
"charge_count": 0.5,
"name": "1",
"batch_id": "2314134-1"
}],
"total_should_pay": 384.25,
"task_should_pay": 100.0,
"additional_task_details": [{
"fee_id": 1,
"real_count": 1.0,
"department_id": 23,
"unit_name": "呀",
"unit_price": 100.0,
"charge_count": 1.0,
"follower_name": "www",
"follower_id": 51,
"name": "高温作业费",
"remark": "13",
"department_name": "北京部门1"
}],
"in_should_pay": 284.25,
"status": 2,
"operate_date": "2016-09-28",
"customer_id": "K00084"
},
"msg": "ok"
}
创建入库单
接口名
/business/stock_in/create
Method
POST
请求
customer_id M string 客户ID(K001)
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回入库单ID
示例
request
http://teststation.guanmai.cn:8888/business/stock_in/create
form-data
customer_id:K001
response
{
"data": "RK0001",
"code": 0,
"msg": "ok"
}
提交入库单
接口名
/business/stock_in/submit
Method
POST
请求
id M string 入库单号
pre_batch_id M string 批号
operate_date M datetime 入库日期
details M list 批次信息
goods_category_3_id M string 品类ID
in_count M int 入库数
unit_weight M int 件重
count_per_pallet M int 每板件数
pile_up_num M int 叠板数
ware_category_4_id M string 通道ID
contract_id M string 合同ID
name M string 商品名
additional_task_details O list 作业单信息
fee_id M int 费用ID
real_count M int 实际数量
follower_id M int 跟进人ID
remark M string 备注
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/stock_in/submit
form-data
id: RK00000001
pre_batch_id: 2
operate_date: 2016-08-05
details:[{"name":"dd","goods_category_3_id":"C00031","in_count":100,"unit_weight":2000,"count_per_pallet":10,"pile_up_num":1,"ware_category_4_id":"WD205","contract_id":"HT000001"}]
additional_task_details:[{"fee_id":"1","real_count":100,"follower_id":20,"remark":"WD205"}]
response
{
"msg": "ok",
"code": 0,
"data": ""
}
拒绝入库单
接口名
/business/stock_in/reject
Method
POST
请求
id M string 入库单号
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/stock_in/reject
form-data
id: RK000001
response
{
"msg": "ok",
"code": 0,
"data": null
}
通过入库单
接口名
/business/stock_in/adopt
Method
POST
请求
id M string 入库单号
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/stock_in/adopt
form-data
id: RK000001
response
{
"msg": "ok",
"code": 0,
"data": null
}
冲销入库单
接口名
/business/stock_in/delete
Method
POST
请求
id M string 入库单号
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/stock_in/delete
form-data
id: RK000001
response
{
"msg": "ok",
"code": 0,
"data": null
}
入库单基础信息
接口名
/business/stock_in/base_info
Method
GET
请求
无
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 基础信息
示例
request
127.0.0.1:8888/business/stock_in/base_info
response
{
"data": {
"status": {
"PASSED": 3,
"DELETED": 5,
"VERIFYING": 2,
"FAIL": 4,
"WAIT_FOR_SUBMIT": 1
},
"calculate_method": {
"REAL": 3,
"HALF_PLUS": 1,
"ONE_PLUS": 2
},
"ware_type": {
"PRIVATE": 2,
"SHARE": 1
}
},
"code": 0,
"msg": "ok"
}