| | |
| | | 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 == '市场' && contractmultiYearWarranty && CanNotCancelledGurantee) { |
| | |
| | | // 数量 |
| | | 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 == '市场') { |
| | |
| | | //no discount price 合计 |
| | | var noDiscountPriceTotal = hidden_MultiYearWarrantyTotalPrice; |
| | | noDiscountPriceTotal = localParseFloat(noDiscountPriceTotal); |
| | | TotalPrice = TotalPrice - noDiscountPriceTotal; |
| | | var exPriceTotal = quo.ExtendedWarrantyAmountTotalPrice__c; |
| | | exPriceTotal = localParseFloat(exPriceTotal); |
| | | TotalPrice = TotalPrice - noDiscountPriceTotal - exPriceTotal; |
| | | jzDataToBeproduct.forEach(jzdtbt=>{ |
| | | s = jzdtbt.Quantity__c; |
| | | s = localParseInt(s); |
| | |
| | | x = localParseFloat(x); |
| | | var y = quo.hidden_Estimation_List; |
| | | y = localParseFloat(y); |
| | | var z = quo.ExtendedWarrantyAmountTotalPrice__c; |
| | | z = localParseFloat(z); |
| | | var noDiscountPriceTotal = hidden_MultiYearWarrantyTotalPrice; |
| | | noDiscountPriceTotal = localParseFloat(noDiscountPriceTotal); |
| | | var thirdPartyEstimation_List_Price = 0; |
| | |
| | | //no discount price 合计 |
| | | var noDiscountPriceTotal = hidden_MultiYearWarrantyTotalPrice; |
| | | noDiscountPriceTotal = localParseFloat(noDiscountPriceTotal); |
| | | var t = (y - noDiscountPriceTotal - thirdPartyEstimation_List_Price) / (Estimation_List_Price - thirdPartyEstimation_List_Price) * 100; |
| | | var exPriceTotal = quo.ExtendedWarrantyAmountTotalPrice__c; |
| | | exPriceTotal = localParseFloat(exPriceTotal); |
| | | var t = (y - noDiscountPriceTotal - exPriceTotal - thirdPartyEstimation_List_Price) / (Estimation_List_Price - thirdPartyEstimation_List_Price) * 100; |
| | | quo.AgencyDiscount__c = toNumComma(t); |
| | | // j$(escapeVfId('Page:mainForm:block:AgencyDiscount')).val(toNumComma(t)); |
| | | } |
| | |
| | | //no discount price 合计 |
| | | var noDiscountPriceTotal = hidden_MultiYearWarrantyTotalPrice; |
| | | noDiscountPriceTotal = localParseFloat(noDiscountPriceTotal); |
| | | var exPriceTotal = quo.ExtendedWarrantyAmountTotalPrice__c; |
| | | exPriceTotal = localParseFloat(exPriceTotal); |
| | | jzDataToBeproduct.forEach(jzdtbt=>{ |
| | | s = jzdtbt.Quantity__c; |
| | | s = localParseInt(s); |
| | |
| | | VenderName = ''; |
| | | } |
| | | if (VenderName == 'OSH' || VenderName == '') { |
| | | yy = localParseFloat(x * (z - noDiscountPriceTotal) / y); |
| | | yy = localParseFloat(x * (z - noDiscountPriceTotal - exPriceTotal) / y); |
| | | jzdtbt.pageObject.Subtotal__c = toNum(yy + s * noDiscountPrice); |
| | | // jzdtbt.Subtotal__c = toNumComma(yy + s * noDiscountPrice); |
| | | jzdtbt.Subtotal__c = yy + s * noDiscountPrice; |
| | |
| | | zz = zz + yy; |
| | | } |
| | | }); |
| | | quo.QuoteTotal_Page__c = toNumComma(zz + noDiscountPriceTotal); |
| | | quo.QuoteTotal_Page__c = toNumComma(zz + noDiscountPriceTotal + exPriceTotal); |
| | | quoExp = quo; |
| | | return jzDataToBeproduct; |
| | | } |
| | |
| | | mp = localParseFloat(mp); |
| | | var num = quo.Quote_Adjust_Calculate__c; |
| | | num = localParseFloat(num); |
| | | var ex = quo.ExtendedWarrantyAmountTotalPrice__c; |
| | | ex.localParseFloat(ex); |
| | | quo.Quote_Adjust_Calculate__c = toNumComma(num); |
| | | num = (100 + num) / 100; |
| | | z=localParseFloat(z); |
| | | var rh = oppInfo.rate_hospital; |
| | | var ra = oppInfo.rate_agency1; |
| | | quo.Dealer_Final_Price_Page__c = toNumComma(z*rh); |
| | | quo.OCM_Agent1_Price_Page__c = Saleslet ? toNumComma(z*num*ra+mp) : ''; |
| | | quo.OCM_Agent1_Price_Page__c = Saleslet ? toNumComma(z*num*ra+mp+ex) : ''; |
| | | } |
| | | // } |
| | | quoExp = quo; |
| | |
| | | export function Agent1comput(quo,Saleslet,oppInfo){ |
| | | var z = quo.Estimation_List_Price__c; |
| | | var mp =quo.MultiYearWarrantyTotalPrice__c; |
| | | var ex = quo.ExtendedWarrantyAmountTotalPrice__c; |
| | | mp = localParseFloat(mp); |
| | | ex = localParseFloat(ex); |
| | | var num = quo.Quote_Adjust_Calculate__c; |
| | | num = localParseFloat(num); |
| | | quo.Quote_Adjust_Calculate__c = toNumComma(num); |
| | |
| | | var rh = oppInfo.rate_hospital; |
| | | var ra = oppInfo.rate_agency1; |
| | | quo.Dealer_Final_Price_Page__c = toNumComma(z*rh); |
| | | quo.OCM_Agent1_Price_Page__c = Saleslet ? toNumComma(z*num*ra+mp):''; |
| | | quo.OCM_Agent1_Price_Page__c = Saleslet ? toNumComma(z*num*ra+mp+ex):''; |
| | | return quo; |
| | | } |