From eab10a370cd6e9d46c67ef1b8dbf6c767e1d478b Mon Sep 17 00:00:00 2001
From: limj <limj@taizhitech.com>
Date: 星期一, 09 十月 2023 09:45:42 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lmj
---
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
index e97d405..b488de3 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -17,6 +17,28 @@
newscenario := null( Scenario );
strategy := null( Strategy );
+ // New version
+ globalotdtable := GlobalOTDTable;
+ testbusinesstype := "闆嗗洟";
+ if( data.IsCreateNewVersion() ){
+ VersionControl::CreateNewSceneVersion( globalotdtable, testbusinesstype );
+ }else{
+ VersionControl::CopyVersion( globalotdtable, testbusinesstype );
+ }
+ versionname := VersionControl::GetVersionInfo( globalotdtable, testbusinesstype ).Element( 3 );
+
+ // Get Version Name
+ if( data.Name() = "" ){
+ data.Name( versionname );
+ }
+
+ // Get Business Type from Scenario Name
+ businesstype := select( globalotdtable,
+ BusinessType,
+ b,
+ b.ScenarioName()=data.ScenarioName() ).BusinessTypeName();
+ data.BusinessType( businesstype );
+
// Copy scenario
if( isnull( data.WrappedInstance() ) )
{
@@ -93,7 +115,7 @@
// sync data
if( data.EnableSync() ) {
MacroPlan::DoSync( macroPlanNew,
- data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() );
+ data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() ,GlobalOTDTable);
}
this.Close();
--
Gitblit v1.9.3