|
@@ -15,7 +15,6 @@ export interface SupplyMonitoringData {
|
|
|
anomalyTypes: SupplyAnomalyType[];
|
|
anomalyTypes: SupplyAnomalyType[];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const SUPPLY_MODULE_CODES = ['S3', 'S4', 'S5'];
|
|
|
|
|
const SUPPLY_ANOMALY_SPECS = [
|
|
const SUPPLY_ANOMALY_SPECS = [
|
|
|
{
|
|
{
|
|
|
key: 'supplier-reply-delay',
|
|
key: 'supplier-reply-delay',
|
|
@@ -62,15 +61,17 @@ const SUPPLY_ANOMALY_SPECS = [
|
|
|
] as const;
|
|
] as const;
|
|
|
|
|
|
|
|
export const s8SupplyMonitoringApi = {
|
|
export const s8SupplyMonitoringApi = {
|
|
|
- /** 获取供应域(S3+S4+S5)的汇总摘要 */
|
|
|
|
|
- summary: () =>
|
|
|
|
|
- s8MonitoringApi.summary({ moduleCode: SUPPLY_MODULE_CODES.join(',') }),
|
|
|
|
|
|
|
+ /** 获取供应域汇总摘要;moduleCodes 由 page-config 派生(fallback 走 STAGE_META_FALLBACK)。 */
|
|
|
|
|
+ summary: (moduleCodes: string[]) =>
|
|
|
|
|
+ s8MonitoringApi.summary({ moduleCode: moduleCodes.join(',') }),
|
|
|
|
|
|
|
|
- /** 获取供应域各阶段订单统计 */
|
|
|
|
|
- modules: () =>
|
|
|
|
|
- s8MonitoringApi.orderGrid().then((data) =>
|
|
|
|
|
- data.modules.filter((m) => SUPPLY_MODULE_CODES.includes(m.moduleCode)),
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ /** 获取供应域各阶段订单统计;按 moduleCodes 过滤 byModule 全集。 */
|
|
|
|
|
+ modules: (moduleCodes: string[]) => {
|
|
|
|
|
+ const set = new Set(moduleCodes);
|
|
|
|
|
+ return s8MonitoringApi.orderGrid().then((data) =>
|
|
|
|
|
+ data.modules.filter((m) => set.has(m.moduleCode)),
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
/** 获取供应异常类型明细(后端未就绪时降级为空数据) */
|
|
/** 获取供应异常类型明细(后端未就绪时降级为空数据) */
|
|
|
anomalyTypes: (): Promise<SupplyAnomalyType[]> =>
|
|
anomalyTypes: (): Promise<SupplyAnomalyType[]> =>
|