import request from '@/utils/request'

// 创建自提点
export function createPickupLoc(data) {
  return request({
    url: '/ecw/pickup-loc/create',
    method: 'post',
    data: data
  })
}

// 更新自提点
export function updatePickupLoc(data) {
  return request({
    url: '/ecw/pickup-loc/update',
    method: 'put',
    data: data
  })
}

// 删除自提点
export function deletePickupLoc(id) {
  return request({
    url: '/ecw/pickup-loc/delete?id=' + id,
    method: 'delete'
  })
}

// 获得自提点
export function getPickupLoc(id) {
  return request({
    url: '/ecw/pickup-loc/get?id=' + id,
    method: 'get'
  })
}

// 获得自提点分页
export function getPickupLocPage(query) {
  return request({
    url: '/ecw/pickup-loc/page',
    method: 'get',
    params: query
  })
}

// 导出自提点 Excel
export function exportPickupLocExcel(query) {
  return request({
    url: '/ecw/pickup-loc/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
