import request from '@/utils/request'

// 开始
export function startProductPlanDetail(query) {
  return request({
    url: '/mes/api/startProductPlanDetail',
    method: 'post',
    data: query
  })
}

// 完成
export function completeProductPlanDetail(query) {
  return request({
    url: '/mes/api/completeProductPlanDetail',
    method: 'post',
    data: query
  })
}

// 获取计划
export function getProductPlans(query) {
  return request({
    url: '/mes/api/getProductPlans',
    method: 'get',
    params: query
  })
}

// 获取计划详情
export function getProductPlanDetails(query) {
  return request({
    url: '/mes/api/getProductPlanDetails',
    method: 'get',
    params: query
  })
}

// 创建
export function insertProductPlanDetails(query) {
  return request({
    url: '/mes/api/insertProductPlanDetails',
    method: 'post',
    data: query
  })
}

export function getStockTotal(query) {
  return request({
    url: '/wms/api/getStockTotal',
    method: 'get',
    params: query
  })
}

export function getWarehouses(query) {
  return request({
    url: '/wms/api/getWarehouses',
    method: 'get',
    params: query
  })
}

export function applyRawOutstock(query) {
  return request({
    url: '/wms/api/applyRawOutstock',
    method: 'post',
    data: query
  })
}



