import request from '@/utils/request'

export function getSupplierList(data) {
  return request({
    url: '/app-api/ecw/admin-clienta/page',
    method: 'get',
    params: data
  })
}

export function getSupplierPage(data) {
  return request({
    url: '/app-api/ecw/supplier/page',
    method: 'get',
    params: data
  })
}

export function getSupplier(data) {
  return request({
    url: '/app-api/ecw/admin-clienta/get',
    method: 'get',
    params: data
  })
}

export function createSupplier(data) {
  return request({
    url: '/app-api/ecw/admin-clienta/create',
    method: 'post',
    data
  })
}

export function updateSupplier(data) {
  return request({
    url: '/app-api/ecw/admin-clienta/update',
    method: 'put',
    data
  })
}

export function deleteSupplier(data) {
  return request({
    url: '/app-api/ecw/admin-clienta/delete?id=' + data,
    method: 'delete'
  })
}

export function getGroupList(data) {
  return request({
    url: '/app-api/ecw/admin-clienta-type/page',
    method: 'get',
    params: data
  })
}

export function getGroup(data) {
  return request({
    url: '/app-api/ecw/admin-clienta-type/get',
    method: 'get',
    params: data
  })
}

export function createGroup(data) {
  return request({
    url: '/app-api/ecw/admin-clienta-type/create',
    method: 'post',
    data
  })
}

export function updateGroup(data) {
  return request({
    url: '/app-api/ecw/admin-clienta-type/update',
    method: 'put',
    data
  })
}

export function deleteGroup(data) {
  return request({
    url: '/app-api/ecw/admin-clienta-type/delete?id=' + data,
    method: 'delete'
  })
}
