|
@@ -21,6 +21,7 @@ import request from '@/router/axios'
|
|
|
* @typedef {import('./types').SalesForecastMainDetailResponse} SalesForecastMainDetailResponse
|
|
|
* @typedef {import('./types').SalesForecastMainUpdateRequest} SalesForecastMainUpdateRequest
|
|
|
* @typedef {import('./types').SalesForecastMainUpdateResponse} SalesForecastMainUpdateResponse
|
|
|
+ * @typedef {import('./types').SalesForecastByMonthResponse} SalesForecastByMonthResponse
|
|
|
*/
|
|
|
|
|
|
/**
|
|
@@ -482,3 +483,20 @@ export const approveSalesForecastSummaryParticulars = async (data) => {
|
|
|
data: { id, forecastMainId, approvalStatus, remark: remark ?? approvalComment ?? '' }
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 按年月查询销售预测汇总明细
|
|
|
+ * 对应后端:GET /api/blade-factory/api/factory/salesForecastSummary/byMonth
|
|
|
+ * @param {number|string} year - 年份,例如 2025
|
|
|
+ * @param {number|string} month - 月份,1-12 或 '01'-'12'
|
|
|
+ * @returns {SalesForecastByMonthResponse} 响应(data: ForecastSummaryRecord[])
|
|
|
+ * @example
|
|
|
+ * const res = await getSalesForecastSummaryByMonth(2025, 12)
|
|
|
+ */
|
|
|
+export const getSalesForecastSummaryByMonth = async (year, month) => {
|
|
|
+ return request({
|
|
|
+ url: '/api/blade-factory/api/factory/salesForecastSummary/byMonth',
|
|
|
+ method: 'get',
|
|
|
+ params: { year, month }
|
|
|
+ })
|
|
|
+}
|