From 479014e115a970d9fcc738e7973bedb1a7b259a6 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期四, 11 四月 2024 17:23:07 +0800
Subject: [PATCH] 123
---
force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js b/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
index f17d5fc..64230d6 100644
--- a/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
+++ b/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
@@ -1779,7 +1779,7 @@
console.log(reslut);
console.log(this.jzDataToBeproduct);
this.jzDataToBeproduct.forEach(item=>{
- idList.push(item.pageObject.PricebookEntry.Product2Id);
+ idList.push(item.pageObject.Id__c);
});
addOptions({idList: idList}).then(result=>{
this.addOptionsLogic(result);
@@ -1832,9 +1832,11 @@
quoteLineItem = InitializeProductAssignment(quoteLineItem);
this.jzDataToBeproduct = quoteLineItem;
// cjw
+ console.log('xxx');
+ console.log(this.jzDataToBeproduct);
var idList = [];
this.jzDataToBeproduct.forEach(item=>{
- idList.push(item.pageObject.PricebookEntry.Product2Id);
+ idList.push(item.pageObject.Id__c);
});
addOptions({idList: idList}).then(result=>{
this.addOptionsLogic(result);
@@ -1888,7 +1890,7 @@
var idList = [];
// cjw
this.jzDataToBeproduct.forEach(item=>{
- idList.push(item.pageObject.PricebookEntry.Product2Id);
+ idList.push(item.pageObject.Id__c);
});
addOptions({idList: idList}).then(result=>{
this.addOptionsLogic(result);
@@ -1913,9 +1915,32 @@
key.forEach(item=>{
Setmap.set(item,result[item]);
});
+ var optionMap = new Map();
+ var map1 = Setmap.get('optionMap');
+ var key1 = Object.keys(map1)
+ key1.forEach(item=>{
+ optionMap.set(item,map1[item]);
+ });
+ var priceMap = new Map();
+ var map2 = Setmap.get('priceMap');
+ var key2 = Object.keys(map2)
+ key2.forEach(item=>{
+ priceMap.set(item,map2[item]);
+ });
this.jzDataToBeproduct.forEach(item=>{
if(result){
- item.Learning_CommunityOptions = Setmap.get(item.pageObject.PricebookEntry.Product2Id);
+ item.Learning_CommunityOptions = optionMap.get(item.pageObject.Id__c);
+ item.multiYearWarrantyList = priceMap.get(item.pageObject.Id__c);
+ if(item.Learning_Community){
+ item.multiYearWarrantyList.forEach(it=>{
+ if('' + (it.AgeLimit__c) == item.Learning_Community){
+ item.exPrice = it.MultiOneYearWarrantyPrice__c;
+ }
+ });
+ if(item.exPrice == null || item.exPrice == '' || item.exPrice == undefined){
+ item.exPrice = 0;
+ }
+ }
}
});
}
--
Gitblit v1.9.1