Skip to content

批次

字段可选

M:must 必填
O:optional 选填
C: conditional 某些条件下必选

客户名下有库存的批次号

接口名
    /business/avail_batch_ids
Method
    GET
请求
    customer_id  M   string  客户ID(K001)
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回批次号列表
示例
    request
        http://test.guanmai.cn:8888/business/avail_batch_ids?customer_id=K0001
    response
        {
            "data": ["0090-1", "24-1", "86-1"],
            "code": 0,
            "msg": "ok"
        }

批次搜索

接口名
    /business/batch
Method
    GET
请求
    query_data  O   string  查询内容,支持客户ID(K001或者1)和批次号
    offset  O   int 分页缩进,默认0
    limit   O   int 分页每页数量,默认10
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回json数据

    [
        {
            "batch_id"    M   string   批次号
            "customer_id"   M   string  客户ID
            "customer_name"  M   string  客户名
            "customer_cellphone"   M   string  客户手机
            "name"  M   string  商品名
            "ware_category_1_name" M   string    仓库名
            "ware_category_2_name" M   string  库区名
            "ware_category_3_name"  M   string  库位名
            "ware_category_4_name"  M   string  通道名
            "remain_count"  M   int    剩余库存
        }
    ]
示例
    request
        http://test.guanmai.cn:8888/business/batch?query_data=K00001
    response
        {
            "data": [{
                "name": "123我我我",
                "ware_category_4_name": "222",
                "ware_category_1_name": "23321",
                "batch_id": "100002-1",
                "customer_name": "北京客户001",
                "customer_id": "K00084",
                "ware_category_2_name": "123",
                "ware_category_3_name": "123",
                "customer_cellphone": "12312312312",
                "remain_count": 10
            }],
            "code": 0,
            "pagination": {
                "offset": 0,
                "count": 17,
                "limit": 10
            },
            "msg": "ok"
        }

批次明细

接口名
    /business/batch/detail
Method
    GET
请求
    "batch_id"    M   string   批次号
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回客户ID

    "ware_category_2_id":   M   string  库区ID
    "ware_category_1_name": M   string  仓库名
    "batch_id": M   string  批次号
    "customer_name":    M   string  客户名
    "stock_logs": [{    M   list    批次的库存变动
        "origin_count": M   int     原库存
        "operate_count":    M   int     操作数量
        "receipt_id":   M   string  库存变动对应的操作单号
        "receipt_type": M   int     操作单号类型(1:入库单;2:出库单;3:转户单;4:调货单)
        "creator_name": M   string  操作人
        "creator_id":   M   int     操作人ID
        "operate_date": M   datetime    操作日期
    }],
    "ware_category_2_name": M   string  库区名
    "ware_category_3_name": M   string  库位名
    "customer_cellphone":   M   string  客户手机
    "ware_category_3_id":   M   string  库位ID
    "name":     M   string  商品名
    "goods_category_2_name":    M   string  二级商品分类名
    "count_per_pallet":     M   int     每板件数
    "contract_id":  M   string  合同ID
    "customer_id":  M   string  客户ID
    "ware_category_1_id":   M   string  仓库ID
    "ware_category_4_id":   M   string  通道ID
    "ware_type":    M   int     仓库类型(1:公库;2:私库)
    "goods_category_3_name":    M   string  品类名
    "remain_count": M   int     剩余库存
    "ware_category_4_name": M   string  通道名
    "goods_category_1_name":    M   string 一级商品分类名

示例
    request
        http://test.guanmai.cn:8888/business/batch/detail?batch_id=10003-1
    response
        {
            "data": {
                "ware_category_2_id": "WB000971",
                "ware_category_1_name": "23321",
                "batch_id": "100003-1",
                "customer_name": "北京客户001",
                "stock_logs": [{
                    "origin_count": 0,
                    "operate_count": 232,
                    "receipt_id": "RK00095",
                    "receipt_type": 1,
                    "creator_name": "bjmila001",
                    "creator_id": 48,
                    "operate_date": "2016-09-21"
                }],
                "ware_category_2_name": "123",
                "ware_category_3_name": "123",
                "customer_cellphone": "12312312312",
                "ware_category_3_id": "WC000972",
                "name": "沃尔沃人",
                "goods_category_2_name": "冻牛肉",
                "count_per_pallet": 23,
                "contract_id": "HT00113",
                "customer_id": "K00084",
                "ware_category_1_id": "WA000970",
                "ware_category_4_id": "WD000973",
                "ware_type": 1,
                "goods_category_3_name": "清风牌",
                "remain_count": 220,
                "ware_category_4_name": "111",
                "goods_category_1_name": "冻品"
            },
            "code": 0,
            "msg": "ok"
        }

批次基础信息

接口名
    /business/batch/base_info
Method
    GET
请求
    无
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  基础信息
示例
    request
        http://test.guanmai.cn:8888/business/batch/base_info
    response
        {
            "data": {
                "receipt_type": {
                    "STOCK_IN_RECEIPT": 1,
                    "TRANSFER_RECEIPT": 3,
                    "STOCK_OUT_RECEIPT": 2,
                    "STOCK_MOVE": 4
                }
            },
            "code": 0,
            "msg": "ok"
        }