| | |
| | | jzdtbt.pageObject.ServicePrice__c = 0; |
| | | jzdtbt.warrantyType__c = ''; |
| | | var NoDiscountTotal = 0; |
| | | 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 != '0' && jzdtbt.Learning_Community != ''){ |
| | | jzdtbt.Learning_CommunityCopy = jzdtbt.Learning_Community; |
| | | } |
| | | jzdtbt.exPrice = 0; |
| | | jzdtbt.Learning_Community = '0'; |
| | | if (GuranteeType == '服务') { |
| | | multiYearWarranty = true; |
| | | jzdtbt.warrantyType__c = '服务多年保修'; |
| | |
| | | } else if (GuranteeType == '市场' && contractmultiYearWarranty == false) { |
| | | multiYearWarranty = true; |
| | | jzdtbt.pageObject.ServicePrice__c = ServicePrice; |
| | | 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 == '市场' && contractmultiYearWarranty && CanNotCancelledGurantee) { |
| | | multiYearWarranty = true; |
| | | jzdtbt.pageObject.ServicePrice__c = ServicePrice; |
| | | // jzdtbt.exPrice = jzdtbt.exPriceCopy; |
| | | // jzdtbt.Learning_Community = jzdtbt.Learning_CommunityCopy; |
| | | jzdtbt.warrantyType__c = '市场多年保修'; |
| | | warrantyType = '市场多年保修'; |
| | | // 数量 |
| | |
| | | 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) { |
| | |
| | | } |
| | | 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; |
| | |
| | | } |
| | | 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; |
| | | |
| | |
| | | quo.OCM_Agent1_Price_Page__c = ''; |
| | | } |
| | | quo.MultiYearWarrantyTotalPrice__c = toNumComma(quo.MultiYearWarrantyTotalPrice__c); |
| | | quo.ExtendedWarrantyAmountTotalPrice__c = toNumComma(quo.ExtendedWarrantyAmountTotalPrice__c); |
| | | quo.Agency1_Profit__c = toNumComma(quo.Agency1_Profit__c); |
| | | quo.Agency2_Profit__c = toNumComma(quo.Agency2_Profit__c); |
| | | //预测金额修改 fy |