From d901b1ab0ee0b690f5ac211b9cdb1db3a58bca86 Mon Sep 17 00:00:00 2001
From: yanweiyuan3 <yanweiyuan3@gmail.com>
Date: 星期二, 10 十月 2023 17:45:58 +0800
Subject: [PATCH] Merge branch 'dev' into dev_yy

---
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def |   43 ++++++++-----------------------------------
 1 files changed, 8 insertions(+), 35 deletions(-)

diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def
index 4991801..700b61d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def
@@ -9,43 +9,16 @@
   {
     Body:
     [*
-      // 鍒濆鍖栨煡璇㈠弬鏁版湀浠�
-      ds_Month_FOF.Date(Date::ActualDate());
-      // 棰勬祴鏁版嵁2姝ゅ鐞嗭紙绛涢��+瀹㈡埛鍚嶇О鎻愬彇锛�
-      if( MacroPlan.H_Forecast(relget ).Size()>0)
+      // 鍒濆鍖栭娴嬫暟鎹�
+      JResult := H_FunctionClass::SM_InitialForcastDataEx( MacroPlan,true,"-");
+      if(not JResult.Get( "Status").GetBoolean())
       {
-        MacroPlan.H_Forecast(relget ).Delete( 0,MacroPlan.H_Forecast(relget ).Size()-1);
+        WebMessageBox::Warning( JResult.Get( "Msg").GetString());
       }
-      //AllData:= selectset( MacroPlan, Product_MP.SalesDemand.astype( Forecast ),object,object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth() 
-      //                     and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth()
-      //                     and object.Quantity()>0 );
-      //
-      //CustomName:="";
-      //DepartMent:="";
-      //idx:=0;
-      //traverse( AllData,Elements,Obj,not isnull(Obj))
-      //{
-      //  idx:=Obj.SalesSegmentName().FindString( "_",0);
-      //  if(idx>0)
-      //  {
-      //    DepartMent:=Obj.SalesSegmentName().SubString( 0,idx+1);
-      //    CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1));
-      //  }
-      //  else
-      //  {
-      //    CustomName :=Obj.SalesSegmentName();
-      //  }
-      //  
-      //   ArrayData:=Obj.SalesSegmentName().SubString( 0,Obj.SalesSegmentName().FindString( "_",0)+1);
-      //   MacroPlan.H_Forecast(relnew,OrderCode := H_FunctionClass::SM_GenerateID( "OF"),
-      //                          SKU := Obj.ProductID(),
-      //                          CustomCode := CustomName,
-      //                         CustomName := CustomName,
-      //                         Util:=Obj.UnitOfMeasureName(),
-      //                         NeedTime:=Obj.EndDate(),
-      //                         ForecastQty:=[Number]Obj.Quantity().Round( 0),
-      //                         Department:=DepartMent);
-      //}
+      else
+      {
+        WebMessageBox::Information( JResult.Get( "Msg").GetString());
+      }
     *]
     GroupServerCalls: false
   }

--
Gitblit v1.9.3