import request from '@/utils/request'

// 创建提单托运人
export function createLadingShipper(data) {
  return request({
    url: '/ecw/lading-shipper/create',
    method: 'post',
    data: data
  })
}

// 更新提单托运人
export function updateLadingShipper(data) {
  return request({
    url: '/ecw/lading-shipper/update',
    method: 'put',
    data: data
  })
}

// 删除提单托运人
export function deleteLadingShipper(id) {
  return request({
    url: '/ecw/lading-shipper/delete?id=' + id,
    method: 'delete'
  })
}

// 获得提单托运人
export function getLadingShipper(id) {
  return request({
    url: '/ecw/lading-shipper/get?id=' + id,
    method: 'get'
  })
}

// 获得提单托运人分页
export function getLadingShipperPage(query) {
  return request({
    url: '/ecw/lading-shipper/page',
    method: 'get',
    params: query
  })
}

// 导出提单托运人 Excel
export function exportLadingShipperExcel(query) {
  return request({
    url: '/ecw/lading-shipper/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
