From 93652435728de839582440eefd5122c281181d35 Mon Sep 17 00:00:00 2001
From: limj <limj@taizhitech.com>
Date: 星期二, 24 十月 2023 18:46:04 +0800
Subject: [PATCH] 优先级管理添加注释
---
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
index 1d0ed83..d2aa450 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, '' )
@@ -16,6 +16,30 @@
data := DataHolderDialogData.Data();
newscenario := null( Scenario );
strategy := null( Strategy );
+
+ // New version
+ globalotdtable := GlobalOTDTable;
+ globalotdsop := GlobalOTDSOP;
+ testbusinesstype := "闆嗗洟";
+ if( data.IsCreateNewVersion() ){
+ VersionControl::CreateNewSceneVersion( globalotdsop, testbusinesstype );
+ }else{
+ VersionControl::CopyVersion( globalotdsop, testbusinesstype );
+ }
+ versionname := VersionControl::GetVersionInfo( globalotdsop, testbusinesstype ).Element( 3 );
+
+ // Get Version Name
+ if( data.Name() = "" ){
+ data.Name( versionname );
+ }
+
+ // Get Business Type from Scenario Name
+ businesstype := guard( select( globalotdtable,
+ BusinessType,
+ b,
+ b.ScenarioName()=data.ScenarioName() ).BusinessTypeName(),
+ "" );
+ data.BusinessType( businesstype );
// Copy scenario
if( isnull( data.WrappedInstance() ) )
@@ -88,22 +112,16 @@
}
macroPlanNew := MacroPlan;
- ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
+ //ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
// sync data
if( data.EnableSync() ) {
MacroPlan::DoSync( macroPlanNew,
- data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() );
+ data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() ,GlobalOTDTable);
}
-
- // New version
- globalotdtable := GlobalOTDTable;
- testbusinesstype := "闆嗗洟";
- if( data.IsCreateNewVersion() ){
- VersionControl::CreateNewSceneVersion( globalotdtable, testbusinesstype );
- }else{
- VersionControl::CreateNewVersion( globalotdtable, testbusinesstype );
- }
+ macroPlanNew.BusinessType( businesstype );
+ macroPlanNew.IsKeyProduct( data.IsKeyProduct() );
+ macroPlanNew.CreatePurchaseSupplyMaterial( data.CreatePurchaseSupplyMaterial() );
this.Close();
*]
--
Gitblit v1.9.3