From 221cf86c35ab100bb8d6af6a066c195b3c5560f2 Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期六, 07 十月 2023 16:27:13 +0800
Subject: [PATCH] 填产优化

---
 _Main/BL/Type_Global_BrokerExecuteLog/Attribute_ExecutionStatus.qbl                                                              |    7 
 _Main/BL/Type_Global_MappingUnitOfMeasure_MP/StaticMethod_SynchronizeMacroPlanData.qbl                                           |   31 +++
 _Main/BL/Type_FillingCapacityOrder/TypeIndex_FillingCapacityOrderTypeIndex.qbl                                                   |   12 +
 _Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_PanelFillingCapacityOrder.def                           |   26 ++
 _Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Response_pnlActions_btnOk_OnClick.def                           |   49 ++++
 _Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_ListFillingCapacityOrder.def                            |    2 
 _Main/BL/Type_GlobalDTOTable/_ROOT_Type_GlobalOTDTable.qbl                                                                       |   12 +
 _Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_ClickBtnOk.def                                           |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_listContextMenuFillingCapacityOrder.def                 |    1 
 _Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Component_pnlContent.def                                        |  189 ++++++++++++++++++
 _Main/BL/Type_FillingCapacityOrder/Attribute_ID.qbl                                                                              |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def |    3 
 /dev/null                                                                                                                        |   15 -
 _Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_ExportTheFileStream.qbl                                             |    2 
 _Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_New.def                                                  |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/_ROOT_Component_FormFillingCapacityOrder.def                      |    1 
 _Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl                                                           |   14 +
 _Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_Edit.def                                                 |   15 +
 _Main/UI/MacroPlannerWebApp/Views/接口测试.vw                                                                                        |  197 ++++++++++++-------
 19 files changed, 480 insertions(+), 114 deletions(-)

