import request from '@/utils/request'
import { AxiosPromise } from 'axios'
import { InventoryLedgerVo, InventoryLedgerForm, InventoryLedgerQuery } from '@/api/wms/inventoryLedger/types'
import { TableDataInfo } from '@/api/types'

/**
 * 查询库存台账列表
 * @param query
 * @returns {*}
 */

export const listInventoryLedger = (query?: InventoryLedgerQuery): AxiosPromise<TableDataInfo<InventoryLedgerVo>> => {
  return request({
    url: '/wms/inventory/ledger/list',
    method: 'get',
    params: query
  })
}

/**
 * 导出库存台账列表
 * @param query
 * @returns {*}
 */
export const exportInventoryLedger = (query: InventoryLedgerQuery) => {
  return request({
    url: '/wms/inventory/ledger/export',
    method: 'post',
    data: query
  })
}
