import request from '@/utils/request'
const baseUrl = import.meta.env.VITE_APP_BASE_API

// 查询车间管理列表
export function listWorkshop(query) {
  return request({
    url:baseUrl + '/business/workshop/list',
    method: 'get',
    params: query
  })
}

// 查询车间管理详细
export function getWorkshop(id) {
  return request({
    url:baseUrl + '/business/workshop/' + id,
    method: 'get'
  })
}

// 新增车间管理
export function addWorkshop(data) {
  return request({
    url:baseUrl + '/business/workshop',
    method: 'post',
    data: data
  })
}

// 修改车间管理
export function updateWorkshop(data) {
  return request({
    url:baseUrl + '/business/workshop',
    method: 'put',
    data: data
  })
}

// 删除车间管理
export function delWorkshop(id) {
  return request({
    url:baseUrl + '/business/workshop/' + id,
    method: 'delete'
  })
}
