import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_BASE_API
const p2Url = import.meta.env.VITE_APP_P2_API

// 查询产品包装客户关联列表
export function listCompanyProductPackage(query) {
  return request({
    url: baseUrl + '/business/companyProductPackage/list',
    method: 'get',
    params: query
  })
}

// 查询产品包装客户关联详细
export function getCompanyProductPackage(id) {
  return request({
    url: baseUrl + '/business/companyProductPackage/' + id,
    method: 'get'
  })
}

// 新增产品包装客户关联
export function addCompanyProductPackage(data) {
  return request({
    url: baseUrl + '/business/companyProductPackage',
    method: 'post',
    data: data
  })
}

// 修改产品包装客户关联
export function updateCompanyProductPackage(data) {
  return request({
    url: baseUrl + '/business/companyProductPackage',
    method: 'put',
    data: data
  })
}

// 删除产品包装客户关联
export function delCompanyProductPackage(id) {
  return request({
    url: baseUrl + '/business/companyProductPackage/' + id,
    method: 'delete'
  })
}

export function getP2CompanyProductPackage() {
  return request({
    url: p2Url + '/business/inc10101/getP2CompanyProductPackage',
    method: 'get'
  })
}
