From 5c8e00ead213294a1f53569a0c1a0997a66d17c5 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期三, 10 四月 2024 16:07:10 +0800
Subject: [PATCH] 1

---
 force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js b/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
index ca5380e..7755fb8 100644
--- a/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
+++ b/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
@@ -1867,13 +1867,12 @@
             var selectvlue = this.SelectedNewProduct;
             var Listvalue = this.jzDataToBeproduct;
             this.jzDataToBeproduct = additionaljzProductLogic(selectvlue,Listvalue,this.oppInfo.CurrencyIsoCode,this.quo.IsQuoteTrial__c);
-            var jzDataToBeproductStr = JSON.stringify(this.jzDataToBeproduct);
-            addOptions({str: jzDataToBeproductStr}).then(result=>{
-                console.log('before');
-                console.log(jzDataToBeproductStr); 
-                this.jzDataToBeproduct = JSON.parse(result); 
-                console.log('after123123213');
-                console.log(result); 
+            var idList = [];
+            this.jzDataToBeproduct.forEach(item=>{
+                idList.push(item.pageObject.PricebookEntry.Product2Id);
+            });
+            addOptions({idList: idList}).then(result=>{
+                addOptionsLogic(result);
                 if(alertExp){
                     this.Alert(alertExp,'error');
                 }
@@ -1888,6 +1887,13 @@
             
         }
     }
+    addOptionsLogic(result){
+        this.jzDataToBeproduct.forEach(item=>{
+            if(result.get(item.pageObject.PricebookEntry.Product2Id)){
+                item.Learning_CommunityOptions = result.get(item.pageObject.PricebookEntry.Product2Id);
+            }
+        });
+    }
     //鏂板鎶ヤ环浜у搧妯℃�佹鍙栨秷鎸夐挳
     cancelProduct() {
         this.showproductfalg = false;

--
Gitblit v1.9.1