From e1af2556a7f785c518380e63b67fe8600b9163ec Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 18 十一月 2024 17:21:03 +0800
Subject: [PATCH] 下线计划界面排版
---
_Main/BL/Type_OfflinePlanArchiveVersionCell/DefaultValue_Order.qbl | 6 ++
_Main/BL/Type_OfflinePlanArchiveVersionRow/Function_CalcShowName.qbl | 13 ++++
_Main/BL/Type_OfflinePlanArchiveVersionRow/Attribute_ShowName.qbl | 8 ++
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelRowSearch.def | 2
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProduct#780.def | 1
_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_InitiateSearch.qbl | 4 +
_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl | 8 +-
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelColumnSaerch.def | 1
_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl | 26 ++++++--
_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_Order.qbl | 8 ++
/dev/null | 18 ------
_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl | 7 ++
_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_OrderNr.qbl | 8 ++
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProductLine.def | 1
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelUnit.def | 1
_Main/BL/Type_OfflinePlanArchiveVersionRow/DefaultValue_ShowName.qbl | 6 ++
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation.def | 8 +-
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_ButtonSearch_OnClick.def | 20 ++++++
_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl | 9 +-
19 files changed, 116 insertions(+), 39 deletions(-)
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
index 607b785..b4665c0 100644
--- a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
@@ -26,11 +26,12 @@
}
traverse( macroPlan, NewAssemblyOnlinePlanRow, aoprow, aoprow.Type() = '1' ){
row := table.GetRow( aoprow );
- traverse( aoprow, NewAssemblyOnlinePlanCell, aopcell ){
- column := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcell.NewAssemblyOnlinePlanColumn().StartDate() );
+ traverse( table, Column, column ){//, aopcolumns.Find( column.StartDate() ) > -1
+ qty := sum( aoprow, NewAssemblyOnlinePlanCell, aopcell, column.StartDate() <= aopcell.NewAssemblyOnlinePlanColumn().StartDate()
+ and column.EndDate() >= aopcell.NewAssemblyOnlinePlanColumn().StartDate(), aopcell.Quantity() );
+
cell := selectobject( row, Cell, cell, cell.Column() = column );
- // cell.InventoryWeight( aopcell.InventoryWeight() );
- cell.Quantity( aopcell.Quantity() );
+ cell.Quantity( qty );
}
}
showtable.Generate( search );
diff --git a/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
index 546ae21..080d8f1 100644
--- a/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
@@ -43,7 +43,8 @@
traverse( table, GeneralExcelImportAndExportDataRow, row ){
productcell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
factorycell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
- idsrow := idstable.GetRowByUnit( productcell.Value(), factorycell.Value() );
+ unitname := ifexpr( factorycell.Value().StartsWith( '闀挎槬' ), FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );
+ idsrow := idstable.GetRowByUnit( productcell.Value(), unitname );
traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){
period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
daycolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), period );
@@ -57,10 +58,11 @@
}
}
traverse ( macroplan, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.Product_MP() ) and forecast.Origin() = 'PPA' ){
- unitname := ifexpr( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' )
+
+ unitname := ifexpr( forecast.StockingPointID().StartsWith( '闀挎槬' ) , FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );/*ifexpr( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' )
or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) )
, FinancialProductionReport::GetDefaultCCUnit()
- , FinancialProductionReport::GetDefaultDLUnit() );
+ , FinancialProductionReport::GetDefaultDLUnit() );*/
traverse( forecast, PlanningSalesDemandInPeriod, sdip ){
idsrow := idstable.GetRowByUnit( forecast.ProductID(), unitname );
daycolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), sdip.StartDate() );
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl
index be82731..0c8071c 100644
--- a/_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl
+++ b/_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl
@@ -1,7 +1,9 @@
Quintiq file version 2.0
#parent: #root
Method Generate (
- OfflinePlanArchiveSearch search
+ OfflinePlanArchiveSearch search,
+ Strings products,
+ Strings units
)
{
TextBody:
@@ -12,23 +14,33 @@
//娓呯┖涔嬪墠瀛樺偍鐨勬樉绀烘暟鎹�
aopcolumns := selectuniquevalues( table, Column, aopcolumn, aopcolumn.TimeUnit() = search.TimeUnit() and aopcolumn.StartDate() >= search.StartDate() and aopcolumn.StartDate() <= search.EndDate(), aopcolumn.StartDate() );
this.Clear( aopcolumns );
- traverse( table, Row, row, ( search.Unit() = FinancialProductionReport::GetDefaultAllUnit() or row.Unit() = search.Unit() )
- and ( search.Product() = FinancialProductionReport::GetDefaultAllUnit() or search.Product() = row.Name() )){
+ traverse( table, Row, row, units.Find( row.ProductionLine() ) > -1 and products.Find( row.Name() ) > -1 ){
showrow := selectobject( this, Row, showrow, showrow.Name() = row.Name() and showrow.Unit() = search.Unit() );
if( isnull( showrow ) ){
showrow := this.Row( relnew, Name := row.Name(), ProductID := row.ProductID(), Unit := search.Unit() );
}
- traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){
- column := selectobject( this, Column, column, column.ColumnName() = cell.Column().ColumnName() );
+ traverse( this, Column, column ){
+ cells := selectset( row, Cell, cell, cell.Column().TimeUnit() = Translations::MP_GlobalParameters_Day()
+ and cell.Column().StartDate() >= column.StartDate()
+ and cell.Column().StartDate() <= column.EndDate() );
+
+ // traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){
+ // column := selectobject( this, Column, column, column.ColumnName() = cell.Column().ColumnName() );
if( not isnull( column ) ){
showcell := selectobject( showrow, Cell, showcell, showcell.Column() = column );
if( isnull( showcell ) ){
showcell := showrow.Cell( relnew, Quantity := 0, ActualProductionQty := 0 );
column.Cell( relinsert, showcell );
}
- showcell.Quantity( cell.Quantity() + showcell.Quantity() );
- showcell.ActualProductionQty( cell.ActualProductionQty() + showcell.ActualProductionQty() );
+ qty := sum( cells, Elements, cell, cell.Quantity() );
+ actqty := sum( cells, Elements, cell, cell.ActualProductionQty() );
+ showcell.Quantity( qty + showcell.Quantity() );
+ showcell.ActualProductionQty( actqty + showcell.ActualProductionQty() );
+ if( search.TimeUnit() = Translations::MP_GlobalParameters_Day() ){
+ showcell.Order( cells.Element( 0 ).Order() );
+ showcell.OrderNr( cells.Element( 0 ).OrderNr() );
+ }
}
}
}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_InitiateSearch.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_InitiateSearch.qbl
index 18ac911..d94362d 100644
--- a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_InitiateSearch.qbl
+++ b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_InitiateSearch.qbl
@@ -22,7 +22,9 @@
}
table := selectobject( owner, OfflinePlanArchiveVersion, table, table.IsShow() );
if( not isnull( table ) ){
- table.Generate( search);
+ productids := selectuniquevalues( table, Row, row, row.Name() );
+ productlines := selectuniquevalues( table, Row, row, row.ProductionLine() );
+ table.Generate( search, productids, productlines );
}
return table;
*]
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
index 86d0c58..3a803ad 100644
--- a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
@@ -33,6 +33,7 @@
actproductionhandle := actproductiontree.GetHandle( actproductionKey );
actproductiontree.Root().AddChild( actproductionhandle,i );
}
+
traverse( noptable, NewOfflinePlanRow, noprow, noprow.Type() = '1' ){
row := table.GetRow( noprow );
if( not isnull( row ) ){
@@ -50,6 +51,8 @@
}
cell.ActualProductionQty( actproductionqty );
cell.InventoryWeight( nopcell.InventoryWeight() );
+ cell.Order( nopcell.Order() );
+ cell.OrderNr( nopcell.OrderNr() );
// cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() );
cell.Quantity( nopcell.Quantity() );
// cell.Shift( nopcell.Shift() );
@@ -57,6 +60,8 @@
}
}
}
- showtable.Generate( search );
+ productids := selectuniquevalues( table, Row, row, row.Name() );
+ productlines := selectuniquevalues( table, Row, row, row.ProductionLine() );
+ showtable.Generate( search, productids, productlines );
*]
}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_Order.qbl b/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_Order.qbl
new file mode 100644
index 0000000..231d2f1
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_Order.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Order
+{
+ #keys: '3[415136.0.1312430050][415136.0.1312430049][415136.0.1312430051]'
+ Description: '鐢熶骇椤哄簭锛圫tring锛�'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_OrderNr.qbl b/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_OrderNr.qbl
new file mode 100644
index 0000000..ec6c83c
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_OrderNr.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute OrderNr
+{
+ #keys: '3[415136.0.1312430053][415136.0.1312430052][415136.0.1312430054]'
+ Description: '鐢熶骇椤哄簭锛圢umber锛�'
+ ValueType: Number
+}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersionCell/DefaultValue_Order.qbl b/_Main/BL/Type_OfflinePlanArchiveVersionCell/DefaultValue_Order.qbl
new file mode 100644
index 0000000..9726838
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanArchiveVersionCell/DefaultValue_Order.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+ TargetAttribute: Order
+}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersionRow/Attribute_ShowName.qbl b/_Main/BL/Type_OfflinePlanArchiveVersionRow/Attribute_ShowName.qbl
new file mode 100644
index 0000000..f8dd131
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanArchiveVersionRow/Attribute_ShowName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ShowName
+{
+ #keys: '3[415136.0.1312430042][415136.0.1312430041][415136.0.1312430043]'
+ Description: '鏄剧ず鍚嶇О'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersionRow/DefaultValue_ShowName.qbl b/_Main/BL/Type_OfflinePlanArchiveVersionRow/DefaultValue_ShowName.qbl
new file mode 100644
index 0000000..6fd3149
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanArchiveVersionRow/DefaultValue_ShowName.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+ TargetAttribute: ShowName
+}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersionRow/Function_CalcShowName.qbl b/_Main/BL/Type_OfflinePlanArchiveVersionRow/Function_CalcShowName.qbl
new file mode 100644
index 0000000..ad4cc5e
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanArchiveVersionRow/Function_CalcShowName.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcShowName
+{
+ TextBody:
+ [*
+ // 鐢勫叞楦� Nov-18-2024 (created)
+
+ value := this.ProductionLine().Concat( '_' ).Concat( this.Name() );
+
+ this.ShowName( value );
+ *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelColumnSaerch.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelColumnSaerch.def
index 838adc6..70f4f62 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelColumnSaerch.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelColumnSaerch.def
@@ -7,6 +7,7 @@
[
#child: PanelPeriod
#child: PanelTimeUnit_720
+ #child: PanelOperation
]
Properties:
[
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation\043679.def" b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation.def
similarity index 63%
rename from "_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation\043679.def"
rename to _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation.def
index e97022e..7addb7b 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation\043679.def"
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation.def
@@ -1,13 +1,13 @@
Quintiq file version 2.0
-Component PanelOperation id:PanelOperation_679
+Component PanelOperation
{
- #keys: '[415136.0.1306620726]'
+ #keys: '[415136.0.1313960022]'
BaseType: 'WebPanel'
Children:
[
Component ButtonSearch
{
- #keys: '[415136.0.1306620727]'
+ #keys: '[415136.0.1313960023]'
BaseType: 'WebButton'
Properties:
[
@@ -18,6 +18,6 @@
]
Properties:
[
- Taborder: 3
+ Taborder: 2
]
}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProduct\043780.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProduct\043780.def"
index 02b7129..3df184a 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProduct\043780.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProduct\043780.def"
@@ -21,5 +21,6 @@
Properties:
[
Taborder: 2
+ Visible: false
]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProductLine.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProductLine.def
index fb4edc1..464dc61 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProductLine.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProductLine.def
@@ -20,5 +20,6 @@
Properties:
[
Taborder: 1
+ Visible: false
]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelRowSearch.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelRowSearch.def
index 5d7cd85..8fe529a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelRowSearch.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelRowSearch.def
@@ -8,11 +8,11 @@
#child: PanelUnit
#child: PanelProductLine
#child: PanelProduct_780
- #child: PanelOperation_679
]
Properties:
[
Orientation: 'horizontal'
Taborder: 0
+ Visible: false
]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelUnit.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelUnit.def
index f7ae386..ea7df10 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelUnit.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelUnit.def
@@ -19,5 +19,6 @@
Properties:
[
Taborder: 0
+ Visible: false
]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_679_ButtonSearch_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_679_ButtonSearch_OnClick.def
deleted file mode 100644
index 563457f..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_679_ButtonSearch_OnClick.def
+++ /dev/null
@@ -1,18 +0,0 @@
-Quintiq file version 2.0
-#parent: PanelOperation_679/ButtonSearch
-Response OnClick () id:Response_PanelOperation_679_ButtonSearch_OnClick
-{
- #keys: '[415136.0.1306620725]'
- CanBindMultiple: false
- DefinitionID: 'Responsedef_WebButton_OnClick'
- QuillAction
- {
- Body:
- [*
- if( not isnull( DataHolderTable.Data() ) ){
- DataHolderTable.Data().Generate( dhSearch.Data() );
- }
- *]
- GroupServerCalls: false
- }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_ButtonSearch_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_ButtonSearch_OnClick.def
new file mode 100644
index 0000000..858ff1f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_ButtonSearch_OnClick.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: PanelOperation/ButtonSearch
+Response OnClick () id:Response_PanelOperation_ButtonSearch_OnClick
+{
+ #keys: '[415136.0.1313960021]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ QuillAction
+ {
+ Body:
+ [*
+ if( not isnull( DataHolderTable.Data() ) ){
+ productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, product.ID() );
+ units := selectuniquevalues( DataHolderUnit.Data(), Elements, unit, unit.ID() );
+ DataHolderTable.Data().Generate( dhSearch.Data(), productids, units );
+ }
+ *]
+ GroupServerCalls: false
+ }
+}
--
Gitblit v1.9.3