From 2713c338a98325cad21ebec2085802a5e49a98ef Mon Sep 17 00:00:00 2001
From: hongji.li <hongji.a.li@capgemini.com>
Date: 星期日, 05 十一月 2023 17:47:41 +0800
Subject: [PATCH] Pegging&年度产销优化
---
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
index b488de3..fe1ca3b 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -6,7 +6,7 @@
[*
// Disabled button to prevent the possibility of multiple firing
- macroPlanOld := MacroPlan;
+ //macroPlanOld := MacroPlan;
btnOK.Enabled( false, '' )
@@ -19,13 +19,14 @@
// New version
globalotdtable := GlobalOTDTable;
+ globalotdsop := GlobalOTDSOP;
testbusinesstype := "闆嗗洟";
if( data.IsCreateNewVersion() ){
- VersionControl::CreateNewSceneVersion( globalotdtable, testbusinesstype );
+ VersionControl::CreateNewSceneVersion( globalotdsop, testbusinesstype );
}else{
- VersionControl::CopyVersion( globalotdtable, testbusinesstype );
+ VersionControl::CopyVersion( globalotdsop, testbusinesstype );
}
- versionname := VersionControl::GetVersionInfo( globalotdtable, testbusinesstype ).Element( 3 );
+ versionname := VersionControl::GetVersionInfo( globalotdsop, testbusinesstype ).Element( 3 );
// Get Version Name
if( data.Name() = "" ){
@@ -33,10 +34,11 @@
}
// Get Business Type from Scenario Name
- businesstype := select( globalotdtable,
- BusinessType,
- b,
- b.ScenarioName()=data.ScenarioName() ).BusinessTypeName();
+ businesstype := guard( select( globalotdtable,
+ BusinessType,
+ b,
+ b.ScenarioName()=data.ScenarioName() ).BusinessTypeName(),
+ "" );
data.BusinessType( businesstype );
// Copy scenario
@@ -110,13 +112,18 @@
}
macroPlanNew := MacroPlan;
- ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
+ //ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
// sync data
if( data.EnableSync() ) {
MacroPlan::DoSync( macroPlanNew,
data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() ,GlobalOTDTable);
}
+ macroPlanNew.BusinessType( businesstype );
+ macroPlanNew.IsKeyProduct( data.IsKeyProduct() );
+ macroPlanNew.CreatePurchaseSupplyMaterial( data.CreatePurchaseSupplyMaterial() );
+
+ MacroPlan.UpdateStartOfPlanning( dsPlanningStart.Date().DateTime() );
this.Close();
*]
--
Gitblit v1.9.3