import request from '@/utils/request'

// 查询配件列表
export function listStore(query) {
  return request({
    url: '/track/store/list',
    method: 'get',
    params: query
  })
}

//所有配件信息
export function getStores(query) {
  return request({
    url: '/track/store/storeList',
    method: 'get',
    params: query
  })
}

// 查询配件详细
export function getStore(id) {
  return request({
    url: '/track/store/' + id,
    method: 'get'
  })
}

// 新增配件
export function addStore(data) {
  return request({
    url: '/track/store',
    method: 'post',
    data: data
  })
}

// 修改配件
export function updateStore(data) {
  return request({
    url: '/track/store',
    method: 'put',
    data: data
  })
}

// 删除配件
export function delStore(id) {
  return request({
    url: '/track/store/' + id,
    method: 'delete'
  })
}

// 导出配件
export function exportStore(query) {
  return request({
    url: '/track/store/export',
    method: 'get',
    params: query
  })
}

//入库
export function inHouse(data) {
  return request({
    url: '/track/store/inHouse',
    method: 'post',
    data: data
  })
}
