import request from '@/utils/request'
import qs from 'qs'
import { QN_BASEURL } from '../../serviceSettings'
const baseUrl = QN_BASEURL

// 站台号
export function checkStation(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/validateStation',
    data: parameter,
  })
}

// 养护确认
export function confirmMaintain(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/maintain/confirmMaintain',
    data: parameter,
  })
}

//查询货架数据
export function uerySourcePalletLocationInfo(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/querySourcePalletLocationInfo',
    data: parameter,
  })
}

// 调出货架数据查询
export function getGoodsShelves(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/queryPalletNo',
    data: parameter,
  })
}

// 原货位、目的货位
export function getGoodsInfoByShelves(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/queryTargetPalletLocationInfo',
    data: parameter,
  })
}

// 调整数量
export function locationAdjustmentGoodsShelves(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/confirmlocationAdjustment',
    data: parameter,
  })
}

// 调出
export function callOutGoodsShelves(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/callOutShelves',
    data: parameter,
  })
}

//货架归还
export function goodsShelvesReturn(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/returnGoodsShelf',
    data: parameter,
  })
}

//调整之后调用
export function queryOldNewQty(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/querySourcePalletLocationInfo',
    data: parameter,
  })
}
//调整
export function querygoodsBarcode(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/maintain/getTargetXnInfos',
    data: parameter,
  })
}
// 查看图片
export function queryImages(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/maintain/queryImages',
    data: parameter,
  })
}

export function adjustGoodsShelves(parameter) {
  return request({
    method: 'post',
    url: baseUrl + '/api/v1/locationAdjustment/confirmAdjust',
    data: parameter,
  })
}
