xiaoding721
2024-11-04 b796873878ce004fa64c9340825edf2e3aa0cb49
修复一些bug
已修改3个文件
已添加8个文件
580 ■■■■ 文件已修改
_Main/BL/Type_ProductionLineBatchData/Method_Enable.qbl 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ProductionLineBatchData/Method_Enable2Lines.qbl 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ProductionLineBatchData/Method_Enable3Lines.qbl 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ProductionLineBatchData/Method_Update#540.qbl 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ProductionLineBatchData/StaticMethod_Create#104.qbl 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pLine3.def 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pShiftPattern3.def 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pnlContent.def 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pLine3_cbLine3_OnChanged.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pShiftPattern3_cbShiftPattern3_OnChanged.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pnlActions_btnOk_OnClick.def 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ProductionLineBatchData/Method_Enable.qbl
@@ -5,80 +5,10 @@
  TextBody:
  [*
    // rislai Jun-7-2024 (created)
    owner := this.MacroPlan();
    // è½®æ¢ç­æ¬¡ç¼“å­˜
    shiftPattern1 := this.ShiftPattern1();
    shiftPattern2 := this.ShiftPattern2();
    shiftPattern3 := this.ShiftPattern3();
    tempShiftPattern := shiftPattern1;
    dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Day' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    weekPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Week' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    // period_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    if( dayPeriod_MPs.Size() > 0 ){
      startDate := dayPeriod_MPs.Element( 0 ).StartDate();
      endDate := dayPeriod_MPs.Element( dayPeriod_MPs.Size() - 1 ).EndDate();
      // æ¯ä¸ƒå¤©è½®æ¢ç­æ¬¡
      for( i := startDate.StartOfWeek(); i < (endDate.StartOfWeek() - 1).StartOfNextWeek(); i := i.StartOfNextWeek()){
        tempStartDate := i;
        tempEndDate := i.StartOfNextWeek();
        tempPeriod_MPs := selectset( dayPeriod_MPs,Elements,period_MP,period_MP.StartDate() >= tempStartDate and period_MP.EndDate() <= tempEndDate );
        unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
        unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
        unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
        if( unitPeriodTimes1.Size() > 0 ){
          this.OnOK( unitPeriodTimes1,shiftPattern1 );
        }
        if( unitPeriodTimes2.Size() > 0 ){
          this.OnOK( unitPeriodTimes2,shiftPattern2 );
        }
        if( unitPeriodTimes3.Size() > 0 ){
          this.OnOK( unitPeriodTimes3,shiftPattern3 );
        }
        // æ¢ç­æ¬¡
        tempShiftPattern := shiftPattern1;
        shiftPattern1 := shiftPattern2;
        shiftPattern2 := shiftPattern3;
        shiftPattern3 := tempShiftPattern;
      }
    if( not isnull( this.Unit3())){
      this.Enable3Lines();
    }else{
      this.Enable2Lines();
    }
    // è½®æ¢ç­æ¬¡ç¼“å­˜
    shiftPattern1 := this.ShiftPattern1();
    shiftPattern2 := this.ShiftPattern2();
    shiftPattern3 := this.ShiftPattern3();
    tempShiftPattern := shiftPattern1;
    if( weekPeriod_MPs.Size() <> 0 ){
      traverse( weekPeriod_MPs,Elements,period_MP ){
        unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
        unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
        unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
        if( unitPeriodTimes1.Size() > 0 ){
          this.OnOK( unitPeriodTimes1,shiftPattern1 );
        }
        if( unitPeriodTimes2.Size() > 0 ){
          this.OnOK( unitPeriodTimes2,shiftPattern2 );
        }
        if( unitPeriodTimes3.Size() > 0 ){
          this.OnOK( unitPeriodTimes3,shiftPattern3 );
        }
        // æ¢ç­æ¬¡
        tempShiftPattern := shiftPattern1;
        shiftPattern1 := shiftPattern2;
        shiftPattern2 := shiftPattern3;
        shiftPattern3 := tempShiftPattern;
      }
    }
    this.IsEnable( true );
  *]
}
_Main/BL/Type_ProductionLineBatchData/Method_Enable2Lines.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,72 @@
Quintiq file version 2.0
#parent: #root
Method Enable2Lines
{
  TextBody:
  [*
    // rislai Jun-7-2024 (created)
    owner := this.MacroPlan();
    // è½®æ¢ç­æ¬¡ç¼“å­˜
    shiftPattern1 := this.ShiftPattern1();
    shiftPattern2 := this.ShiftPattern2();
    tempShiftPattern := shiftPattern1;
    dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Day' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    weekPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Week' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    // period_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    if( dayPeriod_MPs.Size() > 0 ){
      startDate := dayPeriod_MPs.Element( 0 ).StartDate();
      endDate := dayPeriod_MPs.Element( dayPeriod_MPs.Size() - 1 ).EndDate();
      // æ¯ä¸ƒå¤©è½®æ¢ç­æ¬¡
      for( i := startDate.StartOfWeek(); i < (endDate.StartOfWeek() - 1).StartOfNextWeek(); i := i.StartOfNextWeek()){
        tempStartDate := i;
        tempEndDate := i.StartOfNextWeek();
        tempPeriod_MPs := selectset( dayPeriod_MPs,Elements,period_MP,period_MP.StartDate() >= tempStartDate and period_MP.EndDate() <= tempEndDate );
        unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
        unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
        if( unitPeriodTimes1.Size() > 0 ){
          this.OnOK( unitPeriodTimes1,shiftPattern1 );
        }
        if( unitPeriodTimes2.Size() > 0 ){
          this.OnOK( unitPeriodTimes2,shiftPattern2 );
        }
        // æ¢ç­æ¬¡
        tempShiftPattern := shiftPattern1;
        shiftPattern1 := shiftPattern2;
        shiftPattern2 := tempShiftPattern;
      }
    }
    // è½®æ¢ç­æ¬¡ç¼“å­˜
    shiftPattern1 := this.ShiftPattern1();
    shiftPattern2 := this.ShiftPattern2();
    tempShiftPattern := shiftPattern1;
    if( weekPeriod_MPs.Size() <> 0 ){
      traverse( weekPeriod_MPs,Elements,period_MP ){
        unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
        unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
        if( unitPeriodTimes1.Size() > 0 ){
          this.OnOK( unitPeriodTimes1,shiftPattern1 );
        }
        if( unitPeriodTimes2.Size() > 0 ){
          this.OnOK( unitPeriodTimes2,shiftPattern2 );
        }
        // æ¢ç­æ¬¡
        tempShiftPattern := shiftPattern1;
        shiftPattern1 := shiftPattern2;
        shiftPattern2 := tempShiftPattern;
      }
    }
    this.IsEnable( true );
  *]
}
_Main/BL/Type_ProductionLineBatchData/Method_Enable3Lines.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,84 @@
Quintiq file version 2.0
#parent: #root
Method Enable3Lines
{
  TextBody:
  [*
    // rislai Jun-7-2024 (created)
    owner := this.MacroPlan();
    // è½®æ¢ç­æ¬¡ç¼“å­˜
    shiftPattern1 := this.ShiftPattern1();
    shiftPattern2 := this.ShiftPattern2();
    shiftPattern3 := this.ShiftPattern3();
    tempShiftPattern := shiftPattern1;
    dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Day' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    weekPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Week' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    // period_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
    if( dayPeriod_MPs.Size() > 0 ){
      startDate := dayPeriod_MPs.Element( 0 ).StartDate();
      endDate := dayPeriod_MPs.Element( dayPeriod_MPs.Size() - 1 ).EndDate();
      // æ¯ä¸ƒå¤©è½®æ¢ç­æ¬¡
      for( i := startDate.StartOfWeek(); i < (endDate.StartOfWeek() - 1).StartOfNextWeek(); i := i.StartOfNextWeek()){
        tempStartDate := i;
        tempEndDate := i.StartOfNextWeek();
        tempPeriod_MPs := selectset( dayPeriod_MPs,Elements,period_MP,period_MP.StartDate() >= tempStartDate and period_MP.EndDate() <= tempEndDate );
        unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
        unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
        unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
        if( unitPeriodTimes1.Size() > 0 ){
          this.OnOK( unitPeriodTimes1,shiftPattern1 );
        }
        if( unitPeriodTimes2.Size() > 0 ){
          this.OnOK( unitPeriodTimes2,shiftPattern2 );
        }
        if( unitPeriodTimes3.Size() > 0 ){
          this.OnOK( unitPeriodTimes3,shiftPattern3 );
        }
        // æ¢ç­æ¬¡
        tempShiftPattern := shiftPattern1;
        shiftPattern1 := shiftPattern2;
        shiftPattern2 := shiftPattern3;
        shiftPattern3 := tempShiftPattern;
      }
    }
    // è½®æ¢ç­æ¬¡ç¼“å­˜
    shiftPattern1 := this.ShiftPattern1();
    shiftPattern2 := this.ShiftPattern2();
    shiftPattern3 := this.ShiftPattern3();
    tempShiftPattern := shiftPattern1;
    if( weekPeriod_MPs.Size() <> 0 ){
      traverse( weekPeriod_MPs,Elements,period_MP ){
        unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
        unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
        unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
        if( unitPeriodTimes1.Size() > 0 ){
          this.OnOK( unitPeriodTimes1,shiftPattern1 );
        }
        if( unitPeriodTimes2.Size() > 0 ){
          this.OnOK( unitPeriodTimes2,shiftPattern2 );
        }
        if( unitPeriodTimes3.Size() > 0 ){
          this.OnOK( unitPeriodTimes3,shiftPattern3 );
        }
        // æ¢ç­æ¬¡
        tempShiftPattern := shiftPattern1;
        shiftPattern1 := shiftPattern2;
        shiftPattern2 := shiftPattern3;
        shiftPattern3 := tempShiftPattern;
      }
    }
    this.IsEnable( true );
  *]
}
_Main/BL/Type_ProductionLineBatchData/Method_Update#540.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
Quintiq file version 2.0
#parent: #root
Method Update (
  Unit line1,
  Unit line2,
  ShiftPattern shiftPattern1,
  ShiftPattern shiftPattern2,
  Date startDate,
  Date endDate
)
{
  TextBody:
  [*
    // rislai Jun-7-2024 (created)
    owner := this.MacroPlan();
    if( isnull( shiftPattern1 ) or isnull( shiftPattern2 ) or isnull( line1 ) or isnull( line2 )){
      error( "数据不能为空!" );
    }
    // ï¼ˆ1) æ–°å¢žäº§çº¿1和产线2相同时报错“相同产线无法新增”;
    if( line1 = line2 ){
       error( "相同产线无法新增" );
    }
    // ï¼ˆ2) ç›¸åŒçš„产线班次,生效时间可以维护多个,但是生效时间重复时报错“该数据已维护”;
    verifyData := select( owner,ProductionLineBatchData,data,data.Unit1() = line1 and data.Unit2() = line2 and
                          data.ShiftPattern1() = shiftPattern1 and data.ShiftPattern2() = shiftPattern2 and
                          data.StartDate() = startDate and data.EndDate() = endDate and data <> this );
    if( not isnull( verifyData )){
      error( "该数据已维护" );
    }
    shiftPattern3 := null( ShiftPattern );
    line3 := null( Unit );
    this.ShiftPattern1( relset, shiftPattern1 );
    this.ShiftPattern2( relset, shiftPattern2 );
    this.ShiftPattern3( relset, shiftPattern3 );
    this.Unit1( relset, line1 );
    this.Unit2( relset, line2 );
    this.Unit3( relset, line3 );
    this.StartDate( startDate );
    this.EndDate( endDate );
  *]
}
_Main/BL/Type_ProductionLineBatchData/StaticMethod_Create#104.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Create (
  MacroPlan owner,
  Unit line1,
  Unit line2,
  ShiftPattern shiftPattern1,
  ShiftPattern shiftPattern2,
  Date startDate,
  Date endDate
) as ProductionLineBatchData
{
  TextBody:
  [*
    // rislai Jun-7-2024 (created)
    if( isnull( shiftPattern1 ) or isnull( line1 ) ){
      error( "数据不能为空!" );
    }
    // ï¼ˆ1) æ–°å¢žäº§çº¿1和产线2相同时报错“相同产线无法新增”;
    if( line1 = line2 ){
       error( "相同产线无法新增" );
    }
    // ï¼ˆ2) ç›¸åŒçš„产线班次,生效时间可以维护多个,但是生效时间重复时报错“该数据已维护”;
    verifyData := select( owner,ProductionLineBatchData,data,data.Unit1() = line1 and data.Unit2() = line2 and
                          data.ShiftPattern1() = shiftPattern1 and data.ShiftPattern2() = shiftPattern2 and
                          data.StartDate() = startDate and data.EndDate() = endDate );
    if( not isnull( verifyData )){
      error( "该数据已维护" );
    }
    data := owner.ProductionLineBatchData( relnew,
                                           ShiftPattern1 := shiftPattern1,
                                           ShiftPattern2 := shiftPattern2,
                                           Unit1 := line1,
                                           Unit2 := line2,
                                           StartDate := startDate,
                                           EndDate := endDate );
    return data;
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pLine3.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
Quintiq file version 2.0
Component pLine3
{
  #keys: '[414996.1.190660603]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ddlLine3 id:ddlLine3_522
    {
      #keys: '[414996.1.190660682]'
      BaseType: 'WebDropDownList'
      Databinding: 'Unit'
      Children:
      [
        Component deContent872 id:deContent872_106
        {
          #keys: '[414996.1.190660683]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'structured[Unit]'
            Source: 'ApplicationMacroPlanner.DataHolderUnit'
            Taborder: 0
            Transformation: 'Elements.astype(Unit)'
          ]
        }
      ]
      Properties:
      [
        DataBinding: 'DialogData.Data.Unit3'
        DisplayField: 'Name'
        Label: 'Line 3'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
    Component cbLine3
    {
      #keys: '[414996.1.190660695]'
      BaseType: 'WebCheckbox'
      Properties:
      [
        Checked: true
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    FixedSize: true
    Orientation: 'horizontal'
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pShiftPattern3.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
Quintiq file version 2.0
Component pShiftPattern3
{
  #keys: '[414996.1.190660633]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ddlShiftPattern3 id:ddlShiftPattern3_474
    {
      #keys: '[414996.1.190660743]'
      BaseType: 'WebDropDownList'
      Databinding: 'ShiftPattern'
      Children:
      [
        Component deContent529 id:deContent529_265
        {
          #keys: '[414996.1.190660744]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'MacroPlan'
            Source: 'MacroPlan'
            Taborder: 0
            Transformation: 'ShiftPattern'
          ]
        }
      ]
      Properties:
      [
        DataBinding: 'DialogData.Data.ShiftPattern3'
        DisplayField: 'Name'
        Label: 'Shift pattern 3'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
    Component cbShiftPattern3
    {
      #keys: '[414996.1.190660783]'
      BaseType: 'WebCheckbox'
      Properties:
      [
        Checked: true
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    FixedSize: true
    Orientation: 'horizontal'
    Taborder: 5
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pnlContent.def
@@ -30,6 +30,7 @@
        DataBinding: 'DialogData.Data.Unit1'
        DisplayField: 'Name'
        Label: 'Line 1'
        NumberOfColumns: 50
        Taborder: 0
      ]
    }
@@ -58,6 +59,7 @@
        DataBinding: 'DialogData.Data.Unit2'
        DisplayField: 'Name'
        Label: 'Line 2'
        NumberOfColumns: 50
        Taborder: 1
      ]
    }
@@ -86,6 +88,7 @@
        DataBinding: 'DialogData.Data.ShiftPattern1'
        DisplayField: 'Name'
        Label: 'Shift pattern 1'
        NumberOfColumns: 50
        Taborder: 3
      ]
    }
@@ -114,6 +117,7 @@
        DataBinding: 'DialogData.Data.ShiftPattern2'
        DisplayField: 'Name'
        Label: 'Shift pattern 2'
        NumberOfColumns: 50
        Taborder: 4
      ]
    }
@@ -139,62 +143,8 @@
        Taborder: 7
      ]
    }
    Component ddlLine3
    {
      #keys: '[414996.1.106189463]'
      BaseType: 'WebDropDownList'
      Databinding: 'Unit'
      Children:
      [
        Component deContent872
        {
          #keys: '[414996.1.106189464]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'structured[Unit]'
            Source: 'ApplicationMacroPlanner.DataHolderUnit'
            Taborder: 0
            Transformation: 'Elements.astype(Unit)'
          ]
        }
      ]
      Properties:
      [
        DataBinding: 'DialogData.Data.Unit3'
        DisplayField: 'Name'
        Label: 'Line 3'
        Taborder: 2
      ]
    }
    Component ddlShiftPattern3
    {
      #keys: '[414996.1.108410230]'
      BaseType: 'WebDropDownList'
      Databinding: 'ShiftPattern'
      Children:
      [
        Component deContent529
        {
          #keys: '[414996.1.108410231]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'MacroPlan'
            Source: 'MacroPlan'
            Taborder: 0
            Transformation: 'ShiftPattern'
          ]
        }
      ]
      Properties:
      [
        DataBinding: 'DialogData.Data.ShiftPattern3'
        DisplayField: 'Name'
        Label: 'Shift pattern 3'
        Taborder: 5
      ]
    }
    #child: pLine3
    #child: pShiftPattern3
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pLine3_cbLine3_OnChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: pLine3/cbLine3
Response OnChanged () id:Response_pLine3_cbLine3_OnChanged
{
  #keys: '[414996.1.190690650]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebCheckbox_OnChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      ddlLine3.Enabled( cbLine3.Checked(),"" );
      cbShiftPattern3.Checked( cbLine3.Checked() )
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pShiftPattern3_cbShiftPattern3_OnChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: pShiftPattern3/cbShiftPattern3
Response OnChanged () id:Response_pShiftPattern3_cbShiftPattern3_OnChanged
{
  #keys: '[414996.1.192162308]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebCheckbox_OnChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      ddlShiftPattern3.Enabled( cbShiftPattern3.Checked(),"" );
      cbLine3.Checked( cbShiftPattern3.Checked() );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pnlActions_btnOk_OnClick.def
@@ -13,24 +13,45 @@
    Body:
    [*
      if( not isnull( DialogData.Data( ))){
        DialogData.Data( ).Update( ddlLine1.Data(),
                                   ddlLine2.Data(),
                                   ddlLine3.Data(),
                                   ddlShiftPattern1.Data(),
                                   ddlShiftPattern2.Data(),
                                   ddlShiftPattern3.Data(),
                                   dsStartDate.Date(),
                                   dsEndDate.Date());
        if( cbLine3.Checked() ){
          DialogData.Data( ).Update( ddlLine1.Data(),
                                     ddlLine2.Data(),
                                     ddlLine3.Data(),
                                     ddlShiftPattern1.Data(),
                                     ddlShiftPattern2.Data(),
                                     ddlShiftPattern3.Data(),
                                     dsStartDate.Date(),
                                     dsEndDate.Date());
        }else{
          DialogData.Data( ).Update( ddlLine1.Data(),
                                     ddlLine2.Data(),
                                     ddlShiftPattern1.Data(),
                                     ddlShiftPattern2.Data(),
                                     dsStartDate.Date(),
                                     dsEndDate.Date());
        }
      }else{
        ProductionLineBatchData::Create( MacroPlan,
                                         ddlLine1.Data(),
                                         ddlLine2.Data(),
                                         ddlLine3.Data(),
                                         ddlShiftPattern1.Data(),
                                         ddlShiftPattern2.Data(),
                                         ddlShiftPattern3.Data(),
                                         dsStartDate.Date(),
                                         dsEndDate.Date());
        if( cbLine3.Checked() ){
          ProductionLineBatchData::Create( MacroPlan,
                                           ddlLine1.Data(),
                                           ddlLine2.Data(),
                                           ddlLine3.Data(),
                                           ddlShiftPattern1.Data(),
                                           ddlShiftPattern2.Data(),
                                           ddlShiftPattern3.Data(),
                                           dsStartDate.Date(),
                                           dsEndDate.Date());
        }else{
          ProductionLineBatchData::Create( MacroPlan,
                                           ddlLine1.Data(),
                                           ddlLine2.Data(),
                                           ddlShiftPattern1.Data(),
                                           ddlShiftPattern2.Data(),
                                           dsStartDate.Date(),
                                           dsEndDate.Date());
        }
      }
      
      // Form.ApplyChanges();