Skip to content

订单

订单

/order/confirm 确认订单 (根据购物车中的商品生成待确认订单)

Method: 
GET
请求:
    无
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的订单信息
    {
        orders M list 订单信息
        [{
            sku_ids M list 商品ID列表
            freight M float 运费
            station_id M string 站点ID
            order_id M string 订单ID
            total_price M float 订单总价
            salemenu_ids M list 销售单ID列表
            allow_remark  M  bool   是否允许备注 
            remark   M  str   备注
            receive_time M dict 收货信息
            {
                msg M string 收货时间提示
                order_flag M bool 是否可下单
                receive_time M dict 客户选择的收货时间
                {
                    defaultStart M string 开始时间HH:MM
                    defaultSpanStartFlag M int 开始时间间隔
                    defaultEnd M string 结束时间HH:MM
                    defaultSpanEndFlag M int 结束时间间隔
                }
                receive_time_limit M dict 收货时间限制
                {
                    r_start M string 开始时间
                    r_end M string 结束时间
                    s_span_time M int 开始时间间隔
                    e_span_time M int 结束时间间隔
                    receiveTimeSpan M int 时间间隔
                    time_config_id M string 时间配置ID
                    customer_weekdays   M  int
                    time_config_type    M  int  时间配置类型
                    weekdays    M   int
                    receiveEndSpan    M   int
                }
            }
            order_time_limit M dict 下单时间限制
            {
                start M string 开始时间HH:MM
                end M string 结束时间HH:MM
                e_span_time M int 结束时间间隔
            }
            order_pay_method M int 订单支付方式
            is_price_timing M bool 是否存在时价商品
            discounted_price  M  float  打折价格
            date_time     M    str
            reward_sku_ids  M  list   积分商品的id
        }]
        finance_status M int 用户财务状态
        address M dict 店铺信息
        {
            id M int 店铺ID
            user_id M int 用户ID
            name M string 用户名
            addr_detail M string 店铺地址
            area_id M int 店铺区域ID
            begintime M string 开始收货时间
            endtime M string 结束收货时间
            finance_status M int 财务状态
            resname M string 店铺名
            telephone M string 电话
            remarks M  str  备注
            map_address  M  str  地图地址
            lat    M   float
            create_time  M  str  创建时间
            lng   M    float
            keycustomer   M  int
            last_use_time   M  str  最后使用时间
            service_station_id   M   str
            district_code     M   邮政编码
            freight    M   int  运费
            sales_employee_id   M  int
            employee_id   M    int
            settle_way    M   int
        }
        pay_method M int 付款方式
        all_price M float 订单总价(含运费)
        all_discounted_price   M  float   总折扣价
        all_freight M float 订单运费
        is_price_timing M bool 是否存在时价商品
        settle_time     M   str
        receive_way     M   int
        total_cost_points   M   int   花费的积分点数
    }
返回示例:
{
    "code": 0,
    "msg": "ok",
    "data": {
        "address": {
            "begintime": null,
            "remarks": null,
            "name": "项羽",
            "map_address": "广东省深圳市福田区华强北街道赛格科技园二栋东赛格科技园",
            "lat": 22.547237,
            "create_time": "2019-06-25T16:50:40",
            "area_id": 30200100000,
            "lng": 114.087662,
            "addr_detail": "广东省深圳市福田区华强北街道赛格科技园二栋东赛格科技园",
            "keycustomer": 0,
            "last_use_time": "2019-08-15T17:30:44",
            "telephone": "18811112222",
            "service_station_id": "",
            "district_code": "440300",
            "id": 238317,
            "freight": 0,
            "endtime": null,
            "sales_employee_id": null,
            "employee_id": null,
            "user_id": 252301,
            "settle_way": 1,
            "resname": "一号宫殿",
            "finance_status": 0
        },
        "is_price_timing": true,
        "all_price": 0,
        "all_discounted_price": 0,
        "orders": [
            {
                "order_time_limit": {
                    "start": "00:00",
                    "e_span_time": 0,
                    "end": "23:00"
                },
                "sku_ids": [
                    "D2734104"
                ],
                "allow_remark": true,
                "is_price_timing": true,
                "freight": 0,
                "remark": null,
                "order_pay_method": null,
                "receive_time": {
                    "order_flag": true,
                    "msg": "请设置收货时间",
                    "receive_time_limit": {
                        "customer_weekdays": 127,
                        "e_span_time": 14,
                        "time_config_id": "ST2253",
                        "time_config_type": 2,
                        "r_start": "04:30",
                        "weekdays": 127,
                        "r_end": "04:00",
                        "receiveEndSpan": 1,
                        "receiveTimeSpan": "15",
                        "s_span_time": 0
                    },
                    "receive_time": null
                },
                "discounted_price": 0,
                "date_time": null,
                "total_price": 0,
                "order_id": null,
                "reward_sku_ids": [],
                "salemenu_ids": [
                    "S6977"
                ],
                "station_id": "T8521"
            }
        ],
        "all_freight": 0,
        "settle_time": "最迟9月1日",
        "receive_way": 1,
        "finance_status": 0,
        "total_cost_points": 0
    }
}

