import request from '@/utils/request'

export function getPoints(areaCode, asnType) {
  return request({
    url: 'api/point/getPointList',
    method: 'post',
    data: {
      'areaCode': areaCode,
      'asnType': asnType
    }
  })
}
export function add(data) {
  return request({
    url: 'api/point',
    method: 'post',
    data
  })
}

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

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

export function updatePointOk(data) {
  return request({
    url: 'api/point/updatePoint',
    method: 'put',
    data
  })
}

export function queryPointList(params) {
  return request({
    url: 'api/point/queryPointList',
    method: 'get',
    params
  })
}

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

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

export function pointStockBack(data) {
  return request({
    url: 'api/task/STAgvReceiving',
    method: 'post',
    data
  })
}
export function pointStockRk(data) {
  return request({
    url: 'api/task/pointStockRk',
    method: 'post',
    data
  })
}
export function pointStockCk(ids) {
  return request({
    url: 'api/task/pointStockCk',
    method: 'post',
    data: {
      'ids': ids
    }
  })
}
export function fullStockOut(data) {
  return request({
    url: 'api/appScene/fullStockOut',
    method: 'post',
    data
  })
}

export function multiAdjust(data) {
  return request({
    url: 'api/point/multiAdjust',
    method: 'post',
    data
  })
}
/* 查询单据类型，出库目标点位*/
export function getPickEnd(billType) {
  return request({
    url: 'api/point/getPickEnd',
    method: 'post',
    data: billType
  })
}

export default { add, edit, del,pointStockCk,getPoints,queryPointList ,fullStockIn,pointCallStock,fullStockOut,pointStockBack,multiAdjust,pointStockRk,getPickEnd}
