Browse Source

HL-5809 库存汇总导出功能接口

hella_online_20240904
yufei_wang 3 months ago
parent
commit
f887410078
  1. 6
      src/api/wms/balance/index.ts
  2. 3
      src/views/wms/inventoryManage/balanceSummary/index.vue

6
src/api/wms/balance/index.ts

@ -156,6 +156,12 @@ export const exportBalance = async (params) => {
}
}
// 导出库存汇总 Excel
export const exportBalanceSummary = async (params) => {
return await request.download({ url: `/wms/balance/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/balance/get-import-template' })

3
src/views/wms/inventoryManage/balanceSummary/index.vue

@ -28,6 +28,7 @@
<script setup lang="ts">
import * as BalanceApi from '@/api/wms/balance'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
import { BalanceSummary,BalanceSummarySearch } from './balanceSummary.data'
import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading()
@ -138,7 +139,7 @@ const handleExport = async () => {
//
loadStart()
const excelTitle = ref(route.meta.title)
const data = await BalanceApi.exportBalance(tableObject.params)
const data = await BalanceApi.exportBalanceSummary(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {

Loading…
Cancel
Save