From 030dc8a61839890da90149c05fe76664e16a8fb6 Mon Sep 17 00:00:00 2001
From: yunchai <yunying.chai@capgemini.com>
Date: 星期一, 25 九月 2023 18:02:37 +0800
Subject: [PATCH] 20230925合并代码前备份

---
 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def |   44 ++++++++++++++++++++++++++++++++++++++------
 1 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def
index b04f7cf..8519bc2 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def
@@ -13,19 +13,31 @@
     [*
       if( not isnull( selection))
       {
+        // 棰勬祴璁㈠崟鍩烘湰淇℃伅
+        CustomCode:="";
+        CustomName:="";
+        SValueJsonString:="";
+        // 鑾峰彇瀹㈡埛鍚嶇О鍜屽鎴稩D
+        if(txtSaveForecastData_FM.Text().Length()>0)
+        {
+           jForecast := JSON::Parse( txtSaveForecastData_FM.Text());
+           CustomCode := jForecast.Get( "CustomCode").GetString();
+           CustomName := jForecast.Get( "CustomName").GetString();
+        }
+        
         if(selection.MaterialType()="鍗婃垚鍝�")
         {
-          OrderCode:="";
+          ForecastID:="";
           if( txtSaveForecastData_FM.Text().Length()>0)
           {
-            JForecast := JSON::Parse( txtSaveForecastData_FM.Text());
-            OrderCode := JForecast.Get( "OrderCode").GetString();
+            JForecast := JSON::Parse(txtSaveForecastData_FM.Text());
+            ForecastID := JForecast.Get( "ForecastID").GetString();
           }
-         jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.NeedQty(), OrderCode,"-",selection.NeedDate());
+         jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.NeedQty(), ForecastID,"-",selection.NeedDate());
           if(jResult.Get( "Status").GetBoolean())
           {
                 de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " +  selection.SKU().AsQUILL()
-                                                + " and object.ForecastID() = " + OrderCode.AsQUILL()
+                                                + " and object.ForecastID() = " + ForecastID.AsQUILL()
                                                 );
           }
           else
@@ -35,7 +47,27 @@
         }
         else
         {
-            // 寮瑰嚭鐗╂枡鍙嶇鎺堟潈
+          SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect");
+          if(not isnull(selection))
+          {
+            SValueJsonString:= JSON::Object().Add( "SKU",selection.SKU())
+                        .Add( "MaterialName",selection.MaterialName())
+                        .Add( "MaterialType",selection.MaterialType())
+                        .Add( "OrgCode",selection.OrgCode())
+                        .Add( "Unit",selection.Unit())
+                        .Add( "CustomCode",CustomCode)
+                        .Add( "ParentSKU",lb_SUK_FM.Text())
+                        .Add( "CustomName",CustomName).Build().AsString();
+          }
+          if(isnull( SelectItem))
+          {
+            MacroPlan.H_MessagePassing(relnew,FKey := "FrmMaterial",ItemKey := "ListSelect", ValueJsonString:=SValueJsonString);
+          }
+          else
+          {
+            SelectItem.ValueJsonString( SValueJsonString);
+          }
+          Application.OpenForm( "FrmAuthorizeAndCountersign_Material","modal");
         }
       }
     *]

--
Gitblit v1.9.3