/point/check_status 商城积分开关和起兑金额

跳转链接:/point/check_status

/util/salemenu 获取当前会话可见销售单

跳转链接:/util/salemenu

/order/list 查看订单列表

Method: 
    GET
请求:
    skip   O   默认0
    limit   O   默认5
    count   O
    type    O   默认0  0:拉取全部订单,1:拉取未支付订单
响应:
    pagination  M   dict   分页信息
    msg         M    str
    code        M    int
    data        M    list  
        {
            paid_amount      M     int      已支付金额
            total_pay        M     int      总金额
            order_refund     M     bool     是否为退款
            settle_time      M     str
            to_pay_amount    M     int      需要支付的金额
            salemenu_ids     M     list     报价单id
            receive_end_time    M   str     收获开始时间
            receive_begin_time  M   str     收货结束时间
            whitelist           M    bool   是否在白名单
            resname             M    str    名字
            supplier_name       M    str    供应商名字
            refund_amount       M    int    退款金额
            station_id          M    str
            freight             M     int
            fisrt_sku_name      M    str   第一个sku名字
            pay_method          M    int   付款方式
            date_time           M    str
            status              M    int   订单状态
            total_price         M    int    总金额
            pay_status          M     int   付款状态
            id                  M      str  订单号
            settle_way          M      int   结款方式  1:先货后款, 2:先款后货
            coupon_amount       M      int   优惠券总数
            due_time            M     str   关闭订单时间,如果结款方式为先货后款,则为none
            sku_num             M     int    sku总数
返回示例:
{
    "pagination": {
        "limit": 5,
        "offset": 0,
        "count": 6
    },
    "msg": "ok",
    "data": [
        {
            "paid_amount": 0,
            "total_pay": 800,
            "order_refund": false,
            "settle_time": "已结算",
            "to_pay_amount": 800,
            "salemenu_ids": [
                "S6977"
            ],
            "receive_end_time": "2019-08-15 04:00",
            "receive_begin_time": "2019-08-14 04:30",
            "whitelist": false,
            "resname": "阿斯顿撒多",
            "supplier_name": "商品由 水果 供应",
            "refund_amount": 0,
            "station_id": "T8521",
            "freight": 0,
            "fisrt_sku_name": "干虫草花",
            "pay_method": 3,
            "date_time": "2019-08-14",
            "status": 10,
            "total_price": 800,
            "pay_status": 1,
            "id": "PL7929126",
            "settle_way": 1,
            "coupon_amount": 0,
            "due_time": null,
            "sku_num": 4
        }
    ],
    "code": 0
}

/coupon/avail_coupon/list 查看已领取的优惠券

 Method: 
    GET
请求:
    status O int  状态 1:待使用 2:已使用 3:已过期
响应:
    code    M   int
    msg     M   str
    data     M    list
    {
        id M int,                优惠券id
        name M str,              优惠券名称
        price_value M float       面值(元)
        min_total_price M float 满减条件
        expiring_time M datetime 到期时间
        description M str        使用说明
        days_remaining   M int   剩余天数
        status M int 状态 1:待使用 2:已使用 3:已过期
    }
返回示例:
todo

/order/detail 订单详情

Method: 
    GET
请求:
    order_id    订单id
响应:
    msg    M   str
    code   M   int
    data   M   dict
        receive_way     M   int   收货方式
        details         M    dict   详情
            {
                real_item_price         M      int    真实价格
                real_quantity           M       int
                is_promotion_sku        M       bool   是否促销的sku
                purchase_quantity       M       int   采购的数量
                remark                   M       str     备注
                id                         M       str    sku_id
                name                      M        str    名称
                sale_num_least            M        int
                sale_ratio                M        float   
                sale_unit_name            M        str    销售单位
                spu_id                    M        str
                std_sale_price            M        float
                std_unit_name             M        str
                stocks                    M        int      库存
                is_price_timing           M        bool     是否时价
                clean_food                M        bool     
            }
        ],
        abnormals      M    list
        coupon_id      M    int    优惠券id
        remark         M    str   备注
        refund_money    M    int   退款金额
        is_edit        M     bool   是否可以编辑
        refunds     M    list
            {
                request_amount    M    int
                status            M     int
                price             M     int   价格
                name              M    str   名字
                detail_id         M     str  skuid
                real_amount       M    int    数量
            }
        ],
        first_sku_name    M     str     第一个sku的名字
        allow_remark      M     bool    是否允许备注
        reward_sku_list   M     list    积分商品列表  
            {
            reward_sku_id     M    str    积分skuid
            sku_name          M     str   sku名字
            sku_cost_point    M     int   一个规格的商品消耗积分
            quantity          M     int    兑换数量
            total_cost_point  M     int    此商品总消耗积分
            }
        real_price       M     int    真实价格
        abnormal_money   M     int
        total_pay        M     int      总金额
        order_refund     M     bool     是否为退款
        settle_time      M     str
        to_pay_amount    M     int      需要支付的金额
        salemenu_ids     M     list     报价单id
        receive_end_time    M   str     收获开始时间
        receive_begin_time  M   str     收货结束时间
        whitelist           M    bool   是否在白名单
        resname             M    str    名字
        supplier_name       M    str    供应商名字
        refund_amount       M    int    退款金额
        station_id          M    str
        freight             M     int
        pay_method          M    int   付款方式
        date_time           M    str
        status              M    int   订单状态
        total_price         M    int    总金额
        pay_status          M     int   付款状态
        id                  M      str  订单号
        settle_way          M      int   结款方式  1:先货后款, 2:先款后货
        coupon_amount       M      int   优惠券总数
        due_time            M     str   关闭订单时间,如果结款方式为先货后款,则为none
        sku_num             M     int    sku总数
    },

