Skip to content

供应商app


数据库

1、mysql中iventory下增加表supplier_quoted_menu

供应商报价单

{
    id
    create_time                  datetime      建单时间
    modify_time                  datetime      修改时间
    delete_time                  datetime      删除时间
    pstatus                      
    group_id                     int           group  ID
    station_id                                 站点id
    supplier_id                  string        

    name                         string        报价单名称
    creator                      string        建单人
    extra1                       int
    extra2                       int
    extra3                       int 
    extra4                       varchar
    extra5                       varchar
    extra6                       varchar
    extra7                       datetime 
    extra8                       datetime 
    extra9                       datetime 
    extra10                      decimal
}

2、mysql中iventory下增加表supplier_quoted_menu_detail

供应商报价单商品

{
    create_time                  datetime      建单时间
    modify_time                  datetime      修改时间
    delete_time                  datetime      删除时间
    pstatus                      
    group_id                     int           group  ID
    station_id
    supplier_id                  string        站点id

    spec_id                      string        采购规格id
    quoted_price                 decimal       最近询价价格
    menu_id                      int           报价单ID
    extra1                       int
    extra2                       int
    extra3                       int 
    extra4                       varchar
    extra5                       varchar
    extra6                       varchar
    extra7                       datetime 
    extra8                       datetime 
    extra9                       datetime 
    extra10                      decimal
}

3、mysql中iventory下增加表supplier_quoted_history

供应商报价单商品

{
    create_time                  datetime      建单时间
    modify_time                  datetime      修改时间
    delete_time                  datetime      删除时间
    pstatus                      
    group_id                     int           group  ID
    station_id
    supplier_id                  string        站点id

    spec_id                      string        采购规格id
    quoted_price                 decimal       最近询价价格
    menu_id                      int           报价单ID
    extra1                       int
    extra2                       int
    extra3                       int 
    extra4                       varchar
    extra5                       varchar
    extra6                       varchar
    extra7                       datetime 
    extra8                       datetime 
    extra9                       datetime 
    extra10                      decimal
}

station

supplier_assistant/home/daily_count/get(新接口)

接口描述
    首页采购金额统计
Method
    GET
request
    days      M        int       统计的天数
response
    {
        "msg": "ok",
        "code": 0,
        "data": {
            daily_price:[
                {
                    date                    datetime     日期
                    purchase_price          float        对应日期报价金额
                }
            ]
        }
    }

supplier_assistant/home/daily_work/get(新接口)

接口描述
    首页今日报价统计
Method
    GET
request

response
    {
        "msg": "ok",
        "code": 0,
        "data": {
            quoted_tasks_todo       int   今日待完成任务
            spus_quoted             int   今日已报价商品
        }
    }

supplier_assistant/task/sheet_count/get(新接口)

接口描述
    任务页面筛选时间内的采购单统计
Method
    GET
request
    start_time            M         datetime     开始时间
    end_time              M         datetime     结束时间
    status                O         int          单据状态, 2为未报价,3为已报价,4为已删除, 默认不填为全部
response
    {
        "msg": "ok",
        "code": 0,
        "data": {
            all_task_num               int          总任务数
            all_sheet_num              int          总单据数量
            unquoted_sheet_num         int          未报价单据
            unfinish_task_num          int          未完成任务
        }
    }

supplier_assistant/task/sheet/list(老接口,加排序字段)

接口描述
    任务页面筛选时间内的采购单列表
Method
    GET
request
    start_time            M         datetime     开始时间
    end_time              M         datetime     结束时间
    sort_type             O         int          排序方式,1为按申请时间降序,2为按申请时间升序,3为按状态
    status                O         int          单据状态, 2为未报价, 3为已报价,4为已删除,默认不填为全部
    sheet_no              O         string       搜索的单据号
response
    {
        "msg": "ok",
        "code": 0,
        "data": [                   list         单据列表
            {               
                sheet_no            string       采购单据号
                apply_time          datetime     申请时间
                task_num            int          要货任务数
                sheet_price         float        单据金额
                status              int          单据状态,2为未报价, 3为已报价,4为已删除
                id                  int          要货单id
            }
        ]
    }

supplier_assistant/task/sheet/detail(老接口,不修改)

接口描述
    任务页面筛选时间内的采购单列表
Method
    GET
request
    id                 M     int          要货单id
response
    {
        "msg": "ok",
        "code": 0,
        "data":
        {   
            id                              id           要货单id                      
            sheet_no                        string       采购单据号
            status                          int          单据状态,2为未报价, 3为已报价,4为已删除
            apply_time                      datetime     报价时间
            details:[                       list         商品明细
                {
                    id                      int          商品id
                    purchase_spec_name      string       商品采购规格名
                    purchase_unit_name      string       采购单位
                    plan_amount             int          计划要货数(采购单位)
                    supply_purchase_amount  float        供货数量(采购单位)
                    supply_std_price        float        供货单价(基本单位)
                    ratio                   float        采购比例
                    std_unit_name           string       基本单位
                }
            ]               
        }
    }

