11
This commit is contained in:
1 parent
00f2b94b6a
commit
171d554abe
2 files changed
+23
-2
No files matched your search
@@ -30,4 +30,12 @@ export const OrderSalesStatisticsApi = {
|
||||
params
|
||||
})
|
||||
},
|
||||
|
||||
// 导出订单销售统计数据
|
||||
exportSalesStatistics: async (params: GetSalesStatisticsReqVO) => {
|
||||
return await request.download({
|
||||
url: '/trade/order/sales-statistics/export-excel',
|
||||
params
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -60,7 +60,6 @@
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['trade:order:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" />
|
||||
导出
|
||||
@@ -141,7 +140,21 @@ const resetQuery = () => {
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await OrderSalesStatisticsApi.exportSalesStatistics(queryParams)
|
||||
download.excel(data, `订单销售统计_${new Date().getTime()}.xls`)
|
||||
} catch {
|
||||
// 用户取消导出或导出失败
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
|
||||
Reference in new issue
Block a user