From cdff37596ef14a95a3e557b0d978f50140410308 Mon Sep 17 00:00:00 2001 From: 涂煌豪 <tuhuanghao@prec-tech.com> Date: 星期二, 10 五月 2022 16:17:59 +0800 Subject: [PATCH] 【委托】URF限次修理合同的最高价格修改 --- force-app/main/default/classes/SelectAssetEstimateURFController.cls | 86 ++++++++++++++++++++++++++-- force-app/main/default/pages/SelectAssetEstimateURF.page | 71 ++++++++++++++++++----- 2 files changed, 133 insertions(+), 24 deletions(-) diff --git a/force-app/main/default/classes/SelectAssetEstimateURFController.cls b/force-app/main/default/classes/SelectAssetEstimateURFController.cls index 454105d..4143377 100644 --- a/force-app/main/default/classes/SelectAssetEstimateURFController.cls +++ b/force-app/main/default/classes/SelectAssetEstimateURFController.cls @@ -244,6 +244,9 @@ + 'CurrentContract_F__r.First_Estimate_Date__c,CurrentContract_F__r.Estimate_Contract_endDate__c,' + 'CurrentContract_F__r.Contract_Consumption_rate__c,CurrentContract_F__r.First_contract_usage_Rate__c,CurrentContract_F__r.Contract_Range__c,' + 'Product2.ProductURF__c,Product2.ProductURF__r.URFLimitSerial__c,Product2.ProductURF__r.UFR_MaxRepairCount__c,Product2.ProductURF__r.UFR_Maintenance_Price_Month__c,' + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + + 'Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c, Product2.ProductURF__r.Maintenance_Price_Year_URF__c,' + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end + 'CurrentContract_End_Date__c, Extend_Gurantee_DateTo__c,EquipmentGuaranteeFlg__c,AssetMark__c FROM Asset WHERE Product2.ProductURF__c != null AND Hospital__c = \'' + this.targetHospitalId + '\' '; //HWAG-BDJ43R ---XHL---20190729--- //soql += ' AND AssetMark__c != \'鑰楁潗\' AND Product2.Family != \'ET\' '; @@ -735,6 +738,9 @@ // 闄愭鍚堝悓淇℃伅 add by gzw start , Product2.ProductURF__c, Product2.ProductURF__r.URFLimitSerial__c, Product2.ProductURF__r.UFR_MaxRepairCount__c, Product2.ProductURF__r.UFR_Maintenance_Price_Month__c // 闄愭鍚堝悓淇℃伅 add by gzw end + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + , Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c, Product2.ProductURF__r.Maintenance_Price_Year_URF__c + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end FROM Asset WHERE Hospital__c = :this.targetHospitalId AND ( AssetMark__c != '鑰楁潗' OR Product2.Family != 'ET' ) ORDER BY ID, IF_Warranty__c asc]; //JZHG-BSDUT4 ---20200825---update By rentongxiao---Start // assetRecords = [SELECT Id, Name, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c, Posting_Date__c,Management_Code__c,IF_Warranty__c,Reson_Can_not_Warranty__c, @@ -779,6 +785,9 @@ Asset__r.Product2.ProductURF__r.UFR_MaxRepairCount__c, Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c // 20210315 gzw 杩藉姞闄愭浜у搧淇℃伅 start + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + , Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c, Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF__c + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end from Maintenance_Contract_Asset__c where Maintenance_Contract__c = :this.targetMaintenanceContractId AND Asset__r.Product2.ProductURF__c != null ]; @@ -869,6 +878,10 @@ Product_Manual__r.ProductURF__r.URFLimitSerial__c, Product_Manual__r.ProductURF__r.UFR_MaxRepairCount__c, Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month__c, + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max__c, + Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF__c, + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end //2021-11-30 fy add LJPH-C8W8FV 缃《 start Product_Manual__r.Asset_Model_No__c, //2021-11-30 fy add LJPH-C8W8FV 缃《 end @@ -876,6 +889,10 @@ Asset__r.Product2.ProductURF__r.URFLimitSerial__c, Asset__r.Product2.ProductURF__r.UFR_MaxRepairCount__c, Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c, + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c, + Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF__c, + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end URF_Series__c, Series_RepairCount__c, Series_MaxRepairCount__c, @@ -1152,6 +1169,9 @@ + 'CurrentContract_F__r.First_Estimate_Date__c,CurrentContract_F__r.Estimate_Contract_endDate__c,' + 'CurrentContract_F__r.Contract_Consumption_rate__c,CurrentContract_F__r.First_contract_usage_Rate__c,' + 'Product2.ProductURF__c,Product2.ProductURF__r.URFLimitSerial__c,Product2.ProductURF__r.UFR_MaxRepairCount__c,Product2.ProductURF__r.UFR_Maintenance_Price_Month__c,' + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + + 'Product2.ProductURF__r.Maintenance_Price_Year_URF__c, Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c,' + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end + 'CurrentContract_F__r.Contract_Range__c,AssetMark__c FROM Asset WHERE Product2.ProductURF__c != null AND Hospital__c = \'' + this.targetHospitalId + '\' ' + 'AND Id NOT IN ' + notInId; //HWAG-B4R3SS START 20181026 @@ -1821,6 +1841,9 @@ //2021-11-30 fy add LJPH-C8W8FV 缃《 start Asset_Model_No__c List<Product2> prd = [select Id,Asset_Model_No__c, Maintenance_Price_Month__c, EquipmentGuaranteeFlg__c, Name, ProductURF__c, ProductURF__r.URFLimitSerial__c, ProductURF__r.UFR_MaxRepairCount__c, ProductURF__r.UFR_Maintenance_Price_Month__c + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + , ProductURF__r.Maintenance_Price_Year_URF__c, ProductURF__r.Maintenance_Price_Year_URF_Max__c + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end from Product2 where Id = :ai.mcae.Product_Manual__c]; ai.mcae.EquipmentGuaranteeFlgTxt__c = prd[0].EquipmentGuaranteeFlg__c; ai.etGFlg = prd[0].EquipmentGuaranteeFlg__c; @@ -1857,6 +1880,10 @@ } //2021-11-30 fy add LJPH-C8W8FV 缃《 end // 闄愭淇℃伅 gzw 20210316 end + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + ai.uFRMaxPrice = prd[0].ProductURF__r.Maintenance_Price_Year_URF_Max__c; + ai.uFRMinPrice = prd[0].ProductURF__r.Maintenance_Price_Year_URF__c; + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } } } @@ -1898,6 +1925,10 @@ // add鐐规鏀瑰杽锛氭柊澧炰竴涓偣妫�瀵硅薄澶嶉�夋瀛楁锛岄粯璁や负true 2021.6.8 fxk End // Decimal listPrice = ass.rec.Maintenance_Price_Month__c; Decimal listPrice = ass.rec.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220510 start + Decimal MaxPrice = ass.rec.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c; + Decimal MinPrice = ass.rec.Product2.ProductURF__r.Maintenance_Price_Year_URF__c; + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220510 end if (ass.rec_checkBox_c) { //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO , 'unCheckedAssets ' )); // xudan 20160110 鏂板搧鍒ゆ柇銇撱亾瑕併倝銇亜銆乧ontractStartDateChange銇屻倓銈� @@ -1914,6 +1945,10 @@ Check_Object__c = isCheck, // add鐐规鏀瑰杽锛氭柊澧炰竴涓偣妫�瀵硅薄澶嶉�夋瀛楁锛岄粯璁や负true 2021.6.8 fxk end Estimate_List_Price__c = listPrice, + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + Adjustment_Upper_price__c = MaxPrice, + Adjustment_Lower_price__c = MinPrice, + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end EquipmentGuaranteeFlgTxt__c = ass.rec.EquipmentGuaranteeFlg__c ); ass.mcae = mcae; @@ -2510,8 +2545,22 @@ } // 2021-09-10 tcm 鎺掑簭閫昏緫璋冩暣 end + + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + Integer Contract_year = 0; + System.debug('this.estimate.Contract_Range__c1:' + this.estimate.Contract_Range__c); + if(this.estimate.Contract_Range__c != null){ + if(this.estimate.Contract_Range__c <= 12){ + Contract_year = 1; + } else{ + Decimal year = this.estimate.Contract_Range__c / 12; + Contract_year = (Integer)year.round(System.RoundingMode.CEILING); + } + } + System.debug('Contract_year1:' + Contract_year); // 闄愭姹囨�讳俊鎭� - Map<String, Decimal> uFRSerialMap = getLimitSerialData(); + Map<String, Decimal> uFRSerialMap = getLimitSerialData(Contract_year); + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end // ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO, 'lastMContractRes +++++锛�' + lastMContractRes)); // if (true) { // return false; @@ -2691,7 +2740,9 @@ input.mcae.Series_RepairCount__c = 0; input.mcae.Series_MaxRepairCount__c = uFRSerialMap.get(input.uFRSerial); input.mcae.Asset_RepairCount__c = 0; - input.mcae.Asset_MaxRepairCount__c = input.uFRRepairCount; + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + input.mcae.Asset_MaxRepairCount__c = input.uFRRepairCount * Contract_year; + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end // 闄愭淇℃伅淇濆瓨 @@ -3155,7 +3206,11 @@ public Decimal uFRRepairCount {get; private set;} // 闄愭浠锋牸 add by gzw end - + + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + public Decimal uFRMaxPrice {get; set;} + public Decimal uFRMinPrice {get; set;} + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end public Id getRecId() { Id rtn = null; @@ -3188,7 +3243,10 @@ // add by fxk 2021/9/9 鎺у埗鐐规瀵硅薄鏄惁鍙�� Star this.CheckRows = true; // add by fxk 2021/9/9 鎺у埗鐐规瀵硅薄鏄惁鍙�� End - + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + this.uFRMaxPrice = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max__c; + this.uFRMinPrice = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF__c; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } // 閬告姙銇曘倢銇熺敤锛堥潪Manual锛� public AssetInfo(Integer lineNo, Asset record, Boolean isNew, Decimal listPrice, Maintenance_Contract_Asset_Estimate__c mcae) { @@ -3243,6 +3301,10 @@ this.uFRPrice = record.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; this.uFRSerial = record.Product2.ProductURF__r.URFLimitSerial__c; this.uFRRepairCount = record.Product2.ProductURF__r.UFR_MaxRepairCount__c; + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + this.uFRMaxPrice = record.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c; + this.uFRMinPrice = record.Product2.ProductURF__r.Maintenance_Price_Year_URF__c; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } // 閬告姙銇曘倢銇熺敤銆佹湭绱嶅搧鐢紙Manual锛� public AssetInfo(Integer lineNo, Maintenance_Contract_Asset_Estimate__c mcae) { @@ -3291,6 +3353,10 @@ this.ProductModelNoc = mcae.Product_Manual__r.Asset_Model_No__c; this.AssetModelNoc = mcae.Asset__r.OwnershipMachine_No__c; //2021-11-30 fy add LJPH-C8W8FV 缃《 end + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + this.uFRMaxPrice = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max__c; + this.uFRMinPrice = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF__c; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } // 閬告姙銇曘倢銇亱銇c仧鐢� public AssetInfo(Integer lineNo, Asset record) { @@ -3306,6 +3372,10 @@ this.uFRPrice = record.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; this.uFRSerial = record.Product2.ProductURF__r.URFLimitSerial__c; this.uFRRepairCount = record.Product2.ProductURF__r.UFR_MaxRepairCount__c; + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + this.uFRMaxPrice = record.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c; + this.uFRMinPrice = record.Product2.ProductURF__r.Maintenance_Price_Year_URF__c; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } } @@ -3444,15 +3514,17 @@ // return data; // } // 璁$畻闄愭绯诲垪娆℃暟 - public Map<String, Decimal> getLimitSerialData() { + public Map<String, Decimal> getLimitSerialData(Integer Contract_year) { Map<String, Decimal> limitSerial = new Map<String, Decimal>(); for (AssetInfo input : this.checkedAssets) { + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start if (String.isNotBlank(input.uFRSerial) && limitSerial.containsKey(input.uFRSerial)) { - limitSerial.put(input.uFRSerial, limitSerial.get(input.uFRSerial) + input.uFRRepairCount); + limitSerial.put(input.uFRSerial, limitSerial.get(input.uFRSerial) + input.uFRRepairCount * Contract_year); } else { - limitSerial.put(input.uFRSerial, input.uFRRepairCount); + limitSerial.put(input.uFRSerial, input.uFRRepairCount * Contract_year); } + //XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end // if (!input.isManual || input.isManual && !String.isBlank(input.mcae.Product_Manual__c)) { // if (String.isBlank(input.mcae.Check_Result__c)) { // input.mcae.Check_Result__c.addError('鐐规缁撴灉蹇呭~'); diff --git a/force-app/main/default/pages/SelectAssetEstimateURF.page b/force-app/main/default/pages/SelectAssetEstimateURF.page index 100444f..36bf3e1 100644 --- a/force-app/main/default/pages/SelectAssetEstimateURF.page +++ b/force-app/main/default/pages/SelectAssetEstimateURF.page @@ -7,8 +7,8 @@ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> - <apex:includeScript value="/soap/ajax/29.0/connection.js"/> - <apex:includeScript value="/soap/ajax/29.0/apex.js"/> + <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> + <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> <style type="text/css"> table { border-collapse: collapse; } @@ -391,9 +391,14 @@ var upPriceSum = 0; // 鍚堝悓鏈堟暟涔楃畻 var month = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val()); - if (month == undefined || month == "") { - month = 1; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + var Contract_year = 0; + if (month == undefined || month == "" || month <= 12) { + Contract_year = 1; + } else{ + Contract_year = Math.ceil(month / 12); } + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end var month2 = 0; if (month > 12) { month2 = month - 12; @@ -427,14 +432,24 @@ //} strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val(); + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + strMoneyMax = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMaxPrice')).val(); + strMoneyMin = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMinPrice')).val(); + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end // alert(strMoney); Price_YearTXT = strMoney * 12; if (isnew == 'true') { newCount ++; - strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj}; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + strMoneyMin = Contract_year * strMoneyMin; + strMoneyMax = Contract_year * strMoneyMax; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } else { newCon = false; - strMoney = month * strMoney + month2 * strMoney; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + strMoneyMin = Contract_year * strMoneyMin; + strMoneyMax = Contract_year * strMoneyMax; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } var b = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contract_No')).value(); var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value(); @@ -478,9 +493,11 @@ // upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100); // downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100); // }else{ - upPrice = strMoney; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + upPrice = strMoneyMax; // downPrice = strMoney * 0.8; - downPrice = strMoney; + downPrice = strMoneyMin; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end // } // }else{ // upPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Upper/100); @@ -488,9 +505,11 @@ // } }else{ //firstCCount ++; - upPrice = strMoney; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + upPrice = strMoneyMax; // downPrice = strMoney * 0.8; - downPrice = strMoney; + downPrice = strMoneyMin; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } // 涓婁笅闄愬洓鑸嶄簲鍏� upPrice = upPrice.toFixed(2); @@ -537,11 +556,21 @@ newCon = false; } strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val(); + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + strMoneyMax = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMaxPrice')).val(); + strMoneyMin = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMinPrice')).val(); + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end Price_YearTXT = strMoney * 12; if (isnew == 'true') { - strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj}; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + strMoneyMin = Contract_year * strMoneyMin; + strMoneyMax = Contract_year * strMoneyMax; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } else { - strMoney = month * strMoney + month2 * strMoney; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + strMoneyMin = Contract_year * strMoneyMin; + strMoneyMax = Contract_year * strMoneyMax; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } var b = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contract_No')).value(); var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value(); @@ -584,9 +613,11 @@ // upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100); // downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100); // }else{ - upPrice = strMoney; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + upPrice = strMoneyMax; // downPrice = strMoney * 0.8; - downPrice = strMoney; + downPrice = strMoneyMin; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end // } // }else{ // upPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Upper/100); @@ -599,9 +630,11 @@ newCon = false; firstCCount ++; } - upPrice = strMoney; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start + upPrice = strMoneyMax; // downPrice = strMoney * 0.8; - downPrice = strMoney; + downPrice = strMoneyMin; + // XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end } // 涓婁笅闄愬洓鑸嶄簲鍏� upPrice = upPrice.toFixed(2); @@ -1217,7 +1250,7 @@ <apex:pageMessages id="pageMessages"></apex:pageMessages> <!-- update 鍚堝悓鎶ヤ环椤甸潰鐨勪紭鍖� 娣诲姞鈥榓ssetSection鈥� fxk 2021/9/10 Star--> - <apex:actionFunction name="refreshProductData" action="{!refreshProductData}" rerender="pageMessages,EquipmentGuaranteeFlg,EGFlgassHidden,EquipmentGuaranteeFlgtxt, assetListPriceHidden, productCount3, assetSection" oncomplete="refreshAsset({!productCount});unblockUI();"> + <apex:actionFunction name="refreshProductData" action="{!refreshProductData}" rerender="pageMessages,EquipmentGuaranteeFlg,EGFlgassHidden,EquipmentGuaranteeFlgtxt, assetListPriceHidden, productCount3, assetSection, uFRMaxPrice, uFRMinPrice" oncomplete="refreshAsset({!productCount});unblockUI();"> <apex:param assignTo="{!productIdx}" name="productIdx" value=""/> </apex:actionFunction> <!-- update 鍚堝悓鎶ヤ环椤甸潰鐨勪紭鍖� 娣诲姞鈥榓ssetSection鈥� fxk 2021/9/10 End--> @@ -1501,6 +1534,10 @@ <apex:inputHidden value="{!ar.mcae.Adjustment_Lower_price__c}" id="Adjustment_Lower_priceHidden"/> <apex:outputPanel layout="none" rendered="{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.createable}" > <apex:inputHidden value="{!ar.mcae.Estimate_List_Price__c}" id="assetListPriceHidden"/> + <!-- XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start --> + <apex:inputHidden value="{!ar.uFRMaxPrice}" id="uFRMaxPrice"/> + <apex:inputHidden value="{!ar.uFRMinPrice}" id="uFRMinPrice"/> + <!-- XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end --> <apex:inputHidden value="{!ar.mcae.Estimate_List_Price_Page__c}" id="assetListPricePageHidden" /> <apex:inputHidden value="{!ar.rec.CurrentContract_F__r.Estimate_Num__c}" id="Estimate_NumHidden" /> </apex:outputPanel> -- Gitblit v1.9.1