import request from '@/utils/request'

// 分账管理列表
export function ledgerdoList(data) {
  return request({
    url: '/ledger/doList',
    method: 'post',
    data
  })
}

// 获取封账详情
export function getDetails(params) {
  return request({
    url: '/ledger/getDetail',
    method: 'get',
    params
  })
}

// 获取融资货物
export function getFinancingGoods(data) {
  return request({
    url: '/ledger/doFindFinancingGoodsList',
    method: 'post',
    data
  })
}

// 获取已验收货物
export function getAcceptanceGoods(data) {
  return request({
    url: '/ledger/doFindAcceptanceGoodsList',
    method: 'post',
    data
  })
}

// 一键计算
export function getCalculateAssign(data) {
  return request({
    url: '/ledger/doCalculateAssign',
    method: 'post',
    data
  })
}

// 查询供应商收款账号
export function getSupplierBankInfoList(data) {
  return request({
    url: '/ledger/doFindSupplierBankInfoList',
    method: 'post',
    data
  })
}

// 分账提交
export function accountSubmit(data) {
  return request({
    url: '/ledger/doAdd',
    method: 'post',
    data
  })
}

// 查看放款计划
export function getLoanDisbursementPlan(data) {
  return request({
    url: '/ledger/doFindPayCollPlanFactoringList',
    method: 'post',
    data
  })
}
