import {main, dict, file} from '@/api'
import request from '@/utils/require'

//列表页
export function selectList(data) {
    return request({
      url: `${main}/client/transferBarnAcceptReview/selectPageByEntity?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
      method: 'post',
      data: data
    })
}



//详情
export function detailsInfo(data) {
  return request({
    url: `${main}/client/transferBarnAcceptReview/selectById`,
    method: 'post',
    data: data
  })
}
//获取移入企业列表
export function companyList() {
  return request({
    url: `${main}/client/transferDepotAcceptApply/selectOwnBarnByEntity`,
    method: 'post',
  })
}

// 通过
export function passItemInfo(data) {
  return request({
    url: `${main}/client/transferBarnAcceptReview/updateFinish`,
    method: 'post',
    data: data
  })
}
//更新为已验收待盖章
export function acceptToBeSealInfo(data) {
  return request({
    url: `${main}/client/transferBarnAcceptReview/updateAcceptToBeSeal1`,
    method: 'post',
    data: data
  })
}
//盖章驳回
export function updateToBeAcceptInfo(data) {
  return request({
    url: `${main}/client/transferBarnAcceptReview/updateToBeAccept`,
    method: 'post',
    data: data
  })
}
//驳回
export function turnDownInfo(data) {
  return request({
    url: `${main}/client/transferBarnAcceptReview/updateToBeRectify`,
    method: 'post',
    data: data
  })
}

//文件回显
export function fileInfo(data) {
  return request({
    url: `${file}/file/findByIds?ids=${data}`,
    method: 'get',
  })
}
// 导出
export function exportWarehouseAcceptance(data) {
  return request({
    url: `${main}/client/transferBarnAcceptReview/exportPageByEntity?` + data,
    method: 'get',
    data,
    responseType:"blob",
    headers:{
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' // 设置完以后 传入的params对象就会时候用formdata传参的方式
    }
  })
}
