import request from '../../utils/request'

export function selectLabelRanges() {
  return request({
    url: '/mixLabelPrint/selectLabelRanges',
    method: 'get',
  })
}

export function selectBeginLabel(tableName) {
  return request({
    url: '/mixLabelPrint/selectBeginLabel',
    method: 'get',
    params: { tableName },
  })
}

export function selectLabelPrinter(tableName, label) {
  return request({
    url: '/mixLabelPrint/selectLabelPrinter',
    method: 'get',
    params: { tableName, label },
  })
}

export function printLabel(tableName, label) {
  return request({
    url: '/mixLabelPrint/printLabel',
    method: 'get',
    params: { tableName, label },
  })
}

export function reprintLabel(data) {
  return request({
    url: '/mixLabelPrint/reprintLabel',
    method: 'post',
    data,
  })
}

export function allPrinted(tableName) {
  return request({
    url: '/mixLabelPrint/allPrinted',
    method: 'get',
    params: { tableName },
  })
}
