import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/pickOut',
    method: 'post',
    data
  })
}

/**
 * 不返回数据的所有操作
 * @param data
 * @returns {AxiosPromise}
 */
export function operationAll(data) {
  return request({
    url: 'api/pickOut/operationAll',
    method: 'post',
    data
  })
}

export function queryTaskLog(data) {
  return request({
    url: 'api/pickOut/queryTaskLog',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/pickOut/',
    method: 'delete',
    data: ids
  })
}

export function getPickOutById(id) {
  return request({
    url: 'api/pickOut/getPickOutById',
    method: 'post',
    data:id
  })
}

export function edit(data) {
  return request({
    url: 'api/pickOut',
    method: 'put',
    data
  })
}

/**
 * 线边接收确认
 * @param ids
 * @returns {*}
 */
export function xbjsOut(ids) {
  return request({
    url: 'api/pickOut/xbjsOut',
    method: 'post',
    data: ids
  })
}
/**
 * 备货操作直接出库
 * @param ids
 * @returns {*}
 */
export function pickOutConfirm(ids) {
  return request({
    url: 'api/pickOut/pickOutConfirm',
    method: 'post',
    data: ids
  })
}

export default { xbjsOut,add, edit, del, operationAll, queryTaskLog ,getPickOutById,pickOutConfirm}
