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

// 查询包装线列表
export function listGroup(query) {
  return request({
    url: baseUrl + '/business/packageResourceGroup/list',
    method: 'get',
    params: query
  })
}

// 查询包装线详细
export function getGroup(id) {
  return request({
    url: baseUrl + '/business/packageResourceGroup/' + id,
    method: 'get'
  })
}

// 新增包装线
export function addGroup(data) {
  return request({
    url: baseUrl + '/business/packageResourceGroup',
    method: 'post',
    data: data
  })
}

// 修改包装线
export function updateGroup(data) {
  return request({
    url: baseUrl + '/business/packageResourceGroup',
    method: 'put',
    data: data
  })
}

// 删除包装线
export function delGroup(id) {
  return request({
    url: baseUrl + '/business/packageResourceGroup/' + id,
    method: 'delete'
  })
}

// 导出包装线
export function addDetails(data) {
  return request({
    url: baseUrl + '/business/packageResourceGroup/addDetails',
    method: 'post',
    data: data
  })
}

export function listDetails(params) {
  return request({
    url: baseUrl + '/business/packageResourceGroup/listDetails',
    method: 'get',
    params: params
  })
}
