From 3ad92186b00a2ab5d9f7834c06ed552d8fd23879 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期二, 25 六月 2024 17:23:34 +0800
Subject: [PATCH] 财务产量报表(没有合计)

---
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def              |    4 
 _Main/BL/Type_FinancialProductionSearch/Attribute_Unit.qbl                                                                         |    8 +
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def                                         |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelPower.def                                       |   10 --
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def |    2 
 _Main/BL/Type_FinancialProductionSearch/Attribute_MqbMlb.qbl                                                                       |    7 +
 _Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl                                                                  |    5 
 _Main/BL/Type_FinancialProductionSearch/Attribute_Power.qbl                                                                        |    7 +
 _Main/BL/Type_FinancialProductionSearch/Attribute_Generation.qbl                                                                   |    7 +
 _Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLUnit.qbl                                                          |   10 ++
 _Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultName.qbl                                                            |   10 ++
 _Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCUnit.qbl                                                          |   10 ++
 _Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl                                                                |   25 ++--
 _Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl                                                                     |    5 
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelGeneration.def                                  |   10 --
 /dev/null                                                                                                                          |   16 ---
 _Main/BL/Relations/Relation_FinancialProductionSearch_FinancialProductionSource_FinancialProduc.qbl                                |   23 ++++
 _Main/BL/Type_FinancialProductionSource/StaticMethod_DownloadTemplate.qbl                                                          |    2 
 _Main/BL/Type_FinancialProductionSearch/_ROOT_Type_FinancialProductionSearch.qbl                                                   |   10 ++
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def                                |    4 
 _Main/BL/Type_FinancialProductionRow/Method_Filter.qbl                                                                             |   24 ++--
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def           |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def                                        |   10 --
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def         |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def             |    2 
 _Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultAllUnit.qbl                                                         |   10 ++
 _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelMQBMLB.def                                      |   10 --
 27 files changed, 144 insertions(+), 97 deletions(-)

diff --git a/_Main/BL/Relations/Relation_FinancialProductionSearch_FinancialProductionSource_FinancialProduc.qbl b/_Main/BL/Relations/Relation_FinancialProductionSearch_FinancialProductionSource_FinancialProduc.qbl
new file mode 100644
index 0000000..1fb618d
--- /dev/null
+++ b/_Main/BL/Relations/Relation_FinancialProductionSearch_FinancialProductionSource_FinancialProduc.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation FinancialProductionSearch_FinancialProductionSource_FinancialProductionSource_FinancialProductionSearch
+{
+  #keys: '1[415136.0.854770948]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide FinancialProductionSource
+  {
+    #keys: '3[415136.0.854770950][415136.0.854770949][415136.0.854770951]'
+    Cardinality: '0to1'
+    ObjectDefinition: FinancialProductionSearch
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide FinancialProductionSearch
+  {
+    #keys: '3[415136.0.854770953][415136.0.854770952][415136.0.854770954]'
+    Cardinality: '0to1'
+    ObjectDefinition: FinancialProductionSource
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultAllUnit.qbl b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultAllUnit.qbl
new file mode 100644
index 0000000..e912c3f
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultAllUnit.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultAllUnit () const declarative as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '<All>';
+  *]
+}
diff --git a/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCUnit.qbl b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCUnit.qbl
new file mode 100644
index 0000000..0c1bf92
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCUnit.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultCCUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLUnit.qbl b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLUnit.qbl
new file mode 100644
index 0000000..a7800dd
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLUnit.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultDLUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return 'Assembly Plant (Spain)';
+  *]
+}
diff --git a/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultName.qbl b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultName.qbl
new file mode 100644
index 0000000..99eb092
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultName.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultName () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return 'Financial productions';
+  *]
+}
diff --git a/_Main/BL/Type_FinancialProductionRow/Method_Filter.qbl b/_Main/BL/Type_FinancialProductionRow/Method_Filter.qbl
index f09176c..8c62e9b 100644
--- a/_Main/BL/Type_FinancialProductionRow/Method_Filter.qbl
+++ b/_Main/BL/Type_FinancialProductionRow/Method_Filter.qbl
@@ -1,22 +1,22 @@
 Quintiq file version 2.0
 #parent: #root
 Method Filter (
-  Product_MPs products,
-  String unit,
-  String generation,
-  String mqbmlb,
-  String power
+  FinancialProductionSearch search,
+  Product_MPs products
 ) declarative remote as Boolean
 {
+  Description: '杩囨护'
   TextBody:
   [*
     // 鐢勫叞楦� Jun-24-2024 (created)
-    //productids := selectuniquevalues( products, Elements, product, ( generation = '<All>' or product.Generation() = generation ) and 
-    //                                  ( mqbmlb = '<All>' or product.MQBMLB() = mqbmlb ) and 
-    //                                  ( power = '<All>' or product.Power() = power ), product.ID() );
-    //productid := construct( Strings );
-    //productid.Add( this.Name() );
-    //return productids.ContainsAll( productid ) and this.Unit() = unit;
-    return this.Name() = '92 kW Stator' and this.Unit() = '<All>';
+    allunit    := '<All>';
+    productids := selectuniquevalues( products, Elements, product, ( search.Generation() = allunit or product.Generation() = search.Generation() )
+                                      and ( search.MqbMlb() = allunit or product.MQBMLB() = search.MqbMlb() )
+                                      and ( search.Power() = allunit or product.Power() = search.Power() ), product.ID() );
+    
+    productid  := construct( Strings );
+    productid.Add( this.Name() );
+    
+    return productids.ContainsAll( productid ) and this.Unit() = search.Unit();
   *]
 }
