lazhen
2024-06-06 4eb6f16a70cbb5c5dff4d8994fb8c042d25dbac2
换型损失设置新增编辑完成
已修改5个文件
已添加13个文件
348 ■■■■■ 文件已修改
_Main/BL/InfoMessages.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Component_pnlContent.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Response_pnlActions_btnOk_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlContent.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlActions.def 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlContent.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlEndTime.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlMaxCapacity.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlRatio.def 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlRouting.def 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlStartAndEnd.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlStartTime.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Method_Edit.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Method_SetDefaultValue.def 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Response_pnlActions_btnCancel_OnClick.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Response_pnlActions_btnOk_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/_ROOT_Component_DialogCreateEditThermalTrialRatio.def 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl
@@ -94,6 +94,10 @@
  {
    DefaultText: 'The same data already exists.'
  }
  InfoMessage MP_ChangeLossSetting_SameProduct
  {
    DefaultText: 'The two products selected are the same.'
  }
  InfoMessage MP_LibCal_EventType_Exist
  {
    DefaultText: 'The ID or name is the same.'
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl
@@ -1,6 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ValidateInput (
  output String feedback,
  MacroPlan owner,
  ChangeLossSetting old,
  Unit unit,
@@ -13,13 +14,19 @@
  [*
    // ç”„兰鸽 Jun-5-2024 (created)
    feedback := '';
    if( isnull( unit ) or isnull( product1 ) or isnull( product2 ) or number < 1 ){
      feedback := Translations::MP_ChangeLossSetting_CheckNull();
    }
    if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit and cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) ){
    if( product1 = product2 ){
      feedback := Translations::MP_ChangeLossSetting_SameProduct();
    }
    if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit
                and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 )
                      or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){
      feedback := Translations::MP_ChangeLossSetting_Exist()
    }
    return feedback = '';
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Component_pnlContent.def
@@ -28,6 +28,7 @@
      Properties:
      [
        DataBinding: 'dhDialogData.Data.Unit'
        DisplayField: 'Name'
        Label: 'Unit'
        Taborder: 0
      ]
@@ -55,6 +56,7 @@
      Properties:
      [
        DataBinding: 'dhDialogData.Data.ProductFirst'
        DisplayField: 'Name'
        Label: 'Product1'
        Taborder: 1
      ]
@@ -82,6 +84,7 @@
      Properties:
      [
        DataBinding: 'dhDialogData.Data.ProductSecond'
        DisplayField: 'Name'
        Label: 'Product2'
        Taborder: 2
      ]
