import dsRequest from '@/utils/dsRequest'
import { dsOutExcel } from '@/utils/filedown'
export function _getPicks(data) {
  return dsRequest({
    url: '/StockPick/GetPicks',
    method: 'post',
    timeout: 20 * 1000,
    data: data
  })
}

export function _getPrintUrl(pickids) {
  return dsRequest({
    url: '/StockPick/GetPrintUrl',
    method: 'post',
    timeout: 20 * 1000,
    params: { pickids }
  })
}

export function _getCounts(data) {
  return dsRequest({
    url: '/StockPick/GetQtys',
    method: 'post',
    data,
    timeout: 30 * 1000
  })
}

export function _out(data) {
  dsOutExcel('/StockPick/out', data, 'post')
}

export function GetSku(number, size, customerId) {
  return dsRequest({
    url: '/Sku/GetSku',
    method: 'get',
    params: { number, size, customerId },
    timeout: 30 * 1000
  })
}

export function _deletePick(pickids) {
  return dsRequest({
    url: '/StockPick/DeletePick',
    method: 'post',
    timeout: 20 * 1000,
    params: { pickids }
  })
}
