import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_BASE_API
// 查询辅助工序列表
export function listProcess(query) {
  return request({
    url: baseUrl + '/business/auxiliaryProcess/list',
    method: 'get',
    params: query
  })
}

// 查询辅助工序详细
export function getProcess(id) {
  return request({
    url: baseUrl + '/business/auxiliaryProcess/' + id,
    method: 'get'
  })
}

// 新增辅助工序
export function addProcess(data) {
  return request({
    url: baseUrl + '/business/auxiliaryProcess',
    method: 'post',
    data: data
  })
}

// 修改辅助工序
export function updateProcess(data) {
  return request({
    url: baseUrl + '/business/auxiliaryProcess',
    method: 'put',
    data: data
  })
}

// 删除辅助工序
export function delProcess(id) {
  return request({
    url: baseUrl + '/business/auxiliaryProcess/' + id,
    method: 'delete'
  })
}
export function allListProcess() {
  return request({
    url: baseUrl + '/business/auxiliaryProcess/all',
    method: 'get'
  })
}