From a099abe8d0ff0699296c9bcc53ca00b98d167c73 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期一, 15 四月 2024 10:42:09 +0800
Subject: [PATCH] 123

---
 force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js |   53 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 28 insertions(+), 25 deletions(-)

diff --git a/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js b/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
index e5718dc..15ec828 100644
--- a/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
+++ b/force-app/main/default/lwc/lexNewQuoteEntry/lexNewQuoteEntry.js
@@ -84,7 +84,7 @@
 import selectUpdateFiexedpriceData from '@salesforce/apex/QuoteTrialController.selectUpdateFiexedpriceData';
 import selectUpdateQuoteLineItemData from '@salesforce/apex/QuoteTrialController.selectUpdateQuoteLineItemData';
 import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
-import {yingYanCheck,qwe,lineDown,lineUp,localParseInt,toNum,initDataTableToBeproductConfig,saveEvoluationLogic,oppInfosave,quoLineItemsave,filterNameoptionList,initDataSetProductTablefig,quoteTotalPriceActionLogic,CheckForCost,actState,tStringe,Agent1comput,
+import {ExtendedWarrantyAmountTotalPriceExport,yingYanCheck,qwe,lineDown,lineUp,localParseInt,toNum,initDataTableToBeproductConfig,saveEvoluationLogic,oppInfosave,quoLineItemsave,filterNameoptionList,initDataSetProductTablefig,quoteTotalPriceActionLogic,CheckForCost,actState,tStringe,Agent1comput,
 toNumComma,localParseFloat,NewQcopyLogic,productCompareLogic,bflag,jzProductsearchLogic,additionaljzProductLogic,initDataProductTablefig,checkNMPA,saveQuotel,CheckForListPrice,calGuranteePeriodLogic,EstimationL,checkch,
 additionabuttonLoc,DataStatus,InitializeProductAssignment,PriceStatusUpdateLogic,newQuoteFlagex,calGuranteeAllFieldsLogic,MultiYearWarrantyTotalPriceExport,newQuoteFlagExp,AlertForCFDA,UnitPriceUpdateLogic,nafgExp,flg,errorflgw,
 PrintCustomerNameoptionsvlue,selection_hpExp,options_hpflgExp,initquoassignment,initquoassignmentcopy,salesProfit1Logic,salesCalculation1Logic,salesProfit2Logic,salesCalculation2Logic,SubtotalupdateLogic,alfExp,resultFlag,
@@ -580,7 +580,7 @@
         this.jzDataToBeproduct =[].concat(this.jzDataToBeproduct);
         this.hidden_MultiYearWarrantyTotalPrice = MultiYearWarrantyTotalPriceExport;
         this.quo.MultiYearWarrantyTotalPrice__c = toNumComma(MultiYearWarrantyTotalPriceExport);
-        this.quo.ExtendedWarrantyAmountTotalPrice__c = toNumComma(ExtendedWarrantyAmountTotalPriceExport);
+        // this.quo.ExtendedWarrantyAmountTotalPrice__c = toNumComma(ExtendedWarrantyAmountTotalPriceExport);
     }
     EstimationListPrice() {
         this.jzDataToBeproduct = EstimationL(this.jzDataToBeproduct,this.quo);
@@ -1455,8 +1455,10 @@
         this.quo.Quote_Adjust_Amount_Page__c = toNumComma(y);
         y=localParseFloat(y);
         var noDiscountPriceTotal = this.hidden_MultiYearWarrantyTotalPrice;
+        var exPriceTotal = this.quo.ExtendedWarrantyAmountTotalPrice__c;
         noDiscountPriceTotal=localParseFloat(noDiscountPriceTotal);
-        this.quo.QuoteTotal_Page__c=toNumComma(y + x + noDiscountPriceTotal);
+        exPriceTotal = localParseFloat(exPriceTotal);
+        this.quo.QuoteTotal_Page__c=toNumComma(y + x + noDiscountPriceTotal + exPriceTotal);
         var z=this.quo.Estimation_List_Price__c;
         var id=this.quoId;
         // if(!id){
@@ -1663,6 +1665,7 @@
         var data=event.detail.rows;
         console.log('data==>> ' + JSON.stringify(data));
         this.jzDataToBeproduct=onsaveToBeproductLoc(data,this.jzDataToBeproduct);
+        debugger
         if(fagExp){
             this.quo.IsQuoteTrial__c=false;
             this.quoteAgencyTotalPriceAction();
@@ -1800,17 +1803,17 @@
                 });
                 addOptions({idList: idList}).then(result=>{
                     this.addOptionsLogic(result);
+                    if(quoteLineItem.length!=num){
+                        this.quo.IsQuoteTrial__c=false;
+                    }
+                    this.calPriceAll();
+                    if(errormessage.indexOf('鎴愬姛') >= 0){
+                        this.Alert(errormessage,'success');
+                    }else{
+                        this.Alert(errormessage,'error');
+                    }
+                    this.OnLoading(false);
                 });
-                if(quoteLineItem.length!=num){
-                    this.quo.IsQuoteTrial__c=false;
-                }
-                this.calPriceAll();
-                if(errormessage.indexOf('鎴愬姛') >= 0){
-                    this.Alert(errormessage,'success');
-                }else{
-                    this.Alert(errormessage,'error');
-                }
-                this.OnLoading(false);
             });
             this.cancelsetProduct();
         }
@@ -1858,20 +1861,20 @@
                     });
                     addOptions({idList: idList}).then(result=>{
                         this.addOptionsLogic(result);
+                        if(quoteLineItem.length!=num){
+                            this.quo.IsQuoteTrial__c = false;
+                        }
+                        this.calPriceAll();
+                        if(errormessage.indexOf('鎴愬姛') >= 0){
+                            this.Alert(errormessage,'success');
+                        }else{
+                            this.Alert(errormessage,'error');
+                        }
+                        
+                        this.OnLoading(false);
+                        this.cancelQuoteExcelImport();
                         this.tobeflag=true;
                     });
-                    if(quoteLineItem.length!=num){
-                        this.quo.IsQuoteTrial__c = false;
-                    }
-                    this.calPriceAll();
-                    if(errormessage.indexOf('鎴愬姛') >= 0){
-                        this.Alert(errormessage,'success');
-                    }else{
-                        this.Alert(errormessage,'error');
-                    }
-                    
-                    this.OnLoading(false);
-                    this.cancelQuoteExcelImport();
             });
     }
     @track

--
Gitblit v1.9.1