import request from '@/utils/request'

// 获取列表
export function getList(params) {
  return request({
    url: '/offline/list',
    method: 'get',
    params
  })
}

// 删除
export function deleteData(params) {
  return request({
    url: '/offline/delete',
    method: 'post',
    params
  })
}

// 新增
export function addData(params) {
  return request({
    url: '/offline/save',
    method: 'post',
    data: params
  })
}

// 编辑
export function editData(params) {
  return request({
    url: '/offline/update',
    method: 'post',
    data: params
  })
}

// 获取详情
export function getDetail(params) {
  return request({
    url: '/offline/detail',
    method: 'get',
    params
  })
}

// 网点列表
export function getWebsiteList(params) {
  return request({
    url: '/select/websit',
    method: 'get',
    params
  })
}

// 区域列表
export function getZoneList(params) {
  return request({
    url: '/select/zone',
    method: 'get',
    params
  })
}

// 获取年销售列表
export function getYearList(params) {
  return request({
    url: '/report/year/statistics',
    method: 'get',
    params
  })
}

// 获取月销售列表
export function getMonthList(params) {
  return request({
    url: '/report/month/statistics',
    method: 'get',
    params
  })
}

// 获取日销售列表
export function getDayList(params) {
  return request({
    url: '/report/day/statistics',
    method: 'get',
    params
  })
}