import request from '@/utils/request'
import { exportExcel } from '@/utils/filedown'
export function _getBatchs(data) {
  return request({
    url: '/Packing/GetBatchs',
    method: 'post',
    data: data
  })
}
export function _insert(data) {
  return request({
    url: '/Packing/Insert',
    method: 'post',
    data: data
  })
}
export function _addDetail(data) {
  return request({
    url: '/Packing/AddDetail',
    method: 'post',
    data: data
  })
}
export function _endBatchScan(data) {
  return request({
    url: '/Packing/EndBatchScan',
    method: 'post',
    data: data
  })
}
export function _getBatch(number) {
  return request({
    url: '/Packing/GetBatch',
    method: 'get',
    params: { number }
  })
}
export function _getBagType() {
  return request({
    url: '/Packing/GetBagType',
    method: 'get'
  })
}
export function _getBoxBatchStatus() {
  return request({
    url: '/Packing/GetBoxBatchStatus',
    method: 'get'
  })
}
export function _edit(data) {
  return request({
    url: '/Packing/Edit',
    method: 'post',
    data: data
  })
}
export function _batchOut(data) {
  return request(
    {
      url: '/Packing/BatchOut',
      method: 'post',
      data: data

    }
  )
}
export function _outOrderInfos(data) {
  exportExcel('/Packing/GetBatchsData', data, 'post')
}

