From 2e5a9bf50702a796c29632ff9dda6687e5c411d0 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期五, 23 八月 2024 10:20:34 +0800
Subject: [PATCH] 换型设置导入导出

---
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlContent.def                                        |   54 +++
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/_ROOT_Component_FormChangeLossSetting.def                 |    3 
 _Main/BL/EDI/Broker_MP_ImportChangeLossSettingsBroker.qbl                                                             |   49 +++
 _Main/BL/InfoMessages.qbl                                                                                             |   12 
 _Main/BL/Type_ChangeLossSettingExcel/StaticMethod_GetDefalutName.qbl                                                  |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listActionBarPageChangeLossSetting#1.def        |   10 
 _var/_Main/Data/MP_ChangeLossSetting.xlsx                                                                             |    0 
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuDelete_OnClick.def |   21 +
 _Main/BL/EDI/Broker_MP_ExportChangeLossSettingsBroker.qbl                                                             |   45 +++
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_PanelHeader_ButtonImport_OnClick.def             |   33 ++
 _Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl                                                          |   42 ++
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting#568.def                   |   16 
 _Main/BL/Type_ChangeLossSettingExcel/Attribute_Product2.qbl                                                           |    9 
 _Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl                                                     |   39 ++
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_PanelHeader.def                                 |   35 ++
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_PanelHeader_ButtonHeader_OnClick.def             |   23 +
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlContent.def                                       |  103 ++++++
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/_ROOT_Component_DialogZEDPPSMS64.def                           |   22 +
 _Main/BL/Relations/Relation_ChangeLossSettingExcel_MacroPlan_MacroPlan_ChangeLossSettingExcel.qbl                     |   23 +
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlActions_btnCancel_OnClick.def                       |   15 +
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlActions.def                                        |   40 ++
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/_ROOT_Component_DialogZEDPPSPIR.def                             |   22 +
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlActions_btnOk_OnClick.def                           |   16 +
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlActions.def                                       |   50 +++
 _Main/BL/Type_ChangeLossSettingExcel/Attribute_ChangeLossNr.qbl                                                       |    8 
 _Main/BL/Type_ChangeLossSettingExcel/Attribute_Product1.qbl                                                           |    9 
 _Main/BL/Type_ChangeLossSettingExcel/Attribute_Unit.qbl                                                               |    9 
 _Main/BL/Type_ChangeLossSettingExcel/_ROOT_Type_ChangeLossSettingExcel.qbl                                            |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuEdit_OnClick.def   |    8 
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnApply_OnClick.def                       |   19 +
 /dev/null                                                                                                             |   22 -
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_PanelList.def                                   |   14 
 _Main/BL/Type_ChangeLossSettingExcel/TypeIndex_ChangeLossSettingTypeIndex.qbl                                         |   20 +
 _Main/BL/Type_ChangeLossSettingExcel/StaticMethod_ExportTemplate.qbl                                                  |   15 +
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuNew_OnClick.def    |   22 +
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnCancel_OnClick.def                      |   15 +
 _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listContextMenuChangeLossSetting#1.def          |   10 
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnOk_OnClick.def                          |   16 +
 38 files changed, 849 insertions(+), 40 deletions(-)

