import request from '@/utils/request'
// 查询当前登录用户信息
export function queryUserVal(query) {
  return request({
    url: '/system/user/queryUserVal',
    method: 'post'
  })
}

// 查询客户详情列表
export function listCorps(query) {
  return request({
    url: '/basicdata/customerDetails/corps/list',
    method: 'get',
    params: query
  })
}

// 查询商品详情列表
export function listGoods(query) {
  return request({
    url: '/basicdata/goods/list',
    method: 'get',
    params: query
  })
}

// 查询仓储费列表
export function listAgreement(query) {
  return request({
    url: '/warehouseBusiness/agreementTask/list',
    method: 'get',
    params: query
  })
}
// 查询作业费协议
export function operationAgreement(query) {
  return request({
    url: '/warehouseBusiness/agreementitems/list',
    method: 'get',
    params: query
  })
}
// 查询仓储费详细
export function getAgreement(fId) {
  return request({
    url: '/warehouseBusiness/agreementTask/' + fId,
    method: 'get'
  })
}

// 新增仓储费
export function addAgreement(data) {
  return request({
    url: '/warehouseBusiness/agreementTask',
    method: 'post',
    data: data
  })
}

// 修改仓储费
export function updateAgreement(data) {
  return request({
    url: '/warehouseBusiness/agreementTask',
    method: 'put',
    data: data
  })
}

// 请核
export function collecTask(queryParameter) {
  return request({
    url: '/warehouseBusiness/agreementTask/agreementTaskSubmission',
    method: 'post',
    data:queryParameter
  })
}

// 修改仓储费
export function updateAgreements(fId, fStatus) {
  return request({
    url: '/warehouseBusiness/agreementTask',
    method: 'put',
    data: {
      fId:fId,
      fStatus:fStatus
    }
  })
}

// 撤销作业费
export function backCharge(data) {
  return request({
    url: '/warehouseBusiness/agreementTask/revoke',
    method: 'post',
    data: data
  })
}

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

// 删除仓储费
export function delAgreement(fId) {
  return request({
    url: '/warehouseBusiness/agreementTask/' + fId,
    method: 'delete'
  })
}

// 导出仓储费
export function exportAgreement(query) {
  return request({
    url: '/warehouseBusiness/agreementTask/export',
    method: 'get',
    params: query
  })
}

// 查询仓储费明细表列表
export function listAgreementitems(query) {
  return request({
    url: '/warehouseBusiness/agreementTask/list',
    method: 'get',
    params: query
  })
}
