import request from '@/utils/request'

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

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

// 新增仓库主(出入库保存)
export function addWarehousebills(data) {
  return request({
    url: '/warehouseBusiness/inStock/add',
    method: 'post',
    data: data
  })
}
// 新增仓库主(出入库提交)
export function addWarehouse(data) {
  return request({
    url: '/warehouseBusiness/inStock/warehouseSubmission',
    method: 'post',
    data: data
  })
}


// 撤销入库
export function updateCredit(data) {
  return request({
    url: '/warehouseBusiness/inStock/updateCredit',
    method: 'post',
    data: data
  })
}

// 入库确认
export function addWhgenleg(data) {
  return request({
    url: '/warehouseBusiness/inStock/addCredit',
    method: 'post',
    data: data
  })
}
// 打印作业单
export function addJoblist(data) {
  return request({
    url: '/warehouseBusiness/inStock/waitWarehousing',
    method: 'post',
    data: data
  })
}
// 卸货接口
export function disChargelist(data) {
  return request({
    url: '/warehouseBusiness/inStock/ischargeCargo',
    method: 'post',
    data: data
  })
}
// 修改仓库主(出入库)
export function updateWarehousebills(data) {
  return request({
    url: '/warehouseBusiness/inStock',
    method: 'put',
    data: data
  })
}

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

// 导出仓库主(出入库)
export function exportWarehousebills(query) {
  return request({
    url: '/warehouseBusiness/inStock/export',
    method: 'get',
    params: query
  })
}
// 状态为6撤销(请核)
export function revoke(fId) {
  return request({
    url: '/warehouseBusiness/inStock/withdrawById/' + fId,
    method: 'get',
  })
}
// 状态为4撤销(请核)
export function revokeTwo(data) {
  return request({
    url: '/warehouse/paths/revoke',
    method: 'post',
    data: data
  })
}
