import request from '/frontEnd/api/config/axios.js'

// 业务管理-获取列表
export const getBusinessManageList = (params) => (
  request({
    url: '/businessProcessingTask/doDifferenceList',
    method: 'get',
    params
  })
)

// 业务管理-获取核心企业和供应商
export const getBusinessManageCoreCompany = (params) => (
  request({
    url: '/customer/findCoreBusiness',
    method: 'get',
    params
  })
)

// 业务管理-获取核心企业和供应商
export const getBusinessManagePlatform = (params) => (
  request({
    url: '/platform/list',
    method: 'get',
    params
  })
)

// 业务管理-新建业务提交
export const businessManageCreateSubmit = (data) => (
  request({
    url: '/business/management/add',
    method: 'post',
    data
  })
)

// 业务管理-新建业务提交
export const businessManageUpdateSubmit = (data) => (
  request({
    url: '/business/management/update',
    method: 'post',
    data
  })
)

// 业务管理-新建业务-获取业务详情
export const getbusinessManageEditDetails = (params) => (
  request({
    url: '/business/management/detail',
    method: 'get',
    params
  })
)


// 业务管理-模板审核-提交
export const businessTemplateExamineSubmit = (data) => (
  request({
    url: '/business/template/review/add',
    method: 'post',
    data
  })
)

// 业务管理-保证方式确认-提交
export const businessPledgeWaySubmit = (data) => (
  request({
    url: '/business/guarantee/mode/add',
    method: 'post',
    data
  })
)

// 业务管理-保证金收款确认-提交
export const businessBondSubmit = (data) => (
  request({
    url: '/business/bond/collection/confirmation/add',
    method: 'post',
    data
  })
)

// 业务管理-中标确认-提交
export const businessWinBiddingSubmit = (data) => (
  request({
    url: '/business/award/confirm/add',
    method: 'post',
    data
  })
)

// 业务管理-保证金退款确认-提交
export const businessRefundDepositSubmit = (data) => (
  request({
    url: '/business/refund/deposit/confirmation/add',
    method: 'post',
    data
  })
)

// 业务管理-删除
export const businessManageDelete = (params) => (
  request({
    url: '/business/management/delete',
    method: 'get',
    params
  })
)

// 业务管理-转移
export const businessManageTransferSubmit = (params) => (
  request({
    url: '/business/management/transfer/new',
    method: 'get',
    params
  })
)


// 业务管理-历史数据列表
export const getbusinessManageHistoryList = (data) => (
  request({
    url: 'business/management/findByCondition',
    method: 'post',
    data
  })
)


export const allDownLoadFile = (id) => (
  request({
    url: '/business/management/downloadAllBusinessFile?id=' + id,
    method: 'get',
    responseType: 'arraybuffer'
  })
)