diff --git a/_Main/BL/EDI/Broker_MP_ExportChangeLossSettingsBroker.qbl b/_Main/BL/EDI/Broker_MP_ExportChangeLossSettingsBroker.qbl
new file mode 100644
index 0000000..519502e
--- /dev/null
+++ b/_Main/BL/EDI/Broker_MP_ExportChangeLossSettingsBroker.qbl
@@ -0,0 +1,45 @@
+Quintiq file version 2.0
+#parent: #root
+EDIBroker MP_ExportChangeLossSettingsBroker
+{
+  MDSDefinition: MacroPlan
+  TimeZone: 'ACT'
+  UseOSTimeZone: false
+  EDIModelLink.Source InputChangeLossSettingsFromModel
+  {
+    EDIMLTable ChangeLossSettingExcel
+    {
+      TargetType: ChangeLossSettingExcel
+      EDIMLColumn ChangeLossNr { Attribute: ChangeLossNr ValueType: Number }
+      EDIMLColumn Product1 { Attribute: Product1 ValueType: String }
+      EDIMLColumn Product2 { Attribute: Product2 ValueType: String }
+      EDIMLColumn Unit { Attribute: Unit ValueType: String }
+    }
+  }
+  EDITransformation.Transformation TransformChangeLossSettingsForExport
+  {
+    EDITableTransformation
+    {
+      InputTable: ChangeLossSettingExcel
+      OutputTable: ChangeLossSetting
+      EDIColumnMatch { InputColumn: ChangeLossNr OutputColumn: ChangeLossNr }
+      EDIColumnMatch { InputColumn: Product1 OutputColumn: Product1 }
+      EDIColumnMatch { InputColumn: Product2 OutputColumn: Product2 }
+      EDIColumnMatch { InputColumn: Unit OutputColumn: Unit }
+    }
+  }
+  EDIXLSLink.Destination OutputChangeLossSettingsToExcel
+  {
+    FileName: 'MP_ChangeLossSettings'
+    EDIXLSLinkTable ChangeLossSetting
+    {
+      Columns:
+      [
+        EDIXLSLinkColumn ChangeLossNr { ValueType: Number }
+        EDIXLSLinkColumn Product1 { ValueType: String }
+        EDIXLSLinkColumn Product2 { ValueType: String }
+        EDIXLSLinkColumn Unit { ValueType: String }
+      ]
+    }
+  }
+}
diff --git a/_Main/BL/EDI/Broker_MP_ImportChangeLossSettingsBroker.qbl b/_Main/BL/EDI/Broker_MP_ImportChangeLossSettingsBroker.qbl
new file mode 100644
index 0000000..2a98355
--- /dev/null
+++ b/_Main/BL/EDI/Broker_MP_ImportChangeLossSettingsBroker.qbl
@@ -0,0 +1,49 @@
+Quintiq file version 2.0
+#parent: #root
+EDIBroker MP_ImportChangeLossSettingsBroker
+{
+  MDSDefinition: MacroPlan
+  TimeZone: 'ACT'
+  UseOSTimeZone: false
+  EDIModelLink.Destination Destination1
+  {
+    EDIMLTable ChangeLossSettingExcel
+    {
+      PrimaryKeyColumns: Product1
+      PrimaryKeyColumns: Product2
+      PrimaryKeyColumns: Unit
+      TargetType: ChangeLossSettingExcel
+      TypeIndex: ChangeLossSettingTypeIndex
+      EDIMLColumn ChangeLossNr { Attribute: ChangeLossNr ValueType: Number }
+      EDIMLColumn Product1 { Attribute: Product1 ValueType: String }
+      EDIMLColumn Product2 { Attribute: Product2 ValueType: String }
+      EDIMLColumn Unit { Attribute: Unit ValueType: String }
+    }
+  }
+  EDITransformation.Transformation TransformChangeLossSettingsForImport
+  {
+    EDITableTransformation
+    {
+      InputTable: ChangeLossSetting
+      OutputTable: ChangeLossSettingExcel
+      EDIColumnMatch { InputColumn: ChangeLossNr OutputColumn: ChangeLossNr }
+      EDIColumnMatch { InputColumn: Product1 OutputColumn: Product1 }
+      EDIColumnMatch { InputColumn: Product2 OutputColumn: Product2 }
+      EDIColumnMatch { InputColumn: Unit OutputColumn: Unit }
+    }
+  }
+  EDIXLSLink.Source InputChangeLossSettingsFromExcel
+  {
+    FileName: 'MP_ChangeLossSetting.xlsx'
+    EDIXLSLinkTable ChangeLossSetting
+    {
+      Columns:
+      [
+        EDIXLSLinkColumn ChangeLossNr { ValueType: Number }
+        EDIXLSLinkColumn Product1 { ValueType: String }
+        EDIXLSLinkColumn Product2 { ValueType: String }
+        EDIXLSLinkColumn Unit { ValueType: String }
+      ]
+    }
+  }
+}
diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl
index fea862f..ea643a4 100644
--- a/_Main/BL/InfoMessages.qbl
+++ b/_Main/BL/InfoMessages.qbl
@@ -154,6 +154,18 @@
   {
     DefaultText: '/authorization/token/api/open/token/generateToken?grant_type=client_credentials&client_id=19KxoxPF25cy96K8TL&client_secret='
   }
