Skip to content

采购

沿用openapi

入库

沿用openapi

订单

沿用openapi

客户收款单可以使用订单数据

供应商

结款列表 参考/station/stock/settle_sheet

Method GET
请求:
    start        M(必填)   datetime 开始时间
    end     M   datetime 结束时间
    settle_supplier_id O   str     供应商ID
    type    M   int     时间过滤类型(1提交日期,2建单日期)
    receipt_type    O   int  结款单状态()

响应:
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   dict    数据字段为订单表字段;

    [
        {
            "station_id": "T7936",
            "status": 1
            "total_price": 4500.0, int 总金额(分)
            "settle_supplier_name": "蔬菜供应商", str 供应商名
            "id": "T7936-FKD-2018-07-16-00001", str 结款单ID
            "date_time": "2018-07-16 14:38:29", datetime 结款时间
            "settle_supplier_id": "T11365", str 供应商ID
            "sub_sheets": [ list 包含单据
                {
                    "sku_money": 4500.0,
                    "creator": "miaomiao",
                    "submit_time": "2018-05-15T00:00:00",
                    "create_type": 1,
                    "supplier_name": "蔬菜供应商",
                    "fentans": [],
                    "date_time": "2018-05-30T15:48:22.410",
                    "_id": "T7936-JHD-2018-05-30-00001",
                    "delta_money": 0,
                    "type": 1,
                    "status": 3,
                    "update_time": "2018-05-31T16:02:03.092",
                    "init_details": [
                        {
                            "shelf_id": null,
                            "life_time": null,
                            "name": "长白菜|1斤/斤",
                            "std_unit": "斤",
                            "category": "蔬菜",
                            "shelf_name": null,
                            "purchase_release_id": 16551836,
                            "operator": "miaomiao",
                            "spu_id": "C874498",
                            "id": "D3457159",
                            "purchase_unit": "斤",
                            "batch_number": "T7936-JHD-2018-05-30-00001-00001",
                            "ratio": 1.0,
                            "money": 4500.0,
                            "unit_price": 300,
                            "quantity": 15.0
                        }
                    ],
                    "settle_supplier_id": "T11365",
                    "purchase_sheet_id": "T7936-CGD-2018-05-30-00001",
                    "zhezhangs": [],
                    "station_id": "T7936",
                    "details": [
                        {
                            "shelf_id": null,
                            "life_time": null,
                            "name": "长白菜|1斤/斤",
                            "std_unit": "斤",
                            "category": "蔬菜",
                            "shelf_name": null,
                            "purchase_release_id": 16551836,
                            "operator": "miaomiao",
                            "spu_id": "C874498",
                            "id": "D3457159",
                            "purchase_unit": "斤",
                            "batch_number": "T7936-JHD-2018-05-30-00001-00001",
                            "ratio": 1.0,
                            "money": 4500.0,
                            "unit_price": 300,
                            "quantity": 15.0
                        }
                    ]
                }
            ],

        }
    ]

商品

沿用openapi

商户

沿用openapi

供应商

拉取这个站点的供应商信息 参考 /supplier/search

Method: GET
请求
    category_id_2 O string
    spu_id O string
    search_text O string 搜索字段
    limit M INT
    offset M INT

响应
    {
      code: 0,
      data: {
        supplier: [{customer_id:'name',  name:'xxxx', phone:'xxxx'}, ....]
      }
    }

仓库档案

获取货位信息 参考/station/stock/shelf/get

接口名:/station/stock/shelf/get

method:get

请求: 无

响应

code M int 0为成功,其他为失败
msg M string 错误提示信息
data M list[
    {
    classification M string
    level M int
    shelf M list[
        {
         shelf_id M int
         shelf_name M string
         parent_id M int
         },
        {
         .....
        },
        ],
    }

部门档案,人员档案

角色 参考 /station/role/search

搜索(station)角色

method
    GET
request
    station_id      O   str 不传代表全部
    search_text     O   str 角色名,不传代表全部
response
    {
        data: {
            roles: [
                id:             M   int
                name:           M   str
                station_name:   M   str
                description:    M   str
                create_date:    M   str or null
            ]
        }
        msg: "OK",
        code: 0
    }

用户 参考 /station/user/search

搜索(station)用户

method
    GET
request
    is_valid    O   bool (0 或 1)
    station_id  O   str
    role_id     O   int
    search_text O   str
    is_admin    O   bool (0 或 1)    是否是管理员
    // 分页
    offset      O   int 默认 0
    limit       O   int 默认 20
response
    {
        data: {
            users: [                M   list
                {
                    id:             M   int     用户 id
                    username:       M   str     用户名
                    name:           M   str     姓名
                    roles: [
                        {
                            id: 123,
                            name: '角色名'
                        }
                    ]
                    is_admin:       M   bool    是否是管理员
                    is_valid:       M   bool
                    create_date:    M   str or null
                    role_name       M   str
                    station_name    M   str
                }
            ]
        ],
        msg: 'OK',
        code: 0,
    }