import request from '@/utils/request'

/**
* 库存管理/库存明细表分页查询
* @param {查询条件} data
*/
export function listStkBalanceDtl(query) {
  return request({
    url: 'business/StkBalanceDtl/list',
    method: 'get',
    params: query,
  })
}
export function StatStkBalanceDtl(query) {
  return request({
    url: 'business/StkBalanceDtl/statlist',
    method: 'get',
    params: query,
  })
}

/**
* 新增库存管理/库存明细表
* @param data
*/
export function addStkBalanceDtl(data) {
  return request({
    url: 'business/StkBalanceDtl',
    method: 'post',
    data: data,
  })
}

/**
* 修改库存管理/库存明细表
* @param data
*/
export function updateStkBalanceDtl(data) {
  return request({
    url: 'business/StkBalanceDtl',
    method: 'PUT',
    data: data,
  })
}

/**
* 获取库存管理/库存明细表详情
* @param {Id}
*/
export function getStkBalanceDtl(id) {
  return request({
    url: 'business/StkBalanceDtl/' + id,
    method: 'get'
  })
}

/**
* 删除库存管理/库存明细表
* @param {主键} pid
*/
export function delStkBalanceDtl(pid) {
  return request({
    url: 'business/StkBalanceDtl/' + pid,
    method: 'delete'
  })
}

// 清空库存管理/库存明细表
export function clearStkBalanceDtl() {
  return request({
    url: 'business/StkBalanceDtl/clean',
    method: 'delete'
  })
}

// 导出库存管理/库存明细表
export async function exportStkBalanceDtl(query) {
  await downFile('business/StkBalanceDtl/export', { ...query })
}

