From d29f75b84fccd06917fb8e2c2ee70e9d76f868cd Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期四, 11 四月 2024 20:15:54 +0800
Subject: [PATCH] 123
---
force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js | 41 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js b/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
index bac488e..2dbedd3 100644
--- a/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
+++ b/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
@@ -4,6 +4,7 @@
export var DataStatus;
export var newQuoteFlagex;
export var MultiYearWarrantyTotalPriceExport;
+export var ExtendedWarrantyAmountTotalPriceExport;
export var newQuoteFlagExp;
export var productStatusUpdatedExp;
export var quoExp;
@@ -207,6 +208,22 @@
},
// chenjingwu 3+2澶氬勾淇濅慨 20240318 start
{
+ label: '寤朵繚閲戦',
+ fieldName: 'exPrice',
+ // editable: true,
+ cellAttributes: {
+ class: {},
+ alignment: 'right',
+ },
+ type: 'number',
+ typeAttributes: {
+ minimumFractionDigits: '2',
+ maximumFractionDigits: '2'
+ },
+ hideDefaultActions: true,
+ initialWidth: 150
+ },
+ {
label: '寤朵繚骞撮檺',
fieldName: 'Learning_Community',
type: 'picklistColumn',
@@ -218,7 +235,7 @@
},
hideDefaultActions: true,
initialWidth: 300
- },
+ }
// chenjingwu 3+2澶氬勾淇濅慨 20240318 end
],
@@ -590,6 +607,7 @@
quo.Dealer_Final_Price_Page__c = quoin.Dealer_Final_Price_Page__c!=undefined&&quoin.Dealer_Final_Price_Page__c!=='' ?localParseFloat(quoin.Dealer_Final_Price_Page__c):null;
quo.OCM_Agent1_Price_Page__c = quoin.OCM_Agent1_Price_Page__c!=undefined &&quoin.OCM_Agent1_Price_Page__c!==''? localParseFloat(quoin.OCM_Agent1_Price_Page__c):null;
quo.MultiYearWarrantyTotalPrice__c = quoin.MultiYearWarrantyTotalPrice__c!=undefined? localParseFloat(quoin.MultiYearWarrantyTotalPrice__c):null;
+ quo.ExtendedWarrantyAmountTotalPrice__c = quoin.ExtendedWarrantyAmountTotalPrice__c!=undefined? localParseFloat(quoin.ExtendedWarrantyAmountTotalPrice__c):null;
quo.Estimation_List_Price__c = quoin.Estimation_List_Price__c!=undefined? localParseFloat(quoin.Estimation_List_Price__c):null;
quo.QuoteTotal_Page__c = quoin.QuoteTotal_Page__c !=undefined?localParseFloat(quoin.QuoteTotal_Page__c):null;
quo.Agency1_Profit__c = quoin.Agency1_Profit__c !=undefined?localParseFloat(quoin.Agency1_Profit__c):null;
@@ -1259,6 +1277,7 @@
contractmultiYearWarranty = quo.multiYearWarranty__c;
}
var MultiYearWarrantyTotalPrice__c = 0.00;
+ var ExtendedWarrantyAmountTotalPrice__c = 0.00;
jzDataToBeproduct.forEach(jzdtbt=>{
var GuranteeType =jzdtbt.pageObject.GuranteeType__c;
// 淇濅慨绫诲瀷
@@ -1292,6 +1311,7 @@
warrantyType = '甯傚満澶氬勾淇濅慨';
var Quantity =jzdtbt.Quantity__c;
MultiYearWarrantyTotalPrice__c = MultiYearWarrantyTotalPrice__c + localParseFloat(ServicePrice) * localParseFloat(Quantity);
+ ExtendedWarrantyAmountTotalPrice__c = ExtendedWarrantyAmountTotalPrice__c + localParseFloat(jzdtbt.exPrice) * localParseFloat(Quantity);
NoDiscountTotal = localParseFloat(ServicePrice) * localParseFloat(Quantity);
}
else if (GuranteeType == '甯傚満' && contractmultiYearWarranty && CanNotCancelledGurantee) {
@@ -1302,6 +1322,7 @@
// 鏁伴噺
var Quantity = jzdtbt.Quantity__c;
MultiYearWarrantyTotalPrice__c = MultiYearWarrantyTotalPrice__c + localParseFloat(ServicePrice) * localParseFloat(Quantity);
+ ExtendedWarrantyAmountTotalPrice__c = ExtendedWarrantyAmountTotalPrice__c + localParseFloat(jzdtbt.exPrice) * localParseFloat(Quantity);
NoDiscountTotal = localParseFloat(ServicePrice) * localParseFloat(Quantity);
}
else if (GuranteeType == '甯傚満') {
@@ -1374,6 +1395,7 @@
});
MultiYearWarrantyTotalPriceExport = MultiYearWarrantyTotalPrice__c;
+ ExtendedWarrantyAmountTotalPriceExport= ExtendedWarrantyAmountTotalPrice__c;
return jzDataToBeproduct;
}
export function initQuoteLineItemcheck(quoteLineItem,productStatusUpdated){
@@ -2186,7 +2208,7 @@
dataMap.set(key,value);
});
jzDataToBeproduct.forEach(jzdtbt=>{
- var x, y, z, c;
+ var x, y, z, c ,e;
if(dataMap.has(jzdtbt.lineNo)){
var datavaue = dataMap.get(jzdtbt.lineNo);
if(datavaue.Quantity__c){
@@ -2196,12 +2218,24 @@
// jzdtbt.UnitPrice_Page__c = toNumComma(datavaue.UnitPrice_Page__c);
jzdtbt.UnitPrice_Page__c = datavaue.UnitPrice_Page__c;
}
+ console.log("saf");
+ console.log(jzdtbt);
if(datavaue.Learning_Community){
jzdtbt.Learning_Community = datavaue.Learning_Community;
+ jzdtbt.multiYearWarrantyList.forEach(item=>{
+ if('' + (item.AgeLimit__c) == jzdtbt.Learning_Community){
+ jzdtbt.exPrice = item.MultiOneYearWarrantyPrice__c;
+ }
+ });
+ if(jzdtbt.exPrice == null || jzdtbt.exPrice == '' || jzdtbt.exPrice == undefined){
+ jzdtbt.exPrice = 0;
+ }
}
+ console.log("saf");
x = localParseInt(jzdtbt.Quantity__c);
y = localParseFloat(jzdtbt.UnitPrice_Page__c);
c = localParseFloat(jzdtbt.Cost_c);
+ e = localParseFloat(jzdtbt.exPrice);
z = x * y;
// jzdtbt.Subtotal__c = toNumComma(z)
jzdtbt.Subtotal__c = z
@@ -2617,7 +2651,8 @@
//DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start
item.IFEndoRapidFlag = jzdtbt.IFEndoRapidFlag;
//DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� end
- if(jzdtbt.PricebookEntry.Product2.ProductCategory__c == 'SP涓绘満'){
+ var qwe = jzdtbt.PricebookEntry ? jzdtbt.PricebookEntry.Product2.ProductCategory__c : jzdtbt.pageObject.PricebookEntry.Product2.ProductCategory__c;
+ if(qwe == 'SP涓绘満'){
item.SPAssistantFlag = true;
flag = true;
}
--
Gitblit v1.9.1