简要描述:

  • 供应商配送方式为司机配送时

确认接单请求URL:

POST/plugin.supplier.frontend.order.accept-receipt

参数:

参数名 是否必须 类型 说明
order_id int 订单ID

确认发货请求URL:

POST/plugin.supplier.frontend.order.driver-send

参数:

参数名 是否必须 类型 说明
order_id int 订单ID
dispatch_type_id int 1:快递,7:司机配送
driver_id int 司机ID

获取司机信息看:获取司机配送司机信息 文档

返回示例:

正确时返回:

{
    result: 1, 
    msg: "ok", 
    data: {
        total: 5, 
        per_page: 2, 
        current_page: 1, 
        last_page: 3, 
        next_page_url: "http://localhost/addons/yun_shop/api.php?page=2", 
        prev_page_url: null, 
        from: 1, 
        to: 2, 
        data: [
            {
                id: 830, 
                uniacid: 6, 
                uid: 2462, 
                order_sn: "SN20190917152640A9", 
                price: "200.00", 
                goods_price: "200.00", 
                goods_total: 1, 
                status: 1, 
                create_time: "2019-09-17 15:26:40", 
                is_deleted: 0, 
                is_member_deleted: 0, 
                finish_time: "1970-01-01 08:00:00", 
                pay_time: "2019-09-17 15:26:44", 
                send_time: "2019-09-17 15:34:45", 
                cancel_time: "1970-01-01 08:00:00", 
                created_at: 1568705200, 
                updated_at: 1568858535, 
                deleted_at: 0, 
                cancel_pay_time: "1970-01-01 08:00:00", 
                cancel_send_time: "2019-09-19 10:02:14", 
                dispatch_type_id: 7, 
                dispatch_price: "0.00", 
                discount_price: "0.00", 
                pay_type_id: 17, 
                order_goods_price: "200.00", 
                deduction_price: "0.00", 
                refund_id: 0, 
                is_plugin: 1, 
                change_price: "0.00", 
                change_dispatch_price: "0.00", 
                comment_status: 0, 
                order_pay_id: "81", 
                plugin_id: 92, 
                is_virtual: 0, 
                mark: "", 
                is_pending: 0, 
                note: null, 
                cost_amount: "100.00", 
                shop_name: "5632", 
                no_refund: 0, 
                need_address: 0, 
                invoice_type: null, 
                rise_type: null, 
                collect_name: null, 
                company_number: null, 
                invoice: null, 
                auto_receipt: 0, 
                fee_amount: "0.00", 
                status_name: "待发货", 
                pay_type_name: "货到付款", 
                button_models: [
                    {
                        name: "确认发货", 
                        value: "supplier_driver_send", 
                        api: "plugin.supplier.frontend.order.driver-send", 
                        type: ""
                    }
                ], 
                has_many_order_goods: [
                    {
                        id: 834, 
                        uniacid: 6, 
                        goods_id: 196, 
                        pay_sn: "", 
                        total: 1, 
                        create_at: 0, 
                        price: "200.00", 
                        goods_sn: "", 
                        uid: 2462, 
                        thumb: "http://localhost/attachment/images/6/2018/09/twzWx2xUCnG2CCwWwDCEcc2k2weE2C.jpg", 
                        title: "区域商品", 
                        goods_price: "200.00", 
                        goods_option_id: 0, 
                        goods_option_title: "", 
                        product_sn: "", 
                        created_at: "2019-09-17 15:26:40", 
                        updated_at: "2019-09-17 15:26:40", 
                        discount_price: "0.00", 
                        comment_status: 0, 
                        change_price: "0.00", 
                        comment_id: 0, 
                        goods_market_price: "123.00", 
                        goods_cost_price: "100.00", 
                        vip_price: "0.00", 
                        coupon_price: "0.00", 
                        payment_amount: "200.00", 
                        deduction_amount: "0.00", 
                        need_address: 0, 
                        goods_thumb: "http://localhost/attachment/images/6/2018/09/twzWx2xUCnG2CCwWwDCEcc2k2weE2C.jpg", 
                        buttons: [ ], 
                        goods: {
                            id: 196, 
                            uniacid: 6, 
                            brand_id: 4, 
                            type: 1, 
                            status: 1, 
                            display_order: 0, 
                            title: "区域商品", 
                            thumb: "images/6/2018/09/twzWx2xUCnG2CCwWwDCEcc2k2weE2C.jpg", 
                            thumb_url: "", 
                            sku: "盒", 
                            description: "", 
                            content: "", 
                            goods_sn: "", 
                            product_sn: "", 
                            market_price: "123.00", 
                            price: "200.00", 
                            cost_price: "100.00", 
                            stock: 123120, 
                            reduce_stock_method: 0, 
                            show_sales: 3, 
                            real_sales: 3, 
                            weight: "0.00", 
                            has_option: 0, 
                            is_new: 0, 
                            is_hot: 0, 
                            is_discount: 0, 
                            is_recommand: 0, 
                            is_comment: 0, 
                            is_deleted: 0, 
                            created_at: "2018-09-29 16:40:45", 
                            deleted_at: null, 
                            updated_at: "2019-09-17 15:26:40", 
                            comment_num: 0, 
                            is_plugin: 1, 
                            plugin_id: 92, 
                            virtual_sales: 12, 
                            goods_video: "", 
                            no_refund: 0, 
                            need_address: 0, 
                            type2: 1, 
                            status_name: "上架"
                        }
                    }
                ], 
                process: [
                    {
                        id: 25, 
                        uid: 2462, 
                        model_id: 830, 
                        flow_id: 10, 
                        status_id: 45, 
                        state: "completed", 
                        is_pending: 0, 
                        created_at: "2019-09-17 15:27:32", 
                        updated_at: "2019-09-17 15:32:47", 
                        deleted_at: null, 
                        note: null, 
                        uniacid: 6, 
                        name: "基地接单", 
                        status_name: "已接单", 
                        status: {
                            id: 45, 
                            flow_id: 10, 
                            name: "已接单", 
                            code: "acceptReceipt", 
                            order: 1, 
                            plugin_id: 92, 
                            created_at: "2019-09-16 18:06:38", 
                            updated_at: "2019-09-16 18:06:38", 
                            deleted_at: null
                        }
                    }
                ], 
                has_one_pay_type: {
                    id: 17, 
                    name: "货到付款", 
                    plugin_id: 0, 
                    code: "COD", 
                    type: 1, 
                    unit: "元", 
                    updated_at: null, 
                    created_at: null, 
                    deleted_at: null, 
                    setting_key: "shop.pay.cod", 
                    need_password: 0, 
                    group_id: 0
                }
            }, 
            {
                id: 829, 
                uniacid: 6, 
                uid: 2456, 
                order_sn: "SN20190917151252l3", 
                price: "200.00", 
                goods_price: "200.00", 
                goods_total: 1, 
                status: 1, 
                create_time: "2019-09-17 15:12:52", 
                is_deleted: 0, 
                is_member_deleted: 0, 
                finish_time: "1970-01-01 08:00:00", 
                pay_time: "2019-09-17 15:12:57", 
                send_time: "1970-01-01 08:00:00", 
                cancel_time: "1970-01-01 08:00:00", 
                created_at: 1568704372, 
                updated_at: 1568704529, 
                deleted_at: 0, 
                cancel_pay_time: "1970-01-01 08:00:00", 
                cancel_send_time: "1970-01-01 08:00:00", 
                dispatch_type_id: 7, 
                dispatch_price: "0.00", 
                discount_price: "0.00", 
                pay_type_id: 17, 
                order_goods_price: "200.00", 
                deduction_price: "0.00", 
                refund_id: 0, 
                is_plugin: 1, 
                change_price: "0.00", 
                change_dispatch_price: "0.00", 
                comment_status: 0, 
                order_pay_id: "80", 
                plugin_id: 92, 
                is_virtual: 0, 
                mark: "", 
                is_pending: 1, 
                note: null, 
                cost_amount: "100.00", 
                shop_name: "5632", 
                no_refund: 0, 
                need_address: 0, 
                invoice_type: null, 
                rise_type: null, 
                collect_name: null, 
                company_number: null, 
                invoice: null, 
                auto_receipt: 0, 
                fee_amount: "0.00", 
                status_name: "待接单", 
                pay_type_name: "货到付款", 
                button_models: [], 
                has_many_order_goods: [
                    {
                        id: 833, 
                        uniacid: 6, 
                        goods_id: 196, 
                        pay_sn: "", 
                        total: 1, 
                        create_at: 0, 
                        price: "200.00", 
                        goods_sn: "", 
                        uid: 2456, 
                        thumb: "http://localhost/attachment/images/6/2018/09/twzWx2xUCnG2CCwWwDCEcc2k2weE2C.jpg", 
                        title: "区域商品", 
                        goods_price: "200.00", 
                        goods_option_id: 0, 
                        goods_option_title: "", 
                        product_sn: "", 
                        created_at: "2019-09-17 15:12:52", 
                        updated_at: "2019-09-17 15:12:52", 
                        discount_price: "0.00", 
                        comment_status: 0, 
                        change_price: "0.00", 
                        comment_id: 0, 
                        goods_market_price: "123.00", 
                        goods_cost_price: "100.00", 
                        vip_price: "0.00", 
                        coupon_price: "0.00", 
                        payment_amount: "200.00", 
                        deduction_amount: "0.00", 
                        need_address: 0, 
                        goods_thumb: "http://localhost/attachment/images/6/2018/09/twzWx2xUCnG2CCwWwDCEcc2k2weE2C.jpg", 
                        buttons: [ ], 
                        goods: {
                            id: 196, 
                            uniacid: 6, 
                            brand_id: 4, 
                            type: 1, 
                            status: 1, 
                            display_order: 0, 
                            title: "区域商品", 
                            thumb: "images/6/2018/09/twzWx2xUCnG2CCwWwDCEcc2k2weE2C.jpg", 
                            thumb_url: "", 
                            sku: "盒", 
                            description: "", 
                            content: "", 
                            goods_sn: "", 
                            product_sn: "", 
                            market_price: "123.00", 
                            price: "200.00", 
                            cost_price: "100.00", 
                            stock: 123120, 
                            reduce_stock_method: 0, 
                            show_sales: 3, 
                            real_sales: 3, 
                            weight: "0.00", 
                            has_option: 0, 
                            is_new: 0, 
                            is_hot: 0, 
                            is_discount: 0, 
                            is_recommand: 0, 
                            is_comment: 0, 
                            is_deleted: 0, 
                            created_at: "2018-09-29 16:40:45", 
                            deleted_at: null, 
                            updated_at: "2019-09-17 15:26:40", 
                            comment_num: 0, 
                            is_plugin: 1, 
                            plugin_id: 92, 
                            virtual_sales: 12, 
                            goods_video: "", 
                            no_refund: 0, 
                            need_address: 0, 
                            type2: 1, 
                            status_name: "上架"
                        }
                    }
                ], 
                process: [
                    {
                        id: 24, 
                        uid: 2456, 
                        model_id: 829, 
                        flow_id: 10, 
                        status_id: 44, 
                        state: "processing", 
                        is_pending: 0, 
                        created_at: "2019-09-17 15:15:29", 
                        updated_at: "2019-09-17 15:15:29", 
                        deleted_at: null, 
                        note: null, 
                        uniacid: 6, 
                        name: "基地接单", 
                        status_name: "待接单", 
                        status: {
                            id: 44, 
                            flow_id: 10, 
                            name: "待接单", 
                            code: "waitReceipt", 
                            order: 0, 
                            plugin_id: 92, 
                            created_at: "2019-09-16 18:06:38", 
                            updated_at: "2019-09-16 18:06:38", 
                            deleted_at: null
                        }
                    }
                ], 
                has_one_pay_type: {
                    id: 17, 
                    name: "货到付款", 
                    plugin_id: 0, 
                    code: "COD", 
                    type: 1, 
                    unit: "元", 
                    updated_at: null, 
                    created_at: null, 
                    deleted_at: null, 
                    setting_key: "shop.pay.cod", 
                    need_password: 0, 
                    group_id: 0
                }
            }
        ]
    }
}

错误时返回:

返回参数说明:

参数名 类型 说明

前端订单操作按钮 button_models:

按钮名称 vlaue值 api
确认发货(司机) supplier_driver_send plugin.supplier.frontend.order.driver-send

备注:

  • 更多返回错误代码请看首页的错误代码描述