import request from '@/utils/request'

// 分页查询食堂采购计划列表
export function pageListPlan(query) {
  return request({
    url: '/canteen/plan/pageList',
    method: 'get',
    params: query
  })
}

// 查询食堂采购计划列表
export function listPlan(query) {
  return request({
    url: '/canteen/plan/list',
    method: 'get',
    params: query
  })
}

// 查询食堂采购计划详细
export function getPlan(id) {
  return request({
    url: '/canteen/plan/' + id,
    method: 'get'
  })
}

// 新增食堂采购计划
export function addPlan(data) {
  return request({
    url: '/canteen/plan',
    method: 'post',
    data: data
  })
}

// 修改食堂采购计划
export function updatePlan(data) {
  return request({
    url: '/canteen/plan',
    method: 'put',
    data: data
  })
}

// 删除食堂采购计划
export function delPlan(id) {
  return request({
    url: '/canteen/plan/' + id,
    method: 'delete'
  })
}

// 导出食堂采购计划
export function exportPlan(query) {
  return request({
    url: '/canteen/plan/' + 'export',
    method: 'post',
    params: query
  })
}
