From c51e03fbf2f6633d8e88aeec9dcb8df13524df8f Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期四, 13 七月 2023 12:00:06 +0800
Subject: [PATCH] backup0713
---
force-app/main/default/pages/SelectAssetEstimateVM.page | 595 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 509 insertions(+), 86 deletions(-)
diff --git a/force-app/main/default/pages/SelectAssetEstimateVM.page b/force-app/main/default/pages/SelectAssetEstimateVM.page
index 82fa4f0..285ea79 100644
--- a/force-app/main/default/pages/SelectAssetEstimateVM.page
+++ b/force-app/main/default/pages/SelectAssetEstimateVM.page
@@ -271,9 +271,9 @@
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val('');
}
Price111 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val();
- console.log('涓婇檺閲戦涓�'+Limit_Price_Amount);
- console.log('鍘熸湁涓婇檺閲戦涓�'+Limit_PriceHidden);
- console.log('涓嶆槸涓婇檺鍚堝悓鐨勯噾棰濅负'+Price111);
+ // console.log('涓婇檺閲戦涓�'+Limit_Price_Amount);
+ // console.log('鍘熸湁涓婇檺閲戦涓�'+Limit_PriceHidden);
+ // console.log('涓嶆槸涓婇檺鍚堝悓鐨勯噾棰濅负'+Price111);
//涓婇檺鍚堝悓 20230103 hql end
pageSetDisabled();
var createdDate = new Date('{!estimate.CreatedDate}');
@@ -395,6 +395,7 @@
}
function checkDiscount(val) {
+ var alerts = 0;
if (val == null || val == "") {
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val("");
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:discount_Rate')).text("");
@@ -406,6 +407,27 @@
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val(0.00);
return;
}
+ // 鎶ヤ环閲戦鏀瑰杽 20230314 start
+ // var startime1 = new Date(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:PastContractendday')).value());
+ // var startime2 = new Date(j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).value());
+ // var result = (startime2-startime1)/(3600*24*1000);
+ // Is_Blank_period1 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Is_Blank_period')).value();
+ // Cost_rate_ForecastF = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Cost_rate_ForecastF')).value();
+ // downprice = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceDown')).value();
+ // var renewTenOFF = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:renewTenOFF')).value();
+ // if (Is_Blank_period1 == 'true' && ((parseFloat(Cost_rate_ForecastF)<100)||Cost_rate_ForecastF.length == 0) && result <=1 && downprice > val ) {
+ // alerts = 1;
+ // }
+ // if (alerts == 1 && renewTenOFF == 'false') {
+ // if (confirm("鏈崟鍙互缁х画鐢宠10%鎶樻墸锛岃纭鏄惁鐢宠锛岀敵璇峰悗鍚堝悓寮�濮嬫棩鑷姩閿佸畾涓哄悎鍚岄瀹氬紑濮嬫棩锛屽悗缁棤娉曟洿鏀瑰悎鍚屽紑濮嬫棩")) {
+ // j$(escapeVfId('allPage:allForm:allBlock:contractInfo:renewTenOFF')).val(true);
+ // val = val*0.9;
+ // j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).attr("disabled", true);
+ // } else {
+
+ // }
+ // }
+ // 鎶ヤ环閲戦鏀瑰杽 20230314 end
val = localParseFloat(val);
//val = Math.round(val * 100) / 100;
val = Math.round(val);
@@ -466,9 +488,188 @@
console.log('鏂规硶2鏄惁瀹℃壒閫氳繃=='+ISReducedpriceapproval+'==============');
}
var number1 = 0;
+// function seamlessRenew(cnt){
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230309 start
+// var isSeamlessRenew = 0;
+// var isSeamlessRenew1 = 0;
+// var isSeamlessRenew3 = 0;
+// var isSeamlessRenew4 = 0;
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230309 end
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 start
+// var downPriceSum = 0;
+// var upPriceSum = 0;
+// var downPriceSum1 = 0;
+// var upPriceSum1 = 0;
+// var downPriceSum3 = 0;
+// var upPriceSum3 = 0;
+// var downPriceSum4 = 0;
+// var upPriceSum4 = 0;
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 end
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 start
+// var renewTenOFF = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:renewTenOFF')).value();
+// if (renewTenOFF == 'true') {
+// j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).attr("disabled", true);
+// }
+// document.getElementById("startdateaddsix1").value = addMonths(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:PastContractendday')).value(),6);
+// document.getElementById("startdateaddsix2").value = addMonths(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:PastContractendday')).value(),6);
+// document.getElementById("startdateaddsix3").value = addMonths(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:PastContractendday')).value(),12);
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 end
+// for (var i = 0; i < cnt; i++) {
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 start
+// var downPrice1 = 0;
+// var upPrice1 = 0;
+// var downPrice3 = 0;
+// var upPrice3 = 0;
+// var downPrice4 = 0;
+// var upPrice4 = 0;
+// var Price_YearTXT = 0;
+// var LastMContract_Price = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContract_Price')).val());
+// var isnew = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetNewHidden')).val();
+// // 鍚堝悓鏈堟暟涔楃畻
+// var month = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val());
+// if (month == undefined || month == "") {
+// month = 1;
+// }
+// var month2 = 0;
+// if (month > 12) {
+// month2 = month - 12;
+// month = 12;
+// }
+// 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();
+// if(b != ''){
+// // var lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':End_Date')).value());
+// var lastContRange = 0;
+// if(LastMContractRecord == 'VM_Contract'){
+// // lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
+// lastContRange = 36;
+// }else{
+// lastContRange = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':lastContRange')).value();
+// }
+// }
+// var Punish = calculateNtoMRatio( lastContRange,(month + month2));
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 end
+// if (!isDisabled) {
+// var Adjustment_ratio_Lower = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_ratio_Lower')).val());
+// var Adjustment_ratio_Upper = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_ratio_Upper')).val());
+// strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val();
+// Price_YearTXT = strMoney * 12;
+// if (isnew == 'true') {
+// strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj};
+// } else {
+// strMoney = month * strMoney + month2 * strMoney;
+// }
+// // 鏈嶅姟鍚堝悓鎶ヤ环瑙勫垯鏀瑰杽 20230227 start
+// var LastMContractID = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractID')).value();
+// // var ISStandardPricing = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ISStandardPricing')).value();
+// // 缂哄皯棣栫璁惧閫昏緫
+// if (LastMContractID == '') {
+// console.log('鏂扮璁惧');
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(strMoney));
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val(strMoney);
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(strMoney));
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val(strMoney);
+// }
+// // 鏈嶅姟鍚堝悓鎶ヤ环瑙勫垯鏀瑰杽 20230227 end
+// var startdate11 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:PastContractendday')).value();
+// var startdate1 = j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).value();
+// var startdate = new Date(startdate1);
+// var startdatesix1 = new Date(addMonths(startdate11,6));
+// startdatesix1.setDate(startdatesix1.getDate()-1);
+// var startdatesix2 = new Date(addMonths(startdate11,6));
+// startdatesix2.setDate(startdatesix2.getDate()+1);
+// var startdatesix3 = new Date(addMonths(startdate11,12));
+// startdatesix3.setDate(startdatesix3.getDate()+1);
+// // 绗竴涓棩鏈�
+// var result1 = Blankperiod(startdate,i,LastMContract_Price,Punish,Adjustment_ratio_Upper,Adjustment_ratio_Lower,strMoney,1);
+// var arr=result1.split( '/');
+// downPrice=parseInt(arr[0]);
+// upPrice=parseInt(arr[1]);
+// isSeamlessRenew=isSeamlessRenew+parseInt(arr[2]);
+// // console.log('result1='+result1);
+// // 绗簩涓棩鏈�
+// var result2 = Blankperiod(startdatesix1,i,LastMContract_Price,Punish,Adjustment_ratio_Upper,Adjustment_ratio_Lower,strMoney,2);
+// var arr2=result2.split( '/');
+// downPrice1=parseInt(arr2[0]);
+// upPrice1=parseInt(arr2[1]);
+// isSeamlessRenew1=isSeamlessRenew1+parseInt(arr2[2]);
+// // console.log('result2='+result2);
+// // 绗笁涓棩鏈�
+// var result3 = Blankperiod(startdatesix2,i,LastMContract_Price,Punish,Adjustment_ratio_Upper,Adjustment_ratio_Lower,strMoney,2);
+// var arr3=result3.split( '/');
+// downPrice3=parseInt(arr3[0]);
+// upPrice3=parseInt(arr3[1]);
+// isSeamlessRenew3=isSeamlessRenew3+parseInt(arr3[2]);
+// // console.log('result3='+result3);
+// // 绗洓涓棩鏈�
+// var result4 = Blankperiod(startdatesix3,i,LastMContract_Price,Punish,Adjustment_ratio_Upper,Adjustment_ratio_Lower,strMoney,2);
+// var arr4=result4.split( '/');
+// downPrice4=parseInt(arr4[0]);
+// upPrice4=parseInt(arr4[1]);
+// isSeamlessRenew4=isSeamlessRenew4+parseInt(arr4[2]);
+// // console.log('result4='+result4);
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230308 end
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 start
+// downPriceSum = downPriceSum + localParseFloat(toNum(downPrice));
+// upPriceSum = upPriceSum + localParseFloat(toNum(upPrice));
+// downPriceSum1 = downPriceSum1 + localParseFloat(toNum(downPrice1));
+// upPriceSum1 = upPriceSum1 + localParseFloat(toNum(upPrice1));
+// downPriceSum3 = downPriceSum3 + localParseFloat(toNum(downPrice3));
+// upPriceSum3= upPriceSum3 + localParseFloat(toNum(upPrice3));
+// downPriceSum4 = downPriceSum4 + localParseFloat(toNum(downPrice4));
+// upPriceSum4= upPriceSum4 + localParseFloat(toNum(upPrice4));
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 end
+// }
+// }
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230309 start
+// // console.log('isSeamlessRenew='+isSeamlessRenew);
+// if (isSeamlessRenew==0) {
+// j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Is_Blank_period')).val(true);
+// }else{
+// j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Is_Blank_period')).val(false);
+// }
+// var startime1 = new Date(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:PastContractendday')).value());
+// var startime2 = new Date(j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).value());
+// var result = (startime2-startime1)/(3600*24*1000);
+// Is_Blank_period1 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Is_Blank_period')).value();
+// Cost_rate_ForecastF = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Cost_rate_ForecastF')).value();
+// // 5.褰撻娴嬫垚鏈巼涓虹┖鏃跺疄缁╄繛鍔ㄤ环鏍兼槸鍚︿韩鍙�9鎶樹紭鎯�
+// if (isSeamlessRenew==0 && ((parseFloat(Cost_rate_ForecastF)<100)||Cost_rate_ForecastF.length == 0)) {
+// downPriceSum = downPriceSum*0.9;
+// upPriceSum = upPriceSum*0.9;
+// }
+// if (isSeamlessRenew1==0) {
+// downPriceSum1 = downPriceSum1*0.9;
+// upPriceSum1 = upPriceSum1*0.9;
+// }
+// if (isSeamlessRenew3==0) {
+// downPriceSum3 = downPriceSum3*0.9;
+// upPriceSum3 = upPriceSum3*0.9;
+// }
+// if (isSeamlessRenew4==0) {
+// downPriceSum4 = downPriceSum4*0.9;
+// upPriceSum4 = upPriceSum4*0.9;
+// }
+// if (!isDisabled) {
+// j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceUp')).text(toNumComma(Math.round(upPriceSum)));
+// j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceUpHidden')).val(toNum(Math.round(upPriceSum)));
+// j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceDown')).text(toNumComma(Math.round(downPriceSum)));
+// j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceDownHidden')).val(toNum(Math.round(downPriceSum)));
+// }
+// document.getElementById("GuidePriceDown5").value = toNumComma(Math.round(downPriceSum));
+// document.getElementById("GuidePriceUp5").value = toNumComma(Math.round(upPriceSum));
+// document.getElementById("GuidePriceDown4").value = toNumComma(Math.round(downPriceSum1));
+// document.getElementById("GuidePriceUp4").value = toNumComma(Math.round(upPriceSum1));
+// document.getElementById("GuidePriceDown3").value = toNumComma(Math.round(downPriceSum3));
+// document.getElementById("GuidePriceUp3").value = toNumComma(Math.round(upPriceSum3));
+// document.getElementById("GuidePriceDown2").value = toNumComma(Math.round(downPriceSum4));
+// document.getElementById("GuidePriceUp2").value = toNumComma(Math.round(upPriceSum4));
+// // 鎶ヤ环瑙勫垯鏀瑰杽 20230309 end
+// }
function refreshAsset(cnt) {
console.log('鎵цrefreshAsset');
console.log('decide==='+{!DecideBtnDisabled});
+
// alert(cnt);
// 鎻愪氦鍚庡氨椤甸潰涓嶈绠椾簡
var isDisabled = {!PageDisabled};
@@ -488,6 +689,8 @@
var GuranteeCount = 0;
//澶氬勾淇濈画绛惧悎鍚屾暟閲� thh 20220316 end
+
+
//2022鏁呴殰鍝佸姞璐� 鑾峰彇userInfo绠�妗e悕绉� 鏄惁涓篎SE start
var isFSE = {!isFSE};
// var isFSE = true;
@@ -503,6 +706,10 @@
//20230208 涓婇檺鍚堝悓寮�鍙� hql end
// 棰勫畾寮�濮嬫棩
var startdate = new Date(j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).value());
+ // 鎶ヤ环瑙勫垯鏀瑰杽
+ // document.getElementById("startdateaddsix4").value = j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).value();
+ // 鎶ヤ环瑙勫垯鏀瑰杽
+
// 棰勫畾寮�濮嬫棩-6涓湀
startdate.setMonth(startdate.getMonth() - 6);
// 鐢宠鏃� 褰撳墠鏃ユ湡
@@ -529,6 +736,7 @@
month = 12;
}
for (var i = 0; i < cnt; i++) {
+ // console.log('绗�'+i+'涓澶�');
var strMoney = 0;
var repairMoney = 0;
// 琛岄」鐩� 鏈�楂樸�佹渶浣庝环鏍煎悎璁�
@@ -536,8 +744,7 @@
// 涓嬬嚎浠锋牸
var downPrice = 0;
// 涓婄嚎浠锋牸
- var upPrice = 0;
-
+ var upPrice = 0;
// 12涓湀鍚堝悓閲戦
var Price_YearTXT = 0;
@@ -620,6 +827,12 @@
var nowdate = new Date();
lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
nowdate = nowdate.setMonth(nowdate.getMonth() + 6);
+ if(nowdate < Date.parse(lastendDate)){
+ upPrice = strMoney;
+ downPrice = strMoney * 0.8;
+ }else{
+ upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
+ downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
//甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start
@@ -629,7 +842,7 @@
var ContractMonth = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val());
var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val());
- console.log('***娑堣垂鐜�:'+AssetRate);
+ // console.log('***娑堣垂鐜�:'+AssetRate);
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).text(AssetRate +'%');
@@ -678,40 +891,40 @@
}
//甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
- console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
- console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
+ // console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
+ // console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
if(nowdate < Date.parse(lastendDate)){
//璁惧灏忎簬涓ゅ勾鍗�
// upPrice = strMoney;
// downPrice = strMoney * 0.8;
- console.log('***灏忎簬2骞村崐')
+ // console.log('***灏忎簬2骞村崐')
// 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� start DC 2023/01/19
//甯傚満澶氬勾淇濊澶囧皬浜�2骞村崐
var AssetModelNo = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_Model_No__c')).value();
var Category4 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Category4__c')).value();
- console.log('***璁惧鍨嬪彿'+AssetModelNo);
- console.log('***浜у搧绫诲瀷'+Category4);
+ // console.log('***璁惧鍨嬪彿'+AssetModelNo);
+ // console.log('***浜у搧绫诲瀷'+Category4);
//璁惧璁惧娑堣垂鐜囧皬浜�1.4
if(AssetRate<1.4){
upPrice = VMassetListmonth * ContractMonth /12;
- console.log('娑堣垂鐜囧皬浜�1.4 upPrice = 瀹氫环 *缁忓巻鏈堟暟 /12'+ upPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 upPrice = 瀹氫环 *缁忓巻鏈堟暟 /12'+ upPrice);
if(AssetModelNo.includes('290')&&( Category4 =='BF'|| Category4=='BF鎵囨壂'||Category4=='CF')){
downPrice = upPrice;
- console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏃犳渶浣庝环 downPrice '+ downPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏃犳渶浣庝环 downPrice '+ downPrice);
}else{
downPrice = upPrice * 0.8;
- console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏈�浣庝环 downPrice = upPrice* 0.8锛�'+ downPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏈�浣庝环 downPrice = upPrice* 0.8锛�'+ downPrice);
}
}else{
upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
- console.log('娑堣垂鐜囧ぇ浜�1.4 upPrice'+ upPrice);
- console.log('娑堣垂鐜囧ぇ浜�1.4 downPrice'+ downPrice);
+ // console.log('娑堣垂鐜囧ぇ浜�1.4 upPrice'+ upPrice);
+ // console.log('娑堣垂鐜囧ぇ浜�1.4 downPrice'+ downPrice);
}
// 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� end DC 2023/01/19
}else{
@@ -724,8 +937,8 @@
upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
- console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 upPrice'+ upPrice);
- console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 downPrice'+ downPrice);
+ // console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 upPrice'+ upPrice);
+ // console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 downPrice'+ downPrice);
//甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
@@ -754,24 +967,12 @@
//j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXT')).text(toNumComma(Price_YearTXT));
//j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXTHidden')).val(Price_YearTXT);
if (!isDisabled) {
- // // 鏈嶅姟鍚堝悓鎶ヤ环瑙勫垯鏀瑰杽 20230227 start
- // var LastMContractID = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractID')).value();
- // var ISStandardPricing = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ISStandardPricing')).value();
- // if (LastMContractID == '' && ISStandardPricing == '鏄�') {
- // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(upPrice));
- // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val(upPrice);
- // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice));
- // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val(upPrice);
- // }
- // // 鏈嶅姟鍚堝悓鎶ヤ环瑙勫垯鏀瑰杽 20230227 end
- // else{
// 瀹為檯鑱斿姩浠锋牸 start
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(downPrice));
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val(downPrice);
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice));
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val(upPrice);
// 瀹為檯鑱斿姩浠锋牸 end
- // }
}
//j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPrice')).text(toNumComma(strMoney));
@@ -815,7 +1016,7 @@
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();
- console.log('***缁翠慨鍚堝悓璁板綍绫诲瀷2'+LastMContractRecord);
+ // console.log('***缁翠慨鍚堝悓璁板綍绫诲瀷2'+LastMContractRecord);
if(b != ''){
conCCount ++;
@@ -862,16 +1063,16 @@
var nowdate = new Date();
lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
nowdate = nowdate.setMonth(nowdate.getMonth() + 6);
- console.log('**缁撴潫鏃�',lastendDate);
+ // console.log('**缁撴潫鏃�',lastendDate);
//甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start
var Maxcoefficient =0;
var Mincoefficient =0;
var ContractMonth = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val());
- console.log('***缁忓巻鏈堟暟'+ContractMonth);
+ // console.log('***缁忓巻鏈堟暟'+ContractMonth);
var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val());
- console.log('***娑堣垂鐜�:'+AssetRate);
+ // console.log('***娑堣垂鐜�:'+AssetRate);
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).text(AssetRate +'%');
@@ -920,40 +1121,45 @@
}
//甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
- console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
- console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
+ // console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
+ // console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
if(nowdate < Date.parse(lastendDate)){
- //璁惧灏忎簬涓ゅ勾鍗�
- // upPrice = strMoney;
- // downPrice = strMoney * 0.8;
+ upPrice = strMoney;
+ downPrice = strMoney * 0.8;
+ }else{
+ upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
+ downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
+ // //璁惧灏忎簬涓ゅ勾鍗�
+ // // upPrice = strMoney;
+ // // downPrice = strMoney * 0.8;
// 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� start DC 2023/01/19
//甯傚満澶氬勾淇濊澶囧皬浜�2骞村崐
var AssetModelNo = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_Model_No__c')).value();
var Category4 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Category4__c')).value();
- console.log('***璁惧鍨嬪彿'+AssetModelNo);
- console.log('***浜у搧绫诲瀷'+Category4);
+ // console.log('***璁惧鍨嬪彿'+AssetModelNo);
+ // console.log('***浜у搧绫诲瀷'+Category4);
//璁惧璁惧娑堣垂鐜囧皬浜�1.4
if(AssetRate<1.4){
upPrice = VMassetListmonth *ContractMonth / 12;
- console.log('娑堣垂鐜囧皬浜�1.4 upPrice = VMassetListmonth *month /12'+ upPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 upPrice = VMassetListmonth *month /12'+ upPrice);
if(AssetModelNo.includes('290')&&( Category4 =='BF'|| Category4=='BF鎵囨壂'||Category4=='CF')){
downPrice = upPrice;
- console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏃犳渶浣庝环 downPrice '+ downPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏃犳渶浣庝环 downPrice '+ downPrice);
}else{
downPrice = upPrice * 0.8;
- console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏈�浣庝环 downPrice = upPrice* 0.8锛�'+ downPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏈�浣庝环 downPrice = upPrice* 0.8锛�'+ downPrice);
}
}else{
upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
- console.log('娑堣垂鐜囧ぇ浜�1.4 upPrice'+ upPrice);
- console.log('娑堣垂鐜囧ぇ浜�1.4 downPrice'+ downPrice);
+ // console.log('娑堣垂鐜囧ぇ浜�1.4 upPrice'+ upPrice);
+ // console.log('娑堣垂鐜囧ぇ浜�1.4 downPrice'+ downPrice);
}
// 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� end DC 2023/01/19
@@ -966,8 +1172,8 @@
upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
- console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 upPrice'+ upPrice);
- console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 downPrice'+ downPrice);
+ // console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 upPrice'+ upPrice);
+ // console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 downPrice'+ downPrice);
//甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
}
// gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
@@ -998,18 +1204,7 @@
//j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXT')).text(toNumComma(Price_YearTXT));
//j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXTHidden')).val(Price_YearTXT);
if (!isDisabled) {
- // // 鏈嶅姟鍚堝悓鎶ヤ环瑙勫垯鏀瑰杽 20230227 start
- // var LastMContractID = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractID')).value();
- // var ISStandardPricing = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ISStandardPricing')).value();
- // console.log('ISStandardPricing=='+ISStandardPricing);
- // if (LastMContractID == '' && ISStandardPricing == '鏄�') {
- // console.log('寮�濮嬫墽琛�');
- // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(upPrice));
- // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val(upPrice);
- // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice));
- // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val(upPrice);
- // }
- // // 鏈嶅姟鍚堝悓鎶ヤ环瑙勫垯鏀瑰杽 20230227 end
+
// else{
// 瀹為檯鑱斿姩浠锋牸 start
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(downPrice));
@@ -1021,13 +1216,14 @@
}
//j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPrice')).text(toNumComma(strMoney));
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPricePageHidden')).val(strMoney);
- //<!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� start -->
+
+ //<!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� start -->
Repair_Price_AutoPrice = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_Auto'));
Repair_Price_Auto = Repair_Price_AutoPrice.value();
repairMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).value();
Repair_Price_pass = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_pass')).val();
- console.log((i+1)+'鍙穜epairMoney='+repairMoney);
+ // console.log((i+1)+'鍙穜epairMoney='+repairMoney);
// console.log((i+1)+'鍙稲epair_Price_Auto='+Repair_Price_Auto);
if ((repairMoney+1)==1) {
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val(Repair_Price_Auto);
@@ -1039,7 +1235,7 @@
}
repairMoney1 = localParseFloat(repairMoney);
ISReducedpriceapproval = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val();
- console.log('ISReducedpriceapproval=='+ISReducedpriceapproval);
+ // console.log('ISReducedpriceapproval=='+ISReducedpriceapproval);
var isDisabled = {!PageDisabled};
if (ISReducedpriceapproval =='鏈夊叓鎶樹互涓嬪緟瀹℃壒' || ISReducedpriceapproval =='鏄�'|| isDisabled) {
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).attr("disabled", true);
@@ -1086,6 +1282,7 @@
listSum = listSum + localParseFloat(toNum(strMoney));
downPriceSum = downPriceSum + localParseFloat(toNum(downPrice));
upPriceSum = upPriceSum + localParseFloat(toNum(upPrice));
+
}
@@ -1094,6 +1291,7 @@
//j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetSumPrice')).text(toNumComma(listSum));
//j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetSumPriceHidden')).val(toNum(listSum));
+
if (!isDisabled) {
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceUp')).text(toNumComma(Math.round(upPriceSum)));
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceUpHidden')).val(toNum(Math.round(upPriceSum)));
@@ -1125,14 +1323,18 @@
}else{
result = '缁鍚堝悓';
}
- console.log(result);
+ // console.log(result);
document.getElementById("allPage:allForm:allBlock:contractInfo:Contract_TypeTXT").innerHTML = result;
document.getElementById("allPage:allForm:allBlock:contractInfo:Contract_TypeTXTHidden").value = result;
// 鍙栨秷閰稿寲姘�
//NotUseOxygenatedWaterAmount(1);
examinationPriceCal(cnt);
getLastContractRate();
+ // 鎶ヤ环瑙勫垯鏀瑰杽 20230315 start
+ // seamlessRenew(cnt);
+ // 鎶ヤ环瑙勫垯鏀瑰杽 20230315 end
number1++;
+
}
function changeAsset(cnt) {
console.log('鎵ц浜哻hangeAsset');
@@ -1346,44 +1548,46 @@
}
//甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
- console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
- console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
+ // console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
+ // console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
if(nowdate < Date.parse(lastendDate)){
//璁惧灏忎簬涓ゅ勾鍗�
// upPrice = strMoney;
// downPrice = strMoney * 0.8;
- console.log('***灏忎簬2骞村崐')
+ // console.log('***灏忎簬2骞村崐')
// 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� start DC 2023/01/19
//甯傚満澶氬勾淇濊澶囧皬浜�2骞村崐
var AssetModelNo = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_Model_No__c')).value();
var Category4 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Category4__c')).value();
- console.log('***璁惧鍨嬪彿'+AssetModelNo);
- console.log('***浜у搧绫诲瀷'+Category4);
+ // console.log('***璁惧鍨嬪彿'+AssetModelNo);
+ // console.log('***浜у搧绫诲瀷'+Category4);
//璁惧璁惧娑堣垂鐜囧皬浜�1.4
if(AssetRate<1.4){
upPrice = VMassetListmonth * ContractMonth / 12 ;
- console.log('娑堣垂鐜囧皬浜�1.4 upPrice = VMassetListmonth *ContractMonth / 12'+ upPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 upPrice = VMassetListmonth *ContractMonth / 12'+ upPrice);
if(AssetModelNo.includes('290')&&( Category4 =='BF'|| Category4=='BF鎵囨壂'||Category4=='CF')){
downPrice = upPrice;
- console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏃犳渶浣庝环 downPrice '+ downPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏃犳渶浣庝环 downPrice '+ downPrice);
}else{
downPrice = upPrice * 0.8;
- console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏈�浣庝环 downPrice = upPrice* 0.8锛�'+ downPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏈�浣庝环 downPrice = upPrice* 0.8锛�'+ downPrice);
}
}else{
upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
- console.log('娑堣垂鐜囧ぇ浜�1.4 upPrice'+ upPrice);
- console.log('娑堣垂鐜囧ぇ浜�1.4 downPrice'+ downPrice);
+ // console.log('娑堣垂鐜囧ぇ浜�1.4 upPrice'+ upPrice);
+ // console.log('娑堣垂鐜囧ぇ浜�1.4 downPrice'+ downPrice);
}
// 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� end DC 2023/01/19
}else{
+ upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
+ downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
// upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
// downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
@@ -1564,43 +1768,47 @@
}
//甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
- console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
- console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
+ // console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
+ // console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
if(nowdate < Date.parse(lastendDate)){
+ upPrice = strMoney;
+ downPrice = strMoney * 0.8;
//璁惧灏忎簬涓ゅ勾鍗�
// upPrice = strMoney;
// downPrice = strMoney * 0.8;
- console.log('***灏忎簬2骞村崐')
+ // console.log('***灏忎簬2骞村崐')
// 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� start DC 2023/01/19
//甯傚満澶氬勾淇濊澶囧皬浜�2骞村崐
var AssetModelNo = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_Model_No__c')).value();
var Category4 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Category4__c')).value();
- console.log('***璁惧鍨嬪彿'+AssetModelNo);
- console.log('***浜у搧绫诲瀷'+Category4);
+ // console.log('***璁惧鍨嬪彿'+AssetModelNo);
+ // console.log('***浜у搧绫诲瀷'+Category4);
//璁惧璁惧娑堣垂鐜囧皬浜�1.4
if(AssetRate<1.4){
upPrice = VMassetListmonth * ContractMonth /12;
- console.log('娑堣垂鐜囧皬浜�1.4 upPrice = VMassetListmonth *ContractMonth /12'+ upPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 upPrice = VMassetListmonth *ContractMonth /12'+ upPrice);
if(AssetModelNo.includes('290')&&( Category4 =='BF'|| Category4=='BF鎵囨壂'||Category4=='CF')){
downPrice = upPrice;
- console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏃犳渶浣庝环 downPrice '+ downPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏃犳渶浣庝环 downPrice '+ downPrice);
}else{
downPrice = upPrice * 0.8;
- console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏈�浣庝环 downPrice = upPrice* 0.8锛�'+ downPrice);
+ // console.log('娑堣垂鐜囧皬浜�1.4 浜у搧鏈�浣庝环 downPrice = upPrice* 0.8锛�'+ downPrice);
}
}else{
upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
- console.log('娑堣垂鐜囧ぇ浜�1.4 upPrice'+ upPrice);
- console.log('娑堣垂鐜囧ぇ浜�1.4 downPrice'+ downPrice);
+ // console.log('娑堣垂鐜囧ぇ浜�1.4 upPrice'+ upPrice);
+ // console.log('娑堣垂鐜囧ぇ浜�1.4 downPrice'+ downPrice);
}
// 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� end DC 2023/01/19
}else{
+ upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
+ downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
// upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
// downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
@@ -1785,6 +1993,9 @@
}
console.log('涓婇檺閲戦涓�'+Limit_Price_Amount);
//涓婇檺鍚堝悓 20230214 hql end
+ // 鎶ヤ环瑙勫垯鏀瑰杽 20230315 start
+ // seamlessRenew(cnt);
+ // 鎶ヤ环瑙勫垯鏀瑰杽 20230315 end
}
@@ -2014,8 +2225,136 @@
// return true;
// }
}
+// 鎶ヤ环瑙勫垯鏀瑰杽 20230310 start
+// function addMonths(yearMonthDay ,monthNum){
+// var arr=yearMonthDay.split( '/');
+// var year=parseInt(arr[0]);
+// var month=parseInt(arr[1]);
+// var day=parseInt(arr[2]);
+// month=month+monthNum;
+// if(month>12){//鏈堜唤鍔�
+// var yearNum=parseInt( (month-1)/12);
+// month=month%12==0?12 :month%12;
+// year+=yearNum;
+// }else if(month<=0){//鏈堜唤鍑�
+// month=Math.abs( month);
+// var yearNum=parseInt( (month+12)/12);
+// year-=yearNum;
+// }
+// month=month<10?"0"+month :month;
+// return year+"/"+month+"/"+day;
+// }
+// function Blankperiod(startdate,i,LastMContract_Price,Punish,Adjustment_ratio_Upper,Adjustment_ratio_Lower,strMoney,type){
+// var downPrice = 0;
+// var upPrice = 0;
+// var isSeamlessRenew = 0;
+// Blank_period = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Blank_period')).value();
+// var lastendDate1= j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':End_Date')).value()
+// var lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':End_Date')).value());
+// // console.log("lastendDate1="+lastendDate1);
+// var today = new Date();
+// if (lastendDate1.length !=0) {
+// if (startdate == null) {
+// // console.log(1);
+// Blank_period=(today-lastendDate)/(3600*24*1000);
+// }else{
+// // console.log(2);
+// Blank_period=(startdate-lastendDate)/(3600*24*1000);
+// }
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Blank_period')).val(Blank_period);
+// }
+// if (Number(Blank_period)<15&&Blank_period.length != 0) {
+// // console.log(3);
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Blank_period')).val('鏃犵紳缁');
+// }
+// Blank_period1 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Blank_period')).value();
+// // console.log('Blank_period1='+Blank_period1);
+// // 2.鏃犵┖鐧芥湡璁惧鏄惁绠楁棤缂濈画绛捐澶� 鏄惁鍖呭惈鍦ㄦ棤缂濈画绛剧殑鎶ヤ环鍒ゆ柇涓紙棣栫鐨勮澶囷級?
+// if (Blank_period1 != '鏃犵紳缁' && Blank_period.length != 0) {
+// isSeamlessRenew++;
+// }
+// // 1.瀹炵哗杩炲姩浠锋牸鍜岃澶囧弬淇濆畾浠� 閫昏緫鏌ョ湅
+// upPrice1 = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Upper/100);
+// downPrice1 = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Lower/100);
+// // 瀹氫环8鎶�
+// downPrice2 = strMoney * 0.8;
+// upPrice1 = upPrice1.toFixed(2);
+// upPrice2 = strMoney.toFixed(2);
+// downPrice1 = downPrice1.toFixed(2);
+// downPrice2 = downPrice2.toFixed(2);
+// // console.log('LastMContract_Price='+LastMContract_Price);
+// // console.log('upPrice1='+upPrice1);
+// // console.log('downPrice1='+downPrice1);
+// // console.log('upPrice2='+upPrice2);
+// // console.log('downPrice2='+downPrice2);
+// if (!isDisabled) {
+// if (Blank_period1.length==0) {
+// downPrice = downPrice2;
+// upPrice = upPrice2;
+// }
+// if (Blank_period1.length!=0 && Number(Blank_period1)<180 || Blank_period1 == '鏃犵紳缁' ) {
+// if (type == 1) {
+// console.log('缁璁惧灏忎簬6涓湀');
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(downPrice1));
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice1));
+// }
+// downPrice = downPrice1;
+// upPrice = upPrice1;
+// }
+// if (Blank_period1 != '鏃犵紳缁' && Number(Blank_period1)>180 && Number(Blank_period1)<365) {
+// if (downPrice1<downPrice2) {
+// if (type == 1) {
+// console.log('缁璁惧6-12涓湀1');
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(downPrice2));
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice2));
+// }
+
+// downPrice = downPrice2;
+// upPrice = upPrice2;
+// }else{
+// if (type == 1) {
+// console.log('缁璁惧6-12涓湀2');
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(downPrice1));
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice1));
+// }
+// downPrice = downPrice1;
+// upPrice = upPrice1;
+// }
+// }
+// if (Blank_period1 != '鏃犵紳缁' && Number(Blank_period1)>365) {
+
+// if (downPrice1<upPrice2) {
+// if (type == 1) {
+// console.log('缁璁惧12涓湀1');
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(upPrice2));
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice2));
+// }
+// downPrice = upPrice2;
+// upPrice = upPrice2;
+// }else{
+// if (type == 1) {
+// console.log('缁璁惧12涓湀2');
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(downPrice1));
+// j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice1));
+// }
+// downPrice = downPrice1;
+// upPrice = upPrice1;
+// }
+// }
+// }
+// return downPrice+"/"+upPrice+"/"+isSeamlessRenew;
+// }
+// 鎶ヤ环瑙勫垯鏀瑰杽 20230310 end
function changeEstiStartdate(val) {
+ // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 start
+ // var startday = addMonths(val,6);
+ // var startday1 = addMonths(val,12);
+ // document.getElementById("startdateaddsix1").value = startday;
+ // document.getElementById("startdateaddsix2").value = startday;
+ // document.getElementById("startdateaddsix3").value = startday1;
+ // document.getElementById("startdateaddsix4").value = val;
+ // 鎶ヤ环瑙勫垯鏀瑰杽 20230310 end
if ('{!SaveBtnDisabled}' == 'false') {
j$(escapeVfId('allPage:allForm:contractstartdate')).val(val);
changeContractStartdate(val);
@@ -2618,6 +2957,8 @@
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Department_Name__c.label}</th>
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Management_Code__c.label}</th>
+ <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Asset_Consumption_rate__c.label}</th>
+ <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.CurrentContract_End_Date__c.label}</th>
<!-- 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/02/20 start-->
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset__c.fields.IS_VMContract_Asset__c.label}</th>
@@ -2628,7 +2969,10 @@
<!-- <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Asset_Consumption_rate__c.label}</th>
-->
<!-- 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end -->
- <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.CurrentContract_End_Date__c.label}</th>
+ <th style="width:70px" class="headerRow booleanColumn">
+ <!-- 鏈�杩戜竴鏈熺淮淇悎鍚岀粨鏉� -->
+ {!$ObjectType.Asset.fields.CurrentContract_End_Date__c.label}
+ </th>
<!-- 瀹炵哗鑱斿姩浠锋牸璁$畻 start -->
<th style="width:35px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Adjustment_Upper_price__c.label}</th>
<th style="width:35px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Adjustment_Lower_price__c.label}</th>
@@ -2749,9 +3093,14 @@
<apex:outputField value="{!ar.mcae.Asset_Consumption_rate__c}" rendered="{!Not(ar.IsManual)}" id="Contractrate"/>
<apex:inputHidden value="{!ar.rec.CurrentContract_F__r.Contract_Range__c}" id="lastContRange"/>
</td>
+ <!-- 2023/03/21 !ar.rec.CurrentContract_F_asset__r.IS_VMContract_Asset__c 涓簍rue 淇濇湁璁惧缁撴潫鏃堕棿锛歵rue:澶氬勾淇濓細淇濅慨鏈熻嚦锛沠alse.鏈�杩戜竴鏈熺淮淇悎鍚岀粨鏉熸棩 -->
<td class="dataCell" width="70px">
- <apex:outputField value="{!ar.rec.CurrentContract_F__r.Contract_End_Date__c}" rendered="{!(Not(ar.IsManual)&& ar.rec.CurrentContract_F__c != null)}" id="End_Date" />
+ <!-- old: 鐩存帴鎷夸繚鏈夎澶囩殑鏈�杩戜竴鏈熺淮淇悎鍚� -->
+ <!-- <apex:outputField value="{!ar.rec.CurrentContract_F__r.Contract_End_Date__c}" rendered="{!(Not(ar.IsManual)&& ar.rec.CurrentContract_F__c != null)}" id="End_Date" /> -->
+ <!-- new: 鍦ㄨ幏鍙栦繚鏈夎澶囦俊鎭椂鐩存帴鍒ゆ柇淇濇湁璁惧鐨勫瓧娈垫椂闂达紙淇濅慨鏈熻嚦/鏈�杩戜竴鏈熺淮淇悎鍚岀粨鏉熸棩锛� -->
+ <apex:outputField value="{!ar.rec.CurrentContract_End_Date__c}" rendered="{!(Not(ar.IsManual) && ar.rec.CurrentContract_F__c != null )}" id="End_Date" />
</td>
+
<!-- 瀹炵哗鑱斿姩浠锋牸璁$畻 start -->
<td class="dataCell" width="35px">
<apex:outputText value="{!ar.mcae.Adjustment_Upper_price__c}" id="Adjustment_Upper_price"/>
@@ -2788,6 +3137,9 @@
</td>
<!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� start -->
<td class="dataCell" width="35px" style="text-align:right" >
+ <!-- // 鎶ヤ环瑙勫垯鏀瑰杽 20230308 start -->
+ <!-- <apex:inputField value="{!ar.mcae.Blank_period__c}" id="Blank_period" style="display:none"/> -->
+ <!-- // 鎶ヤ环瑙勫垯鏀瑰杽 20230308 start -->
<apex:outputText value="{!ar.Repair_Price_Auto}" id="Repair_Price_Auto" style="width:95%; "/>
<!-- <apex:inputHiddenalue="{!ar.rec.Reson_Can_not_Warranty__c}" id="ResonCannotWarranty"/> -->
<!-- <apex:outputText value="{!ar.Agreed_Date}" id="Agreed_Date" style="width:95%;display: none;"/> -->
@@ -3038,6 +3390,12 @@
<apex:inputField value="{!estimate.Limit_Price_Amount__c}" style="ime-mode: disabled; text-align: right; width:100px" id="Limit_Price_Amount" />
<apex:inputHidden value="{!isLimitPrice}" id="Limit_Price2Hidden" />
<apex:inputHidden value="{!OldLimitPrice}" id="Limit_PriceHidden" />
+ <!-- // 鎶ヤ环瑙勫垯鏀瑰杽 20230309 start -->
+ <!-- <apex:inputHidden value="{!Is_Blank_period}" id="Is_Blank_period" />
+ <apex:inputField value="{!estimate.Maintenance_Contract__r.Past_Contract_end_day__c}" style="display:none" id="PastContractendday" />
+ <apex:inputHidden value="{!estimate.renewTen_OFF__c}" id="renewTenOFF" />
+ <apex:inputHidden value="{!Cost_rate_ForecastF}" id="Cost_rate_ForecastF" /> -->
+ <!-- // 鎶ヤ环瑙勫垯鏀瑰杽 20230309 end -->
</td>
<!-- 涓婇檺鍚堝悓 20230103 hql end -->
</tr>
@@ -3085,6 +3443,71 @@
<td style="text-align: center"></td>
</tr>
</table>
+ <!-- // 鎶ヤ环瑙勫垯鏀瑰杽 20230309 start -->
+ <!-- <table style="width:100%">
+ <tr>
+ <th style="text-align: center" colspan="3">璇风粨鍚堝疄闄呭彲浠ョ绾︾殑鏃ユ湡锛岄�夋嫨鎭板綋鐨勭敵璇烽噾棰濓紝浠ュ厤鍚庣画绌虹櫧鏈熷彉鍖栧鑷存爣鍑嗛噾棰濆彉鍖栵紝鍐嶆鐢宠浠锋牸寤惰鏃堕棿</th>
+ <th style="text-align: center"></th>
+ <th style="text-align: center"></th>
+ </tr>
+ <tr>
+ <th style="text-align: center">鏈璁″垝銆愬悎鍚岄瀹氬紑濮嬫棩銆�:<input type="text" id="startdateaddsix4" readonly="readonly" style="border: none;width:70px"></input> </th>
+ <th style="text-align: center">鏍囧噯浠锋牸鐨勬渶浣庝环鎬婚</th>
+ <th style="text-align: center">鏍囧噯浠锋牸鐨勬渶楂樹环鎬婚</th>
+ </tr>
+ <tr>
+ <td style="text-align: center"></td>
+ <td style="text-align: center">
+ CNY<input type="text" id="GuidePriceDown5" readonly="readonly" style="border: none;width:70px"></input>
+ </td>
+ <td style="text-align: center">
+ CNY<input type="text" id="GuidePriceUp5" readonly="readonly" style="border: none;width:70px"></input>
+ </td>
+ </tr>
+ <tr>
+ <th style="text-align: center">褰撱�愬悎鍚岄瀹氬紑濮嬫棩銆戝湪<input type="text" id="startdateaddsix1" readonly="readonly" style="border: none;width:70px"></input> 涔嬪墠</th>
+ <th style="text-align: center">鏍囧噯浠锋牸鐨勬渶浣庝环鎬婚</th>
+ <th style="text-align: center">鏍囧噯浠锋牸鐨勬渶楂樹环鎬婚</th>
+ </tr>
+ <tr>
+ <td style="text-align: center"></td>
+ <td style="text-align: center">
+ CNY<input type="text" id="GuidePriceDown4" readonly="readonly" style="border: none;width:70px"></input>
+ </td>
+ <td style="text-align: center">
+ CNY<input type="text" id="GuidePriceUp4" readonly="readonly" style="border: none;width:70px"></input>
+ </td>
+ </tr>
+ <tr>
+ <th style="text-align: center">褰撱�愬悎鍚岄瀹氬紑濮嬫棩銆戝湪<input type="text" id="startdateaddsix2" readonly="readonly" style="border: none;width:70px"></input> 涔嬪悗</th>
+ <th style="text-align: center">鏍囧噯浠锋牸鐨勬渶浣庝环鎬婚</th>
+ <th style="text-align: center">鏍囧噯浠锋牸鐨勬渶楂樹环鎬婚</th>
+ </tr>
+ <tr>
+ <td style="text-align: center"></td>
+ <td style="text-align: center">
+ CNY<input type="text" id="GuidePriceDown3" readonly="readonly" style="border: none;width:70px"></input>
+ </td>
+ <td style="text-align: center">
+ CNY<input type="text" id="GuidePriceUp3" readonly="readonly" style="border: none;width:70px"></input>
+ </td>
+ </tr>
+ <tr>
+ <th style="text-align: center">褰撱�愬悎鍚岄瀹氬紑濮嬫棩銆戝湪<input type="text" id="startdateaddsix3" readonly="readonly" style="border: none;width:70px"></input> 涔嬪悗</th>
+ <th style="text-align: center">鏍囧噯浠锋牸鐨勬渶浣庝环鎬婚</th>
+ <th style="text-align: center">鏍囧噯浠锋牸鐨勬渶楂樹环鎬婚</th>
+ </tr>
+ <tr>
+ <td style="text-align: center"></td>
+ <td style="text-align: center">
+ CNY<input type="text" id="GuidePriceDown2" readonly="readonly" style="border: none;width:70px"></input>
+ </td>
+ <td style="text-align: center">
+ CNY<input type="text" id="GuidePriceUp2" readonly="readonly" style="border: none;width:70px"></input>
+ </td>
+ </tr>
+ </table> -->
+ <!-- // 鎶ヤ环瑙勫垯鏀瑰杽 20230309 end -->
</apex:outputPanel>
</apex:pageblocksection>
--
Gitblit v1.9.1