import request from '@/utils/request'

export function commonLogList(params) {
  return request({
    url: '/common/log/list',
    method: 'get',
    params
  })
}

// 字典列表
export function getDictList(params) {
  return request({
    url: '/common/dict/list',
    method: 'get',
    params
  })
}

// 修改字典列表
export function editDictList(params) {
  return request({
    url: '/common/dict/update',
    method: 'post',
    data: params
  })
}
// 删除字典
export function deleDictList(params) {
  return request({
    url: '/common/dict/del',
    method: 'post',
    params
  })
}
// 添加字典
export function addDictList(params) {
  return request({
    url: '/common/dict/add',
    method: 'post',
    data: params
  })
}

// 销售类型列表
export function getTypeList(params) {
  return request({
    url: '/sale/type/list',
    method: 'get',
    params
  })
}
// 销售类型-家用工程专用
export function getHomeTypeList(params) {
  // /sale/type/home/list
  return request({
    url: '/sale/type/home/list',
    method: 'get',
    params
  })
}

// 获取oss配置
export function getOssConfig(params) {
  return request({
    url: '/common/oss/config',
    method: 'get',
    params
  })
}

// 获取附件地址
export function getFileUrl(params) {
  return request({
    url: '/common/file/get',
    method: 'get',
    params
  })
}

// 获取产品小类列表
export function getSmallList(params) {
  return request({
    url: '/product-category/sub-list',
    method: 'get',
    params
  })
}

// 获取经销商列表
export function getDealerList(params) {
  return request({
    url: '/customer/list',
    method: 'get',
    params
  })
}

// 获取存货类别列表
export function getCategoryList(params) {
  return request({
    url: '/k3/category/list',
    method: 'get',
    params
  })
}
// 强制仓库展示
export function getStockForceDetail(params) {
  return request({
    url: '/stock/force/detail',
    method: 'post',
    params
  })
}
// 添加强制仓库
export function updateStockForceDetail(data) {
  return request({
    url: '/stock/force/update',
    method: 'post',
    data
  })
}
export function delTockForceDetail(data) {
  return request({
    url: '/stock/force/del',
    method: 'post',
    data
  })
}
// 联查单据
export function checkOrder(params) {
  return request({
    url: '/invoice/listInvoiceRetreat',
    method: 'get',
    params
  })
}

// 获取业务员列表
export function getSalesmanList(params) {
  return request({
    url: '/admin/user/list',
    method: 'get',
    params
  })
}
// 获取业务员列表
export function getSalesmanListService(params) {
  return request({
    url: '/admin/user/listService',
    method: 'get',
    params
  })
}


// 更新发票
export function updateReceipt(params) {
  return request({
    url: '/stock/manager/receipt',
    method: 'get',
    params
  })
}

// 起始库存
export function getStockCostDict(params) {
  return request({
    url: '/stock/cost/dict',
    method: 'get',
    params
  })
}

// 改变起始库存
export function updateStockCostDict(params) {
  return request({
    url: '/stock/cost/update',
    method: 'post',
    params
  })
}

// 高德省市区街道
export function getAutonaviRegion(params) {
  return request({
    url: '/common/region',
    method: 'post',
    params
  })
}
