From 744f42c5496e656a1f9927740a3b37c0b97a6cba Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 14:34:12 +0800
Subject: [PATCH] lexcommunityupload0714
---
force-app/main/default/pages/SelectAssetEstimateVM.page | 1752 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 1,708 insertions(+), 44 deletions(-)
diff --git a/force-app/main/default/pages/SelectAssetEstimateVM.page b/force-app/main/default/pages/SelectAssetEstimateVM.page
index c8ed24e..285ea79 100644
--- a/force-app/main/default/pages/SelectAssetEstimateVM.page
+++ b/force-app/main/default/pages/SelectAssetEstimateVM.page
@@ -1,4 +1,4 @@
-<apex:page controller="SelectAssetEstimateVMController" tabStyle="Maintenance_Contract_Estimate__c" sidebar="false" showHeader="true" id="allPage" action="{!init}">
+<apex:page controller="SelectAssetEstimateVMController" tabStyle="Maintenance_Contract_Estimate__c" lightningStylesheets="true" sidebar="false" showHeader="true" id="allPage" action="{!init}">
<head>
<!-- <meta http-equiv="x-ua-compatible" content="ie=edge" /> -->
<!-- <meta name="viewport" content="width=device-width, initial-scale=1" /> -->
@@ -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; }
@@ -40,14 +40,42 @@
var Confirm_EstimateRefresh = '宸茶秴杩囧垱寤烘棩3涓湀锛屾槸鍚︽洿鏂版姤浠凤紵';
window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
+var RCbottonChanged = 0;
+// 鏁呴殰鍝�
+
+
+var hasSendEmail = {!hasSendEmail};
+console.log('***hasSendEmail',hasSendEmail)// 鏁呴殰鍝�;
+// if(hasSendEmail == true){
+// j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", true);
+// j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btnDisabled');
+// console.log('宸叉彁浜C 鎸夐挳涓嶅彲瑙�');
+// }
+
function approvalJs() {
approvalDate = new Date();
var rowCnt = j$(escapeVfId('allPage:allForm:allBlock:assetSection:productCnt')).val();
refreshAsset(rowCnt);
}
-
+//鏁呴殰鍝佸姞璐� RC 鐐瑰嚮鍚庝笉鍙
+function rcJs() {
+ hasSendEmail = true;
+ j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btnDisabled');
+ console.log('鐐瑰嚮RC 鎸夐挳涓嶅彲瑙乭asSendEmail' +hasSendEmail);
+}
//add by gwy 2021-01-27 start 鎻愪氦鏃剁殑鎻愮ず妗�
function KindsAndMonths() {
+ // 鏁呴殰鍝佸姞璐� 绯荤粺妫�鏌ヤ慨鐞嗗噺浠峰鎵瑰畬鎴� Start
+ ISReduced = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val();
+ console.log('鐐瑰嚮鎻愪氦寰呭鎵规椂 鏄惁瀹℃壒閫氳繃='+ISReduced);
+ if( ISReduced == '瀹℃壒涓�' || ISReduced == '鏈夊叓鎶樹互涓嬪緟瀹℃壒'){
+ alert('璇烽�氳繃淇悊鍑忎环瀹℃壒鍐嶆彁浜�');
+ // approvalbtntop1.style.display = "none";
+ return false;
+ }
+
+ // 鏁呴殰鍝佸姞璐� 绯荤粺妫�鏌ヤ慨鐞嗗噺浠峰鎵瑰畬鎴� end
var months = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val());
var contrNew = document.getElementById("allPage:allForm:allBlock:contractInfo:Contract_TypeTXT").innerHTML;
if(months>12 && months<60 && contrNew == '鏂板搧鍚堝悓'){
@@ -57,7 +85,17 @@
return false;
}
}
- return true;
+ // 鍏堟鍚庝慨-鎻愪氦鎶ヤ环鏃跺鏋滄槸鍏堟瀵硅薄杩涜鎻愮ず thh 20220408 start
+ var FirstParagraphEnd = j$(escapeVfId('allPage:allForm:allBlock:contract:FirstParagraphEnd'))[0].checked;
+ if(FirstParagraphEnd){
+ if (confirm('鏈绛剧害缁忛攢鍟嗘槸鍏堟瀵硅薄锛岃纭鏄惁鎻愪氦鎶ヤ环锛�')) {
+ return true;
+ }else{
+ return false;
+ }
+ }
+ // 鍏堟鍚庝慨-鎻愪氦鎶ヤ环鏃跺鏋滄槸鍏堟瀵硅薄杩涜鎻愮ず thh 20220408 end
+ return true;
}
//add by gwy 2021-01-27 end 鎻愪氦鏃剁殑鎻愮ず妗�
@@ -79,6 +117,9 @@
j$("#sbArea").fadeOut(500, function(){
j$("#sbArea").remove();
});
+
+ console.log('鍙戦�侀偖浠舵垚鍔�');
+
}
//<!-- HWAG-B4R3SS START 20181026-->
function clearAndSearch() {
@@ -95,8 +136,31 @@
//<!-- HWAG-B4R3SS END 20181026-->
// 鍒濆鍖栬瀹氱敾闈㈤」鐩笉鍙敤
function pageSetDisabled(){
+ // if (RCbottonChanged == 0) {
+ // console.log('test鍒濆鍖�');
+ // 鏁呴殰鍝佸姞璐� 鎻愪氦RC鎸夐挳涓嶅彲瑙� start
+ // j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", true);
+ // j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btnDisabled');
+ // 鏁呴殰鍝佸姞璐� 鎻愪氦RC鎸夐挳涓嶅彲瑙� end
+ // }
+ // 鏁呴殰鍝佸姞璐� start
+ var hasSendEmail ={!hasSendEmail};
+ console.log('page hasSendEmail',hasSendEmail);
+ if(hasSendEmail == true){
+ j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btnDisabled');
+ console.log('宸叉彁浜C 鎸夐挳涓嶅彲瑙� page set');
+ }
+
+ //鏁呴殰鍝佸姞璐� end
var isDisabled = {!PageDisabled};
+ // ResonCannotWarranty = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ResonCannotWarranty')).value();
+ // if(!ResonCannotWarranty.contains("寮冧慨")){
+ // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_Auto')).attr("display", none);
+ // }
+
if (isDisabled) {
+
j$(escapeVfId('allPage:allForm:allBlock:contract:depart')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).attr("disabled", true);
@@ -113,6 +177,7 @@
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetCheck')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':comment')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Third_Party_Return__c')).attr("disabled", true);
}
j$(escapeVfId('allPage:allForm:allBlock:appendCondition:Examination_Count')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:disPercent')).attr("disabled", true);
@@ -181,6 +246,35 @@
// 2021銆�8銆�26 鍚堝悓鎶ヤ环椤甸潰鐨勪紭鍖栵紝鏃犱繚鏈夎澶囩偣妫�瀵硅薄閫夋嫨妗嗗彉榛� fxk star
// disable1();
// 2021銆�8銆�26 鍚堝悓鎶ヤ环椤甸潰鐨勪紭鍖栵紝鏃犱繚鏈夎澶囩偣妫�瀵硅薄閫夋嫨妗嗗彉榛� fxk end
+ console.log('ApprovalBtnDisabled=='+{!ApprovalBtnDisabled});
+ refreshAsset({!productCount});
+ //涓婇檺鍚堝悓 20230103 hql start
+ // console.log('Limit_PriceHidden2=='+Limit_PriceHidden2);
+ var RequestquotationAmount = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val();
+ console.log('鐢宠鎶ヤ环閲戦='+RequestquotationAmount);
+ var AssetRepairSumPrice = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetRepairSumPrice')).text();
+ console.log('鍚堝悓璁惧淇悊鎬婚='+AssetRepairSumPrice);
+ Limit_Price_Amount = (localParseFloat(AssetRepairSumPrice)+localParseFloat(RequestquotationAmount))*1.3;
+ Limit_Price_Amount = Math.round(Limit_Price_Amount);
+ // console.log('Limit_Price_Amount'+Limit_Price_Amount);
+ Limit_Price_AmountOne = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value();
+ Limit_PriceHidden = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_PriceHidden')).value();
+
+ if (Limit_PriceHidden*1==0) {
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(Limit_Price_Amount);
+ }
+ Limit_PriceHidden2 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price2Hidden')).value();
+ if (Limit_PriceHidden2 == 'false') {
+ // lpa = document.getElementById('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount');
+ // lpa.style.display = "none";
+ // console.log('闅愯棌瀹屾瘯');
+ 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);
+ //涓婇檺鍚堝悓 20230103 hql end
pageSetDisabled();
var createdDate = new Date('{!estimate.CreatedDate}');
// 鎶ヤ环涓澶囩殑鏈鸿韩缂栫爜涓虹┖鏃剁殑鏂板搧鍚堝悓鏈夋晥鏈熷欢闀� 20200710 gzw
@@ -212,6 +306,11 @@
//j$(escapeVfId('allPage:allForm:decidebtn')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:savebtn')).attr("class", 'btnDisabled');
j$(escapeVfId('allPage:allForm:approvalbtn')).attr("class", 'btnDisabled');
+
+ //鏁呴殰鍝佸姞璐� RC鎸夐挳
+ j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btnDisabled');
+
//j$(escapeVfId('allPage:allForm:decidebtn')).attr("class", 'btnDisabled');
if (confirm(Confirm_EstimateRefresh)) {
@@ -244,6 +343,10 @@
//j$(escapeVfId('allPage:allForm:decidebtn')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:savebtn')).attr("class", 'btnDisabled');
j$(escapeVfId('allPage:allForm:approvalbtn')).attr("class", 'btnDisabled');
+
+ //鏁呴殰鍝佸姞璐筊C鎸夐挳
+ j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btnDisabled');
//j$(escapeVfId('allPage:allForm:decidebtn')).attr("class", 'btnDisabled');
if (confirm('宸茶秴杩囧垱寤烘棩6涓湀锛屾槸鍚︽洿鏂版姤浠凤紵')) {
@@ -261,6 +364,7 @@
}
if ('{!DecideBtnDisabled}' == 'false') {
+ console.log('oldMainteReal淇敼瀹屾垚');
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:oldMainteReal')).val(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:mainteReal')).text());
}
}
@@ -291,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("");
@@ -302,10 +407,53 @@
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);
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val(toNumComma(val));
+ //涓婇檺鍚堝悓 20230117 HQL start
+ var RequestquotationAmount = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val();
+ console.log('鐢宠鎶ヤ环閲戦='+RequestquotationAmount);
+ var AssetRepairSumPrice = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetRepairSumPrice')).text();
+ console.log('鍚堝悓璁惧淇悊鎬婚='+AssetRepairSumPrice);
+ Limit_Price_Amount = (localParseFloat(AssetRepairSumPrice)+localParseFloat(RequestquotationAmount))*1.3;
+ Limit_Price_Amount = Math.round(Limit_Price_Amount);
+ Limit_Price_AmountOne = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value();
+ Limit_PriceHidden = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_PriceHidden')).value();
+ // if (Limit_PriceHidden*1==0) {
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(Limit_Price_Amount);
+ // }
+ Limit_PriceHidden2 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price2Hidden')).value();
+ if (Limit_PriceHidden2 == 'false') {
+ // lpa = document.getElementById('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount');
+ // lpa.style.display = "none";
+ // console.log('闅愯棌瀹屾瘯');
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val('');
+ }
+ amount = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value();
+ console.log('涓婇檺閲戦濉叆锛�'+amount);
+ //涓婇檺鍚堝悓 20230117 HQL end
makeRealPrice(1);
}
@@ -329,13 +477,873 @@
//contractStartDateChange();
refreshAsset(cnt);
}
-
+function toChange1(){
+ tochange();
+ ISReducedpriceapproval = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val();
+ console.log('鏂规硶1鏄惁瀹℃壒閫氳繃=='+ISReducedpriceapproval+'====================');
+}
+function toChange2(){
+ tochange2();
+ ISReducedpriceapproval = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val();
+ 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};
+ // 鍚堝悓鎬荤悊
+ var newCount = 0;
+ var isresduce = 0;
+ var oyearCount = 0;
+ var firstCCount = 0;
+ var conCCount = 0;
+ // row閲戦鍚堣▓
+ var repairSum = 0;
+ var listSum = 0;
+ // 鏂板搧鍚堝悓 鍒ゆ柇
+ var newCon = true;
+ var contractStartDate = new Date(j$(escapeVfId('allPage:allForm:contractstartdate')).value());
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲� thh 20220316 start
+ var GuranteeCount = 0;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲� thh 20220316 end
+
+
+
+ //2022鏁呴殰鍝佸姞璐� 鑾峰彇userInfo绠�妗e悕绉� 鏄惁涓篎SE start
+ var isFSE = {!isFSE};
+ // var isFSE = true;
+ console.log('***isFSE',isFSE);
+ //2022鏁呴殰鍝佸姞璐� 鑾峰彇userInfo绠�妗e悕绉� end
+ //20230208 涓婇檺鍚堝悓寮�鍙� hql start
+ if (isFSE) {
+ // lpa = document.getElementById('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount');
+ // lpa.style.display = "none";
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).attr("disabled", true);
+ console.log('涓婇檺閲戦闅愯棌');
+ }
+ //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);
+ // 鐢宠鏃� 褰撳墠鏃ユ湡
+ if(approvalDate != ''){
+ //鐢宠鏃�
+ approvalDate = new Date(approvalDate.toLocaleDateString());
+ if (Date.parse(approvalDate) < Date.parse(startdate)) {
+ newCon = false;
+ }
+
+ }
+
+ // 鏈�楂樸�佹渶浣庝环鏍煎悎璁�
+ var downPriceSum = 0;
+ var upPriceSum = 0;
+ // 鍚堝悓鏈堟暟涔楃畻
+ 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;
+ }
+ for (var i = 0; i < cnt; i++) {
+ // console.log('绗�'+i+'涓澶�');
+ var strMoney = 0;
+ var repairMoney = 0;
+ // 琛岄」鐩� 鏈�楂樸�佹渶浣庝环鏍煎悎璁�
+ // 缁浠锋牸鍙栬仈鍔ㄤ环鏍奸〉闈㈣绠楋紝棣栫鎴栦骇鍝佸彇 瀹為檯浠锋牸
+ // 涓嬬嚎浠锋牸
+ var downPrice = 0;
+ // 涓婄嚎浠锋牸
+ var upPrice = 0;
+ // 12涓湀鍚堝悓閲戦
+ var Price_YearTXT = 0;
+
+ var isManual = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':IsManual')).text();
+ var isnew = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetNewHidden')).val();
+ var assetListmonth = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val();
+
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/02/09 start
+ var VMassetListmonth = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Maintenance_Price_Year__c')).val();
+ // console.log('***鍚堝悓瀹氫环:'+VMassetListmonth);
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/02/09 end
+
+ // console.log('***isManual=:'+isManual);
+ if (isManual == 'true') {
+ var a = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Assert')).value();
+ if (a != '') {
+ // 鎵�鏈夎澶囨寜瀹夎鏃ャ�佸彂璐ф棩锛堟渶鏃╃殑锛夛紝璺濈鍚堝悓寮�濮嬫棩6涓湀鍐呴兘鏄柊鍝佸悎鍚�
+ //var isNewDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':isNewDate')).value());
+ //isNewDate.setMonth(isNewDate.getMonth() + 6);
+ //if (Date.parse(contractStartDate) > Date.parse(isNewDate)) {
+ // newCon = false;
+ //}
+
+ strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val();
+
+ // alert(strMoney);
+ Price_YearTXT = strMoney * 12;
+ if (isnew == 'true') {
+ newCount ++;
+ strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj};
+
+ } else {
+ newCon = false;
+ strMoney = month * strMoney + month2 * strMoney;
+
+ }
+ 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('***缁翠慨鍚堝悓璁板綍绫诲瀷1'+LastMContractRecord);
+ if(b != ''){
+ conCCount ++;
+ // 1.鍚堝悓鏈熶笉婊′竴骞存椂锛屽悎鍚屾湡瓒呰繃涓�鍗婃墠鍙紑濮嬬画绛炬姤浠枫��(eg:11涓湀鐨勫悎鍚屼粠6涓湀鍚庢墠鍙姤浠枫��)
+
+ // 2.涓�骞翠互涓婄殑鍚堝悓锛屽湪缁撴潫鍓�6涓湀寮�濮嬪彲浠ュ紑鏀剧画绛炬姤浠枫��
+
+ var lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':End_Date')).value());
+ var lastContRange = 0;
+ if(LastMContractRecord == 'VM_Contract'){
+ newCount++;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲�,澶氬勾淇濈画绛惧埌鏈嶅姟鍚堝悓鏃惰涓洪绛捐澶� thh 20220316 start
+ GuranteeCount++;
+ newCon = false;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲�,澶氬勾淇濈画绛惧埌鏈嶅姟鍚堝悓鏃惰涓洪绛捐澶� thh 20220316 end
+ 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();
+ }
+ //鏈�鍚庣粨鏉熸棩+1骞�
+ lastendDate.setMonth(lastendDate.getMonth() + 12);
+ if (Date.parse(contractStartDate) > Date.parse(lastendDate) ) {
+ oyearCount ++;
+ }
+ // 鍙栬仈鍔ㄤ环鏍�
+ // 涓婁竴鏈熷悎鍚屽疄闄呮姤浠锋湀棰�
+ //
+ var LastMContract_Price = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContract_Price')).val());
+ 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());
+ //璁$畻鎯╃綒鐜�
+ var Punish = calculateNtoMRatio( lastContRange,(month + month2));
+ if(Punish == 0){
+ return;
+ }
+ // 鍒ゆ柇鏈夋棤鎶ヤ环锛氭病鏈夋寜鐓ф爣鍑嗕环鏍煎疄闄呰仈鍔�
+ var Estimate_Num = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Estimate_NumHidden')).val();
+ if(Estimate_Num == 0){
+ if(LastMContractRecord == 'VM_Contract'){
+ // gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
+ 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
+
+ var Maxcoefficient =0;
+ var Mincoefficient =0;
+
+ 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);
+
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).text(AssetRate +'%');
+
+ if(AssetRate>0 &&AssetRate<=0.5){
+ Maxcoefficient = (1-0.3);
+ Mincoefficient = (1-0.4);
+ }else if(AssetRate>0.5 &&AssetRate<=0.6){
+ Maxcoefficient = (1-0.2);
+ Mincoefficient = (1-0.3);
+
+ }else if(AssetRate>0.6 &&AssetRate<=0.7){
+ Maxcoefficient = (1-0.15);
+ Mincoefficient = (1-0.25);
+
+ }else if(AssetRate>0.7 &&AssetRate<=0.8){
+ Maxcoefficient = (1-0.1);
+ Mincoefficient = (1-0.2);
+
+ }else if(AssetRate>0.8 &&AssetRate<=0.9){
+ Maxcoefficient = (1-0.05);
+ Mincoefficient = (1-0.15);
+
+ }else if(AssetRate>0.9 &&AssetRate<=1.0){
+ Maxcoefficient = 1;
+ Mincoefficient = (1-0.05);
+
+ }else if(AssetRate>1.0 &&AssetRate<=1.1){
+ Maxcoefficient = (1+0.05);
+ Mincoefficient = 1;
+
+ }else if(AssetRate>1.1 &&AssetRate<=1.2){
+ Maxcoefficient = (1+0.1);
+ Mincoefficient = 1;
+
+ }else if(AssetRate>1.2 &&AssetRate<=1.3){
+ Maxcoefficient = (1+0.2);
+ Mincoefficient = (1+0.1);
+
+ }else if(AssetRate>1.3 &&AssetRate<=1.4){
+ Maxcoefficient = (1+0.25);
+ Mincoefficient = (1+0.15);
+
+ }else if(AssetRate>1.4){
+ Maxcoefficient = (1+0.3);
+ Mincoefficient = (1+0.2);
+
+ }
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
+ // console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
+ // console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
+
+ if(nowdate < Date.parse(lastendDate)){
+ //璁惧灏忎簬涓ゅ勾鍗�
+ // upPrice = strMoney;
+ // downPrice = strMoney * 0.8;
+ // 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);
+
+ //璁惧璁惧娑堣垂鐜囧皬浜�1.4
+ if(AssetRate<1.4){
+ upPrice = VMassetListmonth * ContractMonth /12;
+ // 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);
+
+ }else{
+ downPrice = upPrice * 0.8;
+ // 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);
+ }
+ // 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� end DC 2023/01/19
+ }else{
+ // upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
+ // downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
+
+
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start 璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟
+
+ upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
+ downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
+
+ // console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 upPrice'+ upPrice);
+ // console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 downPrice'+ downPrice);
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
+
+
+ }
+ // gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
+ }else{
+ upPrice = strMoney;
+ downPrice = strMoney * 0.8;
+ console.log('閫夋嫨1');
+ }
+ }else{
+ upPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Upper/100);
+ downPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Lower/100);
+ console.log('閫夋嫨2');
+ }
+ }else{
+ //firstCCount ++;
+ upPrice = strMoney;
+ downPrice = strMoney * 0.8;
+ console.log('閫夋嫨3');
+ }
+ // 涓婁笅闄愬洓鑸嶄簲鍏�
+ upPrice = upPrice.toFixed(2);
+ downPrice = downPrice.toFixed(2);
+ // 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) {
+ // 瀹為檯鑱斿姩浠锋牸 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));
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPricePageHidden')).val(strMoney);
+
+ repairMoney = j$.trim(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).value());
+ } else {
+ // TODO 涓�鏅傜殑銇蹇溿�併仾銈撱仹鍒ヨ銇噾椤嶃儶銉曘儸銉冦偡銉ャ仌銈屻仧锛�
+ //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPrice')).text("");
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPricePageHidden')).val();
+
+ // 12涓湀鍚堝悓閲戦
+ //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXT')).text("");
+ //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXTHidden')).val();
+ if (!isDisabled) {
+ // 瀹為檯鑱斿姩浠锋牸 start
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text("");
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val();
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text("");
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val();
+ // 瀹為檯鑱斿姩浠锋牸 end
+ }
+ }
+ }
+ else {
+ // 鎵�鏈夎澶囨寜瀹夎鏃ャ�佸彂璐ф棩锛堟渶鏃╃殑锛夛紝璺濈鍚堝悓寮�濮嬫棩6涓湀鍐呴兘鏄柊鍝佸悎鍚�
+ var isNewDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':isNewDate')).value());
+ isNewDate.setMonth(isNewDate.getMonth() + 6);
+ if (Date.parse(contractStartDate) > Date.parse(isNewDate)) {
+ newCon = false;
+ }
+ 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;
+ }
+
+ 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);
+
+ if(b != ''){
+ conCCount ++;
+ // 1.鍚堝悓鏈熶笉婊′竴骞存椂锛屽悎鍚屾湡瓒呰繃涓�鍗婃墠鍙紑濮嬬画绛炬姤浠枫��(eg:11涓湀鐨勫悎鍚屼粠6涓湀鍚庢墠鍙姤浠枫��)
+
+ // 2.涓�骞翠互涓婄殑鍚堝悓锛屽湪缁撴潫鍓�6涓湀寮�濮嬪彲浠ュ紑鏀剧画绛炬姤浠枫��
+ var lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':End_Date')).value());
+ var lastContRange = 0;
+ if(LastMContractRecord == 'VM_Contract'){
+ newCount++;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲�,澶氬勾淇濈画绛惧埌鏈嶅姟鍚堝悓鏃惰涓洪绛捐澶� thh 20220316 start
+ GuranteeCount++;
+ newCon = false;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲�,澶氬勾淇濈画绛惧埌鏈嶅姟鍚堝悓鏃惰涓洪绛捐澶� thh 20220316 end
+ 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();
+ }
+ //鏈�鍚庣粨鏉熸棩+1骞�
+ lastendDate.setMonth(lastendDate.getMonth() + 12);
+ // alert('+++++++++--------' + lastendDate);
+ // alert('+++++++++--------' + Date.parse(contractStartDate) + '77777' + Date.parse(lastendDate));
+ if (Date.parse(contractStartDate) > Date.parse(lastendDate)) {
+ oyearCount ++;
+ }
+ // 鍙栬仈鍔ㄤ环鏍�
+ // 涓婁竴鏈熷悎鍚屽疄闄呮姤浠锋湀棰�
+ //
+ var LastMContract_Price = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContract_Price')).val());
+ 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());
+ //璁$畻鎯╃綒鐜�
+ var Punish = calculateNtoMRatio( lastContRange,(month + month2));
+ if(Punish == 0){
+ return;
+ }
+ // 鍒ゆ柇鏈夋棤鎶ヤ环锛氭病鏈夋寜鐓ф爣鍑嗕环鏍煎疄闄呰仈鍔�
+ var Estimate_Num = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Estimate_NumHidden')).val();
+ if(Estimate_Num == 0){
+ if(LastMContractRecord == 'VM_Contract'){
+ // alert('11111');
+ // gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
+ 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);
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� 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);
+ var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val());
+ // console.log('***娑堣垂鐜�:'+AssetRate);
+
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).text(AssetRate +'%');
+
+ if(AssetRate>0 &&AssetRate<=0.5){
+ Maxcoefficient = (1-0.3);
+ Mincoefficient = (1-0.4);
+ }else if(AssetRate>0.5 &&AssetRate<=0.6){
+ Maxcoefficient = (1-0.2);
+ Mincoefficient = (1-0.3);
+
+ }else if(AssetRate>0.6 &&AssetRate<=0.7){
+ Maxcoefficient = (1-0.15);
+ Mincoefficient = (1-0.25);
+
+ }else if(AssetRate>0.7 &&AssetRate<=0.8){
+ Maxcoefficient = (1-0.1);
+ Mincoefficient = (1-0.2);
+
+ }else if(AssetRate>0.8 &&AssetRate<=0.9){
+ Maxcoefficient = (1-0.05);
+ Mincoefficient = (1-0.15);
+
+ }else if(AssetRate>0.9 &&AssetRate<=1.0){
+ Maxcoefficient = 1;
+ Mincoefficient = (1-0.05);
+
+ }else if(AssetRate>1.0 &&AssetRate<=1.1){
+ Maxcoefficient = (1+0.05);
+ Mincoefficient = 1;
+
+ }else if(AssetRate>1.1 &&AssetRate<=1.2){
+ Maxcoefficient = (1+0.1);
+ Mincoefficient = 1;
+
+ }else if(AssetRate>1.2 &&AssetRate<=1.3){
+ Maxcoefficient = (1+0.2);
+ Mincoefficient = (1+0.1);
+
+ }else if(AssetRate>1.3 &&AssetRate<=1.4){
+ Maxcoefficient = (1+0.25);
+ Mincoefficient = (1+0.15);
+
+ }else if(AssetRate>1.4){
+ Maxcoefficient = (1+0.3);
+ Mincoefficient = (1+0.2);
+
+ }
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
+ // console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
+ // console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
+
+ 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);
+ // //璁惧灏忎簬涓ゅ勾鍗�
+ // // 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);
+
+ //璁惧璁惧娑堣垂鐜囧皬浜�1.4
+ if(AssetRate<1.4){
+ upPrice = VMassetListmonth *ContractMonth / 12;
+ // 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);
+
+ }else{
+ downPrice = upPrice * 0.8;
+ // 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);
+ }
+ // 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� end DC 2023/01/19
+
+ }else{
+ //璁惧澶т簬涓ゅ勾鍗�
+ // upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
+ // downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
+
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start 璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟
+ upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
+ downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
+
+ // console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 upPrice'+ upPrice);
+ // console.log('璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟 downPrice'+ downPrice);
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
+ }
+ // gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
+ }else{
+ upPrice = strMoney;
+ downPrice = strMoney * 0.8;
+ console.log('閫夋嫨4');
+ }
+ }else{
+ upPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Upper/100);
+ downPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Lower/100);
+ console.log('閫夋嫨5');
+ }
+ }else{
+ if (isnew == 'true') {
+ newCount ++;
+ } else {
+ newCon = false;
+ firstCCount ++;
+ }
+ upPrice = strMoney;
+ downPrice = strMoney * 0.8;
+ }
+ // 涓婁笅闄愬洓鑸嶄簲鍏�
+ upPrice = upPrice.toFixed(2);
+ downPrice = downPrice.toFixed(2);
+ // 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) {
+
+ // 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));
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPricePageHidden')).val(strMoney);
+
+
+ //<!-- (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)+'鍙稲epair_Price_Auto='+Repair_Price_Auto);
+ if ((repairMoney+1)==1) {
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val(Repair_Price_Auto);
+ // console.log('repairMoney淇敼鎴愬姛');
+ }
+ if ((Repair_Price_pass+1)==1) {
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_pass')).val(Repair_Price_Auto);
+ // console.log('Repair_Price_pass淇敼鎴愬姛');
+ }
+ repairMoney1 = localParseFloat(repairMoney);
+ ISReducedpriceapproval = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val();
+ // console.log('ISReducedpriceapproval=='+ISReducedpriceapproval);
+ var isDisabled = {!PageDisabled};
+ if (ISReducedpriceapproval =='鏈夊叓鎶樹互涓嬪緟瀹℃壒' || ISReducedpriceapproval =='鏄�'|| isDisabled) {
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).attr("disabled", true);
+ }else{
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).attr("disabled", false);
+ }
+ ISReducedpriceapproval1 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ISReducedpriceapproval1')).val();
+ ISReduced = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val();
+ if (repairMoney1> 0 && (repairMoney1 <Repair_Price_Auto*0.80)) {
+
+ isresduce = isresduce+1;
+ }
+
+ // console.log('鍒濆鍖杋sresduce='+isresduce);
+ rppa = document.getElementById('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_Auto');
+ ResonCannotWarranty = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ResonCannotWarranty')).value();
+ // console.log('涓嶅彲鍙備繚鍘熷洜涓猴細'+ResonCannotWarranty);
+ // console.log('repairMoney鎵ц娆℃暟涓�'+repairMoney);
+ if(!(ResonCannotWarranty.indexOf("寮冧慨") != -1)&&(repairMoney+1)==1){
+ // if (!(situation.indexOf("淇悊涓�")!=-1)&& !(Agreed_Date.indexOf("涓虹┖")!=-1)) {
+ rppa.style.display = "none";
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val('');
+ // console.log('###淇敼鎴愬姛');
+ // }
+ }
+
+
+ situation = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_situation')).value();
+ // Agreed_Date = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Agreed_Date')).value();
+
+ // console.log('situation='+situation);
+ // console.log('Agreed_Date1='+Agreed_Date);
+
+ // console.log('鍒ゆ柇'+(Agreed_Date.indexOf("涓嶄负绌�")!=-1));
+ // if ((situation.indexOf("淇悊涓�")!=-1)&& (Agreed_Date.indexOf("涓嶄负绌�")!=-1)) {
+ // console.log('寮�濮嬫搷浣�2');
+ // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_Auto')).val(0);
+ // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val(0);
+ // }
+ //<!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� end -->
+ }
+
+ repairSum = repairSum + localParseFloat(repairMoney);
+ listSum = listSum + localParseFloat(toNum(strMoney));
+ downPriceSum = downPriceSum + localParseFloat(toNum(downPrice));
+ upPriceSum = upPriceSum + localParseFloat(toNum(upPrice));
+
+ }
+
+
+ j$(escapeVfId('allPage:allForm:allBlock:assetRepairSumNum')).text(toNumComma(repairSum));
+ //j$(escapeVfId('allPage:allForm:allBlock:assetListSumNum')).text(toNumComma(listSum));
+
+ //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)));
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceDown')).text(toNumComma(Math.round(downPriceSum)));
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceDownHidden')).val(toNum(Math.round(downPriceSum)));
+ }
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetRepairSumPrice')).text(toNumComma(repairSum));
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetRepairSumPriceHidden')).val(toNum(repairSum));
+
+ var allcount = j$(escapeVfId('allPage:allForm:allBlock:productCount3')).value();
+ var result = '';
+ if (allcount == 0) {
+ result = null;
+ //濡傛灉鎵�鏈夎澶囩殑涓婃湡鍚堝悓閮芥槸澶氬勾淇濆悎鍚岋紝鍒欏悎鍚岀绫讳负甯傚満澶氬勾淇濈画绛惧悎鍚� thh 20220315 start
+ }else if(GuranteeCount > 0 && GuranteeCount == allcount){
+ result = '甯傚満澶氬勾淇濈画绛惧悎鍚�';
+ //濡傛灉鎵�鏈夎澶囩殑涓婃湡鍚堝悓閮芥槸澶氬勾淇濆悎鍚岋紝鍒欏悎鍚岀绫讳负甯傚満澶氬勾淇濈画绛惧悎鍚� thh 20220315 end
+ }else if (newCount > 0 && newCount == allcount && newCon == true) {
+ result = '鏂板搧鍚堝悓';
+ }else if (((newCount > 0 && newCount == allcount) ||(newCount + firstCCount == allcount)) && newCon == false) {
+ result = '棣栫鍚堝悓';
+ }else if(firstCCount > 0 && firstCCount == allcount){
+ result = '棣栫鍚堝悓';
+ // 20220328 ljh update LJPH-C8FB4P銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 start
+ // }else if(oyearCount > 0 && oyearCount == conCCount){
+ }else if(oyearCount > 0 && oyearCount == conCCount && allcount == oyearCount ){
+ // 20220328 ljh update LJPH-C8FB4P銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 start
+ result = '闈炵画绛惧悎鍚岋紙绌虹櫧鏈熶竴骞翠互涓婏級';
+ }else{
+ 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');
// alert(cnt);
// 鎻愪氦鍚庡氨椤甸潰涓嶈绠椾簡
var isDisabled = {!PageDisabled};
// 鍚堝悓鎬荤悊
var newCount = 0;
+ var isresduce = 0;
var oyearCount = 0;
var firstCCount = 0;
var conCCount = 0;
@@ -346,6 +1354,25 @@
var newCon = true;
var contractStartDate = new Date(j$(escapeVfId('allPage:allForm:contractstartdate')).value());
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲� thh 20220316 start
+ var GuranteeCount = 0;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲� thh 20220316 end
+
+ //2022鏁呴殰鍝佸姞璐� 鑾峰彇userInfo绠�妗e悕绉� 鏄惁涓篎SE start
+ var isFSE = {!isFSE};
+ // var hasSendEmail = {!hasSendEmail};
+
+ // var isFSE = true;
+ console.log('***isFSE',isFSE);
+ // console.log('***hasSendEmail',hasSendEmail);
+ // if(hasSendEmail == true){
+ // j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", true);
+ // j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btnDisabled');
+ // console.log('8鎶樹互涓嬫彁浜C鍙 ');
+ // }
+
+
+ //2022鏁呴殰鍝佸姞璐� 鑾峰彇userInfo绠�妗e悕绉� end
// 棰勫畾寮�濮嬫棩
var startdate = new Date(j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).value());
@@ -383,13 +1410,17 @@
var downPrice = 0;
// 涓婄嚎浠锋牸
var upPrice = 0;
-
+
// 12涓湀鍚堝悓閲戦
var Price_YearTXT = 0;
var isManual = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':IsManual')).text();
var isnew = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetNewHidden')).val();
var assetListmonth = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val();
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/02/09 start
+ var VMassetListmonth = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Maintenance_Price_Year__c')).val();
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/02/09 end
+
if (isManual == 'true') {
var a = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Assert')).value();
if (a != '') {
@@ -401,17 +1432,22 @@
//}
strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val();
+
+ var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value();
// alert(strMoney);
+ console.log('***缁翠慨鍚堝悓璁板綍绫诲瀷3'+LastMContractRecord);
+
Price_YearTXT = strMoney * 12;
if (isnew == 'true') {
newCount ++;
strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj};
+
} else {
newCon = false;
strMoney = month * strMoney + month2 * strMoney;
}
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();
+ // var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value();
if(b != ''){
conCCount ++;
// 1.鍚堝悓鏈熶笉婊′竴骞存椂锛屽悎鍚屾湡瓒呰繃涓�鍗婃墠鍙紑濮嬬画绛炬姤浠枫��(eg:11涓湀鐨勫悎鍚屼粠6涓湀鍚庢墠鍙姤浠枫��)
@@ -422,6 +1458,10 @@
var lastContRange = 0;
if(LastMContractRecord == 'VM_Contract'){
newCount++;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲�,澶氬勾淇濈画绛惧埌鏈嶅姟鍚堝悓鏃惰涓洪绛捐澶� thh 20220316 start
+ GuranteeCount++;
+ newCon = false;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲�,澶氬勾淇濈画绛惧埌鏈嶅姟鍚堝悓鏃惰涓洪绛捐澶� thh 20220316 end
lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
lastContRange = 36;
}else{
@@ -447,10 +1487,116 @@
var Estimate_Num = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Estimate_NumHidden')).val();
if(Estimate_Num == 0){
if(LastMContractRecord == 'VM_Contract'){
- //upPrice = (strMoney) * (1 + Adjustment_ratio_Upper/100);
- //downPrice = (strMoney) * (1 + Adjustment_ratio_Lower/100);
- upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
- downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
+ // gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
+ var nowdate = new Date();
+ lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
+ nowdate = nowdate.setMonth(nowdate.getMonth() + 6);
+
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start
+ var Maxcoefficient =0;
+ var Mincoefficient =0;
+
+ var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val());
+ console.log('***娑堣垂鐜�:'+AssetRate);
+
+ var ContractMonth = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val());
+
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).text(AssetRate +'%');
+
+ if(AssetRate>0 &&AssetRate<=0.5){
+ Maxcoefficient = (1-0.3);
+ Mincoefficient = (1-0.4);
+ }else if(AssetRate>0.5 &&AssetRate<=0.6){
+ Maxcoefficient = (1-0.2);
+ Mincoefficient = (1-0.3);
+
+ }else if(AssetRate>0.6 &&AssetRate<=0.7){
+ Maxcoefficient = (1-0.15);
+ Mincoefficient = (1-0.25);
+
+ }else if(AssetRate>0.7 &&AssetRate<=0.8){
+ Maxcoefficient = (1-0.1);
+ Mincoefficient = (1-0.2);
+
+ }else if(AssetRate>0.8 &&AssetRate<=0.9){
+ Maxcoefficient = (1-0.05);
+ Mincoefficient = (1-0.15);
+
+ }else if(AssetRate>0.9 &&AssetRate<=1.0){
+ Maxcoefficient = 1;
+ Mincoefficient = (1-0.05);
+
+ }else if(AssetRate>1.0 &&AssetRate<=1.1){
+ Maxcoefficient = (1+0.05);
+ Mincoefficient = 1;
+
+ }else if(AssetRate>1.1 &&AssetRate<=1.2){
+ Maxcoefficient = (1+0.1);
+ Mincoefficient = 1;
+
+ }else if(AssetRate>1.2 &&AssetRate<=1.3){
+ Maxcoefficient = (1+0.2);
+ Mincoefficient = (1+0.1);
+
+ }else if(AssetRate>1.3 &&AssetRate<=1.4){
+ Maxcoefficient = (1+0.25);
+ Mincoefficient = (1+0.15);
+
+ }else if(AssetRate>1.4){
+ Maxcoefficient = (1+0.3);
+ Mincoefficient = (1+0.2);
+
+ }
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
+ // console.log('***鏈�楂樼郴鏁�'+Maxcoefficient);
+ // console.log('***鏈�浣庣郴鏁�'+Mincoefficient);
+
+ if(nowdate < Date.parse(lastendDate)){
+ //璁惧灏忎簬涓ゅ勾鍗�
+ // upPrice = strMoney;
+ // downPrice = strMoney * 0.8;
+ // 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);
+
+ //璁惧璁惧娑堣垂鐜囧皬浜�1.4
+ if(AssetRate<1.4){
+ upPrice = VMassetListmonth * ContractMonth / 12 ;
+ // 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);
+
+ }else{
+ downPrice = upPrice * 0.8;
+ // 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);
+ }
+ // 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� 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);
+
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start 璁惧澶т簬2骞村崐 缁浠锋牸 =瀹氫环*娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟
+ upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
+ downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
+ }
+ // gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
}else{
upPrice = strMoney;
downPrice = strMoney * 0.8;
@@ -509,14 +1655,17 @@
newCon = false;
}
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;
+
}
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('***缁翠慨鍚堝悓璁板綍绫诲瀷4'+LastMContractRecord);
if(b != ''){
conCCount ++;
// 1.鍚堝悓鏈熶笉婊′竴骞存椂锛屽悎鍚屾湡瓒呰繃涓�鍗婃墠鍙紑濮嬬画绛炬姤浠枫��(eg:11涓湀鐨勫悎鍚屼粠6涓湀鍚庢墠鍙姤浠枫��)
@@ -526,6 +1675,10 @@
var lastContRange = 0;
if(LastMContractRecord == 'VM_Contract'){
newCount++;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲�,澶氬勾淇濈画绛惧埌鏈嶅姟鍚堝悓鏃惰涓洪绛捐澶� thh 20220316 start
+ GuranteeCount++;
+ newCon = false;
+ //澶氬勾淇濈画绛惧悎鍚屾暟閲�,澶氬勾淇濈画绛惧埌鏈嶅姟鍚堝悓鏃惰涓洪绛捐澶� thh 20220316 end
lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
lastContRange = 36;
}else{
@@ -533,6 +1686,8 @@
}
//鏈�鍚庣粨鏉熸棩+1骞�
lastendDate.setMonth(lastendDate.getMonth() + 12);
+ // alert('+++++++++--------' + lastendDate);
+ // alert('+++++++++--------' + Date.parse(contractStartDate) + '77777' + Date.parse(lastendDate));
if (Date.parse(contractStartDate) > Date.parse(lastendDate)) {
oyearCount ++;
}
@@ -551,10 +1706,119 @@
var Estimate_Num = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Estimate_NumHidden')).val();
if(Estimate_Num == 0){
if(LastMContractRecord == 'VM_Contract'){
- //upPrice = (strMoney) * (1 + Adjustment_ratio_Upper/100);
- //downPrice = (strMoney) * (1 + Adjustment_ratio_Lower/100);
- upPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Upper/100);
- downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100);
+ // alert('11111');
+ // gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
+ var nowdate = new Date();
+ lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
+ nowdate = nowdate.setMonth(nowdate.getMonth() + 6);
+
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start
+ var Maxcoefficient =0;
+ var Mincoefficient =0;
+
+ var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val());
+ console.log('***娑堣垂鐜�:'+AssetRate);
+
+ var ContractMonth = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val());
+
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).text(AssetRate +'%');
+
+ if(AssetRate>0 &&AssetRate<=0.5){
+ Maxcoefficient = (1-0.3);
+ Mincoefficient = (1-0.4);
+ }else if(AssetRate>0.5 &&AssetRate<=0.6){
+ Maxcoefficient = (1-0.2);
+ Mincoefficient = (1-0.3);
+
+ }else if(AssetRate>0.6 &&AssetRate<=0.7){
+ Maxcoefficient = (1-0.15);
+ Mincoefficient = (1-0.25);
+
+ }else if(AssetRate>0.7 &&AssetRate<=0.8){
+ Maxcoefficient = (1-0.1);
+ Mincoefficient = (1-0.2);
+
+ }else if(AssetRate>0.8 &&AssetRate<=0.9){
+ Maxcoefficient = (1-0.05);
+ Mincoefficient = (1-0.15);
+
+ }else if(AssetRate>0.9 &&AssetRate<=1.0){
+ Maxcoefficient = 1;
+ Mincoefficient = (1-0.05);
+
+ }else if(AssetRate>1.0 &&AssetRate<=1.1){
+ Maxcoefficient = (1+0.05);
+ Mincoefficient = 1;
+
+ }else if(AssetRate>1.1 &&AssetRate<=1.2){
+ Maxcoefficient = (1+0.1);
+ Mincoefficient = 1;
+
+ }else if(AssetRate>1.2 &&AssetRate<=1.3){
+ Maxcoefficient = (1+0.2);
+ Mincoefficient = (1+0.1);
+
+ }else if(AssetRate>1.3 &&AssetRate<=1.4){
+ Maxcoefficient = (1+0.25);
+ Mincoefficient = (1+0.15);
+
+ }else if(AssetRate>1.4){
+ Maxcoefficient = (1+0.3);
+ Mincoefficient = (1+0.2);
+
+ }
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
+ // 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骞村崐')
+ // 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� 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);
+
+ //璁惧璁惧娑堣垂鐜囧皬浜�1.4
+ if(AssetRate<1.4){
+ upPrice = VMassetListmonth * ContractMonth /12;
+ // 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);
+
+ }else{
+ downPrice = upPrice * 0.8;
+ // 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);
+ }
+ // 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� 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);
+
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start 璁惧澶т簬2骞村崐 缁浠锋牸 = 瀹氫环 *娑堣垂鐜囧搴旂郴鏁� / 12 *鍚堝悓鏈堟暟
+ upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12;
+ downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12;
+ //甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 end
+
+ }
+ // gzw 20220630 瀹為檯鑱斿姩6涓湀浠锋牸鍖哄垎
}else{
upPrice = strMoney;
downPrice = strMoney * 0.8;
@@ -589,19 +1853,86 @@
}
//j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPrice')).text(toNumComma(strMoney));
j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPricePageHidden')).val(strMoney);
- //
- repairMoney = j$.trim(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).value());
+ //<!-- (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();
+ // console.log('repairMoney='+repairMoney);
+ repairMoney1 = localParseFloat(repairMoney);
+ ISReducedpriceapproval1 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ISReducedpriceapproval1')).val();
+ ISReduced = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val();
+ // console.log('ISReduced='+ISReduced);
+
+ // console.log('Repair_Price_Auto='+Repair_Price_Auto);
+ // console.log('绗�'+(i+1)+'涓澶嘔SReducedpriceapproval1='+ISReducedpriceapproval1);
+ // console.log('repairMoney1='+repairMoney1);
+
+ Repair_Price_pass1 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_pass')).val();
+ Repair_Price_pass2 = localParseFloat(Repair_Price_pass1);
+ // console.log('缁撴灉='+(repairMoney1<Repair_Price_pass2));
+ // console.log('Repair_Price_pass2='+Repair_Price_pass2);
+ if (repairMoney1> 0 && repairMoney1<(Repair_Price_Auto*0.80) && Repair_Price_Auto != null && isFSE == true) {
+ if (Repair_Price_pass1!=null && repairMoney1<Repair_Price_pass2) {
+ alert('鐢变簬瀛樺湪鎶樻墸鐜囪秴杩�20%浠ヤ笂鐨勪慨鐞嗗姞璐瑰噺浠风敵璇凤紝璇峰厛鐐瑰嚮鈥滄彁浜C璇勪及鈥濇寜閽紝寰匯C璇勪及鍚庢湇鍔$鐞嗛儴浼氭帹杩涘鎵�');
+ // j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", false);
+ // j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btn');
+
+ // RCbottonChanged = 1;
+
+ // var change_cancel = document.getElementById("emailSend");
+ // change_cancel.style.display = "block";
+ repairMoney = Repair_Price_pass2;
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val(Repair_Price_pass2);
+ }
+ }
+
+ repairMoney2 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).value();
+ // console.log('repairMoney='+repairMoney);
+ repairMoney3 = localParseFloat(repairMoney2);
+ if (repairMoney3> 0 && (repairMoney3 <Repair_Price_Auto*0.80)) {
+ if (Repair_Price_pass1!=null && repairMoney3<Repair_Price_pass2) {
+ isresduce = isresduce+1;
+ }
+ }
+ ResonCannotWarranty = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ResonCannotWarranty')).value();
+ rppa = document.getElementById('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_Auto');
+ situation = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_situation')).value();
+ // Agreed_Date = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Agreed_Date')).value();
+
+ // console.log('situation='+situation);
+ // console.log('Agreed_Date1='+Agreed_Date);
+ // if(!(ResonCannotWarranty.indexOf("寮冧慨") != -1)){
+ // rppa.style.display = "none";
+ // // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val('');
+ // // console.log('###淇敼鎴愬姛');
+ // }
+ // if ((situation.indexOf("淇悊涓�")!=-1)&& (Agreed_Date.indexOf("涓虹┖")!=-1)) {
+ // console.log('寮�濮嬫搷浣�1');
+ // rppa.style.display = "none";
+ // }
+ // if ((situation.indexOf("淇悊涓�")!=-1)&& (Agreed_Date.indexOf("涓嶄负绌�")!=-1)) {
+ // console.log('寮�濮嬫搷浣�2');
+ // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_Auto')).val(0);
+ // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val(0);
+ // }
+ //<!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� end -->
}
+
repairSum = repairSum + localParseFloat(repairMoney);
listSum = listSum + localParseFloat(toNum(strMoney));
downPriceSum = downPriceSum + localParseFloat(toNum(downPrice));
upPriceSum = upPriceSum + localParseFloat(toNum(upPrice));
}
+ // console.log('鏀瑰彉閲戦isresduce='+isresduce);
+ if (isresduce!=0) {
+ toChange1();
+ }else{
+ if(ISReduced !='' ){
+ toChange2();
+ }
+ }
j$(escapeVfId('allPage:allForm:allBlock:assetRepairSumNum')).text(toNumComma(repairSum));
- //j$(escapeVfId('allPage:allForm:allBlock:assetListSumNum')).text(toNumComma(listSum));
-
- //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)));
@@ -615,8 +1946,11 @@
var result = '';
if (allcount == 0) {
result = null;
- }else
- if (newCount > 0 && newCount == allcount && newCon == true) {
+ //濡傛灉鎵�鏈夎澶囩殑涓婃湡鍚堝悓閮芥槸澶氬勾淇濆悎鍚岋紝鍒欏悎鍚岀绫讳负甯傚満澶氬勾淇濈画绛惧悎鍚� thh 20220315 start
+ }else if(GuranteeCount > 0 && GuranteeCount == allcount){
+ result = '甯傚満澶氬勾淇濈画绛惧悎鍚�';
+ //濡傛灉鎵�鏈夎澶囩殑涓婃湡鍚堝悓閮芥槸澶氬勾淇濆悎鍚岋紝鍒欏悎鍚岀绫讳负甯傚満澶氬勾淇濈画绛惧悎鍚� thh 20220315 end
+ }else if (newCount > 0 && newCount == allcount && newCon == true) {
result = '鏂板搧鍚堝悓';
}else if (((newCount > 0 && newCount == allcount) ||(newCount + firstCCount == allcount)) && newCon == false) {
result = '棣栫鍚堝悓';
@@ -630,15 +1964,39 @@
}else{
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();
+ //涓婇檺鍚堝悓 20230214 hql start
+ var RequestquotationAmount = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val();
+ console.log('鐢宠鎶ヤ环閲戦='+RequestquotationAmount);
+ var AssetRepairSumPrice = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetRepairSumPrice')).text();
+ console.log('鍚堝悓璁惧淇悊鎬婚='+AssetRepairSumPrice);
+ Limit_Price_Amount = (localParseFloat(AssetRepairSumPrice)+localParseFloat(RequestquotationAmount))*1.3;
+ Limit_Price_Amount = Math.round(Limit_Price_Amount);
+ // console.log('鍙栨暣1='+Math.round(124.5));
+ // console.log('鍙栨暣2='+Math.round(124.4));
+ // console.log('鍙栨暣3='+Math.round(124.6));
+ Limit_Price_AmountOne = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value();
+ Limit_PriceHidden = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_PriceHidden')).value();
+ // if (Limit_PriceHidden*1==0) {
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(Limit_Price_Amount);
+ // }
+ Limit_PriceHidden2 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price2Hidden')).value();
+ if (Limit_PriceHidden2 == 'false') {
+ // lpa = document.getElementById('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount');
+ // lpa.style.display = "none";
+ // console.log('闅愯棌瀹屾瘯');
+ j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val('');
+ }
+ console.log('涓婇檺閲戦涓�'+Limit_Price_Amount);
+ //涓婇檺鍚堝悓 20230214 hql end
+ // 鎶ヤ环瑙勫垯鏀瑰杽 20230315 start
+ // seamlessRenew(cnt);
+ // 鎶ヤ环瑙勫垯鏀瑰杽 20230315 end
}
-
function examinationPriceCal(cntWithKara) {
@@ -867,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);
@@ -962,8 +2448,10 @@
function ComputeLTY() {
var urlNameJs = j$(escapeVfId('allPage:allForm:urlName')).val();
urlNameJs = '{!$Label.ID_of_SelectAssetEstimate}'+urlNameJs ;
- var w = window.open(encodeURI(urlNameJs),'杩囧幓涓ゅ勾淇悊瀹炵哗','menubar=no,height=720,width=986');
- w.focus();
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
+ // var w = window.open(encodeURI(urlNameJs),'杩囧幓涓ゅ勾淇悊瀹炵哗','menubar=no,height=720,width=986');
+ // w.focus();
+ //URF闄愭鍚堝悓2鏈� LY 20220920 end
}
function recordNumChangeJs() {
recordNumChangeAction();
@@ -1051,7 +2539,8 @@
} else {
var oldp = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:oldMainteReal')).value());
var newp = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:mainteReal')).text());
-
+ console.log('oldp='+oldp);
+ console.log('newp='+newp);
if (oldp != newp) {
// 20201106 楂樼珷浼� 鎻愰啋娑堟伅淇敼 start
j$(escapeVfId('allPage:allForm:changedAfterPrint')).val('true');
@@ -1245,6 +2734,10 @@
<!-- HWAG-B4R3SS START 20181026-->
<apex:actionFunction name="searchfunc" action="{!searchBtn}" rerender="Form,Block,assetSection2,pageMessages,allBlock" onComplete="unblockUI();"></apex:actionFunction>
+ <apex:actionfunction action="{!tochange}" name="tochange" rerender="ISReducedpriceapproval" oncomplete="unblockUI();">
+ </apex:actionfunction>
+ <apex:actionfunction action="{!tochange2}" name="tochange2" rerender="ISReducedpriceapproval" oncomplete="unblockUI();">
+ </apex:actionfunction>
<!-- HWAG-B4R3SS END 20181026-->
<apex:actionFunction name="ComputeLTYRepair" action="{!ComputeLTYRepair}" rerender="pageMessages" oncomplete="unblockUI();ComputeLTY();"/>
<apex:actionFunction name="ShowLTYRepair" action="{!ShowLTYRepair}" oncomplete="unblockUI();ComputeLTY();"/>
@@ -1466,6 +2959,20 @@
<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>
+
+ <!-- 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/02/20 end-->
+ <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Asset_Consumption_rate__c.label}</th>
+
+ <!-- 甯傚満澶氬勾淇濅慨浠锋牸寮�鍙� DC 2023/1/30 start -->
+ <!-- <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>
<!-- 瀹炵哗鑱斿姩浠锋牸璁$畻 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>
@@ -1485,7 +2992,15 @@
<th style="width:90px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Estimate_List_Price_All__c.label}</th>
<th style="width:90px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Maintenance_Price_YearTXT__c.label}</th>-->
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Repair_Price__c.label}</th>
+ <!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� start -->
+
+ <th style="width:70px" class="headerRow ">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Repair_Price_Auto__c.label}</th>
+
+ <!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� end -->
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Comment__c.label}</th>
+
+ <!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� 绗笁鏂瑰洖褰� -->
+ <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Third_Party_Return__c.label}</th>
</tr>
<apex:variable value="{!1}" var="cnt" />
@@ -1503,8 +3018,13 @@
<apex:inputField value="{!ar.mcae.Product_Manual__c}" id="Assert" style="width:90%;" rendered="{!ar.IsManual}" onchange="blockme();refreshProductData({!ar.lineNo});"/>
<apex:inputText id="ProductId" value="{!ar.mcae.Product_Manual__c}" style="display:none;" disabled="true"/>
</td>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 start -->
+
+ <apex:inputHidden value="{!ar.rec.URF_Maintenance_Contract__r.Management_Code__c}" rendered="{!Not(ar.IsManual)}" id="URF_Contract_No"/>
+
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 end -->
<td class="dataCell" width="70px">
- <apex:outputField value="{!ar.rec.Asset_situation__c}" rendered="{!Not(ar.IsManual)}" />
+ <apex:outputField value="{!ar.rec.Asset_situation__c}" rendered="{!Not(ar.IsManual)}" id="Asset_situation"/>
</td>
<td class="dataCell" width="70px">
<apex:outputLink value="/{!ar.recId}" rendered="{!Not(ar.IsManual)}" >{!ar.rec.SerialNumber}</apex:outputLink>
@@ -1540,17 +3060,47 @@
<td class="dataCell" width="70px">
<apex:outputField value="{!ar.rec.CurrentContract_F__r.Maintenance_Contract_No_F__c}" rendered="{!Not(ar.IsManual)}" id="Contract_No"/>
+
<apex:inputHidden value="{!ar.rec.CurrentContract_F__r.RecordType_DeveloperName__c}" id="LastMContractRecord"/>
<apex:inputField value="{!ar.rec.CurrentContract_F_asset__r.endDateGurantee_Text__c}" id="endDateGurantee_Text" style="display: none" showDatePicker="false"/>
<apex:inputHidden value="{!ar.rec.CurrentContract_F__c}" id="LastMContractID"/>
+ <!-- 甯傚満澶氬勾淇濅环鏍煎紑鍙� start 20223/01/17 缁翠慨鍚堝悓/淇濇湁璁惧 璁惧娑堣垂鐜� -->
+
+
+ <!-- <apex:outputField value="{!ar.rec.CurrentContract_F_asset__r.IS_VMContract_Asset__c}" rendered="{!Not(ar.IsManual)}" id="IS_VMContract_Asset"/> -->
+
+ <apex:inputHidden value="{!ar.rec.CurrentContract_F_asset__r.Asset_Consumption_Rate__c}" id="AssetConsumptionRateNew"/>
+
+ <apex:inputHidden value="{!ar.rec.CurrentContract_F_asset__r.Maintenance_Price_Year__c}" id="Maintenance_Price_Year__c"/>
+
+ <!-- <apex:inputField value="{!ar.rec.CurrentContract_F_asset__r.Asset_Consumption_Rate__c}" id="AssetConsumptionRateNew2" style="display: none" showDatePicker="false" />
+
+ <apex:outputText value="{!ar.rec.CurrentContract_F_asset__r.Asset_Consumption_Rate__c}" id="AssetConsumptionRateNew3" rendered="{!Not(ar.IsManual)}" style="display: none"/> -->
+
+ <apex:inputField value="{!ar.rec.Product2.Asset_Model_No__c}" id="Asset_Model_No__c" style="display: none" showDatePicker="false"/>
+
+ <apex:inputField value="{!ar.rec.Product2.Category4__c}" id="Category4__c" style="display: none" showDatePicker="false"/>
+ <!-- 甯傚満澶氬勾淇濅环鏍煎紑鍙� end 20223/01/17 璁惧娑堣垂鐜� -->
+
</td>
+ <!-- 甯傚満澶氬勾淇濅环鏍煎紑鍙� end 20223/02/20 鏄惁澶氬勾淇濊澶� start -->
+ <td class="dataCell" width="90px" style="text-align:center">
+ <apex:outputField value="{!ar.rec.CurrentContract_F_asset__r.IS_VMContract_Asset__c}" rendered="{!Not(ar.IsManual)}" id="IS_VMContract_Asset"/>
+ </td>
+ <!-- 甯傚満澶氬勾淇濅环鏍煎紑鍙� end 20223/02/20 鏄惁澶氬勾淇濊澶� end -->
+
<td class="dataCell" width="90px" style="text-align:right" >
<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"/>
@@ -1559,6 +3109,10 @@
</td>
<td class="dataCell" width="35px" >
<apex:outputText value="{!ar.mcae.Adjustment_Lower_price__c}" id="Adjustment_Lower_price"/>
+ <!-- // 鏈嶅姟鍚堝悓鎶ヤ环瑙勫垯鏀瑰杽 20230227 start -->
+ <!-- <apex:inputHidden value="{!ar.ISStandardPricing}" id="ISStandardPricing" /> -->
+
+ <!-- // 鏈嶅姟鍚堝悓鎶ヤ环瑙勫垯鏀瑰杽 20230227 end -->
<apex:inputHidden value="{!ar.mcae.LastMContract_Price__c}" id="LastMContract_Price"/>
<apex:inputHidden value="{!ar.mcae.Adjustment_ratio_Lower__c}" id="Adjustment_ratio_Lower"/>
<apex:inputHidden value="{!ar.mcae.Adjustment_Lower_price__c}" id="Adjustment_Lower_priceHidden"/>
@@ -1566,6 +3120,7 @@
<apex:inputHidden value="{!ar.mcae.Estimate_List_Price__c}" id="assetListPriceHidden"/>
<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>
<apex:outputPanel layout="none" rendered="{!Not($ObjectType.Maintenance_Contract_Asset_Estimate__c.createable)}" >
@@ -1577,11 +3132,29 @@
<!-- 20200103 Gzw 璁$畻瀹為檯鎶ヤ环閲戦 end -->
</td>
- <td class="dataCell" width="70px" style="text-align:right" >
- <apex:inputField value="{!ar.mcae.Repair_Price__c}" id="repairPrice" style="ime-mode: disabled; width:95%; text-align:right;" onchange="refreshAsset({!productCount});"/>
+ <td class="dataCell" width="35px" style="text-align:right" >
+ <apex:inputField value="{!ar.mcae.Repair_Price__c}" id="repairPrice" style="ime-mode: disabled; width:95%; text-align:right;" onchange="changeAsset({!productCount})"/>
</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;"/> -->
+ <apex:inputField value="{!ar.mcae.Repair_Price_pass__c}" id="Repair_Price_pass" style="width:95%;display: none;"/>
+ <apex:inputHidden value="{!ar.mcae.IS_Reduced_price_approval__c}" id="ISReducedpriceapproval1"/>
+ <apex:outputText value="{!ar.rec.Reson_Can_not_Warranty__c}" id="ResonCannotWarranty" style="display:none;" rendered="{!Not(ar.IsManual)}" />
+ </td>
+
+ <!-- (2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� end -->
<td class="dataCell" width="70px" style="text-align:right" >
<apex:inputField value="{!ar.mcae.Comment__c}" id="comment" style="width:95%;"/>
+ </td>
+ <!--(2022骞�12鏈堜笂绾�)鏁呴殰鍝佸姞璐� 绗笁鏂瑰洖褰� -->
+ <td class="dataCell" width="40px" style="text-align:center;" >
+ <apex:inputCheckbox value="{!ar.mcae.Third_Party_Return__c}" id="Third_Party_Return__c"/>
</td>
</tr>
@@ -1638,9 +3211,12 @@
<th width="90px" style="text-align:right">璁惧鏁伴噺</th>
<td width="90px" style="text-align:right"><apex:outputtext value="{!productCount3}" id="productCount3"/></td>
<td width="25px"> </td>
+ <th width="90px" style="text-align:right">
+ <apex:inputField value="{!estimate.IS_Reduced_price_approval__c}" id="ISReducedpriceapproval" style="display:none"/></th>
+ <!-- <apex:inputField value="{!estimate.IS_Reduced_price_approval__c}" id="ISReducedpriceapproval"/></th> -->
+ <td width="25px"> </td>
<!--<th width="90px" style="text-align:right">鎶ヤ环鎬婚</th>
<th width="90px" style="text-align:right"><span id="allPage:allForm:allBlock:assetListSumNum" ></span></th>-->
- <td width="25px"> </td>
<th width="90px" style="text-align:right">淇悊鎬婚</th>
<th width="90px" style="text-align:right"><span id="allPage:allForm:allBlock:assetRepairSumNum" ></span></th>
<td width="95px"> </td>
@@ -1661,7 +3237,7 @@
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.SerialNumber.label}</th>
<th class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Department_Name__c.label}</th>
<!-- <th style="width:90px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Installation_Site__c.label}</th> -->
- <th style="width:90px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.IF_Warranty__c.label}</th>
+ <th style="width:90px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.IF_Warranty_Service__c.label}</th>
<!-- //JZHG-BSDUT4 ---20200825---update By rentongxiao---Start -->
<th style="width:90px" class="headerRow booleanColumn">涓绘満/鑰楁潗</th>
<!-- //JZHG-BSDUT4 ---20200825---update By rentongxiao---End -->
@@ -1679,7 +3255,7 @@
<apex:repeat value="{!assetsView}" var="ar" id="assetTable2">
<tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
<td class="dataCell" width="25px">
- <apex:inputCheckbox value="{!ar.rec_checkBox_c}" id="assetRowCheckbox2" disabled="{!IF(ar.rec.Maintenance_Price_Month__c == 0 || ar.rec.IF_Warranty__c = '鍚�', 'true', 'false')}"/>
+ <apex:inputCheckbox value="{!ar.rec_checkBox_c}" id="assetRowCheckbox2" disabled="{!IF(ar.rec.Maintenance_Price_Month__c == 0 || ar.rec.IF_Warranty_Service__c = '鍚�', 'true', 'false')}"/>
</td>
<td class="dataCell" width="25%">
<apex:outputField value="{!ar.rec.name}" id="assetName"/>
@@ -1697,7 +3273,7 @@
<apex:outputField value="{!ar.rec.Installation_Site__c}"/>
</td> -->
<td class="dataCell" width="90px" style="text-align:center">
- <apex:outputField value="{!ar.rec.IF_Warranty__c}"/>
+ <apex:outputField value="{!ar.rec.IF_Warranty_Service__c}"/>
</td>
<!-- //JZHG-BSDUT4 ---20200825---update By rentongxiao---Start -->
<td class="dataCell" width="90px" style="text-align:center">
@@ -1782,6 +3358,9 @@
<th style="text-align: center">鐢宠鎶ヤ环閲戦</th>
<th style="text-align: center">鍚堝悓璁惧淇悊鎬婚</th>
<th style="text-align: center">鍚堝悓鎬婚噾棰�</th>
+ <!-- 涓婇檺鍚堝悓 20230103 hql start -->
+ <th style="text-align: center">涓婇檺閲戦</th>
+ <!-- 涓婇檺鍚堝悓 20230103 hql end -->
</tr>
<tr>
<td style="text-align: center">
@@ -1792,6 +3371,7 @@
<apex:outputField value="{!estimate.GuidePrice_Up__c}" id="GuidePriceUp" />
<apex:inputHidden value="{!estimate.GuidePrice_Up__c}" id="GuidePriceUpHidden" />
</td>
+
<td style="text-align: center">
<!--<apex:inputField value="{!estimate.Request_quotation_Amount__c}" id="quotation_Amount" />-->
<apex:inputField value="{!estimate.Request_quotation_Amount__c}" style="ime-mode: disabled; text-align: right; width:100px" id="quotation_Amount" onchange="checkDiscount(this.value);"/>
@@ -1801,10 +3381,23 @@
<apex:inputHidden value="{!estimate.Asset_Repair_Sum_Price__c}" id="assetRepairSumPriceHidden" />
</td>
<td style="text-align: center">
- <apex:outputField value="{!estimate.Maintenance_Price__c}" id="mainteReal" />
+ <apex:outputField value="{!estimate.Maintenance_Price__c}" id="mainteReal"/>
<apex:inputHidden value="{!estimate.Maintenance_Price__c}" id="mainteRealHidden"/>
<apex:inputHidden value="{!OldMaintenancePrice}" id="oldMainteReal"/>
</td>
+ <!-- 涓婇檺鍚堝悓 20230103 hql start -->
+ <td style="text-align: center">
+ <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>
<tr>
<th style="text-align: center">{!$ObjectType.Maintenance_Contract_Estimate__c.fields.Service_discount_Rate__c.label}</th>
@@ -1850,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>
@@ -1974,9 +3632,12 @@
<td> </td>
<td width="30px"> </td>
<!-- <td><apex:commandButton id="savebtn" action="{!save}" value="{!$Label.Save_Button}" disabled="{!SaveBtnDisabled}" rerender="allForm" onclick="if (!onclickCheckchangedAfterPrint('true','true')) return false;" oncomplete="unblockUI();"/></td> -->
- <td><apex:commandButton id="savebtn" action="{!save}" value="{!$Label.Save_Button}" disabled="{!SaveBtnDisabled}" rerender="allForm" onclick="if (!EGFlgconfim()) return false;" oncomplete="unblockUI();"/></td>
-
- <td width="200px"><apex:commandButton id="approvalbtn" action="{!approvalProcess}" value="鎻愪氦寰呭鎵�" disabled="{!ApprovalBtnDisabled}" rerender="allForm" onclick="if (!KindsAndMonths()) return false;if (!EGFlgconfim()) return false;approvalJs();" oncomplete="unblockUI();"/>
+ <!-- 鏁呴殰淇悊璐� 娣诲姞鎻愪氦淇悊鍑忎环鎸夐挳 disabled="true" -->
+ <td><apex:commandButton id="emailSend" action="{!sendEmail}" value="鎻愪氦RC璇勪及" rerender="allForm" disabled="{!SendEmailBtnDisabled}" onclick="if (!EGFlgconfim()) return false;" oncomplete="unblockUI();"/></td>
+ <td>
+ <apex:commandButton id="approvalbtn1" action="{!toApprovalProcess}" value="鎻愪氦淇悊鍑忎环瀹℃壒" disabled="{!ApprovalBtnNewDisabled}" />
+ </td>
+ <td width="200px"><apex:commandButton id="approvalbtn" action="{!approvalProcess}" value="鎻愪氦寰呭鎵�" disabled="{!ApprovalBtnDisabled}" rerender="allForm" onclick="if (!KindsAndMonths()) return false;if (!EGFlgconfim()) return false;approvalJs();" oncomplete="unblockUI();toApprovalProcess();"/>
<!-- HWAG-B399Q8 2018/08/20 鏂板璇锋彁浜ゅ緟瀹℃壒 鎻愮ず瀛楁 start-->
<apex:outputText style="color:red;font-size:20px;" value="璇锋彁浜ゅ緟瀹℃壒" rendered="{!IS_Clone_After_Decide}"/>
<!-- HWAG-B399Q8 2018/08/20 鏂板璇锋彁浜ゅ緟瀹℃壒 鎻愮ず瀛楁 end-->
@@ -1990,6 +3651,9 @@
<td><apex:outputField value="{!estimate.Contract_End_Date__c}" id="contractenddate"/></td>
<td> </td>
<td><apex:commandButton id="decidebtn" value="{!$Label.QuoteDecision_Button}" disabled="{!DecideBtnDisabled}" onclick="decideJs(); return false;"/></td>
+ <td> <apex:commandButton id="savebtn" action="{!save}" value="{!$Label.Save_Button}" disabled="{!SaveBtnDisabled}" rerender="allForm" onclick="if (!EGFlgconfim()) return false;" oncomplete="unblockUI();"/>
+ </td>
+ <!-- <td><apex:commandButton id="decidebtn1" value="{!$Label.QuoteDecision_Button}" action="{!dosomething}"/></td> -->
<td style="text-align:right"><apex:commandButton id="undecidebtn" action="{!undecide}" value="鍙栨秷{!$Label.QuoteDecision_Button}" disabled="{!UnDecideBtnDisabled}" rerender="allForm" onclick="blockme();" oncomplete="unblockUI();"/></td>
</tr>
</table>
@@ -2144,7 +3808,7 @@
// xud 20140529 銇撱亾銇槑绱板鏇村垽鏂�
// xudan 20150729 銈姐兗銉堥爡鐩伀Id銈掕拷鍔�
var sql = "SELECT Id, Asset__c, Asset__r.SerialNumber, Check_Result__c, Product_Manual__c,"
- + " Repair_Price__c, Comment__c, Maintenance_Contract_Estimate__r.Maintenance_Price__c"
+ + " Repair_Price__c, Comment__c, Maintenance_Contract_Estimate__r.Maintenance_Price__c,Third_Party_Return__c"
+ " FROM Maintenance_Contract_Asset_Estimate__c"
+ " WHERE Maintenance_Contract_Estimate__c = '{!targetEstimateId}'"
+ " ORDER BY id,Asset__c,Product_Manual__c, Asset__r.SerialNumber, Asset__r.Name, Asset__r.Department_Name__c, Asset__r.InstallDate";
--
Gitblit v1.9.1