chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { ListSOP } from '../../libappsop/listsop';
import { FormSOP } from '../../libappsop/formsop';
import { DialogForecast } from '../dialogs/dialog.forecast';
import { DialogPostponeForecast } from '../dialogs/dialog.postponeforecast';
 
export class FormForecasts extends FormSOP {
  public listForecasts = new ListForecasts();
  public listForecastsPlanningLevel = new ListForecastsPlanningLevel();
 
  public constructor() {
    super('FormForecasts');
  }
}
 
export class ListForecasts extends ListSOP<DialogForecast, ListForecastsColumn> {
  public readonly title = 'Forecasts';
 
  public constructor() {
    super('ListSalesDemands', new DialogForecast());
  }
}
 
export class ListForecastsPlanningLevel extends ListSOP<DialogPostponeForecast, ListForecastsPlanningLevelColumn> {
  public readonly title = 'Forecasts at planning level';
 
  public constructor() {
    super('ListSDIP', new DialogPostponeForecast());
  }
}
 
// List Forecasts columns
export interface ListForecastsColumn {
  Product?: string;
  'Sales segment'?: string;
  'Stocking point'?: string;
  Start?: string;
  End?: string;
  'Original Qty'?: string;
  Price?: string;
}
 
export interface ListForecastsPlanningLevelColumn {
  Product?: string;
  'Sales segment'?: string;
  'Stocking point'?: string;
  Start?: string;
  End?: string;
  Quantity?: string;
}
 
// List Forecasts context menu items
const listForecastsContextMenuItem = {
  Create: { ContextMenu: 'listContextMenuSD', Name: 'MenuCreate', Label: 'Create' },
  Edit: { ContextMenu: 'listContextMenuSD', Name: 'MenuEdit', Label: 'Edit' },
  Delete: { ContextMenu: 'listContextMenuSD', Name: 'MenuDelete', Label: 'Delete' },
  AdjustQuantity: { ContextMenu: 'listContextMenuSD', Name: 'MenuAdjustQuantity', Label: 'Adjust Quantity...' },
};
 
const listForecastsPlanningLevelContextMenuItem = {
  Postpone: { ContextMenu: 'listContextMenuSDIP', Name: 'MenuPostpone', Label: 'Postpone' },
};
 
export { listForecastsContextMenuItem as ListForecastsContextMenuItem };
export { listForecastsPlanningLevelContextMenuItem as ListForecastsPlanningLevelContextMenuItem };