返回示例:
{
    "msg": "ok",
    "data": {
        "paid_amount": 0,
        "receive_way": 1,
        "details": [
            {
                "sale_ratio": 1,
                "std_unit_name": "KG",
                "stocks": -99999,
                "name": "干虫草花",
                "real_item_price": 500,
                "id": "D15933122",
                "real_quantity": 5,
                "is_promotion_sku": false,
                "clean_food": false,
                "purchase_quantity": 5,
                "remark": "",
                "std_sale_price": 100,
                "sale_num_least": 1,
                "sale_unit_name": "KG",
                "spu_id": "C1968686",
                "is_price_timing": false
            }
        ],
        "freight": 500,
        "settle_time": "已结算",
        "abnormals": [],
        "total_pay": 900,
        "salemenu_ids": [
            "S6977"
        ],
        "receive_end_time": "2019-08-21 04:00",
        "coupon_id": 0,
        "sku_num": 1,
        "whitelist": false,
        "resname": "阿斯顿撒多",
        "remark": null,
        "pay_method": 3,
        "order_refund": false,
        "supplier_name": "商品由 水果 供应",
        "refund_money": -100,
        "date_time": "2019-08-20",
        "is_edit": false,
        "refunds": [
            {
                "request_amount": 1,
                "status": 4,
                "price": 100,
                "name": "干虫草花",
                "detail_id": "D15933122",
                "real_amount": 1
            }
        ],
        "status": 10,
        "first_sku_name": "干虫草花",
        "to_pay_amount": 900,
        "total_price": 500,
        "allow_remark": true,
        "pay_status": 1,
        "id": "PL8069146",
        "settle_way": 1,
        "coupon_amount": 0,
        "due_time": null,
        "refund_amount": 0,
        "receive_begin_time": "2019-08-20 18:00",
        "station_id": "T8521",
        "reward_sku_list": [],
        "real_price": 500,
        "abnormal_money": 0
    },
    "code": 0
}

