lazhen
2024-06-05 c425d960e4eefbe0565de33aabbdc83552580e88
换型损失设置前端form建
已修改4个文件
已添加7个文件
已删除3个文件
219 ■■■■ 文件已修改
_Main/BL/InfoMessages.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/Attribute_Line.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/Attribute_Product1.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/Attribute_Product2.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Component_pnlContent.def 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Method_Edit.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Method_New.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Method_OnOK.def 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Response_pnlActions_btnOk_OnClick.def 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuDelete_OnClick.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuEdit_OnClick.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuNew_OnClick.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl
@@ -86,6 +86,14 @@
  {
    DefaultText: 'There are duplicate three digit codes present'
  }
  InfoMessage MP_ChangeLossSetting_CheckNull
  {
    DefaultText: 'The required field is blank.'
  }
  InfoMessage MP_ChangeLossSetting_Exist
  {
    DefaultText: 'The same data already exists.'
  }
  InfoMessage MP_LibCal_EventType_Exist
  {
    DefaultText: 'The ID or name is the same.'
_Main/BL/Type_ChangeLossSetting/Attribute_Line.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_ChangeLossSetting/Attribute_Product1.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_ChangeLossSetting/Attribute_Product2.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ValidateInput (
  MacroPlan owner,
  ChangeLossSetting old,
  Unit unit,
  Product_MP product1,
  Product_MP product2,
  Number number
) as Boolean
{
  TextBody:
  [*
    // ç”„兰鸽 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 ) ){
      feedback := Translations::MP_ChangeLossSetting_Exist()
    }
    return feedback = '';
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Component_pnlContent.def
@@ -9,6 +9,7 @@
    {
      #keys: '[415136.0.735612418]'
      BaseType: 'WebDropDownList'
      Databinding: 'Unit'
      Children:
      [
        Component deUnit
@@ -36,6 +37,7 @@
    {
      #keys: '[415136.0.738250065]'
      BaseType: 'WebDropDownList'
      Databinding: 'Product_MP'
      Children:
      [
        Component deProductFirst
@@ -62,6 +64,7 @@
    {
      #keys: '[415136.0.738250142]'
      BaseType: 'WebDropDownList'
      Databinding: 'Product_MP'
      Children:
      [
        Component deProductSecond
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Method_Edit.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method Edit (
  ChangeLossSetting selection
) id:Method_DialogCreateEditChangeLossSetting_Edit
{
  #keys: '[415136.0.746200731]'
  Body:
  [*
    // Edit Product(s)
    data := shadow( selection );
    dhDialogData.Data( &data );
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Method_New.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: #root
Method New (
  FormChangeLossSetting form
) id:Method_DialogCreateEditChangeLossSetting_New
{
  #keys: '[415136.0.746200358]'
  Body:
  [*
    // To create a new product
    owner := LibCal_GlobalState.dhGlobalCalendarRegistry().Data();
    obj := MacroPlan.ChangeLossSetting( relshadow, Line := '', Product1 := '', Product2 := '' );
    dhDialogData.Data( &obj );
    dhForm.Data( form );
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Method_OnOK.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_DialogCreateEditChangeLossSetting_OnOK
{
  #keys: '[415136.0.746200837]'
  Body:
  [*
    // onOK for ProductDialog
    // When the user clicks ok,
    // we either create or edit the data
    this.ApplyChanges();
    data := dhDialogData.Data();
    if( isnull( data.WrappedInstance() ) ) // New
    {
      data.Commit();
      dhForm.Data().ListChangeLossSetting().SelectByKey( data.WrappedInstance().Key() );
    }
    else
    {
      data.Commit();
    }
    this.Close();
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Response_pnlActions_btnOk_OnClick.def
@@ -5,12 +5,15 @@
  #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() );
  *]
  QuillAction
  {
    Body:
    [*
      Form.ApplyChanges();
      Form.Close();
      Form.OnOK();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting.def
@@ -38,4 +38,22 @@
  [
    Taborder: 0
  ]
  ResponseDefinitions:
  [
    DelegatedResponseDefinition OnClick id:Responsedef_ListChangeLossSetting_WebMenu_OnClick
    {
      #keys: '[415136.0.747540770]'
      Initiator: 'WebMenu'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument selection
        {
          #keys: '[913.0.7765768]'
          Binding: 'this.Selection()'
        }
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuDelete_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: ListChangeLossSetting
Response OnClick (
  structured[ChangeLossSetting] selection
) id:Response_ListChangeLossSetting_MenuDelete_OnClick
{
  #keys: '[415136.0.747541132]'
  CanBindMultiple: false
  DefinitionID => /ListChangeLossSetting/Responsedef_ListChangeLossSetting_WebMenu_OnClick
  Initiator: 'MenuDelete'
  QuillAction
  {
    Body:
    [*
      traverse( selection, Elements, e ){
        e.Delete();
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuEdit_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
#parent: ListChangeLossSetting
Response OnClick (
  ChangeLossSetting selection
) id:Response_ListChangeLossSetting_MenuEdit_OnClick
{
  #keys: '[415136.0.747540962]'
  CanBindMultiple: false
  DefinitionID => /ListChangeLossSetting/Responsedef_ListChangeLossSetting_WebMenu_OnClick
  Initiator: 'MenuEdit'
  Precondition:
  [*
    return MacroPlan::HasMacroPlan( MacroPlan, feedback );
  *]
  QuillAction
  {
    Body:
    [*
      dlg := construct( DialogCreateEditChangeLossSetting );
      dlg.Edit( selection );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuNew_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: ListChangeLossSetting
Response OnClick () id:Response_ListChangeLossSetting_MenuNew_OnClick
{
  #keys: '[415136.0.747540787]'
  CanBindMultiple: false
  DefinitionID => /ListChangeLossSetting/Responsedef_ListChangeLossSetting_WebMenu_OnClick
  Initiator: 'MenuNew'
  Precondition:
  [*
    return MacroPlan::HasMacroPlan( MacroPlan, feedback );
  *]
  QuillAction
  {
    Body:
    [*
      dlg := construct( DialogCreateEditChangeLossSetting );
      dlg.New( FormChangeLossSetting );
    *]
    GroupServerCalls: false
  }
}