diff --git a/_Main/BL/Type_FillingCapacityOrder/Attribute_ID.qbl b/_Main/BL/Type_FillingCapacityOrder/Attribute_ID.qbl
new file mode 100644
index 0000000..a15a6b3
--- /dev/null
+++ b/_Main/BL/Type_FillingCapacityOrder/Attribute_ID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ID
+{
+  #keys: '3[414702.0.525344991][414702.0.525344990][414702.0.525344992]'
+  IsReadOnly: true
+  ValueType: String
+}
diff --git a/_Main/BL/Type_FillingCapacityOrder/TypeIndex_FillingCapacityOrderTypeIndex.qbl b/_Main/BL/Type_FillingCapacityOrder/TypeIndex_FillingCapacityOrderTypeIndex.qbl
new file mode 100644
index 0000000..41296eb
--- /dev/null
+++ b/_Main/BL/Type_FillingCapacityOrder/TypeIndex_FillingCapacityOrderTypeIndex.qbl
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+TypeIndex FillingCapacityOrderTypeIndex
+{
+  Attributes:
+  [
+    TypeIndexAttribute
+    {
+      ModelElement: ID
+    }
+  ]
+}
diff --git "a/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl" "b/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl"
new file mode 100644
index 0000000..c1d4c3f
--- /dev/null
+++ "b/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan\043127.qbl"
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+Method SynchronizeDataToMacroPlan (
+  MacroPlan macroPlan,
+  Boolean isUnitOfMeasure_MP
+)
+{
+  TextBody:
+  [*
+    if ( isUnitOfMeasure_MP ) {
+      Global_MappingUnitOfMeasure_MP::SynchronizeMacroPlanData( this, macroPlan );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan.qbl b/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan.qbl
deleted file mode 100644
index 380fac6..0000000
--- a/_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan.qbl
+++ /dev/null
@@ -1,15 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Method SynchronizeDataToMacroPlan (
-  MacroPlan macroPlan,
-  Boolean isCustomOrder,
-  Boolean isForecast
-)
-{
-  TextBody:
-  [*
-    if ( isCustomOrder ) {
-    //  macroPlan.MappingCustomerOrderData( businessTypes, this );
-    }
-  *]
-}
diff --git a/_Main/BL/Type_GlobalDTOTable/_ROOT_Type_GlobalOTDTable.qbl b/_Main/BL/Type_GlobalDTOTable/_ROOT_Type_GlobalOTDTable.qbl
index 0518307..c3d49d2 100644
--- a/_Main/BL/Type_GlobalDTOTable/_ROOT_Type_GlobalOTDTable.qbl
+++ b/_Main/BL/Type_GlobalDTOTable/_ROOT_Type_GlobalOTDTable.qbl
@@ -5,5 +5,17 @@
 {
   #keys: '5[414702.0.83354588][414702.0.83354586][0.0.0][414702.0.83354587][414702.0.83354589]'
   BaseType: Object
+  OnCreate:
+  [*
+    this.BusinessType( relnew, BusinessTypeName := "鎵嬫満浜嬩笟閮∣LED" );
+    this.BusinessType( relnew, BusinessTypeName := "涓撲笟鏄剧ず浜嬩笟閮�" );
+    this.BusinessType( relnew, BusinessTypeName := "澶栧崠CELLOLED" );
+    this.BusinessType( relnew, BusinessTypeName := "鎵嬫満浜嬩笟閮�" );
+    this.BusinessType( relnew, BusinessTypeName := "姹借溅鐢靛瓙浜嬩笟閮�" );
+    this.BusinessType( relnew, BusinessTypeName := "鐗圭鏄剧ず" );
+    this.BusinessType( relnew, BusinessTypeName := "杩愬姩鍋ュ悍浜嬩笟閮�" );
+    this.BusinessType( relnew, BusinessTypeName := "杞﹁浇鏄剧ず浜嬩笟閮�" );
+    this.BusinessType( relnew, BusinessTypeName := "IT浜嬩笟閮�" );
+  *]
   StructuredName: 'GlobalOTDTables'
 }
diff --git a/_Main/BL/Type_Global_BrokerExecuteLog/Attribute_ExecutionStatus.qbl b/_Main/BL/Type_Global_BrokerExecuteLog/Attribute_ExecutionStatus.qbl
index 0374f88..e4a5392 100644
--- a/_Main/BL/Type_Global_BrokerExecuteLog/Attribute_ExecutionStatus.qbl
+++ b/_Main/BL/Type_Global_BrokerExecuteLog/Attribute_ExecutionStatus.qbl
@@ -3,6 +3,11 @@
 Attribute ExecutionStatus
 {
   #keys: '3[414702.0.498264686][414702.0.498264685][414702.0.498264687]'
-  Description: '鎵ц鐘舵��'
+  Description:
+  [*
+    鎵ц鐘舵��
+    InOperation
+    Complete
+  *]
   ValueType: String
 }
diff --git a/_Main/BL/Type_Global_MappingUnitOfMeasure_MP/StaticMethod_SynchronizeMacroPlanData.qbl b/_Main/BL/Type_Global_MappingUnitOfMeasure_MP/StaticMethod_SynchronizeMacroPlanData.qbl
new file mode 100644
index 0000000..d31811e
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingUnitOfMeasure_MP/StaticMethod_SynchronizeMacroPlanData.qbl
@@ -0,0 +1,31 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SynchronizeMacroPlanData (
+  GlobalOTDTable globalOTDTable,
+  MacroPlan macroPlan
+)
+{
+  TextBody:
+  [*
+    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
+                                                                       Name := "鍚屾鍗曚綅鏁版嵁",
+                                                                       IsSuccess := true
+                                                                      );
+                                            
+    try {
+      traverse ( globalOTDTable, Global_MappingUnitOfMeasure_MP, gmuommp ) {
+        unitOfMeasure_MP := select( macroPlan, UnitOfMeasure_MP, tempUOMMP, tempUOMMP.Name() = gmuommp.Name() );
+        if ( isnull( unitOfMeasure_MP ) ) {  
+          unitOfMeasure_MP := UnitOfMeasure_MP::Create( macroPlan, gmuommp.Name(), false, false );
+        }
+        if ( gmuommp.IsDefault() ) {
+          unitOfMeasure_MP.SetAsDefault();
+        }
+      }
+    } onerror {
+      global_BrokerExecuteLog.IsSuccess( false );
+      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
+      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_ExportTheFileStream.qbl b/_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_ExportTheFileStream.qbl
index 4b41017..6e0539c 100644
--- a/_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_ExportTheFileStream.qbl
+++ b/_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_ExportTheFileStream.qbl
@@ -31,7 +31,7 @@
     
     xmlDOMSerializer := xmlDOMImplementation.CreateSerializer();
     xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument );
-    
+    info( xmlTableString );
     tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) );
     tableGroupHandle := TableGroupHandle::Create( "鐗╂枡鏍囩" );
     tableGroupHandle.Add( tableHandle );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Component_pnlContent.def
index 3425275..911ba95 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Component_pnlContent.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Component_pnlContent.def
@@ -13,8 +13,10 @@
       [
         AllowEmpty: true
         DataBinding: 'DataHolderFillingCapacityOrder.Data.ProductID'
+        Enabled: false
         Label: '鍟嗗搧缂栫爜'
         Taborder: 0
+        Visible: false
       ]
     }
     Component dropDownStringListSalesSegmentName id:dropDownStringListSalesSegmentName_325
@@ -25,8 +27,10 @@
       [
         AllowEmpty: true
         DataBinding: 'DataHolderFillingCapacityOrder.Data.SalesSegmentName'
+        Enabled: false
         Label: '閿�鍞儴闂�'
         Taborder: 1
+        Visible: false
       ]
     }
     Component dropDownStringListStockPointID id:dropDownStringListStockPointID_801
