import request from '@/utils/request'

/*新增套餐*/
export function submitPackage(parmas) {
    return request({
      url: `/admin/erp/companyPackage/createCompanyPackage`,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data: parmas
    })
  }

  /*修改套餐 */
export function editPackage(id,parmas) {
    return request({
      url: `/admin/erp/companyPackage/updateCompanyPackage/${id}`,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data: parmas
    })
  }

  /* 套餐列表 */
  export function packageList(parmas) {
    return request({
      url: '/admin/erp/companyPackage',
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data: parmas,
      needToken: false,
    })
  }

  /*  /admin/erp/companyPackage/disAbleUse/{id}*/
  export function switchPackage(id) {
    return request({
      url: `/admin/erp/companyPackage/disAbleUse/${id}`,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
    })
  }