import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/milkInOutStore/list',
    method: 'get',
    params
  })
}

export function importExcel(file) {
  const data = new FormData()
  data.append('file', file)
  return request({
    url: '/milkInOutStore/import',
    method: 'post',
    data,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}

export function exportExcel(params) {
  return request({
    url: '/milkInOutStore/export',
    method: 'post',
    params,
    responseType: 'blob'
  })
}

export function getColumns() {
  return request({ url: '/milkInOutStore/columns', method: 'get' })
}