+  InfoMessage MP_ChangeLossSettingExcel_Import_NullInputRequiredField
+  {
+    DefaultText: 'The import field is empty.'
+  }
+  InfoMessage MP_ChangeLossSettingExcel_Import_ProductNoExist
+  {
+    DefaultText: 'The entered product does not exist.'
+  }
+  InfoMessage MP_ChangeLossSettingExcel_Import_UnitNoExist
+  {
+    DefaultText: 'The entered unit does not exist.'
+  }
   InfoMessage MP_ChangeLossSetting_CheckNull
   {
     DefaultText: 'The required field is blank.'
diff --git a/_Main/BL/Relations/Relation_ChangeLossSettingExcel_MacroPlan_MacroPlan_ChangeLossSettingExcel.qbl b/_Main/BL/Relations/Relation_ChangeLossSettingExcel_MacroPlan_MacroPlan_ChangeLossSettingExcel.qbl
new file mode 100644
index 0000000..7e0918c
--- /dev/null
+++ b/_Main/BL/Relations/Relation_ChangeLossSettingExcel_MacroPlan_MacroPlan_ChangeLossSettingExcel.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation ChangeLossSettingExcel_MacroPlan_MacroPlan_ChangeLossSettingExcel
+{
+  #keys: '1[415136.0.1035218354]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide MacroPlan
+  {
+    #keys: '3[415136.0.1035218356][415136.0.1035218355][415136.0.1035218357]'
+    Cardinality: '0to1'
+    ObjectDefinition: ChangeLossSettingExcel
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide ChangeLossSettingExcel
+  {
+    #keys: '3[415136.0.1035218359][415136.0.1035218358][415136.0.1035218360]'
+    Cardinality: '1toN'
+    ObjectDefinition: MacroPlan
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/Attribute_ChangeLossNr.qbl b/_Main/BL/Type_ChangeLossSettingExcel/Attribute_ChangeLossNr.qbl
new file mode 100644
index 0000000..379f527
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/Attribute_ChangeLossNr.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ChangeLossNr
+{
+  #keys: '3[415136.0.1035218301][415136.0.1035218300][415136.0.1035218302]'
+  Description: '鎹㈠瀷鎹熷け锛堝彴锛�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Product1.qbl b/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Product1.qbl
new file mode 100644
index 0000000..0e7d165
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Product1.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Product1
+{
+  #keys: '3[415136.0.1035218324][415136.0.1035218323][415136.0.1035218325]'
+  Description: '浜у搧1'
+  IsReadOnly: true
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Product2.qbl b/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Product2.qbl
new file mode 100644
index 0000000..77b29db
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Product2.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Product2
+{
+  #keys: '3[415136.0.1035218327][415136.0.1035218326][415136.0.1035218328]'
+  Description: '浜у搧2'
+  IsReadOnly: true
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Unit.qbl b/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Unit.qbl
new file mode 100644
index 0000000..ae7ecf7
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/Attribute_Unit.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Unit
+{
+  #keys: '3[415136.0.1035218331][415136.0.1035218330][415136.0.1035218332]'
+  Description: '鍗曚綅'
+  IsReadOnly: true
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
new file mode 100644
index 0000000..8e48b1d
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
@@ -0,0 +1,39 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CheckImport (
+  MacroPlan macroplan
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-22-2024 (created)
+    if( exists( macroplan, ChangeLossSettingExcel, excel, excel.Product1() = '' 
+                or excel.Product2() = '' 
+                or excel.Unit() = '' 
+                or excel.ChangeLossNr() = 0 ) ){
+      error( Translations::MP_ChangeLossSettingExcel_Import_NullInputRequiredField() );
+    }
+    //瀵煎叆浜у搧鏄惁瀛樺湪
+    if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Product_MP, product, product.ID() = excel.Product1() or product.ID() = excel.Product2() ) ) ){
+      error( Translations::MP_ChangeLossSettingExcel_Import_ProductNoExist() );
+    }
+    //瀵煎叆浜х嚎鏄惁瀛樺湪
+    if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Unit, unit, unit.ID() = excel.Unit() ) ) ){
+      error( Translations::MP_ChangeLossSettingExcel_Import_UnitNoExist() );
+    }
+    //瀵煎叆鐨勪袱涓骇鍝佺浉绛�
+    if( exists( macroplan, ChangeLossSettingExcel, excel, excel.Product1() = excel.Product2() ) ){
+      error( Translations::MP_ChangeLossSetting_SameProduct() );
+    }
+    //閲嶅瀵煎叆鏍¢獙
+    //if( selectduplicates( owner, LaneExcel, excel, excel.StartFrom(), 
+    //                      excel.EndTo(), 
+    //                      excel.StartStockingPoint(), 
+    //                      excel.EndStockingPoint(), 
+    //                      excel.TransporationType(), 
+    //                      excel.Product(), 
+    //                      excel.TransporationTime() ).Size() > 0 ){
+    //  error( Translations::MP_LaneExcel_Import_RepeatKey() );
+    //}
+  *]
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_ExportTemplate.qbl b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_ExportTemplate.qbl
new file mode 100644
index 0000000..cf221ac
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_ExportTemplate.qbl
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ExportTemplate (
+  MacroPlan macroplan,
+  Boolean isxlsxformat
+) as BinaryValue
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-22-2024 (created)
+    value := macroplan.MP_ExportChangeLossSettingsBroker().ExecuteToXLS( isxlsxformat ).AsBinaryValue();
+    
+    return value;
+  *]
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_GetDefalutName.qbl b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_GetDefalutName.qbl
new file mode 100644
index 0000000..3375894
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_GetDefalutName.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefalutName () as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-22-2024 (created)
+    return 'MP_ChangeLossSetting.xlsx';
+  *]
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl
new file mode 100644
index 0000000..94fe124
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl
@@ -0,0 +1,42 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Import (
+  MacroPlan macroplan,
+  BinaryValue binaryvalue
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-22-2024 (created)
+    
+    macroplan.ValidateBroker( typeof( MP_ImportChangeLossSettingsBroker ).ShortName(), macroplan.MP_ImportChangeLossSettingsBroker().Source(), binaryvalue );
+    progress( 'Importing lanes', DateTime::ActualTime() );
+    macroplan.MP_ImportChangeLossSettingsBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
+    
+    try{
+      ChangeLossSettingExcel::CheckImport( macroplan );
+    }onerror{
+      //鏍¢獙澶辫触鍚庡垹闄�
+      macroplan.ChangeLossSettingExcel( relflush );
+      error( e.GeneralInformation() );
+    }
+    //閬嶅巻澶勭悊瀵煎叆鐨勬暟鎹�
+    traverse( macroplan, ChangeLossSettingExcel, excel ){
+      cls               := selectobject(  macroplan, ChangeLossSetting, cls, cls.ProductFirst().ID() = excel.Product1()
+                                          and cls.ProductSecond().ID() = excel.Product2()
+                                          and cls.Unit().ID() = excel.Unit() );
+      if( isnull( cls ) ){
+        cls             := macroplan.ChangeLossSetting( relnew, ChangeLossNr := excel.ChangeLossNr() );
+        product1        := selectobject( macroplan, Product_MP, product, product.ID() = excel.Product1() );
+        product2        := selectobject( macroplan, Product_MP, product, product.ID() = excel.Product2() );
+        unit            := selectobject( macroplan, Unit, unit, unit.ID() = excel.Unit() );
+        cls.ProductFirst( relset, product1 );
+        cls.ProductSecond( relset, product2 );
+        cls.Unit( relset, unit );
+      }else {
+        cls.ChangeLossNr( excel.ChangeLossNr() );
+      }
+      excel.Delete();
+    }
+  *]
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/TypeIndex_ChangeLossSettingTypeIndex.qbl b/_Main/BL/Type_ChangeLossSettingExcel/TypeIndex_ChangeLossSettingTypeIndex.qbl
new file mode 100644
index 0000000..79e5846
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/TypeIndex_ChangeLossSettingTypeIndex.qbl
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+TypeIndex ChangeLossSettingTypeIndex
+{
+  Attributes:
+  [
+    TypeIndexAttribute
+    {
+      ModelElement: Product2
+    }
+    TypeIndexAttribute
+    {
+      ModelElement: Product1
+    }
+    TypeIndexAttribute
+    {
+      ModelElement: Unit
+    }
+  ]
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/_ROOT_Type_ChangeLossSettingExcel.qbl b/_Main/BL/Type_ChangeLossSettingExcel/_ROOT_Type_ChangeLossSettingExcel.qbl
new file mode 100644
index 0000000..1e4d6ef
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSettingExcel/_ROOT_Type_ChangeLossSettingExcel.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type ChangeLossSettingExcel
+{
+  #keys: '5[415136.0.1035218297][415136.0.1035218295][0.0.0][415136.0.1035218296][415136.0.1035218298]'
+  BaseType: Object
+  Description: '鎹㈠瀷璁剧疆瀵煎叆瀵煎嚭绫�'
+  StructuredName: 'ChangeLossSettingExcels'
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlActions.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlActions.def
new file mode 100644
index 0000000..1733369
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlActions.def
@@ -0,0 +1,50 @@
+Quintiq file version 2.0
+Component pnlActions
+{
+  #keys: '[415136.0.1033612182]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component btnApply
+    {
+      #keys: '[415136.0.1033612184]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Apply'
+        Taborder: 0
+      ]
+    }
+    Component btnOk
+    {
+      #keys: '[415136.0.1033612186]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'OK'
+        Taborder: 1
+      ]
+    }
+    Component btnCancel
+    {
+      #keys: '[415136.0.1033612188]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Cancel'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    Border: true
+    ExcludeFromActiveComponent: true
+    FixedSize: true
+    Orientation: 'horizontal'
+    Padding: 'true'
+    Style: 'footer'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlContent.def
new file mode 100644
index 0000000..d7da3c3
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlContent.def
@@ -0,0 +1,103 @@
+Quintiq file version 2.0
+Component pnlContent
+{
+  #keys: '[415136.0.1033612180]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component efFactory id:efFactory_891
+    {
+      #keys: '[415136.0.1033612218]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: '宸ュ巶浠g爜'
+        Taborder: 0
+      ]
+    }
+    Component dsStartDate id:dsStartDate_57
+    {
+      #keys: '[415136.0.1033612231]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Label: '寮�濮嬫棩鏈�'
+        Taborder: 1
+      ]
+    }
+    Component dsEndDate id:dsEndDate_963
+    {
+      #keys: '[415136.0.1033612244]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Label: '缁撴潫鏃ユ湡'
+        Taborder: 2
+      ]
+    }
+    Component efOriginMacroPlan
+    {
+      #keys: '[415136.0.1033612274]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: '浠庣増鏈�'
+        Taborder: 3
+      ]
+    }
+    Component efDestinationMacroPlan
+    {
+      #keys: '[415136.0.1033612302]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: '鍒扮増鏈�'
+        Taborder: 4
+      ]
+    }
+    Component cbActiveVersion
+    {
+      #keys: '[415136.0.1033612322]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Checked: true
+        Label: '鏄惁婵�娲荤増鏈�'
+        Taborder: 5
+      ]
+    }
+    Component ddlProduct
+    {
+      #keys: '[415136.0.1034848130]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'Product_MP'
+      Children:
+      [
+        Component deContent
+        {
+          #keys: '[415136.0.1034848132]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            FixedFilter: 'object.IsLeaf()'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'Product_MP'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'Name'
+        Label: '鐗╂枡鍙�'
+        Taborder: 6
+      ]
+    }
+  ]
+  Properties:
+  [
+    Padding: 'true'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnApply_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnApply_OnClick.def
new file mode 100644
index 0000000..b44ee8d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnApply_OnClick.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: pnlActions/btnApply
+Response OnClick () id:Response_pnlActions_btnApply_OnClick
+{
+  #keys: '[415136.0.1033612190]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  Precondition:
+  [*
+    return Form.HasChanges();
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      Form.ApplyChanges();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnCancel_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnCancel_OnClick.def
new file mode 100644
index 0000000..69114aa
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/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.1033612192]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      Form.Close();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Response_pnlActions_btnOk_OnClick.def
new file mode 100644
index 0000000..074b6bc
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/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.1033612191]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      Form.ApplyChanges();
+      Form.Close();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/_ROOT_Component_DialogZEDPPSMS64.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/_ROOT_Component_DialogZEDPPSMS64.def
new file mode 100644
index 0000000..eaa6f12
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/_ROOT_Component_DialogZEDPPSMS64.def
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent DialogZEDPPSMS64
+{
+  #keys: '[415136.0.1033612178]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: pnlContent
+    #child: pnlActions
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    EnterButton: 'btnOk'
+    EscapeButton: 'btnCancel'
+    ExcludeFromActiveComponent: true
+    Padding: 'false'
+    Title: 'ZED_PPS_MS64'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlActions.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlActions.def
new file mode 100644
index 0000000..8a9a900
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlActions.def
@@ -0,0 +1,40 @@
+Quintiq file version 2.0
+Component pnlActions
+{
+  #keys: '[415136.0.1033611817]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component btnOk
+    {
+      #keys: '[415136.0.1033611821]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'OK'
+        Taborder: 0
+      ]
+    }
+    Component btnCancel
+    {
+      #keys: '[415136.0.1033611823]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Cancel'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    Border: true
+    ExcludeFromActiveComponent: true
+    FixedSize: true
+    Orientation: 'horizontal'
+    Padding: 'true'
+    Style: 'footer'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlContent.def
new file mode 100644
index 0000000..2be7df6
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlContent.def
@@ -0,0 +1,54 @@
+Quintiq file version 2.0
+Component pnlContent
+{
+  #keys: '[415136.0.1033611815]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component efFactory
+    {
+      #keys: '[415136.0.1033611885]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: '宸ュ巶浠g爜'
+        Taborder: 0
+      ]
+    }
+    Component efMacroPlan
+    {
+      #keys: '[415136.0.1033611906]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: '鐗堟湰'
+        Taborder: 1
+      ]
+    }
+    Component dsStartDate
+    {
+      #keys: '[415136.0.1033611945]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Label: '璁″垝寮�濮嬫椂闂�'
+        Taborder: 2
+      ]
+    }
+    Component dsEndDate
+    {
+      #keys: '[415136.0.1033611978]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Label: '璁″垝缁撴潫鏃堕棿'
+        Taborder: 3
+      ]
+    }
+  ]
+  Properties:
+  [
+    Padding: 'true'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlActions_btnCancel_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlActions_btnCancel_OnClick.def
new file mode 100644
index 0000000..18a0c9d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/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.1033611827]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      Form.Close();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Response_pnlActions_btnOk_OnClick.def
new file mode 100644
index 0000000..63e94cb
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/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.1033611826]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      Form.ApplyChanges();
+      Form.Close();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/_ROOT_Component_DialogZEDPPSPIR.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/_ROOT_Component_DialogZEDPPSPIR.def
new file mode 100644
index 0000000..b246e29
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/_ROOT_Component_DialogZEDPPSPIR.def
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent DialogZEDPPSPIR
+{
+  #keys: '[415136.0.1033611813]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: pnlContent
+    #child: pnlActions
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    EnterButton: 'btnOk'
+    EscapeButton: 'btnCancel'
+    ExcludeFromActiveComponent: true
+    Padding: 'false'
+    Title: 'ZED_PPS_PIR'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting.def "b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting\043568.def"
similarity index 83%
rename from _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting\043568.def"
index 213c5f6..d1ab712 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting\043568.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component ListChangeLossSetting
+Component ListChangeLossSetting id:ListChangeLossSetting_568
 {
-  #keys: '[415136.0.735611728]'
+  #keys: '[415136.0.1033650293]'
   BaseType: 'WebList'
   Children:
   [
     Component DataExtractorChangeLossSetting
     {
-      #keys: '[415136.0.735611729]'
+      #keys: '[415136.0.1033650294]'
       BaseType: 'WebDataExtractor'
       Properties:
       [
@@ -17,14 +17,14 @@
         Transformation: 'ChangeLossSetting'
       ]
     }
-    #child: listActionBarPageChangeLossSetting
+    #child: listActionBarPageChangeLossSetting_1
     Component DataSetLevelChangeLossSetting
     {
-      #keys: '[415136.0.735611734]'
+      #keys: '[415136.0.1033650296]'
       BaseType: 'WebDataSetLevel'
       Children:
       [
-        #child: listContextMenuChangeLossSetting
+        #child: listContextMenuChangeLossSetting_1
       ]
       Properties:
       [
@@ -40,9 +40,9 @@
   ]
   ResponseDefinitions:
   [
-    DelegatedResponseDefinition OnClick id:Responsedef_ListChangeLossSetting_WebMenu_OnClick
+    DelegatedResponseDefinition OnClick id:Responsedef_ListChangeLossSetting_568_WebMenu_OnClick
     {
-      #keys: '[415136.0.747540770]'
+      #keys: '[415136.0.1033650287]'
       Initiator: 'WebMenu'
       IsInherited: false
       ResponseType: 'OnClick'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_PanelHeader.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_PanelHeader.def
new file mode 100644
index 0000000..53cde5c
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_PanelHeader.def
@@ -0,0 +1,35 @@
+Quintiq file version 2.0
+Component PanelHeader
+{
+  #keys: '[415136.0.1033690374]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ButtonImport
+    {
+      #keys: '[415136.0.1033690395]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'IMPORT1'
+        Taborder: 0
+      ]
+    }
+    Component ButtonHeader
+    {
+      #keys: '[415136.0.1033690437]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'EXPORT1'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_PanelList.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_PanelList.def
new file mode 100644
index 0000000..6e18d88
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_PanelList.def
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+Component PanelList
+{
+  #keys: '[415136.0.1033650239]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: ListChangeLossSetting_568
+  ]
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listActionBarPageChangeLossSetting\0431.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listActionBarPageChangeLossSetting\0431.def"
new file mode 100644
index 0000000..adcfae2
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listActionBarPageChangeLossSetting\0431.def"
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listActionBarPageChangeLossSetting id:listActionBarPageChangeLossSetting_1
+{
+  #keys: '[415136.0.1033650295]'
+  BaseType: 'listActionBarPage'
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listActionBarPageChangeLossSetting.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listActionBarPageChangeLossSetting.def
deleted file mode 100644
index 0576b9a..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listActionBarPageChangeLossSetting.def
+++ /dev/null
@@ -1,10 +0,0 @@
-Quintiq file version 2.0
-Component listActionBarPageChangeLossSetting
-{
-  #keys: '[415136.0.735611731]'
-  BaseType: 'listActionBarPage'
-  Properties:
-  [
-    Taborder: 1
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listContextMenuChangeLossSetting.def "b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listContextMenuChangeLossSetting\0431.def"
similarity index 72%
rename from _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listContextMenuChangeLossSetting.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listContextMenuChangeLossSetting\0431.def"
index da9fbff..91dedf2 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listContextMenuChangeLossSetting.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_listContextMenuChangeLossSetting\0431.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component listContextMenuChangeLossSetting
+Component listContextMenuChangeLossSetting id:listContextMenuChangeLossSetting_1
 {
-  #keys: '[415136.0.735611736]'
+  #keys: '[415136.0.1033650297]'
   BaseType: 'listContextMenu'
   Children:
   [
     Component MenuNew
     {
-      #keys: '[415136.0.735612003]'
+      #keys: '[415136.0.1033650298]'
       BaseType: 'WebMenu'
       Properties:
       [
@@ -18,7 +18,7 @@
     }
     Component MenuEdit
     {
-      #keys: '[415136.0.735612046]'
+      #keys: '[415136.0.1033650299]'
       BaseType: 'WebMenu'
       Properties:
       [
@@ -29,7 +29,7 @@
     }
     Component MenuDelete
     {
-      #keys: '[415136.0.735612088]'
+      #keys: '[415136.0.1033650300]'
       BaseType: 'WebMenu'
       Properties:
       [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuDelete_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuDelete_OnClick.def
new file mode 100644
index 0000000..cf6ce84
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuDelete_OnClick.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: ListChangeLossSetting_568
+Response OnClick (
+  structured[ChangeLossSetting] selection
+) id:Response_ListChangeLossSetting_568_MenuDelete_OnClick
+{
+  #keys: '[415136.0.1033650291]'
+  CanBindMultiple: false
+  DefinitionID => /ListChangeLossSetting_568/Responsedef_ListChangeLossSetting_568_WebMenu_OnClick
+  Initiator: 'MenuDelete'
+  QuillAction
+  {
+    Body:
+    [*
+      traverse( selection, Elements, e ){
+        e.Delete();
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuEdit_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuEdit_OnClick.def
similarity index 62%
rename from _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuEdit_OnClick.def
rename to _Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuEdit_OnClick.def
index 94565f7..77f8962 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuEdit_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuEdit_OnClick.def
@@ -1,12 +1,12 @@
 Quintiq file version 2.0
-#parent: ListChangeLossSetting
+#parent: ListChangeLossSetting_568
 Response OnClick (
   ChangeLossSetting selection
-) id:Response_ListChangeLossSetting_MenuEdit_OnClick
+) id:Response_ListChangeLossSetting_568_MenuEdit_OnClick
 {
-  #keys: '[415136.0.747540962]'
+  #keys: '[415136.0.1033650290]'
   CanBindMultiple: false
-  DefinitionID => /ListChangeLossSetting/Responsedef_ListChangeLossSetting_WebMenu_OnClick
+  DefinitionID => /ListChangeLossSetting_568/Responsedef_ListChangeLossSetting_568_WebMenu_OnClick
   Initiator: 'MenuEdit'
   Precondition:
   [*
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuNew_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuNew_OnClick.def
new file mode 100644
index 0000000..d302fd7
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_568_MenuNew_OnClick.def
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: ListChangeLossSetting_568
+Response OnClick () id:Response_ListChangeLossSetting_568_MenuNew_OnClick
+{
+  #keys: '[415136.0.1033650289]'
+  CanBindMultiple: false
+  DefinitionID => /ListChangeLossSetting_568/Responsedef_ListChangeLossSetting_568_WebMenu_OnClick
+  Initiator: 'MenuNew'
+  Precondition:
+  [*
+    return MacroPlan::HasMacroPlan( MacroPlan, feedback );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogCreateEditChangeLossSetting );
+      dlg.New( FormChangeLossSetting );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuDelete_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuDelete_OnClick.def
deleted file mode 100644
index ae6d5c1..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuDelete_OnClick.def
+++ /dev/null
@@ -1,21 +0,0 @@
-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
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuNew_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuNew_OnClick.def
deleted file mode 100644
index 0ad7fde..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_ListChangeLossSetting_MenuNew_OnClick.def
+++ /dev/null
@@ -1,22 +0,0 @@
-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
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_PanelHeader_ButtonHeader_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_PanelHeader_ButtonHeader_OnClick.def
new file mode 100644
index 0000000..482d218
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_PanelHeader_ButtonHeader_OnClick.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: PanelHeader/ButtonHeader
+Response OnClick () id:Response_PanelHeader_ButtonHeader_OnClick
+{
+  #keys: '[415136.0.1033690473]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      //
+      binaryValue := ChangeLossSettingExcel::ExportTemplate( MacroPlan, true );
+      
+      Application.Download( ChangeLossSettingExcel::GetDefalutName(), binaryValue.AsBinaryData() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_PanelHeader_ButtonImport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_PanelHeader_ButtonImport_OnClick.def
new file mode 100644
index 0000000..ef11ed7
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Response_PanelHeader_ButtonImport_OnClick.def
@@ -0,0 +1,33 @@
+Quintiq file version 2.0
+#parent: PanelHeader/ButtonImport
+Response OnClick () id:Response_PanelHeader_ButtonImport_OnClick
+{
+  #keys: '[415136.0.1035340153]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      try {
+        uploadJsonString := Application.GetFile();
+        if ( uploadJsonString <> "" ) {
+          uploadJson := JSON::Parse( uploadJsonString );
+          Archive::VerifyTheFileName( uploadJson );
+                
+          fileName := uploadJson.Get( "name" ).GetString();
+          base64String := uploadJson.Get( "data" ).GetString();
+              
+          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
+          
+          ChangeLossSettingExcel::Import( MacroPlan, webFileBinaryData );
+          
+          WebMessageBox::Success( Translations::A_VWED_Success() );
+        }
+      } onerror {
+        WebMessageBox::Error( e.GeneralInformation() );
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/_ROOT_Component_FormChangeLossSetting.def b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/_ROOT_Component_FormChangeLossSetting.def
index 62cfd05..a8a8401 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/_ROOT_Component_FormChangeLossSetting.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/_ROOT_Component_FormChangeLossSetting.def
@@ -7,7 +7,8 @@
   BaseType: 'WebForm'
   Children:
   [
-    #child: ListChangeLossSetting
+    #child: PanelHeader
+    #child: PanelList
   ]
   Properties:
   [
diff --git a/_var/_Main/Data/MP_ChangeLossSetting.xlsx b/_var/_Main/Data/MP_ChangeLossSetting.xlsx
new file mode 100644
index 0000000..3e99527
--- /dev/null
+++ b/_var/_Main/Data/MP_ChangeLossSetting.xlsx
Binary files differ

--
Gitblit v1.9.3