From 8badb57ea2c82557850ad5b39281c3e8714eb119 Mon Sep 17 00:00:00 2001
From: liuyan <liuyan@prec-tech.com>
Date: 星期四, 24 十一月 2022 10:08:31 +0800
Subject: [PATCH] 科室信息漏传SPO问题
---
force-app/main/default/pages/SelectAssetEstimateURF.page | 71 +++++++++++++++++++++++++++--------
1 files changed, 54 insertions(+), 17 deletions(-)
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