@@ -37,8 +41,10 @@
       [
         AllowEmpty: true
         DataBinding: 'DataHolderFillingCapacityOrder.Data.StockingPointID'
+        Enabled: false
         Label: '搴撳瓨鐐�'
         Taborder: 2
+        Visible: false
       ]
     }
     Component dropDownStringListCustomer id:dropDownStringListCustomer_957
@@ -49,8 +55,10 @@
       [
         AllowEmpty: true
         DataBinding: 'DataHolderFillingCapacityOrder.Data.Customer'
+        Enabled: false
         Label: '瀹㈡埛'
         Taborder: 3
+        Visible: false
       ]
     }
     Component edtQuantity id:edtQuantity_995
@@ -62,7 +70,7 @@
         DataBinding: 'DataHolderFillingCapacityOrder.Data.Quantity'
         Label: '鏁伴噺'
         Mask: 'REAL'
-        Taborder: 4
+        Taborder: 12
       ]
     }
     Component dropDownStringListUnitOfMeasureName id:dropDownStringListUnitOfMeasureName_750
@@ -73,9 +81,11 @@
       [
         AllowEmpty: true
         DataBinding: 'DataHolderFillingCapacityOrder.Data.UnitOfMeasureName'
+        Enabled: false
         Label: '鏁伴噺鍗曚綅'
         Strings: 'UnitName'
-        Taborder: 5
+        Taborder: 4
+        Visible: false
       ]
     }
     Component edtSalesAmount id:edtSalesAmount_608
@@ -87,7 +97,7 @@
         DataBinding: 'DataHolderFillingCapacityOrder.Data.SalesAmount'
         Label: '閿�鍞'
         Mask: 'NUMBER'
-        Taborder: 6
+        Taborder: 13
       ]
     }
     Component dsDemandDate
@@ -98,7 +108,7 @@
       [
         DataBinding: 'DataHolderFillingCapacityOrder.Data.DemandDate'
         Label: '闇�姹傛棩鏈�'
-        Taborder: 8
+        Taborder: 15
       ]
     }
     Component dsForecastDemandDate
