import request from '@/utils/request'

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

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

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

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

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

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

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

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

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

export function getItemCode(stockCode) {
  return request({
    url: 'api/stock/getItemCode',
    method: 'post',
    data:stockCode
  })
}

export default { add, edit, del,containerIn,containerOut,callStock,getItemCode,lineReturn}