/order/driver/get 获取订单相关的司机信息

Method: 
    GET
请求:
    order_id : PL6141976    M    str    订单id
响应:
    {
        code:0          M           int             0为成功,其他为失败
        msg:"ok"        M           str             错误提示信息      
        data:{          M           dict            订单相关司机信息
            driver_name  : "张三",            O      str      司机名称
            driver_phone : "23455",          O      str      司机手机号
            plate_number : "粤123",           O      str      车牌号
            driver_lat   : 22.526114,        O      float    司机位置经度
            driver_lng   : 22.526114,        O      float    司机位置纬度
            address_lat  : 22.526114,        M      float    店铺位置经度
            address_lng  : 22.526114,        M      float    店铺位置经度
        }
    }
返回示例: 
{
    "msg": "ok",
    "data": {
        "address_lng": 114.086082,
        "address_detail": "广东省深圳市福田区华强北街道振兴路茂业天地",
        "address_lat": 22.546366
    },
    "code": 0
}

/order/receipt 确认订单

Method: 
    POST
请求:
    order_id : PL6141976    M    str    订单id
响应:
    code       M           int             0为成功,其他为失败
    msg        M           str             错误提示信息
    data       M           str             'ok'
返回示例:
{msg: "ok", data: "ok", code: 0}

/order/partpay_list 购物车页展示差额订单

Method:   
    GET
请求:
    order_id  O  str  下单的订单号
响应:
    用户结款方式为先货后款时
    {msg: "当前用户结款方式为先货后款", data: null, code: 12}
    用户结款方式为先款后货时
    {
        current_order   O    dict  //可能不存在
                order_id       M       str            订单号
                date_time      M        str       下单日期
                to_pay_amount  M        int          差额
            }
        code: 0,
        msg: ok
        data           M     dict
            address_id       M        str       商户id
            user_id          M        str       用户id
            order_list       M        list       
                {
                    order_id           M      str      订单号
                    date_time          M      str     下单日期
                    to_pay_amount      M      int      差额
                },
            ]
        }
    }

/order/unpaid_list

Method:   
    GET
请求:
    order_id  O  str  下单的订单号
响应:
code      M    int
msg       M    str
data      M 
    current_orders     M     list    当前订单列表
            id         M      str     订单id
            receive_begin_time    M    str    收获开始时间
            status                M     int    状态
            pay_status            M     int   支付状态
            freight               M     int
            money                 M     int   差额
            station_id            M     str   站点id
            create_time           M      str   创建时间
            settle_way            M      str   结款方式
    history_settle              M     str   历史账期
    settle_time                 M     str    结算时间
    current_settle              M      str    当前账期
    settle_date_type            M       int    结算时间类型
    history_orders             M          list
            id: PL7623676,
            receive_begin_time: 2019-07-30,
            status: 10,
            pay_status: 1,
            freight: 0,
            money: 57000,
            station_id: T8521,
            create_time: 2019-07-30,
            settle_way: 1
            id         M      str     订单id
            receive_begin_time    M    str    收获开始时间
            status                M     int    状态
            pay_status            M     int   支付状态
            freight               M     int
            money                 M     int   差额
            station_id            M     str   站点id
            create_time           M      str   创建时间
            settle_way            M      str   结款方式
    resname                       M      str    名字
},
返回示例:
{
    "msg": "ok",
    "data": {
        "current_orders": [
            {
                "id": "PL7929126",
                "receive_begin_time": "2019-08-14",
                "status": 10,
                "pay_status": 1,
                "freight": 0,
                "money": 800,
                "station_id": "T8521",
                "create_time": "2019-08-14",
                "settle_way": 1
            }
        ],
        "history_settle": "08月01日00:00:00前",
        "settle_time": "最迟9月1日",
        "current_settle": "8月1日~8月31日",
        "settle_date_type": 1,
        "history_orders": [
            {
                "id": "PL7623676",
                "receive_begin_time": "2019-07-30",
                "status": 10,
                "pay_status": 1,
                "freight": 0,
                "money": 57000,
                "station_id": "T8521",
                "create_time": "2019-07-30",
                "settle_way": 1
            }
        ],
        "resname": "renz"
    },
    "code": 0
}