import request from '@/utils/request'

// 查询盘点计划列表
export function listWmsInventoryPlan(query) {
  return request({
    url: '/ware/wmsInventoryPlan/list',
    method: 'get',
    params: query
  })
}

// 查询盘点计划详细
export function getWmsInventoryPlan(planId) {
  return request({
    url: '/ware/wmsInventoryPlan/' + planId,
    method: 'get'
  })
}

// 新增盘点计划
export function addWmsInventoryPlan(data) {
  return request({
    url: '/ware/wmsInventoryPlan',
    method: 'post',
    data: data
  })
}

// 修改盘点计划
export function updateWmsInventoryPlan(data) {
  return request({
    url: '/ware/wmsInventoryPlan',
    method: 'put',
    data: data
  })
}

// 删除盘点计划
export function delWmsInventoryPlan(planId) {
  return request({
    url: '/ware/wmsInventoryPlan/' + planId,
    method: 'delete'
  })
}

// 执行全部盘点计划
export function generateAllInventoryPlan() {
  return request({
    url: '/ware/wmsInventoryTask/generateAll',
    method: 'get'
  })
}

// 执行单个盘点计划
export function generateInventoryPlan(planId) {
  return request({
    url: '/ware/wmsInventoryTask/generateForPlan/' + planId,
    method: 'get'
  })
}
