import request from '@/utils/request'
const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API

// 查询存储码列表
export function listStorageCode(query) {
  return request({
    url: baseUrl + '/business/storageCode/list',
    method: 'get',
    params: query
  })
}

// 查询存储码详细
export function getStorageCode(id) {
  return request({
    url: '/business/storageCode/' + id,
    method: 'get'
  })
}

// 新增存储码
export function addStorageCode(data) {
  return request({
    url: baseUrl + '/business/storageCode',
    method: 'post',
    data: data
  })
}
export function printUpdate(id) {
  return request({
    url: baseUrl + '/business/storageCode/printUpdate/' + id,
    method: 'get'
  })
}

// 修改存储码
export function updateStorageCode(data) {
  return request({
    url: '/business/storageCode',
    method: 'put',
    data: data
  })
}

// 删除存储码
export function delStorageCode(id) {
  return request({
    url: '/business/storageCode/' + id,
    method: 'delete'
  })
}
