From ab469f9de1c0e446965e0d926ee0769e51a90cdc Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期三, 11 十月 2023 09:15:15 +0800
Subject: [PATCH] 添加物料标签视图

---
 _Main/UI/MacroPlannerWebApp/Views/物料标签_计划策略.vw                                                                                                 |  262 +++++++++++++++++++++++++++++++++++++++++++
 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl                                                  |    8 
 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl                                   |    9 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageInventory.def                                             |    8 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def                                      |    1 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ActionBarGroupInventoryViews_ButtonMaterialLabelingPl.def |   16 ++
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupInventoryViews#981.def                                   |   18 +++
 7 files changed, 318 insertions(+), 4 deletions(-)

diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl
index afe440f..d989131 100644
--- a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl
+++ b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl
@@ -9,8 +9,15 @@
   [*
     targetProduct_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = "Chassis - SUV 1" );
     
+    period_MPS := null( Period_MPs );
+    traverse ( macroPlan, PeriodSpecification_MP, psmp, psmp.ID() = "Planning periods" ) {
+      period_MPS := selectsortedset( psmp, PeriodSpecificationPeriod.Period_MP, pmp, not pmp.IsHistorical(), pmp.StartDate() );
+    }
+    
     traverse ( targetProduct_MP, ProductInStockingPoint_MP, pisp ) {
-      CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, pisp );
+      traverse ( period_MPS, Elements, pmp ) { 
+        CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, pisp, pisp, pmp.StartDate() );
+      }
     }
   *]
 }
diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl
index e5b4fa6..5cbc2aa 100644
--- a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl
+++ b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_RecursiveGeneration.qbl
@@ -2,7 +2,9 @@
 #parent: #root
 StaticMethod RecursiveGeneration (
   MacroPlan macroPlan,
-  ProductInStockingPoint_MP outputPISP
+  ProductInStockingPoint_MP outputPISP,
+  ProductInStockingPoint_MP firstPISP,
+  Date startDate
 )
 {
   TextBody:
@@ -13,8 +15,8 @@
     traverse ( operations, Elements, o ) {
       traverse ( o, OperationInput, tempOI ) {
         inputPISP := tempOI.ProductInStockingPoint_MP();
-        CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, tempOI.ProductInStockingPoint_MP() );
-        info( "杈撳叆PISP锛�", inputPISP.Name(), "      杈撳嚭PISP锛�", outputPISP.Name() );
+        CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, tempOI.ProductInStockingPoint_MP(), firstPISP, startDate );
+        info( "杈撳叆PISP锛�", inputPISP.Name(), "    杈撳嚭PISP锛�", outputPISP.Name(), "    绗竴娆ISP锛�", firstPISP.Name() );
       }
     }
   *]
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupInventoryViews\043981.def" "b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupInventoryViews\043981.def"
new file mode 100644
index 0000000..cd385bb
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupInventoryViews\043981.def"
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+Component ActionBarGroupInventoryViews #extension
+{
+  Children:
+  [
+    Component ButtonMaterialLabelingPlanningStrategy
+    {
+      #keys: '[414702.1.16631997]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'FISH_BOWL'
+        Label: '鐗╂枡鏍囩'
+        Taborder: 4
+      ]
+    }
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageInventory.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageInventory.def
new file mode 100644
index 0000000..f003691
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarPageInventory.def
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+Component ActionBarPageInventory #extension
+{
+  Children:
+  [
+    #child: ActionBarGroupInventoryViews
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ActionBarGroupInventoryViews_ButtonMaterialLabelingPl.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ActionBarGroupInventoryViews_ButtonMaterialLabelingPl.def
new file mode 100644
index 0000000..3422aba
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ActionBarGroupInventoryViews_ButtonMaterialLabelingPl.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ActionBarGroupInventoryViews/ButtonMaterialLabelingPlanningStrategy
+Response OnClick () id:Response_TIANMA_JITUAN_ActionBarGroupInventoryViews_ButtonMaterialLabelingPlanningStrategy_OnClick
+{
+  #keys: '[414702.1.19527712]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      ApplicationScope.ViewManager().ResetUserViewById( "鐗╂枡鏍囩_璁″垝绛栫暐", true );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
index 381d169..4f48b76 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
@@ -13,6 +13,7 @@
         #child: ActionBarPageSales
         #child: applicationDevelopmentActionBarPageDef_1
         #child: ActionBarPagePlan
+        #child: ActionBarPageInventory
       ]
     }
     Component DataHolderCapacityAndSaleBudgeFilterItem
diff --git "a/_Main/UI/MacroPlannerWebApp/Views/\347\211\251\346\226\231\346\240\207\347\255\276_\350\256\241\345\210\222\347\255\226\347\225\245.vw" "b/_Main/UI/MacroPlannerWebApp/Views/\347\211\251\346\226\231\346\240\207\347\255\276_\350\256\241\345\210\222\347\255\226\347\225\245.vw"
new file mode 100644
index 0000000..4a663f4
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Views/\347\211\251\346\226\231\346\240\207\347\255\276_\350\256\241\345\210\222\347\255\226\347\225\245.vw"
@@ -0,0 +1,262 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_FormMaterialLabelingAndPlanningStrategy
+      {
+        title: 'QTIANMA_JITUAN::FormMaterialLabelingAndPlanningStrategy'
+        shown: true
+        componentID: 'QTIANMA_JITUAN::FormMaterialLabelingAndPlanningStrategy'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 15
+          columnPosition: 1
+          columnSpan: 12
+        }
+        components
+        {
+          FormMaterialLabelingAndPlanningStrategy_PanelMaterialLabelingAndPlanningStrategy
+          {
+            sizeRatio: 1
+          }
+          FormMaterialLabelingAndPlanningStrategy_PanelMaterial
+          {
+            sizeRatio: 1
+          }
+          FormMaterialLabelingAndPlanningStrategy_PanelMaterialOperationButton
+          {
+            sizeRatio: 1
+          }
+          FormMaterialLabelingAndPlanningStrategy_PanelMaterialExportAndImport
+          {
+            sizeRatio: 1
+          }
+          FormMaterialLabelingAndPlanningStrategy_ListMaterialMaterialLabelingAndPlanningStrategy
+          {
+          }
+          FormMaterialLabelingAndPlanningStrategy_DataSetLevelMaterial679
+          {
+            groupDepth: -1
+            column_SerialNumber
+            {
+              columnId: 'SerialNumber'
+              dataPath: 'SerialNumber'
+              dataType: 'number'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_BusinessType
+            {
+              columnId: 'BusinessType'
+              dataPath: 'BusinessType'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_MatCode
+            {
+              columnId: 'MatCode'
+              dataPath: 'MatCode'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_MatName
+            {
+              columnId: 'MatName'
+              dataPath: 'MatName'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+            column_MatType
+            {
+              columnId: 'MatType'
+              dataPath: 'MatType'
+              dataType: 'string'
+              index: 4
+              subtotals: ''
+              width: 150
+            }
+            column_MatArrivalLT
+            {
+              columnId: 'MatArrivalLT'
+              dataPath: 'MatArrivalLT'
+              dataType: 'real'
+              index: 5
+              subtotals: ''
+              width: 150
+            }
+            column_ProductCount
+            {
+              columnId: 'ProductCount'
+              dataPath: 'ProductCount'
+              dataType: 'number'
+              index: 6
+              subtotals: ''
+              width: 150
+            }
+            column_MinProdDeliverLT
+            {
+              columnId: 'MinProdDeliverLT'
+              dataPath: 'MinProdDeliverLT'
+              dataType: 'real'
+              index: 7
+              subtotals: ''
+              width: 150
+            }
+            column_FlagLongTerm
+            {
+              columnId: 'FlagLongTerm'
+              dataPath: 'FlagLongTerm'
+              dataType: 'string'
+              index: 8
+              subtotals: ''
+              width: 150
+            }
+            column_FlagGeneric
+            {
+              columnId: 'FlagGeneric'
+              dataPath: 'FlagGeneric'
+              dataType: 'string'
+              index: 9
+              subtotals: ''
+              width: 150
+            }
+            column_PlanningStrategyAuto
+            {
+              columnId: 'PlanningStrategyAuto'
+              dataPath: 'PlanningStrategyAuto'
+              dataType: 'string'
+              index: 10
+              subtotals: ''
+              width: 150
+            }
+            column_PlanningStrategyCustom
+            {
+              columnId: 'PlanningStrategyCustom'
+              dataPath: 'PlanningStrategyCustom'
+              dataType: 'string'
+              index: 11
+              subtotals: ''
+              width: 150
+            }
+            column_UpdateBy
+            {
+              columnId: 'UpdateBy'
+              dataPath: 'UpdateBy'
+              dataType: 'string'
+              index: 12
+              subtotals: ''
+              width: 150
+            }
+            column_UpdateTime
+            {
+              columnId: 'UpdateTime'
+              dataPath: 'UpdateTime'
+              dataType: 'datetime'
+              index: 13
+              subtotals: ''
+              width: 150
+            }
+            column_MinimumNumberOfDaysInStock
+            {
+              columnId: 'MinimumNumberOfDaysInStock'
+              dataPath: 'MinimumNumberOfDaysInStock'
+              dataType: 'number'
+              index: 14
+              subtotals: ''
+              width: 150
+            }
+            column_MaximumNumberOfDaysInInventory
+            {
+              columnId: 'MaximumNumberOfDaysInInventory'
+              dataPath: 'MaximumNumberOfDaysInInventory'
+              dataType: 'number'
+              index: 15
+              subtotals: ''
+              width: 150
+            }
+          }
+          FormMaterialLabelingAndPlanningStrategy_PanelChildMaterial
+          {
+            sizeRatio: 1
+          }
+          FormMaterialLabelingAndPlanningStrategy_ListChildMaterial
+          {
+          }
+          FormMaterialLabelingAndPlanningStrategy_DataSetLevelChildMaterial
+          {
+            groupDepth: -1
+            column_MatCode
+            {
+              columnId: 'MatCode'
+              dataPath: 'MatCode'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_ProductCode
+            {
+              columnId: 'ProductCode'
+              dataPath: 'ProductCode'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_StandardLT
+            {
+              columnId: 'StandardLT'
+              dataPath: 'StandardLT'
+              dataType: 'real'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_ProductDesc
+            {
+              columnId: 'ProductDesc'
+              dataPath: 'ProductDesc'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+            column_Comment
+            {
+              columnId: 'Comment'
+              dataPath: 'Comment'
+              dataType: 'string'
+              index: 4
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
+    }
+    userconfigurableinformation
+    {
+    }
+    image: 'GOLDFISH'
+    page: ''
+    group: ''
+    index: 0
+    description: ''
+  }
+  formatversion: 2
+  id: '鐗╂枡鏍囩_璁″垝绛栫暐'
+  name: '鐗╂枡鏍囩&璁″垝绛栫暐'
+  isglobal: false
+  isroot: true
+}

--
Gitblit v1.9.3