import request from '@/utils/request'

// 查询库存量
export function searchMaterialNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '采购管理_物料与货位对照_查询数据',
      param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}`,
      Pagination: pageCurrent + '&' + pageSize
    }
  })
}
// 查询滞货库存量
export function searchBacklogNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '采购管理_滞货物料与货位对照_查询数据',
      param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}`,
      Pagination: pageCurrent + '&' + pageSize
    }
  })
}
// 转为滞货
export function submitTurn(...params) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '2',
      name: '采购管理_转为滞货',
      param: `物料流水号=${params[0]}&转滞货数量=${params[1]}&物料与货位对照流水号=${params[2]}&货位流水号=${params[3]}`
    }
  })
}
