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

export function partsCreditGatherList(data) {
  return request({
    url: `/parts/credit/gather/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function partsCreditGatherListExport(data, name) {
  return postBlob({
    url: '/parts/credit/gather/list/export',
    data,
    name
  })
}

export function partsCreditList(data) {
  return request({
    url: `/parts/credit/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function partsCreditListExport(data, name) {
  return postBlob({
    url: '/parts/credit/list/export',
    data,
    name
  })
}

export function ppartsCreditDetail(params) {
  return request({
    url: `/parts/credit/detail`,
    method: 'post',
    params
  })
}

export function partsCreditCode(params) {
  return request({
    url: `/parts/credit/code`,
    method: 'post',
    params
  })
}

export function partsCreditChangeCash(params) {
  return request({
    url: `/parts/credit/change-cash`,
    method: 'post',
    params
  })
}