@@ -94,6 +97,7 @@
      [
        DataBinding: 'dhDialogData.Data.ChangeLossNr'
        Label: 'Change loss number'
        Min: '0'
        Taborder: 3
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Response_pnlActions_btnOk_OnClick.def
@@ -4,10 +4,9 @@
{
  #keys: '[415136.0.735612174]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  Precondition:
  [*
    return ChangeLossSetting::ValidateInput( MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), [Number]npChangeLossNr.Number() );
    return ChangeLossSetting::ValidateInput( feedback, MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), [Number]npChangeLossNr.Number() );
  *]
  QuillAction
  {
@@ -15,5 +14,6 @@
    [*
      Form.OnOK();
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlContent.def
@@ -55,7 +55,6 @@
        FixedSize: false
        Label: 'Parent event type'
        Taborder: 2
        Tooltip: '<html>Leave empty if the product is at the highest level of the product hierarchy.<br>Otherwise select the parent product.</html>'
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlActions.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
Quintiq file version 2.0
Component pnlActions
{
  #keys: '[415136.0.756140030]'
  BaseType: 'WebPanel'
  Children:
  [
    Component btnOk
    {
      #keys: '[415136.0.756140034]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'OK'
        Taborder: 0
      ]
    }
    Component btnCancel
    {
      #keys: '[415136.0.756140036]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Cancel'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    Border: true
    ExcludeFromActiveComponent: true
    FixedSize: true
    Orientation: 'horizontal'
    Padding: 'true'
    Style: 'footer'
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlContent.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
Component pnlContent
{
  #keys: '[415136.0.756140028]'
  BaseType: 'WebPanel'
  Children:
  [
    #child: pnlRouting
    #child: pnlMaxCapacity
    #child: pnlStartAndEnd
    #child: pnlRatio
  ]
  Properties:
  [
    Padding: 'true'
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlEndTime.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
Component pnlEndTime
{
  #keys: '[415136.0.756140748]'
  BaseType: 'WebPanel'
  Children:
  [
    Component dsEndTime
    {
      #keys: '[415136.0.756140766]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        Label: 'End'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlMaxCapacity.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
Component pnlMaxCapacity
{
  #keys: '[415136.0.756140541]'
  BaseType: 'WebPanel'
  Children:
  [
    Component efMaxCapacity
    {
      #keys: '[415136.0.756140589]'
      BaseType: 'WebEditField'
      Properties:
      [
        Label: 'Maximum thermal trial capacity'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlRatio.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
Quintiq file version 2.0
Component pnlRatio
{
  #keys: '[415136.0.756140800]'
  BaseType: 'WebPanel'
  Children:
  [
    Component lblThermalTrialRatio
    {
      #keys: '[415136.0.756140822]'
      BaseType: 'WebLabel'
      Properties:
      [
        Label: 'Thermal Trial Ratio'
        Taborder: 0
      ]
    }
    Component efThermalTrialRatio
    {
      #keys: '[415136.0.756140847]'
      BaseType: 'WebEditField'
      Properties:
      [
        Label: '1:'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlRouting.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
Quintiq file version 2.0
Component pnlRouting
{
  #keys: '[415136.0.756140163]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ddlRouting
    {
      #keys: '[415136.0.756140276]'
      BaseType: 'WebDropDownList'
      Databinding: 'Routing'
      Children:
      [
        Component DataExtractorRouting
        {
          #keys: '[415136.0.756140277]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'structured[Routing]'
            Source: 'dhRoutingSelection'
            Taborder: 0
            Transformation: 'Elements'
          ]
        }
      ]
      Properties:
      [
        AllowEmpty: true
        DataBinding: 'dhDialogData.Data'
        DisplayField: 'Name'
        FixedSize: false
        Label: 'Routing'
        Taborder: 1
      ]
    }
    Component dhRoutingSelection
    {
      #keys: '[415136.0.756140424]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[Routing]*'
      Properties:
      [
        MergeStyle: 'Union'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlStartAndEnd.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
Component pnlStartAndEnd
{
  #keys: '[415136.0.756140654]'
  BaseType: 'WebPanel'
  Children:
  [
    #child: pnlStartTime
    #child: pnlEndTime
  ]
  Properties:
  [
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Component_pnlStartTime.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
Component pnlStartTime
{
  #keys: '[415136.0.756140686]'
  BaseType: 'WebPanel'
  Children:
  [
    Component dsStartTime
    {
      #keys: '[415136.0.756140720]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        Label: 'Start'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Method_Edit.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: #root
Method Edit (
  Routing selection
) id:Method_DialogCreateEditThermalTrialRatio_Edit
{
  #keys: '[415136.0.756141435]'
  Body:
  [*
    // Edit Product(s)
    dhDialogData.Data( selection );
    Form.SetDefaultValue();
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Method_SetDefaultValue.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
#parent: #root
Method SetDefaultValue () id:Method_DialogCreateEditThermalTrialRatio_SetDefaultValue
{
  #keys: '[415136.0.756141199]'
  Body:
  [*
    // Set default + init dialog
    routings := selectset( MacroPlan, Routing, routing , true );
    dhRoutingSelection.Data( routings.Copy() );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Response_pnlActions_btnCancel_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActions/btnCancel
Response OnClick () id:Response_pnlActions_btnCancel_OnClick
{
  #keys: '[415136.0.756140040]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.Close();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/Response_pnlActions_btnOk_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[415136.0.756140039]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.ApplyChanges();
      Form.Close();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThermalTrialRatio/_ROOT_Component_DialogCreateEditThermalTrialRatio.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent DialogCreateEditThermalTrialRatio
{
  #keys: '[415136.0.756140026]'
  BaseType: 'WebForm'
  Children:
  [
    #child: pnlContent
    #child: pnlActions
    Component dhDialogData id:dhDialogData_623
    {
      #keys: '[415136.0.756140336]'
      BaseType: 'WebDataHolder'
      Databinding: 'Routing'
      Properties:
      [
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    EnterButton: 'btnOk'
    EscapeButton: 'btnCancel'
    ExcludeFromActiveComponent: true
    Padding: 'false'
    Title: 'Thermal trial ratio'
  ]
}