import request from "@/util/oaRequest"

// 查询采购计划列表
export function listOaWarehouseTask(query) {
  return request({
    url: '/oa/oaWarehouseTask/list',
    method: 'get',
    params: query
  })
}

// 查询采购计划详细
export function getOaWarehouseTask(taskId) {
  return request({
    url: '/oa/oaWarehouseTask/' + taskId,
    method: 'get'
  })
}

// 查询采购计划详细
export function getOaWarehouseTaskByMasterId(masterId) {
  return request({
    url: '/oa/oaWarehouseTask/masterId/' + masterId,
    method: 'get'
  })
}

// 新增采购计划
export function addOaWarehouseTask(data) {
  return request({
    url: '/oa/oaWarehouseTask',
    method: 'post',
    data: data
  })
}
// 新增采购计划
export function addOaWarehouseTaskBatch(data) {
  return request({
    url: '/oa/oaWarehouseTask/insert',
    method: 'post',
    data: data
  })
}

// 修改采购计划
export function updateOaWarehouseTask(data) {
  return request({
    url: '/oa/oaWarehouseTask',
    method: 'put',
    data: data
  })
}

// 修改采购计划
export function updateOaWarehouseTaskStatus(data) {
  return request({
    url: '/oa/oaWarehouseTask/status',
    method: 'put',
    data: data
  })
}

// 修改采购计划
export function updateOaWarehouseTaskBatch(data) {
  return request({
    url: '/oa/oaWarehouseTask/status-list',
    method: 'put',
    data: data
  })
}

// 删除采购计划
export function delOaWarehouseTask(taskId) {
  return request({
    url: '/oa/oaWarehouseTask/' + taskId,
    method: 'delete'
  })
}

// 修改采购计划备注
export function updateTaskRemark(data) {
  return request({
    url: '/oa/oaWarehouseMaster/updateRemark',
    method: 'put',
    params: data
  })
}