import axios from "@/utils/axios";

export function listPlan(query) {
    return axios({
        url: '/purchase/plan/list',
        method: 'get',
        params: query
    })
}

export function auditListPlan(query) {
    return axios({
        url: '/purchase/plan/auditList',
        method: 'get',
        params: query
    })
}


export function listApplyDetail(query) {
    return axios({
        url: '/purchase/plan/list/detail',
        method: 'get',
        params: query
    })
}

export function getApply(id) {
    return axios({
        url: '/purchase/plan/' + id,
        method: 'get'
    })
}

export function addApply(data) {
    return axios({
        url: '/purchase/plan',
        method: 'post',
        data: data
    })
}


export function auditOrder(data) {
    return axios({
        url: '/purchase/plan/auditOrder',
        method: 'post',
        data: data
    })
}


// 修改pur
export function updateApply(data) {
    return axios({
        url: '/purchase/plan',
        method: 'put',
        data: data
    })
}

// 删除pur
export function delApply(id) {
    return axios({
        url: '/purchase/plan/' + id,
        method: 'delete'
    })
}

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


// 删除pur
export function delApplyDetail(id) {
    return axios({
        url: '/purchase/plan/detail/' + id,
        method: 'delete'
    })
}

