import request from "@/utils/request.js";

// 订单详情
export function orderDeatails(data) {
    return request({
        method: 'get',
        url: '/api/order/v1/wx/getOrder',
        data
    });
}

// 取消订单
export function cancleOrder(data) {
    return request({
        method: 'post',
        url: '/api/order/v1/wx/applyCancle',
        data
    });
}

// 取消退单申请
export function cancleApply(data) {
    return request({
        method: 'post',
        url: '/api/order/v1/wx/cancelApplyCancle',
        data
    });
}

// 删除订单
export function delOrder(data) {
    return request({
        method: 'post',
        url: '/api/order/v1/del',
        data
    });
}

// 接受订单
export function takeOrder(data) {
    return request({
        method: 'post',
        url: '/api/order/v1/wx/takingOrders',
        data
    });
}

// 拒绝订单
export function refuseOrder(data) {
    return request({
        method: 'post',
        url: '/api/order/v1/wx/jujue',
        data
    });
}

// 确认服务完成订单
export function confirmOrder(data) {
    return request({
        method: 'post',
        url: '/api/order/v1/wx/confirm',
        data
    });
}

// 加单
export function speedOrder(data) {
    return request({
        method: 'post',
        url: '/api/order/v1/wx/add',
        data
    });
}

// 获取技师可预约时间
export function getStaffServiceTime(data) {
    return request({
        method: 'get',
        url: '/api/order/v1/wx/getTechnicianAvailability',
        data
    });
}
//郭

// 查询订单
export function queryOrder(data) {
    return request({
        method: 'post',
        url: '/merchant/order/queryByDate',
        data
    });
}
// 订单详情
export function orderDetail(data) {
    return request({
        method: 'post',
        url: '/merchant/order/detail',
        data
    });
}
// 立即接单
export function acceptOrder(data) {
    return request({
        method: 'post',
        url: '/merchant/order/accept',
        data
    });
}
// 拒绝订单
export function rejectOrder(data) {
    return request({
        method: 'post',
        url: '/merchant/order/reject',
        data
    });
}
// 取消订单
export function cancelOrder(data) {
    return request({
        method: 'post',
        url: '/merchant/order/cancelAfterReceive',
        data
    });
}
// 我已到
export function arriveSign(data) {
    return request({
        method: 'post',
        url: '/merchant/order/arriveSign',
        data
    });
}
// 开始服务
export function startService(data) {
    return request({
        method: 'post',
        url: '/merchant/order/startService',
        data
    });
}
// 服务完成
export function finishService(data) {
    return request({
        method: 'post',
        url: '/merchant/order/finishService',
        data
    });
}
// 一键报警
export function alarmOrder(data) {
    return request({
        method: 'post',
        url: '/merchant/order/alarm',
        data
    });
}

// 取消订单原因
export function cancelOrderReason(type) {
    return request({
        method: 'get',
        url: `/order/after/sale/dict/${type}/reason`,
    });
}
///merchant/order/startGoOut 我已出发/签到
export function startGoOut(data) {
    return request({
        method: 'post',
        url: '/merchant/order/startGoOut',
        data
    });
}
// 获取客户手机号
export function getCustomerPhone(data) {
    return request({
        method: 'post',
        url: '/merchant/order/getCustomerPhone',
        data
    });
}
