import request from '@/utils/request'

// 分页查询仓库库存列表
export function pageListCkstock(query) {
  return request({
    url: '/jxc/ckstock/pageList',
    method: 'get',
    params: query
  })
}
// 分页查询即将过期仓库库存列表
export function pageListByExpire(query) {
  return request({
    url: '/jxc/ckstock/pageListByExpire',
    method: 'get',
    params: query
  })
}
export function newList(query) {
  return request({
    url: '/jxc/ckstock/newList',
    method: 'get',
    params: query
  })
}

// 查询仓库库存列表
export function listCkstock(query) {
  return request({
    url: '/jxc/ckstock/list',
    method: 'get',
    params: query
  })
}

// 查询仓库库存列表
export function warehouseList(query) {
  return request({
    url: '/jxc/ckstock/warehouseList',
    method: 'get',
    params: query
  })
}
export function stockNumList(query) {
  return request({
    url: '/jxc/ckstock/stockNumList',
    method: 'get',
    params: query
  })
}
export function getIndexMsg() {
  return request({
    url: '/jxc/ckstock/getIndexMsg',
    method: 'get',
  })
}

// 查询仓库库存列表
export function newListCkstock(query) {
  return request({
    url: '/jxc/ckstock/newList' ,
    method: 'get'
  })
}


// 查询仓库库存详细
export function getCkstock(id) {
  return request({
    url: '/jxc/ckstock/' + id,
    method: 'get'
  })
}

// 新增仓库库存
export function addCkstock(data) {
  return request({
    url: '/jxc/ckstock',
    method: 'post',
    data: data
  })
}

// 修改仓库库存
export function updateCkstock(data) {
  return request({
    url: '/jxc/ckstock',
    method: 'put',
    data: data
  })
}

// 删除仓库库存
export function delCkstock(id) {
  return request({
    url: '/jxc/ckstock/' + id,
    method: 'delete'
  })
}

// 导出仓库库存
export function exportCkstock(query) {
  return request({
    url: '/jxc/ckstock/' + 'export',
    method: 'post',
    params: query
  })
}