supplier_assistant/task/sheet/submit(老接口,不修改)

接口描述
    提交要货单
Method
    POST
request
    id                                M     int          要货单id
    details:[                         M     list         要货单详情
        {                    
            id                        M     int          商品id
            supply_purchase_amount    M     float        供货数量
            supply_std_price          M     float        供货单价(元)
        }
    ]                      
response
    {
        "msg": "ok",
        "code": 0,
        "data": ''
    }

supplier_assistant/task/sheet/edit(老接口,不修改)

接口描述
    要货单保存草稿
Method
    POST
request
    sheet_id                          M     int          要货单id
    details:[                         M     list         要货单详情
        {                    
            id                        M     int          商品id
            supply_purchase_amount    M     float        供货数量
            supply_std_price          M     float        供货单价(元)
        }
    ]                      
response
    {
        "msg": "ok",
        "code": 0,
        "data": ''
    }

supplier_assistant/task/sheet/sync_sort_data(老接口,不修改)

接口描述
    同步分拣数据
Method
    GET
request
    id                                M     int          要货单id
    detail_ids:[]                     M     list         同步分拣数据商品id        
response
    {
        "msg": "ok",
        "code": 0,
        "data": {
            '商品id'                         float        供货数量
        }
    }

supplier_assistant/quoted/menu/list(新接口)

接口描述
    获取报价单列表
Method
    GET
request

response
    {
        "msg": "ok",
        "code": 0,
        "data": [                list       报价单列表
            {
                id               int        报价单id
                name             string     报价单名称
                spec_num         int        商品数
                quote_num        int        今日报价次数
            }
        ]
    }

supplier_assistant/quoted/menu/create(新接口)

接口描述
    创建报价单
Method
    POST
request
     name      M            string     报价单名称
response
    {
        "msg": "ok",
        "code": 0,
        "data":{
            id              int        报价单id
        }
    }

supplier_assistant/quoted/menu/delete(新接口)

接口描述
    删除报价单
Method
    POST
request
     id          M              string      报价单id
response
    {
        "msg": "ok",
        "code": 0,
        "data": null
    }

supplier_assistant/quoted/menu/details/add(新接口)

接口描述
    报价单添加商品
Method
    POST
request
     id                     M    int        报价单id
     detail_ids:[]          M    list       采购规格列表
responsek
    {
        "msg": "ok",
        "code": 0,
        "data": null
    }

supplier_assistant/quoted/menu/details/delete(新接口)

接口描述
    报价单删除商品
Method
    POST
request
     id                     M    int        报价单id
     detail_ids:[]          M    list       采购规格列表
response
    {
        "msg": "ok",
        "code": 0,
        "data": null
    }

supplier_assistant/quoted/menu/details/get(新接口)

接口描述
    报价单商品列表         
    (过滤已删除的spec)
    (商品分类变化)
Method
    GET
request
     id                     M    int        报价单id
response
    {
        "msg": "ok",
        "code": 0,
        "data":{

            details:[                list       商品列表
                {
                    spec_id          string     采购规格id
                    name             string     报价单名称
                    ratio            float      
                    std_unit_name    string     基本单位名
                    quote_price      float      报价价格(元)
                    quoted_time      datetime   报价时间
                }
            ]
        }
    }

supplier_assistant/quoted/supply_sku(新接口)

接口描述
    获取可报价商品列表
    (参考采购app)
Method
    GET
request
     is_today               O    bool       是否仅看今天报价商品,0为否,1为是
response
    {
        "msg": "ok",
        "code": 0,
        "data":{
            [                            list       商品列表
                {
                    category_id_1        string     一级分类id
                    category_id_1_name   string     一级分类名称
                    category_id_2        string     二级分类id
                    category_id_2_name   string     二级分类名称
                    spec_id              string     采购规格id
                    name                 string     商品名称
                    std_unit_name        string     基本单位
                    last_quote_price     float      最近报价价格
                    last_quote_time      datetime   最近报价
                }
            ]
        }
    }

supplier_assistant/quoted/edit(新接口)

接口描述
    商品报价
Method
    POST
request
    details:[             M
        {
            spec_id       M    string     采购规格id
            price         M    float      报价价格(元)
            origin_place  O    string     产地
            remark        O    string     描述
        }
    ]
    menu_id               O    int        报价单id,如果从报价单报价的,要带上这个参数
response
    {
        "msg": "ok",
        "code": 0,
        "data": ’‘
    }

