admin
2024-10-28 9114e6d212617a2b12f19dc37d697b24d9efb1a0
包装计划优化
已修改3个文件
125 ■■■■■ 文件已修改
_Main/BL/Type_PackagingPlanCell/Function_CalcPackagingInventory.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/PackagingPlan.vw 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PackagingPlanCell/Function_CalcPackagingInventory.qbl
@@ -8,10 +8,11 @@
    
    value := ifexpr( this.PackagingPlanRow().Factory() = "长春工厂", this.CC_PackagingInventory(),
                     this.InitialPackagingInventory() + guard( this.Previous().PackagingInventory()                 + 
                                                       guard( this.Package(), 0.0 )                         -
                                                       ifexpr( this.TransferIn() > 0.0, 0, this.Unpacking() ),
                                                       0.0 )
                                              - this.Out()
                                                               this.TransferIn()                                    +
                                                               guard( this.Package(), 0.0 )                         -
                                                               ifexpr( this.TransferIn() > 0.0, 0, this.Unpacking() ),
                                                               0.0 )
                                                      - this.Out()
                    );
    
    this.PackagingInventory( value );
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
@@ -65,14 +65,12 @@
          // 净需求&剩余库存&供应量
          cell.NetDemand( cell.NetDemand() + pispipl.DependentDemandAndSalesDemandQuantity() );
          cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
          cell.NewSupply( cell.NewSupply() + pispipl.NewSupplyQuantity() );
        }
        
        // 长春工厂设置值
        if ( factory = "长春工厂" ) {
          // 剩余库存&供应量
          cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
          cell.NewSupply( cell.NewSupply() + pispipl.NewSupplyQuantity() );
          
          // 净需求【只取线边库】&包装库存&非包装库存
          if ( pisp.StockingPointID().Regex( "外租库" ) ) {
@@ -83,6 +81,11 @@
          }
        }
        
        // 设置New Supply,纯生产值
        traverse ( pispipl, NewSupply, ns, ns.PeriodTask_MP().istype( PeriodTaskOperation ) ) {
          cell.NewSupply( cell.NewSupply() + ns.Quantity() );
        }
        // 设置前一天库存
        if ( pispipl.Start().Date() = macroPlan.StartOfPlanning().Date() ) {
          prePISPIPL  := pispipl.PreviousPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf ); // 前一个pispippl
_Main/UI/MacroPlannerWebApp/Views/PackagingPlan.vw
@@ -27,6 +27,115 @@
          {
            sizeRatio: 1
          }
          FormPackagingPlan_MatrixEditor493
          {
            gridColor: '#c4c4c4'
            totalHeaderWidth: 224
            attributeHeaderWidthRatio: 0.6
            nameHeaderWidthRatio: 0.4
            columnWidth: 100
            horizontalGrid: true
            verticalGrid: true
            backendState
            {
              componentId: 'QMacroPlanner::FormPackagingPlan.MatrixEditor493'
              state
              {
                cells
                {
                  attributes
                  {
                    attribute_NetDemand
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 0
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'NetDemand'
                    }
                    attribute_NewSupply
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 1
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'NewSupply'
                    }
                    attribute_EndingInventory
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 2
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'EndingInventory'
                    }
                    attribute_Out
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 3
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'Out'
                    }
                    attribute_TransferIn
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 4
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'TransferIn'
                    }
                    attribute_UnpackagedInventory
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 5
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'UnpackagedInventory'
                    }
                    attribute_PackagingInventory
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 6
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'PackagingInventory'
                    }
                    attribute_Package
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 7
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'Package'
                    }
                    attribute_Unpacking
                    {
                      type: 'MatrixEditorWebApiCellDataModelInterest'
                      index: 8
                      rowsubtotal: ''
                      columnsubtotal: ''
                      attribute: 'Unpacking'
                    }
                  }
                }
                columns
                {
                  sorting
                  {
                    criteria: "datamember:'StartDate'"
                  }
                }
                rows
                {
                  sorting
                  {
                    criteria: "datamember:'ProductID';datamember:'StockingPointID'"
                  }
                }
              }
            }
          }
        }
      }
      form_FormGeneralSettings