lazhen
2024-11-18 e1af2556a7f785c518380e63b67fe8600b9163ec
下线计划界面排版
已重命名1个文件
已修改10个文件
已添加7个文件
已删除1个文件
155 ■■■■ 文件已修改
_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_InitiateSearch.qbl 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_Order.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersionCell/Attribute_OrderNr.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersionCell/DefaultValue_Order.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersionRow/Attribute_ShowName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersionRow/DefaultValue_ShowName.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanArchiveVersionRow/Function_CalcShowName.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelColumnSaerch.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation.def 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProduct#780.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProductLine.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelRowSearch.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelUnit.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_679_ButtonSearch_OnClick.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_ButtonSearch_OnClick.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_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 );
_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() );
_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() );
          }
        }
      }
    }
_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;
  *]
_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 );
  *]
}
_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: '生产顺序(String)'
  ValueType: String
}
_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: '生产顺序(Number)'
  ValueType: Number
}
_Main/BL/Type_OfflinePlanArchiveVersionCell/DefaultValue_Order.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: Order
}
_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
}
_Main/BL/Type_OfflinePlanArchiveVersionRow/DefaultValue_ShowName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: ShowName
}
_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 );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelColumnSaerch.def
@@ -7,6 +7,7 @@
  [
    #child: PanelPeriod
    #child: PanelTimeUnit_720
    #child: PanelOperation
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelOperation#679.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
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProduct#780.def
@@ -21,5 +21,6 @@
  Properties:
  [
    Taborder: 2
    Visible: false
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelProductLine.def
@@ -20,5 +20,6 @@
  Properties:
  [
    Taborder: 1
    Visible: false
  ]
}
_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
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Component_PanelUnit.def
@@ -19,5 +19,6 @@
  Properties:
  [
    Taborder: 0
    Visible: false
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanArchive/Response_PanelOperation_679_ButtonSearch_OnClick.def
ÎļþÒÑɾ³ý
_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
  }
}