// 物流中心模块

// 获取地址列表
export const getAddressList = {
  url: '/address/addressPermission/list',
  method: 'GET'
}

// 新增地址
export const addAddress = {
  url: '/address/addressPermission/save',
  method: 'POST',
  dealReqData: (form) => {
    return form
  }
}

// 删除地址
export const deleteAddress = {
  url: '/address/addressPermission/delete',
  method: 'DELETE',
  dealUrl: (url, addressId) => {
    return `${url}/${addressId}`
  }
}

// 获取公司
export const getCompanyList = {
  url: '/company/companyPermission/list',
  method: 'GET'
}

// 新增物流公司
export const addCompany = {
  url: '/company/companyPermission/save',
  method: 'POST',
  dealReqData: (form) => {
    return form
  }
}
// 获取物流公司简称
export const getCompanyName = {
  url: '/express/list',
  method: 'GET'
}

// 删除地址
export const deleteCompany = {
  url: '/company/companyPermission/delete',
  method: 'DELETE',
  dealUrl: (url, companyId) => {
    return `${url}/${companyId}`
  }
}

// 地理行政地区-列表查询
export const getDictCnProvinceList = {
  url: '/dict-cn-province/templatePermission/list',
  method: 'GET'
}

// 新增模板
export const addTemplate = {
  url: '/template/templatePermission/save',
  method: 'POST',
  dealReqData: (form) => {
    return form
  }
}

// 运费模板列表
export const getTemplateList = {
  url: '/template/templatePermission/list',
  method: 'GET'
}

// 运费模板删除
export const deleteTemplate = {
  url: '/template/templatePermission/delete',
  method: 'DELETE',
  dealUrl: (url, templateId) => {
    return `${url}/${templateId}`
  }
}

// 运费模板编辑
export const updateTemplate = {
  url: '/template/templatePermission/update',
  method: 'PUT',
  dealReqData: (form) => {
    return form
  }
}

// 运费模板详情
export const detailTemplate = {
  url: '/template/templatePermission',
  method: 'GET',
  dealUrl: (url, templateId) => {
    return `${url}/${templateId}`
  }
}

// 包裹列表
export const getParcelList = {
  url: '/parcelCenter/parcelCenterPermission/list',
  method: 'GET',
  dealReqData: ({ pageNum, pageSize, packageNum, orderDeliveryId, uid, deliveryState }) => {
    return { pageNum, pageSize, packageNum, orderDeliveryId, uid, deliveryState }
  }
}

// 包裹详情
export const parcelDetail = {
  url: '/parcelCenter/parcelCenterPermission',
  method: 'GET',
  dealUrl: (url, expressNo) => {
    return `${url}/${expressNo}`
  }
}