@@ -109,9 +119,180 @@
       [
         DataBinding: 'DataHolderFillingCapacityOrder.Data.ForecastDemandDate'
         Label: '棰勬湡闇�姹傛棩鏈�'
+        Taborder: 14
+      ]
+    }
+    Component ddlSalesSegment
+    {
+      #keys: '[414702.0.525040441]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'SalesSegment_MP'
+      Children:
+      [
+        Component deSalesSegment
+        {
+          #keys: '[414702.0.525040443]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'structured[SalesSegment_MP]'
+            FixedFilter: 'object.Child(relsize)=0'
+            Source: 'ApplicationMacroPlanner.DataHolderSalesSegment'
+            Taborder: 0
+            Transformation: 'Elements'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'Name'
+        Label: '閿�鍞儴闂�'
+        Taborder: 5
+      ]
+    }
+    Component ddlProduct_MP
+    {
+      #keys: '[414702.0.525462899]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'Product_MP'
+      Children:
+      [
+        Component deContent
+        {
+          #keys: '[414702.0.525462901]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'structured[Product_MP]'
+            FixedFilter: 'not object.IsSystem()'
+            Source: 'ApplicationMacroPlanner.DataHolderProduct'
+            Taborder: 0
+            Transformation: 'Elements'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'Name'
+        Label: '浜у搧'
+        Taborder: 6
+      ]
+    }
+    Component ddlStockingPoint_MP
+    {
+      #keys: '[414702.0.525462922]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'StockingPoint_MP'
+      Children:
+      [
+        Component deContent345
+        {
+          #keys: '[414702.0.525462924]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'structured[StockingPoint_MP]'
+            FixedFilter: 'not object.IsSystem()'
+            Source: 'ApplicationMacroPlanner.DataHolderStockingPoint'
+            Taborder: 0
+            Transformation: 'Elements'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'Name'
+        Label: '搴撳瓨鐐�'
         Taborder: 7
       ]
     }
+    Component ddlBusinessType
+    {
+      #keys: '[414702.0.525012300]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'BusinessType'
+      Children:
+      [
+        Component deContent989
+        {
+          #keys: '[414702.0.525012302]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'GlobalOTDTable'
+            Source: 'GlobalOTDTable'
+            Taborder: 0
+            Transformation: 'BusinessType'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'BusinessTypeName'
+        Label: '浜嬩笟閮�'
+        Taborder: 8
+      ]
+    }
+    Component ddlUnitOfMeasure_MP
+    {
+      #keys: '[414702.0.525669735]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'UnitOfMeasure_MP'
+      Children:
+      [
+        Component deContent703
+        {
+          #keys: '[414702.0.525669737]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'UnitOfMeasure_MP'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'Name'
+        Label: '鍗曚綅'
+        Taborder: 9
+      ]
+    }
+    Component efCustomerName
+    {
+      #keys: '[414702.0.525734924]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'DataHolderFillingCapacityOrder.Data.Customer'
+        Label: 'Customer name'
+        Taborder: 10
+      ]
+    }
+    Component efCustomID
+    {
+      #keys: '[414702.0.525734943]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: 'Customer ID'
+        Taborder: 11
+      ]
+    }
+    Component ddslOrderType
+    {
+      #keys: '[414702.0.526239841]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        DataBinding: 'DataHolderFillingCapacityOrder.Data.OrderType'
+        Label: '璁㈠崟绫诲瀷'
+        Strings: '鍙嶇;鎺堟潈'
+        Taborder: 16
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_ClickBtnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_ClickBtnOk.def
index c345b5c..446efca 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_ClickBtnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_ClickBtnOk.def
@@ -7,12 +7,12 @@
   [*
     // Disabled button to prevent the possibility of multiple firing
     
-    btnOk.Enabled(false,'');
+    //btnOk.Enabled(false,'');
     
     // OnOk
     this.ApplyChanges();
     
-    DataHolderFillingCapacityOrder.Data().Commit();
+    //DataHolderFillingCapacityOrder.Data().Commit();
     
     //if( not isnull( DataHolderForm.Data() ) )
     //{
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_Edit.def b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_Edit.def
index 2d5dc2d..f217f0d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_Edit.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_Edit.def
@@ -12,6 +12,21 @@
     
     DataHolderFillingCapacityOrder.Data( &data );
     
+    salesSegment_MP := select( MacroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = selection.SalesSegmentName() );
+    ddlSalesSegment.Data( salesSegment_MP );
+    
+    product_MP := select( MacroPlan, Product_MP, tempPMP, tempPMP.ID() = selection.ProductID() );
+    ddlProduct_MP.Data( product_MP );
+    
+    stockingPoint_MP := select( MacroPlan, StockingPoint_MP, tempSPMP, tempSPMP.ID() = selection.StockingPointID() );
+    ddlStockingPoint_MP.Data( stockingPoint_MP );
+    
+    businessType := select( GlobalOTDTable, BusinessType, tempBT, tempBT.BusinessTypeName() = selection.BusinessType() );
+    ddlBusinessType.Data( businessType );
+    
+    unitOfMeasure_MP := select( MacroPlan, UnitOfMeasure_MP, tempUOMMP, tempUOMMP.Name() = selection.UnitOfMeasureName() );
+    ddlUnitOfMeasure_MP.Data( unitOfMeasure_MP );
+    
     ApplicationMacroPlanner.ShowFormModal( this );
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_New.def b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_New.def
index 4170b61..658d008 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_New.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Method_New.def
@@ -8,10 +8,10 @@
   Body:
   [*
     
-    data := owner.FillingCapacityOrder(relshadow);
-    data.OrderType("鎻愭媺")
+    data := owner.FillingCapacityOrder( relshadow );
+    //data.OrderType("鎻愭媺")
     
-    DataHolderFillingCapacityOrder.Data(&data);
+    DataHolderFillingCapacityOrder.Data( &data );
     
     ApplicationMacroPlanner.ShowFormModal( this );
   *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Response_pnlActions_btnOk_OnClick.def
index 89f4bc2..4e6488a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Response_pnlActions_btnOk_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Response_pnlActions_btnOk_OnClick.def
@@ -6,20 +6,51 @@
   DefinitionID: 'Responsedef_WebButton_OnClick'
   Precondition:
   [*
-    feedback := Translations::FilllingCapacity_ValidateInput();
-    
-    checkValue := not dropDownStringListProductID.Text() = '' and not dropDownStringListSalesSegmentName.Text() = ''
-                  and not dropDownStringListStockPointID.Text() = '' and not dropDownStringListCustomer.Text() = ''
-                  and not edtQuantity.Text() = '' and not dropDownStringListUnitOfMeasureName.Text() = ''
-                  and not edtSalesAmount.Text() = ''
-    
-    return checkValue;
+    //feedback := Translations::FilllingCapacity_ValidateInput();
+    //
+    //checkValue := not dropDownStringListProductID.Text() = '' and not dropDownStringListSalesSegmentName.Text() = ''
+    //              and not dropDownStringListStockPointID.Text() = '' and not dropDownStringListCustomer.Text() = ''
+    //              and not edtQuantity.Text() = '' and not dropDownStringListUnitOfMeasureName.Text() = ''
+    //              and not edtSalesAmount.Text() = ''
+    //
+    //return checkValue;
   *]
   QuillAction
   {
     Body:
     [*
-      Form.ClickBtnOk()
+      Form.ApplyChanges();
+      
+      data := guard( DataHolderFillingCapacityOrder.Data().WrappedInstance(), null( FillingCapacityOrder ) );;
+      if ( isnull( data ) ) {
+        MacroPlan.FillingCapacityOrder( relnew,
+                                        ProductID          := guard( ddlProduct_MP.Data().ID(), "null" ),
+                                        BusinessType       := guard( ddlBusinessType.Data().BusinessTypeName(), "null" ),
+                                        SalesSegmentName   := guard( ddlSalesSegment.Data().Name(), "null" ),
+                                        StockingPointID    := guard( ddlStockingPoint_MP.Data().ID(), "null" ),
+                                        Customer           := efCustomerName.Text(),
+                                        Quantity           := [Real]edtQuantity.Text(),
+                                        UnitOfMeasureName  := ddlUnitOfMeasure_MP.Data().Name(),
+                                        ForecastDemandDate := dsForecastDemandDate.Date(),
+                                        DemandDate         := dsDemandDate.Date(),
+                                        OrderType          := ddslOrderType.Text(),
+                                        SalesAmount        := [Number]edtSalesAmount.Text()
+                                       );
+      } else {
+        data.ProductID( guard( ddlProduct_MP.Data().ID(), "null" ) );
+        data.BusinessType( guard( ddlBusinessType.Data().BusinessTypeName(), "null" ) );
+        data.SalesSegmentName( guard( ddlSalesSegment.Data().Name(), "null" ) );
+        data.StockingPointID( guard( ddlStockingPoint_MP.Data().ID(), "null" ) );
+        data.Customer( efCustomerName.Text() );
+        data.Quantity( [Real]edtQuantity.Text() );
+        data.UnitOfMeasureName( ddlUnitOfMeasure_MP.Data().Name() );
+        data.ForecastDemandDate( dsForecastDemandDate.Date() );
+        data.DemandDate( dsDemandDate.Date() );
+        data.OrderType( ddslOrderType.Text() );
+        data.SalesAmount( [Number]edtSalesAmount.Text() );
+      }
+      
+      Form.Close();
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_ListFillingCapacityOrder.def b/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_ListFillingCapacityOrder.def
index 7ff6bcd..a3801b2 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_ListFillingCapacityOrder.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_ListFillingCapacityOrder.def
@@ -37,7 +37,7 @@
   ]
   Properties:
   [
-    Taborder: 0
+    Taborder: 1
   ]
   ResponseDefinitions:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_PanelFillingCapacityOrder.def b/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_PanelFillingCapacityOrder.def
new file mode 100644
index 0000000..57a3abe
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_PanelFillingCapacityOrder.def
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+Component PanelFillingCapacityOrder
+{
+  #keys: '[414702.0.526129526]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ButtonDeduct
+    {
+      #keys: '[414702.0.523642357]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'EDITOR_ACCESSIBILITY_LOCAL'
+        Label: '鍐插噺'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_listContextMenuFillingCapacityOrder.def b/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_listContextMenuFillingCapacityOrder.def
index 42e181a..7db97cc 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_listContextMenuFillingCapacityOrder.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/Component_listContextMenuFillingCapacityOrder.def
@@ -22,6 +22,7 @@
       BaseType: 'WebMenu'
       Properties:
       [
+        BindOnDoubleClick: true
         Image: 'PENCIL'
         Taborder: 4
         Title: 'Edit'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/_ROOT_Component_FormFillingCapacityOrder.def b/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/_ROOT_Component_FormFillingCapacityOrder.def
index 594ffdc..da0e3a5 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/_ROOT_Component_FormFillingCapacityOrder.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFillingCapacityOrder/_ROOT_Component_FormFillingCapacityOrder.def
@@ -8,6 +8,7 @@
   Children:
   [
     #child: ListFillingCapacityOrder
+    #child: PanelFillingCapacityOrder
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def
index 91508e3..0b714ed 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def
@@ -14,8 +14,7 @@
     Body:
     [*
       GlobalOTDTable.SynchronizeDataToMacroPlan( MacroPlan, 
-                                                 CheckboxCustomOrder.Checked(),
-                                                 CheckboxForecast.Checked()
+                                                 CheckboxUnitOfMeasure_MP.Checked()
                                                 );
       
       WebMessageBox::Success( "鍚屾鎴愬姛锛�", true );
diff --git "a/_Main/UI/MacroPlannerWebApp/Views/\346\216\245\345\217\243\346\265\213\350\257\225.vw" "b/_Main/UI/MacroPlannerWebApp/Views/\346\216\245\345\217\243\346\265\213\350\257\225.vw"
index 43ce5f1..d4e8c6a 100644
--- "a/_Main/UI/MacroPlannerWebApp/Views/\346\216\245\345\217\243\346\265\213\350\257\225.vw"
+++ "b/_Main/UI/MacroPlannerWebApp/Views/\346\216\245\345\217\243\346\265\213\350\257\225.vw"
@@ -13,13 +13,25 @@
         {
           mode: 'open'
           rowPosition: 1
-          rowSpan: 10
+          rowSpan: 16
           columnPosition: 1
           columnSpan: 6
         }
         components
         {
-          FormInterfaceTest_PanelInterfaceOptions
+          FormInterfaceTest_PanelInterfaceOption1
+          {
+            sizeRatio: 1
+          }
+          FormInterfaceTest_PanelInterfaceOption2
+          {
+            sizeRatio: 1
+          }
+          FormInterfaceTest_PanelInterfaceOption3
+          {
+            sizeRatio: 1
+          }
+          FormInterfaceTest_PanelInterfaceOption4
           {
             sizeRatio: 1
           }
@@ -27,7 +39,7 @@
           {
             sizeRatio: 1
           }
-          FormInterfaceTest_PanelInterfaceTest981
+          FormInterfaceTest_PanelInterfaceGlobal_BrokerExecuteLog
           {
             sizeRatio: 1
           }
@@ -37,66 +49,85 @@
           FormInterfaceTest_DataSetLevelInterfaceTest
           {
             groupDepth: -1
-            column_BrokerName
+            sort: 'IsSuccess'
+            column_ImageExecutionStatus
             {
-              columnId: 'BrokerName'
-              dataPath: 'BrokerName'
+              columnId: 'ImageExecutionStatus'
+              dataPath: 'ImageExecutionStatus'
               dataType: 'string'
               index: 0
               subtotals: ''
-              width: 150
+              width: 37
             }
-            column_ElementTotal
+            column_ExecuteUser
             {
-              columnId: 'ElementTotal'
-              dataPath: 'ElementTotal'
-              dataType: 'number'
+              columnId: 'ExecuteUser'
+              dataPath: 'ExecuteUser'
+              dataType: 'string'
               index: 1
               subtotals: ''
-              width: 150
-            }
-            column_ErrorDateTime
-            {
-              columnId: 'ErrorDateTime'
-              dataPath: 'ErrorDateTime'
-              dataType: 'string'
-              index: 2
-              subtotals: ''
-              width: 150
-            }
-            column_ErrorMessage
-            {
-              columnId: 'ErrorMessage'
-              dataPath: 'ErrorMessage'
-              dataType: 'string'
-              index: 3
-              subtotals: ''
-              width: 150
-            }
-            column_ErrorNo
-            {
-              columnId: 'ErrorNo'
-              dataPath: 'ErrorNo'
-              dataType: 'number'
-              index: 4
-              subtotals: ''
-              width: 150
+              width: 110
             }
             column_IsSuccess
             {
               columnId: 'IsSuccess'
               dataPath: 'IsSuccess'
               dataType: 'boolean'
+              index: 2
+              subtotals: ''
+              width: 96
+            }
+            column_BrokerName
+            {
+              columnId: 'BrokerName'
+              dataPath: 'BrokerName'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 229
+            }
+            column_ElementTotal
+            {
+              columnId: 'ElementTotal'
+              dataPath: 'ElementTotal'
+              dataType: 'number'
+              index: 4
+              subtotals: ''
+              width: 87
+            }
+            column_ErrorDateTime
+            {
+              columnId: 'ErrorDateTime'
+              dataPath: 'ErrorDateTime'
+              dataType: 'string'
               index: 5
               subtotals: ''
-              width: 150
+              width: 121
+            }
+            column_ErrorMessage
+            {
+              columnId: 'ErrorMessage'
+              dataPath: 'ErrorMessage'
+              dataType: 'string'
+              index: 6
+              subtotals: ''
+              width: 86
+            }
+            column_ErrorNo
+            {
+              columnId: 'ErrorNo'
+              dataPath: 'ErrorNo'
+              dataType: 'number'
+              index: 7
+              subtotals: ''
+              width: 86
             }
             column_Name
             {
               columnId: 'Name'
               dataPath: 'Name'
               dataType: 'string'
-              index: 6
+              index: 8
               subtotals: ''
               width: 150
             }
@@ -105,40 +136,7 @@
               columnId: 'SuccessDateTime'
               dataPath: 'SuccessDateTime'
               dataType: 'string'
-              index: 7
-              subtotals: ''
-              width: 150
-            }
-          }
-        }
-      }
-      form_FormBusinessType
-      {
-        title: 'QTIANMA_JITUAN::FormBusinessType'
-        shown: true
-        componentID: 'QTIANMA_JITUAN::FormBusinessType'
-        layout
-        {
-          mode: 'open'
-          rowPosition: 11
-          rowSpan: 6
-          columnPosition: 1
-          columnSpan: 6
-        }
-        components
-        {
-          FormBusinessType_ListBusinessType
-          {
-          }
-          FormBusinessType_DataSetLevelBusinessType
-          {
-            groupDepth: -1
-            column_BusinessTypeName
-            {
-              columnId: 'BusinessTypeName'
-              dataPath: 'BusinessTypeName'
-              dataType: 'string'
-              index: 0
+              index: 9
               subtotals: ''
               width: 150
             }
@@ -158,7 +156,54 @@
           columnPosition: 7
           columnSpan: 6
         }
-        components: null
+        components
+        {
+          FormShowInterfaceData_MatrixEditorShowInterfaceData
+          {
+            gridColor: '#c4c4c4'
+            totalHeaderWidth: 200
+            attributeHeaderWidthRatio: 0.6
+            nameHeaderWidthRatio: 0.4
+            columnWidth: 100
+            horizontalGrid: true
+            verticalGrid: true
+            backendState
+            {
+              componentId: 'QTIANMA_JITUAN::FormShowInterfaceData.MatrixEditorShowInterfaceData'
+              state
+              {
+                cells
+                {
+                  attributes
+                  {
+                    attribute_Value
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 0
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'Value'
+                    }
+                  }
+                }
+                columns
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'ColumnIndex'"
+                  }
+                }
+                rows
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'RowNr'"
+                  }
+                }
+              }
+            }
+          }
+        }
       }
     }
     userconfigurableinformation

--
Gitblit v1.9.3