supplier_assistant/quoted/history/list(新接口)

接口描述
    报价历史列表
Method
    GET
request
    start_time            M          datetime    开始时间
    end_time              M          datetime    结束时间
    sort_type             O          int         排序方式,不填为默认,1为商品名称升序, 2为商品名称降序
    q                     O          string      商品名搜索

    page_obj              O          string      起始页
    reverse               O          int         是否反向查询。1:是,0:不是。默认为否。
    limit                 O          int         返回条数,默认10。传0表示返回所有数据。
response
    {
        "msg": "ok",
        "code": 0,
        "data": {
            details:[                list        商品列表
                { 
                    spec_id          string      采购规格id
                    name             string      报价单名称
                    std_unit_price   float       报价价格(元)
                    create_time      datetime    报价时间
                }
            ]
        }
    }

supplier_assistant/quoted/history/detail(新接口)

接口描述
    报价历史明细
Method
    GET
request
    days                          M         int          统计的天数
    spec_id                       M         string       采购规格ID
response
    {
        "msg": "ok",
        "code": 0,
        "data": {
            quote_detail:[                  list         询价明细
                {
                    date                    datetime     日期
                    quoted_price            float        对应日期报价金额   
                }
            ]

            daily_avg_price:[               list         每天的询价
                {
                    date                    datetime     日期
                    quoted_avg_price        float        对应日期报价均价
                }
            ]
        }
    }

supplier_assistant/quoted/settlement/report(新接口)

接口描述
    账单统计
Method
    GET
request
    start_time                    M         datetime     开始时间
    end_time                      M         datetime     结束时间
    q                             M         string       单据号搜索
response
    {
        "msg": "ok",
        "code": 0,
        "data": {
            total_unpay_sum                 float        期末未收
            cur_should_pay_sum              float        本期应收
            cur_pay_sum                     float        本期已收
        }
    }

supplier_assistant/quoted/settlement/list(新接口)

接口描述
    账单单据列表
Method
    GET
request
    start_time                    M         datetime     开始时间
    end_time                      M         datetime     结束时间
    sort_type                     O         int          排序类型,1为时间降序,2为时间升序,3为按状态(未结款-已结款)
    status                        O         int          单据状态,2为已提交待审核,3为审核通过待结款,4为已结款
    sheet_type                    O         int          单据类型,1为入库单,2为退货单
    q                             O         string       单据号搜索

    page_obj                      O         string       起始页
    reverse                       O         int          是否反向查询。1:是,0:不是。默认为否。
    limit                         O         int          返回条数,默认10。传0表示返回所有数据。
response
    {
        "msg": "ok",
        "code": 0,
        "data": [                           list         单据列表
            {    
                date_time                   datetime     单据时间
                sheet_no                    string       单据号
                sheet_money                 float        单据金额
                sheet_type                  int          单据类型1为入库单,2为退货单
                status                      int          单据状态
            }
        ]
    }

supplier_assistant/quoted/settlement/details(新接口)

接口描述
    账单单据明细
Method
    GET
request
    sheet_no                    M           datetime     单据号
response
    {
        "msg": "ok",
        "code": 0,
        "data":{    
                date_time                   datetime     入库时间
                sheet_no                    string       单据号
                sheet_money                 float        单据金额
                sheet_type                  int          单据类型
                status                      int          单据状态

                details:[                   list         商品明细
                    {
                        name                string       商品采购规格名称
                        spec_id             string       采购规格ID

                        supply_num          float        供货数量(采购单)
                        in_stock_num        float        实收数量(入库单)
                        supply_money        float        供货金额
                        in_stock_money      float        实收金额
                        in_stock_price      float        实收单价
                        supply_price        float        供货单价
                        unit_name           string       基本单位
                        purchase_unit       string       采购单位
                        ratio               float        采购规格比例

                    }
                ]
            }

    }

supplier_assistant/password/change(老接口,不修改)

接口描述
    修改密码
Method
    POST
request
    old                       M         datetime     旧密码
    new                       M         datetime     新密码
response
    {
        "msg": "ok",
        "code": 0,
        "data": null
    }

supplier_assistant/login

接口描述
    登录
Method
    POST
request
    username                       M         datetime     旧密码
    password                       M         datetime     新密码
response
    {
        "msg": "ok",
        "code": 0,
        "data": null
    }

supplier_assistant/info

接口描述
    个人中心
Method
    GET
request

response
    {
        "msg": "ok",
        "code": 0,
        "data": {
            username          string       用户名
            name              string       供应商名称
            group_id          int          group_id
            station_id        string       station_id
            pay_method        int          结算方式,1为日结,2为周结,3为半月结, 4为月结

        }
    }