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

export function partsNewInList(data) {
  return request({
    url: `/websit/parts/new-in/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function partsNewInExport(data, name) {
  return postBlob({
    url: '/websit/parts/new-in/list/export',
    data,
    name
  })
}

export function partsNewInImport(data) {
  return handleImport('/websit/parts/new-in/import', data.formdata, data.id || '')
}

export function partsNewInAdd(data) {
  return request({
    url: `/websit/parts/new-in/add`,
    method: 'post',
    data
  })
}

export function partsNewInUpdate(params) {
  return request({
    url: `/websit/parts/new-in/update`,
    method: 'post',
    params
  })
}

export function partsNewInDel(params) {
  return request({
    url: `/websit/parts/new-in/del`,
    method: 'post',
    params
  })
}
