✨ 完善毛利分析筛选与导出日志

This commit is contained in:
caojia
2026-10-15 14:37:18 +08:00
parent be2a359698
commit c704021f2f
15 changed files with 534 additions and 39 deletions
+32 -3
View File
@@ -1,4 +1,15 @@
import request, { download } from '@/utils/request'
import request from '@/utils/request'
import { tansParams } from '@/utils/bms'
function createProfitExport(url, params) {
return request({
url,
method: 'post',
data: params,
transformRequest: [tansParams],
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
}
export function listProfitSummary(params) {
return request({
@@ -25,13 +36,30 @@ export function listProfitProducts(params) {
}
export function exportProfitOrders(params) {
return download('/report/profit/orders/export', params, '订单毛利报表.xlsx')
return createProfitExport('/report/profit/orders/export', params)
}
export function exportProfitProducts(params) {
return download('/report/profit/products/export', params, '产品毛利报表.xlsx')
return createProfitExport('/report/profit/products/export', params)
}
export function listProfitExports(params) {
return request({
url: '/report/profit/exports',
method: 'get',
params
})
}
export function downloadProfitExport(exportId) {
return request({
url: '/report/profit/exports/' + exportId + '/download',
method: 'get',
responseType: 'blob'
})
}
/* 提成功能暂停使用,保留接口定义便于恢复。
export function listProfitCommissionRates() {
return request({
url: '/report/profit/commission-rates',
@@ -53,3 +81,4 @@ export function deleteProfitCommissionRate(rateId) {
method: 'delete'
})
}
*/