import request from '@/utils/request'

// 查询原材料库存列表
export function listStocktotal(query) {
  return request({
    url: '/wms/stocktotal/list',
    method: 'get',
    params: query
  })
}

// 查询原材料库存详细
export function getStocktotal(stockTotalId) {
  return request({
    url: '/wms/stocktotal/' + stockTotalId,
    method: 'get'
  })
}

// 新增原材料库存
export function addStocktotal(data) {
  return request({
    url: '/wms/stocktotal',
    method: 'post',
    data: data
  })
}

// 修改原材料库存
export function updateStocktotal(data) {
  return request({
    url: '/wms/stocktotal',
    method: 'put',
    data: data
  })
}

// 删除原材料库存
export function delStocktotal(stockTotalId) {
  return request({
    url: '/wms/stocktotal/' + stockTotalId,
    method: 'delete'
  })
}

// 查询原材料库存列表
export function listRawstock(query) {
  return request({
    url: '/wms/rawstock/list',
    method: 'get',
    params: query
  })
}

// 查询成品库存列表
export function listProductstock(query) {
  return request({
    url: '/wms/productstock/list',
    method: 'get',
    params: query
  })
}
