import request from '@/utils/request'

// 查询仓库主调拨列表
export function listStockTransfer(query) {
  return request({
    url: '/warehouseBusiness/stockTransfer/list',
    method: 'get',
    params: query
  })
}

// 查询仓库主调拨列表
export function getStockTransferList(query) {
  return request({
    url: '/warehouseBusiness/stockTransfer/list',
    method: 'get',
    params: query
  })
}

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

// 打印作业单
export function addJoblist(data) {
  return request({
    url: '/warehouseBusiness/stockTransfer/waitWarehousing',
    method: 'post',
    data: data
  })
}

// 卸货接口
export function disChargelist(data) {
  return request({
    url: '/warehouseBusiness/stockTransfer/ischargeCargo',
    method: 'post',
    data: data
  })
}

// 撤销调拨确认
export function updateCredit (data) {
  return request({
    url: '/warehouseBusiness/stockTransfer/updateCredit',
    method: 'post',
    data: data
  })
}

// 查询仓库主调拨详细
export function getStockTransfer(fId) {
  return request({
    url: '/warehouseBusiness/stockTransfer/' + fId,
    method: 'get'
  })
}

// 调拨暂存
export function addStockTransfer(data) {
  return request({
    url: '/warehouseBusiness/stockTransfer/add',
    method: 'post',
    data: data
  })
}

// 调拨提交
export function warehouseSubmission(data) {
  return request({
    url: '/warehouseBusiness/stockTransfer/warehouseSubmission',
    method: 'post',
    data: data
  })
}

// 修改仓库主调拨
export function updateStockTransfer(data) {
  return request({
    url: '/warehouseBusiness/stockTransfer',
    method: 'put',
    data: data
  })
}

// 删除仓库主调拨
export function delStockTransfer(fId) {
  return request({
    url: '/warehouseBusiness/stockTransfer/' + fId,
    method: 'delete'
  })
}

// 导出仓库主调拨
export function exportStockTransfer(query) {
  return request({
    url: '/warehouseBusiness/stockTransfer/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/stockTransfer/withdrawById/' + fId,
    method: 'get',
  })
}
