From 9168a7e089c1bae5714902ba7c61109168e6972b Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期三, 10 四月 2024 17:29:29 +0800
Subject: [PATCH] 1
---
force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js b/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
index 654966a..e1b7b9a 100644
--- a/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
+++ b/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
@@ -1774,6 +1774,13 @@
var quoteLineItem=JSON.parse(tempArr[1]);
quoteLineItem=InitializeProductAssignment(quoteLineItem);
this.jzDataToBeproduct=quoteLineItem;
+ // cjw
+ this.jzDataToBeproduct.forEach(item=>{
+ idList.push(item.pageObject.PricebookEntry.Product2Id);
+ });
+ addOptions({idList: idList}).then(result=>{
+ this.addOptionsLogic(result);
+ });
if(quoteLineItem.length!=num){
this.quo.IsQuoteTrial__c=false;
}
@@ -1868,11 +1875,11 @@
var Listvalue = this.jzDataToBeproduct;
this.jzDataToBeproduct = additionaljzProductLogic(selectvlue,Listvalue,this.oppInfo.CurrencyIsoCode,this.quo.IsQuoteTrial__c);
var idList = [];
+ // cjw
this.jzDataToBeproduct.forEach(item=>{
idList.push(item.pageObject.PricebookEntry.Product2Id);
});
addOptions({idList: idList}).then(result=>{
- console.log('result');
this.addOptionsLogic(result);
if(alertExp){
this.Alert(alertExp,'error');
@@ -1885,17 +1892,23 @@
this.cancelProduct();
this.SelectedNewProduct = [];
});
-
+ // cjw
}
}
+ // cjw
addOptionsLogic(result){
+ var Setmap = new Map()
+ var key = Object.keys(result)
+ key.forEach(item=>{
+ Setmap.set(item,result[item]);
+ });
this.jzDataToBeproduct.forEach(item=>{
- console.log(result);
if(result){
- item.Learning_CommunityOptions = result.get(item.pageObject.PricebookEntry.Product2Id);
+ item.Learning_CommunityOptions = Setmap.get(item.pageObject.PricebookEntry.Product2Id);
}
});
}
+ // cjw
//鏂板鎶ヤ环浜у搧妯℃�佹鍙栨秷鎸夐挳
cancelProduct() {
this.showproductfalg = false;
--
Gitblit v1.9.1