import request, { postBlob, handleImport, getBlob } from '@/utils/request'

// 提货-列表V2
export function pickListV2(data) {
  return request({
    url: `/pick/listV2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}


//提货-列表V2导出
export function pickListV2Export(data, name) {
  return postBlob({
    url: '/pick/listV2/export',
    method: 'post',
    data,
    name
  })
}



export function getPickupListV2(data) {
  return request({
    url: `/pick/listV2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}



export function exportPickupListV2(data, name) {
  return postBlob({
    url: '/pick/listV2/export',
    method: 'post',
    data,
    name
  })
}

export function getListInvoiceNumberV2(data) {
  return request({
    url: `/invoice/listInvoiceNumberV2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}
// 获取列表
export function getPickupList(params) {
  return request({
    url: '/pick/list',
    method: 'get',
    params
  })
}

// 获取详情
export function getListInvoiceNumber(params) {
  return request({
    url: '/invoice/listInvoiceNumber',
    method: 'get',
    params
  })
}

// 是否已打印单据
export function getDetailPrintDisString(params) {
  return request({
    url: '/pick/detailPrintDisString',
    method: 'post',
    data: params
  })
}
// 获取详情
export function getDetail(params) {
  return request({
    url: '/pick/detail',
    method: 'get',
    params
  })
}

// 获取打印详情
export function getPrintDetail(params) {
  return request({
    url: '/pick/detailPrint',
    method: 'get',
    params
  })
}
// 获取打印详情
export function getDtailPrintDis(params) {
  return request({
    url: '/pick/detailPrintDis',
    method: 'post',
    data: params
  })
}

// 获取仓库列表
export function getWarehouseList(params) {
  return request({
    url: '/stock/manager/listStock',
    method: 'get',
    params
  })
}

// 获取发货单列表
export function getDeliverList(params) {
  return request({
    url: '/pick/listInvoice',
    method: 'get',
    params
  })
}

// 获取提货人列表
export function getPickupManList(params) {
  return request({
    url: '/taker-record/list',
    method: 'get',
    params
  })
}

// 获取提货车辆列表
export function getPickupCarList(params) {
  return request({
    url: '/take-car-record/list',
    method: 'get',
    params
  })
}

// 获取物流公司列表
export function getCompanyList(params) {
  return request({
    url: '/logistics/list',
    method: 'get',
    params
  })
}

// 新增提货预约
export function addPickupBook(params) {
  return request({
    url: '/pick/add',
    method: 'post',
    data: params
  })
}

// 编辑提货预约
export function editPickupBook(params) {
  return request({
    url: '/pick/update',
    method: 'post',
    data: params
  })
}

// 校验库存
export function checkStock(params) {
  return request({
    url: '/stock/manager/stockHint',
    method: 'get',
    params
  })
}

// 获取短信验证码
export function getCode(params) {
  return request({
    url: '/pick/sendCode',
    method: 'post',
    params
  })
}

// 获取短信验证码
export function getPickupManInfo(params) {
  return request({
    url: '/pick/verifyCode',
    method: 'post',
    params
  })
}

// 增加打印次数
export function addPrints(params) {
  return request({
    url: '/invoice/printInvoice',
    method: 'post',
    params
  })
}

// 增加打印次数
export function addPrint(params) {
  return request({
    url: '/pick/printAdd',
    method: 'post',
    params
  })
}

// 获取汇总
export function getStatistics(params) {
  return request({
    url: '/pick/summary',
    method: 'get',
    params
  })
}

// 验证密码
export function checkPassword(params) {
  return request({
    url: '/pick/verifyShip',
    method: 'post',
    params
  })
}

// 增加打印次数
export function cancelData(params) {
  return request({
    url: '/pick/delete',
    method: 'post',
    params
  })
}
// 订单查询物流
export function getListOrderTrack(params) {
  return request({
    url: '/pick/listOrderTrack',
    method: 'get',
    params
  })
}
