lazhen
2024-09-26 3bb308481a906e3c2c9c1670905249fb73f36100
报表导入导出图标修改
已修改11个文件
已添加1个文件
200 ■■■■ 文件已修改
_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelExport#670.def 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Component_PanelExport.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormEnginePipelineReport/Component_PanelExport#570.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelExport.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelFinancialProductionReportOperation.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelExport#545.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReportOperation.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialWeeklyReport/Component_PanelHeader.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventorySummaryReport/Component_PanelExport.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMachiningPipelineReport/Component_PanelExport.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
@@ -83,27 +83,29 @@
      //是否属于长春装配线
    //  iscc                  := unit.ID() = ccspline or exists( parentunits, Elements, punit, punit.ID() = ccspline );
    //  if( table.IsInUnit( stockingpoint, ccspline ) ){
        traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and pisp.Product_MP().MQBMLB() = 'MQB'
        traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf()
                  and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear 
                              and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ) ){//产品为MQB
          product           := pisp.Product_MP();
          allrow            := table.GetRow( allunit, product );
          ccrow             := table.GetRow( ccunit, product );
          products.Add( product );
          traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical()
                    and pispip.Period_MP().StartDate() < startofnextyear
                    and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){
            dayperiodtime   := pispip.Start().Date();
            dayperiodname   := dayperiodtime.Format( "M2/D2/Y" );
            periodtime      := pispip.Start().StartOfMonth().Date();
            periodname      := periodtime.Format( "M2/D2/Y" );
            daycolumn       := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
            column          := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
            quantity        := ifexpr( isdl, [Number]pispip.NewSupplyQuantity(), [Number]pispip.DependentDemandAndSalesDemandQuantity() );//四舍五入
            ccrow.Initialize( column, quantity );//取Total Demand字段按月汇总需求数量
            ccrow.Initialize( daycolumn, quantity );
            allrow.Initialize( column, quantity );
          if( isdl or pisp.Product_MP().MQBMLB() = 'MQB' ){
            factoryrow      := table.GetRow( ifexpr( isdl, dlunit, ccunit ), product );
            products.Add( product );
            traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical()
                      and pispip.Period_MP().StartDate() < startofnextyear
                      and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){
              dayperiodtime := pispip.Start().Date();
              dayperiodname := dayperiodtime.Format( "M2/D2/Y" );
              periodtime    := pispip.Start().StartOfMonth().Date();
              periodname    := periodtime.Format( "M2/D2/Y" );
              daycolumn     := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
              column        := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
              quantity      := ifexpr( isdl, [Number]pispip.NewSupplyQuantity(), [Number]pispip.DependentDemandAndSalesDemandQuantity() );//四舍五入
              factoryrow.Initialize( column, quantity );//取Total Demand字段按月汇总需求数量
              factoryrow.Initialize( daycolumn, quantity );
              allrow.Initialize( column, quantity );
            }
          }
        }
    //  }
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,142 @@
Quintiq file version 2.0
#parent: #root
StaticMethod InitializeNew (
  MacroPlan owner
)
{
  Description: '初始化'
  TextBody:
  [*
    // ç”„兰鸽 Jun-24-2024 (created)
    owner.FinancialSalesSource( relflush );
    products                  := construct( Product_MPs );
    allunit                   := FinancialSalesReport::GetDefaultAllUnit();
    ccunit                    := FinancialSalesReport::GetDefaultCCUnit();
    dlunit                    := FinancialSalesReport::GetDefaultDLUnit();
    ccsalessegment            := FinancialSalesReport::GetSalesSegmentCC();
    //tjsalessegment            := FinancialSalesReport::GetSalesSegmentTJ();
    //fssalessegment            := FinancialSalesReport::GetSalesSegmentFS();
    //ccspline                  := FinancialSalesReport::GetStockingPointCCLine();
    //dlspline                  := FinancialSalesReport::GetStockingPointDLLine();
    //ccrent                    := FinancialSalesReport::GetStockingPointCCRent();
    source                    := owner.FinancialSalesSource( relnew, IsImport := false, Name := FinancialSalesReport::GetDefaultName() );
    table                     := source.FinancialSalesReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
    showtable                 := source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
    startofplanning           := owner.StartOfPlanning().Date();
    //startofyear               := startofplanning.StartOfYear();
    startofnextyear           := startofplanning.StartOfNextYear();
    search                    := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
    table.GenerateColumn( owner );
    //首先在forecast界面查找sales segment为长春的所有需求,识别出MLB的所有产品,每个产品按月汇总需求数量
    traverse( owner, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < startofnextyear and forecast.Quantity() <> 0
              and exists( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ) ){
      salessegment            := forecast.SalesSegment_MP();
      parentsalessegments     := salessegment.GetAllParent();
      stockingpoint           := forecast.StockingPointID();
      product                 := forecast.Product_MP();
      //是否属于长春
      iscc                    := salessegment.Name().StartsWith( ccsalessegment ) or exists( parentsalessegments, Elements, psalessegment, psalessegment.Name().StartsWith( ccsalessegment ) );
      isccrent                := iscc and stockingpoint.EndsWith( '外租库' ) and ( stockingpoint.StartsWith( 'CC' ) or stockingpoint.StartsWith( '长春' ) );
      //Forecast的Sales Segment为长春,识别出MLB的所有产品汇总
      //大连财务销量:首先在forecast界面查找Sales Segment是天津和佛山的所有需求,每个产品按月汇总需求数量 and forecast.Product_MP().MQBMLB() = 'MLB' )
      if( ( iscc and product.MQBMLB() = 'MLB' ) or ( isccrent and product.MQBMLB() = 'MQB' ) ){
        //获取合计行
        allrow               := table.GetRow( allunit, product );
        //获取工厂行
        factoryrow           := table.GetRow( ccunit, product );
        products.Add( product );
        traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ){
          dayperiodtime      := psdip.StartDate();
          dayperiodname      := dayperiodtime.Format( "M2/D2/Y" );
          periodtime         := psdip.StartDate().StartOfMonth();
          periodname         := periodtime.Format( "M2/D2/Y" );
    //      info( '-------------------------', periodname, periodtime );
          daycolumn          := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
          column             := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
    //      info( '-------------------------', column.Name() );
          quantity   := [Number]psdip.Quantity();//四舍五入
          factoryrow.Initialize( column, quantity );
          factoryrow.Initialize( daycolumn, quantity );
          allrow.Initialize( column, quantity );
        }
      }
    }
    //从Product planning查找库存点为大连发动机的长春外租库,取New supply字段按月汇总需求数量
    traverse( owner, StockingPoint_MP, stockingpoint, stockingpoint.ID() = '大连发动机的长春外租库' ){
        traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf()
                  and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear
                              and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ) ){//产品为MQB
          product           := pisp.Product_MP();
          allrow            := table.GetRow( allunit, product );
          factoryrow        := table.GetRow( dlunit, product );
          products.Add( product );
          traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical()
                    and pispip.Period_MP().StartDate() < startofnextyear
                    and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){
            dayperiodtime   := pispip.Start().Date();
            dayperiodname   := dayperiodtime.Format( "M2/D2/Y" );
            periodtime      := pispip.Start().StartOfMonth().Date();
            periodname      := periodtime.Format( "M2/D2/Y" );
            daycolumn       := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
            column          := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
            quantity        := [Number]pispip.NewSupplyQuantity();//四舍五入
            factoryrow.Initialize( column, quantity );//取Total Demand字段按月汇总需求数量
            factoryrow.Initialize( daycolumn, quantity );
            allrow.Initialize( column, quantity );
          }
        }
    //  }
    }
    //startofnextyearlead       := startofplanning.StartOfNextYear() + FinancialSalesReport::GetDefaultTripLeadingTime();
    //大连财务销量:长春的需求需要在trip plan里面找到起始库存点为大连装配线边库,目的地为长春外租库的产品,由于需要考虑产品运输lead time,每个月的汇总数据需要推迟两天进行计算
    //traverse( owner, Unit.Lane.LaneLeg, laneleg ){
    //  //起始库存点是否是大连装配线边库
    //  originsp              := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.OriginStockingPointID() );
    //  isdlspline            := table.IsInUnit( originsp, dlspline );
    //  //目的地是否是长春外租库
    //  destisp               := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() );
    //  isccrent              := table.IsInUnit( destisp, ccrent );
    //  if( isdlspline and isccrent ){
    //    traverse( laneleg, Trip, trip, trip.Arrival() < startofnextyearlead and exists( trip, ProductInTrip, pit, pit.Quantity() <> 0 ) ){
    ////      periodtime        := ( trip.Arrival() - FinancialSalesReport::GetDefaultTripLeadingTime() ).StartOfMonth().Date();
    //      dayperiodtime     := trip.Departure().Date();
    //      dayperiodname     := dayperiodtime.Format( "M2/D2/Y" );
    //      periodtime        := trip.Departure().StartOfMonth().Date();
    //      periodname        := periodtime.Format( "M2/D2/Y" );
    //
    //      daycolumn         := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
    //      column            := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
    //      if( not isnull( column ) ){
    //        traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 ){
    //          product       := pit.Product_MP();
    //          products.Add( product );
    //          quantity      := [Number]pit.Quantity();//四舍五入
    //          dlrow         := table.GetRow( dlunit, pit.Product_MP() );
    //          dlrow.Initialize( column, quantity );//汇总数量
    //          dlrow.Initialize( daycolumn, quantity );
    //
    //          allrow        := table.GetRow( allunit, pit.Product_MP() );
    //          allrow.Initialize( column, quantity );
    //        }
    //      }
    //    }
    //  }
    //}
    rows := selectsortedset( table, FinancialSalesRow, row, row.Name() );
    i    := 0;
    traverse( rows, Elements, e ){
      e.RowNr( i );
      i := i + 1;
    }
    showtable.Generate( search, products );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelExport#670.def