diff --git a/_Main/BL/Type_FinancialProductionSearch/Attribute_Generation.qbl b/_Main/BL/Type_FinancialProductionSearch/Attribute_Generation.qbl
new file mode 100644
index 0000000..1f3448b
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionSearch/Attribute_Generation.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Generation
+{
+  #keys: '3[415136.0.854770962][415136.0.854770961][415136.0.854770963]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_FinancialProductionSearch/Attribute_MqbMlb.qbl b/_Main/BL/Type_FinancialProductionSearch/Attribute_MqbMlb.qbl
new file mode 100644
index 0000000..f82aef2
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionSearch/Attribute_MqbMlb.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute MqbMlb
+{
+  #keys: '3[415136.0.854770972][415136.0.854770971][415136.0.854770973]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_FinancialProductionSearch/Attribute_Power.qbl b/_Main/BL/Type_FinancialProductionSearch/Attribute_Power.qbl
new file mode 100644
index 0000000..a7abf83
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionSearch/Attribute_Power.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Power
+{
+  #keys: '3[415136.0.854770982][415136.0.854770981][415136.0.854770983]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_FinancialProductionSearch/Attribute_Unit.qbl b/_Main/BL/Type_FinancialProductionSearch/Attribute_Unit.qbl
new file mode 100644
index 0000000..4005f62
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionSearch/Attribute_Unit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Unit
+{
+  #keys: '3[415136.0.854770939][415136.0.854770938][415136.0.854770940]'
+  Description: '浜х嚎'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_FinancialProductionSearch/_ROOT_Type_FinancialProductionSearch.qbl b/_Main/BL/Type_FinancialProductionSearch/_ROOT_Type_FinancialProductionSearch.qbl
new file mode 100644
index 0000000..ed2c807
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionSearch/_ROOT_Type_FinancialProductionSearch.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type FinancialProductionSearch
+{
+  #keys: '5[415136.0.854770935][415136.0.854770933][0.0.0][415136.0.854770934][415136.0.854770936]'
+  BaseType: Object
+  Description: '鏌ヨ绫�'
+  StructuredName: 'FinancialProductionSearchs'
+}
diff --git a/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl b/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
index 61fce2d..b5170ce 100644
--- a/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
@@ -5,7 +5,8 @@
   TextBody:
   [*
     // 鐢勫叞楦� Jun-24-2024 (created)
-    table := selectobject( this.MacroPlan(), FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() );
+    allunit := FinancialProductionReport::GetDefaultAllUnit();
+    table   := selectobject( this.MacroPlan(), FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() );
     //info( '--------------------------', table.Name() );
     traverse( this, FinancialProductionReport, report ){
       productcolumn := selectobject( report, FinancialProductionColumn, column, column.Name() = 'Product' );
@@ -16,7 +17,7 @@
         unit    := selectobject( row, FinancialProductionCell, cell, cell.FinancialProductionColumn() = unitcolumn );
         
         unitrow := selectobject( table, FinancialProductionRow, unitrow, unitrow.Name() = product.Value() and unitrow.Unit() = unit.Value() );
-        allrow  := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = '<All>' );
+        allrow  := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
         
         traverse( row, FinancialProductionCell, cell, cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and product.Value() = '120 kW Rotor' and unit.Value() = 'Assembly Plant (Spain)' ){
           column   := cell.FinancialProductionColumn();
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
index a655636..102cea7 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
@@ -9,6 +9,7 @@
   TextBody:
   [*
     startofplanning := macroPlan.StartOfPlanning().Date();
+    allunit         := FinancialProductionReport::GetDefaultAllUnit();
     table := selectobject( macroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() );
     
     xmlDOMI := XMLDOMImplementation::Create();
@@ -43,7 +44,7 @@
       columnelement.AppendChild( nameelement );
       columnelement.AppendChild( typeelement );
       
-      cells := selectsortedset( column, FinancialProductionCell, cell, cell.FinancialProductionRow().Unit() <> '<All>', cell.FinancialProductionRow().Name() );
+      cells := selectsortedset( column, FinancialProductionCell, cell, cell.FinancialProductionRow().Unit() <> allunit, cell.FinancialProductionRow().Name() );
     
       traverse ( cells, Elements, c ) {
         if( column.Index() = 0 ){
@@ -72,7 +73,7 @@
     
     //info( xmlString );
     
-    tableGroupHandle := TableGroupHandle::Create( "Financial productions" );
+    tableGroupHandle := TableGroupHandle::Create( FinancialProductionReport::GetDefaultName() );
     tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
     tableGroupHandle.Add( tableHandle );
     
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_DownloadTemplate.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_DownloadTemplate.qbl
index 3e744a6..6952017 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_DownloadTemplate.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_DownloadTemplate.qbl
@@ -29,7 +29,7 @@
     
     //info( xmlString );
     
-    tableGroupHandle := TableGroupHandle::Create( "Financial productions" );
+    tableGroupHandle := TableGroupHandle::Create( FinancialProductionReport::GetDefaultName() );
     tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
     tableGroupHandle.Add( tableHandle );
     
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
index 5aeeda4..8f1db4a 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -8,32 +8,31 @@
   [*
     // 鐢勫叞楦� Jun-24-2024 (created)
     owner.FinancialProductionSource( relflush );
-    ccunit                    := 'Assembly Plant (France)';
-    dlunit                    := 'Assembly Plant (Spain)';
-    source                    := owner.FinancialProductionSource( relnew, IsImport := false, Name := 'Financial productions' );
+    ccunit                    := FinancialProductionReport::GetDefaultCCUnit();
+    dlunit                    := FinancialProductionReport::GetDefaultDLUnit();
+    allunit                   := FinancialProductionReport::GetDefaultAllUnit();
+    source                    := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() );
     table                     := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
     startofplanning           := owner.StartOfPlanning();
     startofnextmonth          := owner.StartOfPlanning().StartOfNextMonth();
     startofyear               := startofplanning.StartOfYear();
     startofnextyear           := startofplanning.StartOfNextYear();
-    info( ccunit, dlunit, source.Name(), table.Name(), startofplanning );
-    //unitids := selectuniquevalues( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.StockingPoint_MP().UnitID() );
-    //traverse( unitids, Elements, e ){
-    //  info( e );
-    //}
+    
+    source.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
+    
     traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){
       unit := pisp.StockingPoint_MP().UnitID();
       info( unit, pisp.ProductID() );
       ccrow := null( FinancialProductionRow );
       dlrow := null( FinancialProductionRow );
-      allrow := selectobject( table, FinancialProductionRow, row, row.Name() = pisp.ProductID() and row.Unit() = '<All>' );
+      allrow := selectobject( table, FinancialProductionRow, row, row.Name() = pisp.ProductID() and row.Unit() = allunit );
       if( unit = ccunit ){
         ccrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := unit );
       }else{
         dlrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := unit );
       }
       if( isnull( allrow ) ){
-        allrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := '<All>' );
+        allrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := allunit );
       }
       
       for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){
@@ -52,7 +51,7 @@
           dlrow.Initialize( column, dlunit );
         }
         if( not exists( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = column ) ){
-          allrow.Initialize( column, '<All>' );
+          allrow.Initialize( column, allunit );
         }
       }
       
@@ -70,9 +69,7 @@
         if( not isnull( dlrow ) ){
           dlrow.Initialize( column, pispip.NewSupplyProductionQuantity() );
         }
-        if( not exists( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = column ) ){
-          allrow.Initialize( column, pispip.NewSupplyProductionQuantity() );
-        }
+        allrow.Initialize( column, pispip.NewSupplyProductionQuantity() );
       }
     }
   *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def
index cb22804..8844548 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_MatrixEditorTable.def
@@ -45,8 +45,8 @@
           Properties:
           [
             DataType: 'FinancialProductionReport'
-            Description: 'productids.FindString( object.Name(), 0 ) >= 0 and object.Unit() = unit'
-            FilterArguments: 'unit:QMacroPlanner::FormFinancialProductionReport.dhUnit;productids:QMacroPlanner::FormFinancialProductionReport.dhProductIDs'
+            FilterArguments: 'products:QLibMacroPlannerWebUI::ApplicationMacroPlanner.DataHolderProduct;search:QMacroPlanner::FormFinancialProductionReport.dhSearch'
+            FixedFilter: 'object.Filter( search, products )'
             Source: 'DataHolderTable'
             Taborder: 0
             Transformation: 'FinancialProductionRow'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelGeneration.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelGeneration.def
index 8e10c6d..3161a19 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelGeneration.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelGeneration.def
@@ -15,16 +15,6 @@
         Taborder: 0
       ]
     }
