import request from '@/utils/request'

// 查询车间管理列表
export function listFactory(query) {
  return request({
    url: '/factory/factory/list',
    method: 'get',
    params: query
  })
}

//物料类别列表
export function listMaterialType(query) {
  return request({
    url: '/factory/factory/cTypelist',
    method: 'get',
    params: query
  })
}

// 查询车间管理详细
export function getFactory(factoryId) {
  return request({
    url: '/factory/factory/' + factoryId,
    method: 'get'
  })
}

// 新增车间管理
export function addFactory(data) {
  return request({
    url: '/factory/factory',
    method: 'post',
    data: data
  })
}

// 修改车间管理
export function updateFactory(data) {
  return request({
    url: '/factory/factory',
    method: 'put',
    data: data
  })
}

// 删除车间管理
export function delFactory(factoryId) {
  return request({
    url: '/factory/factory/' + factoryId,
    method: 'delete'
  })
}
