import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取安装列表
export function listPageV2(data) {
  return request({
    url: `/settle/norm/install/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//安装导出
export function pageExport(data, name) {
  return postBlob({
    url: '/settle/norm/install/list/export',
    data,
    name
  })
}

// 新增
export function add(data) {
  return request({
    url: `/settle/norm/install/add`,
    method: 'post',
    data
  })
}

// 编辑
export function edit(data) {
  return request({
    url: `/settle/norm/install/edit`,
    method: 'post',
    data
  })
}

// 删除
export function del(params) {
  return request({
    url: `/settle/norm/delete`,
    method: 'post',
    params
  })
}

// 获取大类
export function getMainList(params) {
  return request({
    url: `/goods/category/list`,
    method: 'get',
    params
  })
}

// 获取大类
export function getTypeList(data) {
  return request({
    url: `/order/smalltype/list`,
    method: 'post',
    data
  })
}

// 获取来源
export function getSourceList(data) {
  return request({
    url: `/dictCompany/page`,
    method: 'post',
    data
  })
}