import request from '@/utils/axios'
import axios from "@/utils/axios";

export function listInnerOrder(query) {
    return request({
        url: '/inv/inner/order/list',
        method: 'get',
        params: query
    })
}

export function auditListInnerOrder(query) {
    return request({
        url: '/inv/inner/order/auditList',
        method: 'get',
        params: query
    })
}



export function listInnerOrderDetail(query) {
    return request({
        url: '/inv/inner/order/list/detail',
        method: 'get',
        params: query
    })
}

export function getInnerOrder(id) {
    return request({
        url: '/inv/inner/order/' + id,
        method: 'get'
    })
}

export function addInnerOrder(data) {
    return request({
        url: '/inv/inner/order',
        method: 'post',
        data: data
    })
}


export function auditOrder(data) {
    return request({
        url: '/inv/inner/order/auditOrder',
        method: 'post',
        data: data
    })
}



// 修改pur
export function updateInnerOrder(data) {
    return request({
        url: '/inv/inner/order',
        method: 'put',
        data: data
    })
}

// 删除pur
export function delInnerOrder(id) {
    return request({
        url: '/inv/inner/order/' + id,
        method: 'delete'
    })
}

export function inserThrOrderWeb(query) {
    return axios({
        url: "/inv/inner/order/postOrder",
        method: "post",
        data: query
    });
}


// 删除pur
export function delInnerOrderDetail(id) {
    return request({
        url: '/inv/inner/order/detail/' + id,
        method: 'delete'
    })
}

