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 updateStockStatus(stockList) {
  return request({
    url: 'api/stock/updateStockStatus',
    method: 'put',
    data:stockList
  })
}

export function updateStock(data) {
  return request({
    url: 'api/stock/updateStockOK',
    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 stockMsg(data) {
  return request({
    url: 'api/stock/stockMsg',
    method: 'post',
    data
  })
}

export default { add, edit, del,containerIn,containerOut,updateStockStatus,stockMsg}
