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

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

//导出
export function pageExport(data, name) {
  return postBlob({
    url: '/websitPartsRet/pageExport',
    data,
    name
  })
}

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

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

// 详情
export function getNewDetail(params) {
  return request({
    url: `/websitPartsRet/detail`,
    method: 'post',
    params
  })
}

// 字典数据
export function getTypeList(data) {
  return request({
    url: `/dictCompany/page`,
    method: 'post',
    data
  })
}

// 配件库存数据
export function getAttachmentList(data) {
  return request({
    url: `/websit/stock/listP`,
    method: 'post',
    data
  })
}