import request from '@/utils/request'
const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API

// 查询盘点时间列表
export function listTakeStockPeriod(query) {
  return request({
    url:baseUrl + '/business/takeStockPeriod/list',
    method: 'get',
    params: query
  })
}

// 查询盘点时间详细
export function getTakeStockPeriod(id) {
  return request({
    url:baseUrl + '/business/takeStockPeriod/' + id,
    method: 'get'
  })
}
export function isTakeStock() {
  return request({
    url:baseUrl + '/business/takeStockPeriod/isTakeStock',
    method: 'get'
  })
}

// 新增盘点时间
export function addTakeStockPeriod(data) {
  return request({
    url:baseUrl + '/business/takeStockPeriod',
    method: 'post',
    data: data
  })
}

// 修改盘点时间
export function updateTakeStockPeriod(data) {
  return request({
    url: baseUrl +'/business/takeStockPeriod',
    method: 'put',
    data: data
  })
}

// 删除盘点时间
export function delTakeStockPeriod(id) {
  return request({
    url:baseUrl + '/business/takeStockPeriod/' + id,
    method: 'delete'
  })
}