@@ -12,7 +12,8 @@
      Properties:
      [
        Image: 'EXPORT1'
        Taborder: 1
        Label: '导出'
        Taborder: 2
      ]
    }
    Component ButtonSearch
@@ -32,7 +33,8 @@
      Properties:
      [
        Image: 'IMPORT1'
        Taborder: 2
        Label: '导入'
        Taborder: 1
      ]
    }
    Component bRefresh
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Component_PanelExport.def
@@ -12,6 +12,7 @@
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 1
      ]
    }
@@ -32,6 +33,7 @@
      Properties:
      [
        Image: 'IMPORT1'
        Label: '导入'
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormEnginePipelineReport/Component_PanelExport#570.def
@@ -11,7 +11,8 @@
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'IMPORT1'
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 1
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelExport.def
@@ -12,6 +12,7 @@
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 1
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Component_PanelFinancialProductionReportOperation.def
@@ -23,6 +23,7 @@
      Properties:
      [
        Image: 'IMPORT1'
        Label: '导入'
        Taborder: 1
      ]
    }
@@ -33,6 +34,7 @@
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelExport#545.def
@@ -12,6 +12,7 @@
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 1
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReportOperation.def
@@ -23,6 +23,7 @@
      Properties:
      [
        Image: 'IMPORT1'
        Label: '导入'
        Taborder: 1
      ]
    }
@@ -33,6 +34,7 @@
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 2
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormFinancialWeeklyReport/Component_PanelHeader.def
@@ -12,6 +12,7 @@
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 0
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormInventorySummaryReport/Component_PanelExport.def
@@ -12,6 +12,7 @@
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 1
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormMachiningPipelineReport/Component_PanelExport.def
@@ -11,7 +11,8 @@
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'IMPORT1'
        Image: 'EXPORT1'
        Label: '导入'
        Taborder: 1
      ]
    }