mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 06:29:20 +08:00
refactor(ecom-dmb): 导出服务重构,ExportServiceImpl拆分为独立服务类,抽取ExportFilenameUtils统一文件名构建
This commit is contained in:
@@ -232,7 +232,7 @@ const handleExportShopOverview = async () => {
|
||||
exportLoading.value = true;
|
||||
const shopName = overviewData.value?.shopName || `店铺${shopId.value}`;
|
||||
const [startDate, endDate] = dateRange.value;
|
||||
const filename = `${shopName}_概览_${startDate.format('YYYYMMDD')}_${endDate.format('YYYYMMDD')}.xlsx`;
|
||||
const filename = `${shopName}_概览_${startDate.format('YYYYMMDD')}-${endDate.format('YYYYMMDD')}.xlsx`;
|
||||
await exportByPost(
|
||||
'/ec/shop/export-overview',
|
||||
{
|
||||
@@ -270,7 +270,12 @@ const handleCategoryExport = async () => {
|
||||
if (selectedExportCategoryIds.value.length > 0) {
|
||||
params.categoryIds = selectedExportCategoryIds.value;
|
||||
}
|
||||
await exportByPost('/ec/shop/export-category', params, '门店品类汇总.xlsx');
|
||||
const [catStart, catEnd] = dateRange.value;
|
||||
await exportByPost(
|
||||
'/ec/shop/export-category',
|
||||
params,
|
||||
`门店品类汇总_${catStart.format('YYYYMMDD')}-${catEnd.format('YYYYMMDD')}.xlsx`,
|
||||
);
|
||||
} finally {
|
||||
categoryExportLoading.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user