import request from '@/utils/new-request'

export function Query(data) {
  return request({
    url: '/FinanceQuotation/Query',
    method: 'post',
    data
  })
}
export function QueryChinaPostPublicDiscount(data) {
  return request({
    url: '/FinanceQuotation/GetChinaPostPublicDiscount',
    method: 'post',
    data
  })
}

export function GetExpressFeeAsAdjustment(data) {
  return request({
    url: '/FinanceQuotation/GetExpressFeeAsAdjustment',
    method: 'post',
    data,
    timeout: 1000 * 120
  })
}

export function GetFedexBaseFee(data) {
  return request({
    url: '/FinanceQuotation/GetFedexBaseFee',
    method: 'post',
    data,
    timeout: 1000 * 120
  })
}

export function getSettlementAdjustmentMode() {
  return request({
    url: '/FinanceQuotation/getSettlementAdjustmentMode',
    method: 'get',
    timeout: 1000 * 120
  })
}

export function GetChinaPostPublic(id) {
  return request({
    url: '/FinanceQuotation/GetChinaPostPublic',
    method: 'get',
    params: { channelId: id }
  })
}

export function GetExoressZones(id) {
  return request({
    url: '/FinanceQuotation/GetExoressZones',
    method: 'get',
    params: { expressId: id }
  })
}

export function ImportExcelToJson(data) {
  return request({
    url: '/FinanceQuotation/ImportExcelToJson',
    method: 'post',
    data,
    timeout: 1000 * 120
  })
}
export function InputChinaPostData(url, sheetName) {
  return request({
    url: '/FinanceQuotation/InputChinaPostData',
    method: 'get',
    params: { url: url, sheetName: sheetName },
    timeout: 1000 * 120
  })
}

export function postBatchChange(data) {
  return request({
    url: '/FinanceQuotation/SendDingDing',
    method: 'post',
    data,
    timeout: 1000 * 60
  })
}
export function postDiscountChange(data) {
  return request({
    url: '/FinanceQuotation/SendDingDingByDiscount',
    method: 'post',
    data,
    timeout: 1000 * 60
  })
}
export async function GenerateExpressFeeFile(data) {
  return request({
    url: '/FinanceQuotation/GenerateExpressFeeFile',
    method: 'post',
    data,
    timeout: 1000 * 60
  })
}
export async function AddQuoteJobBySales(channelId) {
  return request({
    url: '/ExpressBulkAdjustmentQuote/AddQuoteJobBySales',
    method: 'get',
    params:{channelId:channelId}
  })
}