-    Component dhGeneration
-    {
-      #keys: '[415136.0.840791740]'
-      BaseType: 'WebDataHolder'
-      Databinding: 'String'
-      Properties:
-      [
-        Taborder: 1
-      ]
-    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelMQBMLB.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelMQBMLB.def
index cdde840..8bdd3ca 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelMQBMLB.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelMQBMLB.def
@@ -15,16 +15,6 @@
         Taborder: 0
       ]
     }
-    Component dhMQBMLB
-    {
-      #keys: '[415136.0.842090347]'
-      BaseType: 'WebDataHolder'
-      Databinding: 'String'
-      Properties:
-      [
-        Taborder: 1
-      ]
-    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelPower.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelPower.def
index 4929267..d027e3a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelPower.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelPower.def
@@ -15,16 +15,6 @@
         Taborder: 0
       ]
     }
-    Component dhPower
-    {
-      #keys: '[415136.0.842090452]'
-      BaseType: 'WebDataHolder'
-      Databinding: 'String'
-      Properties:
-      [
-        Taborder: 1
-      ]
-    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def
index b331fcc..067a367 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelUnit.def
@@ -15,16 +15,6 @@
         Taborder: 0
       ]
     }
-    Component dhUnit
-    {
-      #keys: '[415136.0.840791605]'
-      BaseType: 'WebDataHolder'
-      Databinding: 'String'
-      Properties:
-      [
-        Taborder: 1
-      ]
-    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Method_filter.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Method_filter.def
deleted file mode 100644
index fe82ebc..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Method_filter.def
+++ /dev/null
@@ -1,18 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Method filter () id:Method_FormFinancialProductionReport_filter
-{
-  #keys: '[415136.0.849432122]'
-  Body:
-  [*
-    generation := ddslGeneration.Text();
-    mqbmlb     := ddslMQBMLB.Text();
-    power      := ddslPower.Text();
-    products   := DataHolderProduct.Data();
-    productids := selectuniquevalues( products, Elements, product, ( generation = '<All>' or product.Generation() = generation ) and 
-                                      ( mqbmlb = '<All>' or product.MQBMLB() = mqbmlb ) and 
-                                      ( power = '<All>' or product.Power() = power ), product.ID() );
-    
-    dhProductIDs.Data( productids.Concatenate( ';' ) );
-  *]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def
index e6a840f..e6d457a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def
@@ -10,13 +10,15 @@
     Body:
     [*
       //鍒濆鍖�
-      if( not exists( MacroPlan, FinancialProductionSource, source, not source.IsImport() ) ){
+      //if( not exists( MacroPlan, FinancialProductionSource, source, not source.IsImport() ) ){
         FinancialProductionSource::Initialize( MacroPlan );
-      }
+      //}
       //info( '------------------1----------------' );
       table := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() );
       //info( '------------------2----------------' );
       DataHolderTable.Data( table );
+      
+      dhSearch.Data( table.FinancialProductionSource().FinancialProductionSearch() );
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def
index 8d3aab8..8ab2cf7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelGeneration_ddslGeneration_OnSelectionChanged.def
@@ -9,7 +9,7 @@
   {
     Body:
     [*
-      Form.filter();
+      dhSearch.Data().Generation( selection );
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def
index f2ad88a..7cfb83f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged.def
@@ -9,7 +9,7 @@
   {
     Body:
     [*
-      Form.filter();
+      dhSearch.Data().MqbMlb( selection );
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def
index 0b27c5e..c87e89d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelPower_ddslPower_OnSelectionChanged.def
@@ -9,7 +9,7 @@
   {
     Body:
     [*
-      Form.filter();
+      dhSearch.Data().Power( selection );
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def
index 45dd899..9e84672 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_ddslUnit_OnSelectionChanged.def
@@ -9,7 +9,7 @@
   {
     Body:
     [*
-      dhUnit.Data( selection );
+      dhSearch.Data().Unit( selection );
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_dhUnit_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_dhUnit_OnCreated.def
deleted file mode 100644
index 91b4a0b..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelUnit_dhUnit_OnCreated.def
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: PanelUnit/dhUnit
-Response OnCreated () id:Response_PanelUnit_dhUnit_OnCreated
-{
-  #keys: '[415136.0.848341171]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebComponent_OnCreated'
-  QuillAction
-  {
-    Body:
-    [*
-      this.Data( '<All>' );
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def
index 2001ad9..146e986 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/_ROOT_Component_FormFinancialProductionReport.def
@@ -19,11 +19,11 @@
         Taborder: 0
       ]
     }
-    Component dhProductIDs
+    Component dhSearch
     {
       #keys: '[415136.0.849431513]'
       BaseType: 'WebDataHolder'
-      Databinding: 'String'
+      Databinding: 'FinancialProductionSearch'
       Properties:
       [
         Taborder: 1

--
Gitblit v1.9.3