import request from '@/utils/request'
import qs from "qs";
export function queryBomAccountList(params) {
  return request({
    url: 'api/bomAccount/queryBomAccountList',
    method: 'get',
    params
  })
}

export function queryBigItemByStationType(stationType) {
  return request({
    url: `api/bomAccount/queryBigItemByStationType/${stationType}`,
    method: 'get'
  })
}

export function queryItemByArea(areaId) {
  return request({
    url: `api/bomAccount/queryItemByArea/${areaId}`,
    method: 'get'
  })
}

export function queryBomAccountPoints() {
  return request({
    url: `api/bomAccount/queryBomAccountPoints`,
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: 'api/bomAccount',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/bomAccount/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/bomAccount',
    method: 'put',
    data
  })
}

export function queryBomPrintList(data) {
  return request({
    url: 'api/bomAccount/queryBomPrintList' + '?' + qs.stringify(data, { indices: false }),
    method: 'get',
    data
  })
}

export function bomPrintBiaoQianList() {
  return request({
    url: 'api/bomAccount/bomPrintBiaoQianList',
    method: 'get'
  })
}

export default { add, edit, del, queryBomAccountPoints, queryBomPrintList }
