From 5c79ed09628411b95f443ece77e63277e9752172 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 19 四月 2024 18:34:29 +0800
Subject: [PATCH] 123
---
force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js b/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
index c7777c5..8cdad3f 100644
--- a/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
+++ b/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
@@ -1303,7 +1303,7 @@
if(jzdtbt.exPrice != 0 && jzdtbt.exPrice != null && jzdtbt.exPrice != undefined ){
jzdtbt.exPriceCopy = jzdtbt.exPrice;
}
- if(jzdtbt.Learning_Community != null && jzdtbt.Learning_Community != undefined && jzdtbt.Learning_Community != ''){
+ if(jzdtbt.Learning_Community != null && jzdtbt.Learning_Community != undefined && jzdtbt.Learning_Community != '0' && jzdtbt.Learning_Community != ''){
jzdtbt.Learning_CommunityCopy = jzdtbt.Learning_Community;
}
jzdtbt.exPrice = 0;
@@ -1327,14 +1327,14 @@
else if (GuranteeType == '甯傚満' && contractmultiYearWarranty && CanNotCancelledGurantee) {
multiYearWarranty = true;
jzdtbt.pageObject.ServicePrice__c = ServicePrice;
- jzdtbt.exPrice = jzdtbt.exPriceCopy;
- jzdtbt.Learning_Community = jzdtbt.Learning_CommunityCopy;
+ // jzdtbt.exPrice = jzdtbt.exPriceCopy;
+ // jzdtbt.Learning_Community = jzdtbt.Learning_CommunityCopy;
jzdtbt.warrantyType__c = '甯傚満澶氬勾淇濅慨';
warrantyType = '甯傚満澶氬勾淇濅慨';
// 鏁伴噺
var Quantity = jzdtbt.Quantity__c;
MultiYearWarrantyTotalPrice__c = MultiYearWarrantyTotalPrice__c + localParseFloat(ServicePrice) * localParseFloat(Quantity);
- ExtendedWarrantyAmountTotalPrice__c = ExtendedWarrantyAmountTotalPrice__c + localParseFloat(jzdtbt.exPrice) * localParseFloat(Quantity);
+ // ExtendedWarrantyAmountTotalPrice__c = ExtendedWarrantyAmountTotalPrice__c + localParseFloat(jzdtbt.exPrice) * localParseFloat(Quantity);
NoDiscountTotal = localParseFloat(ServicePrice) * localParseFloat(Quantity);
}
else if (GuranteeType == '甯傚満') {
@@ -1362,12 +1362,18 @@
var GuranteePrice = 0;
// 璁℃彁骞撮檺
var provistonPeriod = 0;
+ var exGuranteePrice = 0;
+ jzdtbt.multiYearWarrantyList.forEach(mu=>{
+ if(jzdtbt.Learning_Community == mu.AgeLimit__c + ''){
+ exGuranteePrice = mu.AmountWithheld__c;
+ }
+ });
// 鏍规嵁浜у搧淇℃伅璁剧疆淇濅慨骞撮檺 鍜岃鎻愰噾棰�
if (GuranteeType == '鏈嶅姟') {
jzdtbt.pageObject.GuaranteePeriod__c = ProductEntend_gurantee_period | 0;
jzdtbt.GuaranteePeriod__c = ProductEntend_gurantee_period | 0;
GuranteePrice = ProductGuranteePrice__c;
- jzdtbt.GuranteePrice = GuranteePrice;
+ jzdtbt.GuranteePrice = GuranteePrice + exGuranteePrice;
provistonPeriod = ProductEntend_gurantee_period;
} else if (GuranteeType == '甯傚満') {
if (contractmultiYearWarranty == false) {
@@ -1380,7 +1386,7 @@
}
provistonPeriod = ProductEntend_gurantee_period;
GuranteePrice = ProductGuranteePrice__c;
- jzdtbt.GuranteePrice = GuranteePrice;
+ jzdtbt.GuranteePrice = GuranteePrice + exGuranteePrice;
}else if (contractmultiYearWarranty && CanNotCancelledGurantee) {
if (localParseFloat(ProductEntend_gurantee_period) >= localParseFloat(AllGurantee_Period)) {
jzdtbt.pageObject.GuaranteePeriod__c = ProductEntend_gurantee_period | 0;
@@ -1391,17 +1397,17 @@
}
provistonPeriod = ProductEntend_gurantee_period;
GuranteePrice = ProductGuranteePrice__c;
- jzdtbt.GuranteePrice = GuranteePrice;
+ jzdtbt.GuranteePrice = GuranteePrice + exGuranteePrice;
}
else {
jzdtbt.pageObject.GuaranteePeriod__c = 1;
jzdtbt.GuaranteePeriod__c = 1;
- jzdtbt.GuranteePrice = GuranteePrice;
+ jzdtbt.GuranteePrice = GuranteePrice + exGuranteePrice;
}
} else {
jzdtbt.pageObject.GuaranteePeriod__c = AllGurantee_Period;
jzdtbt.GuaranteePeriod__c = AllGurantee_Period;
- jzdtbt.GuranteePrice = GuranteePrice;
+ jzdtbt.GuranteePrice = GuranteePrice + exGuranteePrice;
}
jzdtbt.pageObject.provistonPeriod__c = provistonPeriod | 0;
--
Gitblit v1.9.1