haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
import { DialogSOP } from '../../libappsop/dialogsop';
import { DropDownListSOP } from '../../libappsop/dropdownlistsop';
import { DropDownStringListSOP } from '../../libappsop/dropdownstringlistsop';
import { NumberPickerSOP } from '../../libappsop/numberpickersop';
 
export interface DialogPostponementSpecificationFields {
  SalesSegment?: string;
  HorizonTimeUnit?: string;
  Horizon?: string;
  MaxPostponementTimeUnit?: string;
  MaxPostponement?: string;
}
 
export class DialogPostponementSpecification extends DialogSOP<DialogPostponementSpecificationFields> {
  public ddlSalesSegment = new DropDownListSOP('selSalesSegment');
  public ddslHorizonTimeUnit = new DropDownStringListSOP('StringListHorizonTimeUnit');
  public npHorizon = new NumberPickerSOP('NumberPickerNrOfTimeUnit');
  public ddslMaxPostponementTimeUnit = new DropDownStringListSOP('StringListMaxTimeUnit');
  public npMaxPostponement = new NumberPickerSOP('NumberPickerMaxNrOfTimeUnit');
 
  public constructor() {
    super('DialogCreateEditPostponementSpecification');
 
    // Set UI element mapping to pair the UI name to the UI element for use in DialogSOP to find the UI object to set value or verify value
    // This prevents each new Dialog to duplicate code just to set/verify UI element value
    this._uiMap.set('SalesSegment', this.ddlSalesSegment);
    this._uiMap.set('HorizonTimeUnit', this.ddslHorizonTimeUnit);
    this._uiMap.set('Horizon', this.npHorizon);
    this._uiMap.set('MaxPostponementTimeUnit', this.ddslMaxPostponementTimeUnit);
    this._uiMap.set('MaxPostponement', this.npMaxPostponement);
  }
}