|
|
@@ -363,6 +363,23 @@ export const exportUserSalesForecastByMonth = async (year, month) => {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 销售预测数据导出(按主表ID)
|
|
|
+ * 对应后端:GET /api/blade-factory/api/factory/salesForecastSummary/exportByMainId/{mainId}
|
|
|
+ * @param {number|string} mainId - 主表ID
|
|
|
+ * @returns {Promise<SalesForecastTemplateResponse>} 导出响应(Blob 数据 + 响应头)
|
|
|
+ * @example
|
|
|
+ * const res = await exportSalesForecastByMainId('1966517943156121601')
|
|
|
+ * // 文件名可从 res.headers['content-disposition'] 中解析
|
|
|
+ */
|
|
|
+export const exportSalesForecastByMainId = async (mainId) => {
|
|
|
+ return request({
|
|
|
+ url: `/api/blade-factory/api/factory/salesForecastSummary/exportByMainId/${mainId}`,
|
|
|
+ method: 'get',
|
|
|
+ responseType: 'blob'
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
* 获取销售预测主表详情
|
|
|
* 对应后端:GET /api/blade-factory/api/factory/salesForecastSummary/forecast/detail
|
|
|
* @param {string|number} id - 主表ID
|