lihongji
2024-11-15 6cdf2fa19118691d7021d48c90c7fed19ff95a3d
BUG修复
已修改9个文件
65 ■■■■■ 文件已修改
_Main/BL/Type_NewOfflinePlanCell/StaticMethod_SynchronizeToNewSupply.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PackagingPlanCell/Method_UpdateValue.qbl 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bConfirm_OnClick.def 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bDeductChangeoverLoss_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bImport_OnClick#568.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bRefresh_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bRestore_OnClick#141.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bSaveAsDraft_OnClick#870.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnCheckEditability.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_NewOfflinePlanCell/StaticMethod_SynchronizeToNewSupply.qbl
@@ -2,12 +2,13 @@
#parent: #root
StaticMethod SynchronizeToNewSupply (
  MacroPlan macroPlan,
  NewOfflinePlanTable nopt
  NewOfflinePlanTable nopt,
  NewOfflinePlanRows selectedRows
)
{
  TextBody:
  [*
    traverse ( nopt, NewOfflinePlanRow.NewOfflinePlanCell, cell,
    traverse ( selectedRows, Elements.NewOfflinePlanCell, cell,
               cell.NewOfflinePlanRow().Type() = "1" and cell.Quantity() > 0.0 
    //           and cell.NewOfflinePlanRow().ProductionLine() = "eMotor Assy (France)" and cell.NewOfflinePlanColumn().StartDate() = Date::Construct( 2020, 4, 4 )
             ) 
_Main/BL/Type_PackagingPlanCell/Method_UpdateValue.qbl
@@ -15,22 +15,36 @@
     this.Unpacking( value );
    }
    
    if ( attrName = "Out" ) { // 调出
      unitID := ifexpr( this.PackagingPlanRow().Factory() = "大连工厂", "DL to CC", "CC to DL" ) + " " + this.PackagingPlanRow().Category() + " Transport";
    if ( this.PackagingPlanRow().Factory() = "长春工厂" and ( attrName = "Package" or attrName = "Unpacking" ) ) {
      u := select( this.PackagingPlanRow().MacroPlan(), Unit, tempU, tempU.ID() = "CC " + this.PackagingPlanRow().Category() + " 线边和外租库间" );
      
      pit     := select( this.PackagingPlanRow().MacroPlan(), Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT,
                         tempPIT.Trip().LaneLeg().Lane().UnitID() = unitID                                 and
                         tempPIT.Trip().Departure().Date()        = this.PackagingPlanColumn().StartDate() and
                         tempPIT.ProductID()                      = this.PackagingPlanRow().ProductID() );
      t := select( u, Lane.LaneLeg.Trip, tempT, tempT.Departure().Date() = this.PackagingPlanColumn().StartDate() and
                   ifexpr( attrName = "Package",
                           tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( "线边库" ) and tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( "外租库" ),
                           tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( "外租库" ) and tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( "线边库" ) )
                  );
      pit := select( t, ProductInTrip, tempPIT, tempPIT.ProductID() = this.PackagingPlanRow().ProductID() );
      pit.Update( value, true );
      this.Out( value );
      cell := select( this.PackagingPlanRow().MacroPlan(), PackagingPlanRow.PackagingPlanCell, tempPPCell,
                      tempPPCell.PackagingPlanRow().Factory()      = ifexpr( this.PackagingPlanRow().Factory() = "大连工厂", "长春工厂", "大连工厂" ) and
                      tempPPCell.PackagingPlanRow().ProductID()    = this.PackagingPlanRow().ProductID()                                              and
                      tempPPCell.PackagingPlanColumn().StartDate() = pit.Trip().Arrival().Date() );
      cell.TransferIn( value );
    }
    //if ( attrName = "Out" ) { // 调出
    //  unitID := ifexpr( this.PackagingPlanRow().Factory() = "大连工厂", "DL to CC", "CC to DL" ) + " " + this.PackagingPlanRow().Category() + " Transport";
    //
    //  pit     := select( this.PackagingPlanRow().MacroPlan(), Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT,
    //                     tempPIT.Trip().LaneLeg().Lane().UnitID() = unitID                                 and
    //                     tempPIT.Trip().Departure().Date()        = this.PackagingPlanColumn().StartDate() and
    //                     tempPIT.ProductID()                      = this.PackagingPlanRow().ProductID() );
    //
    //  pit.Update( value, true );
    //  this.Out( value );
    //
    //  cell := select( this.PackagingPlanRow().MacroPlan(), PackagingPlanRow.PackagingPlanCell, tempPPCell,
    //                  tempPPCell.PackagingPlanRow().Factory()      = ifexpr( this.PackagingPlanRow().Factory() = "大连工厂", "长春工厂", "大连工厂" ) and
    //                  tempPPCell.PackagingPlanRow().ProductID()    = this.PackagingPlanRow().ProductID()                                              and
    //                  tempPPCell.PackagingPlanColumn().StartDate() = pit.Trip().Arrival().Date() );
    //  cell.TransferIn( value );
    //}
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bConfirm_OnClick.def
@@ -7,17 +7,17 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and not isnull( InterfaceDataset ) and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName()
    return not isnull( MacroPlan ) and not isnull( InterfaceDataset )/* and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName()*/;
  *]
  QuillAction
  {
    Body:
    [*
      // 同步到周期任务
      NewOfflinePlanCell::SynchronizeToNewSupply( MacroPlan, dhNewOfflinePlanTable.Data() );
      NewOfflinePlanCell::SynchronizeToNewSupply( MacroPlan, dhNewOfflinePlanTable.Data(), dhSelectedDetailNewOfflinePlanRow.Data() );
      
      // 设置按钮(除下载)不可用
      MacroPlan.A_PreviousScenaioName( MacroPlan.ScenarioName() );
      //MacroPlan.A_PreviousScenaioName( MacroPlan.ScenarioName() );
      
      WebMessageBox::Success( Translations::A_VWED_Success() );
    *]
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bDeductChangeoverLoss_OnClick.def
@@ -7,7 +7,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName();
    return not isnull( MacroPlan )/* and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName()*/;
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bImport_OnClick#568.def
@@ -7,7 +7,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName();
    return not isnull( MacroPlan )/* and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName()*/;
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bRefresh_OnClick.def
@@ -7,7 +7,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName();
    return not isnull( MacroPlan )/* and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName()*/;
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bRestore_OnClick#141.def
@@ -7,7 +7,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName();
    return not isnull( MacroPlan )/* and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName()*/;
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bSaveAsDraft_OnClick#870.def
@@ -7,7 +7,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName();
    return not isnull( MacroPlan )/* and MacroPlan.A_PreviousScenaioName() <> MacroPlan.ScenarioName()*/;
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnCheckEditability.def
@@ -12,7 +12,7 @@
  {
    Body:
    [*
      cond := focusedattribute = "Package" or focusedattribute = "Unpacking" or focusedattribute = "Out";
      cond := focusedattribute = "Package" or focusedattribute = "Unpacking";
      
      editinfo.CanEdit( cond );
      editinfo.UserHint( ifexpr( cond, "", "不能修改" ) );