import request from '@/utils/request'

// 查询仓库主(出入库)列表
export function listGoodsTransfer(query) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/list',
    method: 'get',
    params: query
  })
}

// 查询仓库主(出入库)列表
export function getGoodsTransferList(query) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/list',
    method: 'get',
    params: query
  })
}

// 入库详情信息入账
export function addWhgenleg(data) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/addCredit',
    method: 'post',
    data: data
  })
}

// 撤销货转确认
export function updateCredit (data) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/updateCredit',
    method: 'post',
    data: data
  })
}

// 查询仓库主(出入库)详细
export function getGoodsTransfer(fId) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/' + fId,
    method: 'get'
  })
}

// 货权转移暂存
export function addGoodsTransfer(data) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/add',
    method: 'post',
    data: data
  })
}

// 货权转移提交
export function warehouseSubmission(data) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/warehouseSubmission',
    method: 'post',
    data: data
  })
}

// 修改仓库主(出入库)
export function updateGoodsTransfer(data) {
  return request({
    url: '/warehouseBusiness/goodsTransfer',
    method: 'put',
    data: data
  })
}

// 删除仓库主(出入库)
export function delGoodsTransfer(fId) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/' + fId,
    method: 'delete'
  })
}

// 导出仓库主(出入库)
export function exportGoodsTransfer(query) {
  return request({
    url: '/warehouseBusiness/goodsTransfer/export',
    method: 'get',
    params: query
  })
}

// 撤销审批
export function RevocationApproval(data){
  return request({
    url:'/warehouse/paths/revoke',
    method:'post',
    data:data
  })
}

// 撤销请核
export function backFee(fId) {
  return request({
    url: '/warehouseBusiness/inStock/withdrawById/' + fId,
    method: 'get',
  })
}
