import request from '@/utils/request'

// 查询配方列表
export function listProcess(query) {
  return request({
    url: '/technology/pro/recipe/list',
    method: 'get',
    params: query
  })
}

// 查询所有有效配方
export function listAllProcess() {
  return request({
    url: '/technology/pro/recipe/listAll',
    method: 'get'
  })
}


// 查询配方详细
export function getProcess(recipeId) {
  return request({
    url: '/technology/pro/recipe/' + recipeId,
    method: 'get'
  })
}

// 新增配方
export function addProcess(data) {
  return request({
    url: '/technology/pro/recipe',
    method: 'post',
    data: data
  })
}

// 修改配方
export function updateProcess(data) {
  return request({
    url: '/technology/pro/recipe',
    method: 'put',
    data: data
  })
}

// 删除配方
export function delProcess(recipeId) {
  return request({
    url: '/technology/pro/recipe/' + recipeId,
    method: 'delete'
  })
}
