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/SelectAssetEstimateURF.page | 318 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 287 insertions(+), 31 deletions(-)
diff --git a/force-app/main/default/pages/SelectAssetEstimateURF.page b/force-app/main/default/pages/SelectAssetEstimateURF.page
index 36bf3e1..8c1d4e6 100644
--- a/force-app/main/default/pages/SelectAssetEstimateURF.page
+++ b/force-app/main/default/pages/SelectAssetEstimateURF.page
@@ -1,4 +1,4 @@
-<apex:page controller="SelectAssetEstimateURFController" tabStyle="Maintenance_Contract_Estimate__c" sidebar="false" showHeader="true" id="allPage" action="{!init}">
+<apex:page controller="SelectAssetEstimateURFController" tabStyle="Maintenance_Contract_Estimate__c" sidebar="false" showHeader="true" id="allPage" action="{!init}" lightningStylesheets="true">
<head>
<!-- <meta http-equiv="x-ua-compatible" content="ie=edge" /> -->
<!-- <meta name="viewport" content="width=device-width, initial-scale=1" /> -->
@@ -57,6 +57,16 @@
return false;
}
}
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
+ var FirstParagraphEnd = j$(escapeVfId('allPage:allForm:allBlock:contract:FirstParagraphEnd'))[0].checked;
+ if(FirstParagraphEnd){
+ if (confirm('鏈绛剧害缁忛攢鍟嗘槸鍏堟瀵硅薄锛岃纭鏄惁鎻愪氦鎶ヤ环锛�')) {
+ return true;
+ }else{
+ return false;
+ }
+ }
+ //URF闄愭鍚堝悓2鏈� LY 20220920 end
return true;
}
//add by gwy 2021-01-27 end 鎻愪氦鏃剁殑鎻愮ず妗�
@@ -92,6 +102,7 @@
blockme();
searchfunc();
}
+
//<!-- HWAG-B4R3SS END 20181026-->
// 鍒濆鍖栬瀹氱敾闈㈤」鐩笉鍙敤
function pageSetDisabled(){
@@ -102,6 +113,10 @@
j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:allBlock:contract:estimateTarget')).attr("disabled", true);
j$(escapeVfId('allPage:allForm:allBlock:contract:EndUserType')).attr("disabled", true);
+ //URF闄愭鍚堝悓2鏈� LY 20220811 start
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).attr("disabled", true);
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
var rowCnt = {!productCount};
for (var i = 0; i < rowCnt; i++) {
var isManual = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':IsManual')).text();
@@ -133,6 +148,9 @@
var target = j$(escapeVfId('allPage:allForm:allBlock:contract:estimateTarget')).val();
if (target != '鍖婚櫌') {
j$(escapeVfId('allPage:allForm:allBlock:contract:dealer')).attr("disabled", true);
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
+ j$(escapeVfId('allPage:allForm:allBlock:contract:FirstParagraphEnd')).attr("disabled", true);
+ //URF闄愭鍚堝悓2鏈� LY 20220920 end
}
}
if ('{!DecideBtnDisabled}' == 'false') {
@@ -208,7 +226,7 @@
//j$(escapeVfId('allPage:allForm:decidebtn')).attr("class", 'btnDisabled');
if (confirm(Confirm_EstimateRefresh)) {
- window.location.href="/apex/SelectAssetEstimateVM?copyid={!URLENCODE(targetEstimateId)}";
+ window.location.href="/apex/SelectAssetEstimateURF?copyid={!URLENCODE(targetEstimateId)}";
return true;
} else {
if ('{!DecideBtnDisabled}' == 'false') {
@@ -240,7 +258,7 @@
//j$(escapeVfId('allPage:allForm:decidebtn')).attr("class", 'btnDisabled');
if (confirm('宸茶秴杩囧垱寤烘棩6涓湀锛屾槸鍚︽洿鏂版姤浠凤紵')) {
- window.location.href="/apex/SelectAssetEstimateVM?copyid={!URLENCODE(targetEstimateId)}";
+ window.location.href="/apex/SelectAssetEstimateURF?copyid={!URLENCODE(targetEstimateId)}";
return true;
} else {
if ('{!DecideBtnDisabled}' == 'false') {
@@ -320,6 +338,49 @@
//contractStartDateChange();
refreshAsset(cnt);
}
+//URF闄愭鍚堝悓2鏈� LY 20220811 start
+function checkVMaxRepairCount(val, cnt) {
+
+ var uRFSeriesMap =[];
+ for (var i = 0; i < cnt; i++) {
+ var uRFSeries = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uRFSeries')).text();
+ // var uRFSeries = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uRFSeries')).value();
+ uRFSeriesMap.push(uRFSeries);
+ }
+ if ((val == null || val == "" || val == "0") && uRFSeriesMap.includes('URF-V')){
+ alert("鍚堝悓瀵硅薄璁惧涓惈鏈塙RF-V绯诲垪锛屽繀椤婚�夋嫨URF-V鐨勬渶澶уぇ淇鏁�!");
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).val("0");
+ return;
+ }
+ if ((val == "3") && uRFSeriesMap.includes('URF-V')){
+ alert("鍚堝悓瀵硅薄璁惧涓璘RF-V绯诲垪鐩墠涓嶈兘閫夋嫨3娆�!");
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).val("0");
+ return;
+ }
+ if (uRFSeriesMap.includes('URF-V')==false) {
+ alert("鍚堝悓瀵硅薄璁惧涓笉鍚湁URF-V绯诲垪锛孶RF-V鐨勬渶澶уぇ淇鏁板繀椤婚�夋嫨/!");
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).val("0");
+ }
+ refreshAsset(cnt);
+}
+function checkPMaxRepairCount(val, cnt) {
+ var uRFSeriesMap =[];
+ for (var i = 0; i < cnt; i++) {
+ var uRFSeries = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uRFSeries')).text();
+ uRFSeriesMap.push(uRFSeries);
+ }
+ if ((val == null || val == "" || val == "0") && uRFSeriesMap.includes('URF-P')){
+ alert("鍚堝悓瀵硅薄璁惧涓惈鏈塙RF-P绯诲垪锛孶RF-P鐨勬渶澶уぇ淇鏁板繀椤婚�夋嫨!");
+ //j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).val("3");
+ }
+ if (uRFSeriesMap.includes('URF-P')==false) {
+ alert("鍚堝悓瀵硅薄璁惧涓笉鍚湁URF-P绯诲垪锛孶RF-P鐨勬渶澶уぇ淇鏁板繀椤婚�夋嫨/!");
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).val("0");
+ }
+
+ refreshAsset(cnt);
+}
+//URF闄愭鍚堝悓2鏈� LY 20220811 end
function checkContractEstiStartDate(val, cnt) {
if (val == null || val == "") {
@@ -391,6 +452,10 @@
var upPriceSum = 0;
// 鍚堝悓鏈堟暟涔楃畻
var month = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val());
+ //URF闄愭鍚堝悓2鏈� LY 20220811 start
+ var estimateURFVMaxRepairCount=localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).val())
+ var estimateURFPMaxRepairCount=localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).val())
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
// XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start
var Contract_year = 0;
if (month == undefined || month == "" || month <= 12) {
@@ -420,6 +485,7 @@
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();
+
if (isManual == 'true') {
var a = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Assert')).value();
if (a != '') {
@@ -433,8 +499,22 @@
strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val();
// XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start
- strMoneyMax = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMaxPrice')).val();
- strMoneyMin = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMinPrice')).val();
+ //URF闄愭鍚堝悓2鏈� LY 20220811 start
+ var uRFSeries= j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uRFSeries')).value();
+ if (uRFSeries=='URF-V' && estimateURFVMaxRepairCount==2) {
+ strMoneyMax = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMaxPrice')).val();
+ strMoneyMin = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMinPrice')).val();
+ }else if (uRFSeries=='URF-V' && estimateURFVMaxRepairCount==0) {
+ strMoneyMax = 0;
+ strMoneyMin = 0;
+ }else if (uRFSeries=='URF-P' && estimateURFPMaxRepairCount==0){
+ strMoneyMax = 0;
+ strMoneyMin = 0;
+ }else{
+ strMoneyMax = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMaxPrice3')).val();
+ strMoneyMin = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMinPrice3')).val();
+ }
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
// XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end
// alert(strMoney);
Price_YearTXT = strMoney * 12;
@@ -557,8 +637,22 @@
}
strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val();
// XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 start
- strMoneyMax = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMaxPrice')).val();
- strMoneyMin = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMinPrice')).val();
+ //URF闄愭鍚堝悓2鏈� LY 20220811 start
+ var uRFSeries= j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uRFSeries')).value();
+ if (uRFSeries=='URF-V' && estimateURFVMaxRepairCount==2) {
+ strMoneyMax = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMaxPrice')).val();
+ strMoneyMin = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMinPrice')).val();
+ }else if (uRFSeries=='URF-V' && estimateURFVMaxRepairCount==0) {
+ strMoneyMax = 0;
+ strMoneyMin = 0;
+ }else if (uRFSeries=='URF-P' && estimateURFPMaxRepairCount==0){
+ strMoneyMax = 0;
+ strMoneyMin = 0;
+ }else{
+ strMoneyMax = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMaxPrice3')).val();
+ strMoneyMin = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uFRMinPrice3')).val();
+ }
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
// XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end
Price_YearTXT = strMoney * 12;
if (isnew == 'true') {
@@ -803,13 +897,22 @@
function resetDealer() {
var target = j$(escapeVfId('allPage:allForm:allBlock:contract:estimateTarget')).val();
var obj = document.getElementById('allPage:allForm:allBlock:contract:dealer');
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
+ var obj2 = document.getElementById('allPage:allForm:allBlock:contract:FirstParagraphEnd');
+ //URF闄愭鍚堝悓2鏈� LY 20220920 end
var obj_lkwgt = document.getElementById('allPage:allForm:allBlock:contract:dealer_lkwgt');
if (target == '鍖婚櫌') {
obj.style.display = "none";
obj_lkwgt.style.display = "none";
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
+ obj2.style.display = "none";
+ //URF闄愭鍚堝悓2鏈� LY 20220920 end
} else {
obj.style.display = "block";
obj_lkwgt.style.display = "block";
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
+ obj2.style.display = "block";
+ //URF闄愭鍚堝悓2鏈� LY 20220920 end
}
}
@@ -863,7 +966,11 @@
var alert1s = 0;
var today = new Date();
today.setMonth(today.getMonth() - 3);
-
+ //URF闄愭鍚堝悓2鏈� LY 20220811 start
+ var uRFSeriesMap =[];
+ var valURFV =j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).val();
+ var valURFP =j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).val();
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
for (var i = 0; i < cntWithKara; i++) {
var isManual = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':IsManual')).text();
if (isManual == 'true') {
@@ -885,7 +992,33 @@
alerts = 1;
}
}
+ //URF闄愭鍚堝悓2鏈� LY 20220811 start
+ var uRFSeries = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':uRFSeries')).text();
+ uRFSeriesMap.push(uRFSeries);
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
+
}
+ //URF闄愭鍚堝悓2鏈� LY 20220811 start
+ if ((valURFV == null || valURFV == "" || valURFV == "0") && uRFSeriesMap.includes('URF-V')){
+ alert("鍚堝悓瀵硅薄璁惧涓惈鏈塙RF-V绯诲垪锛屽繀椤婚�夋嫨URF-V鐨勬渶澶уぇ淇鏁�!");
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).val("");
+ return;
+ }
+ if ((valURFP == null || valURFP == "" || valURFP == "0") && uRFSeriesMap.includes('URF-P')){
+ alert("鍚堝悓瀵硅薄璁惧涓惈鏈塙RF-P绯诲垪锛屽繀椤婚�夋嫨URF-P鐨勬渶澶уぇ淇鏁�!");
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).val("0");
+ return;
+ }
+ if (uRFSeriesMap.includes('URF-V')==false) {
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).val("0");
+ }
+ // if ((valURFP == null || valURFP == "" || valURFP == "0") && uRFSeriesMap.includes('URF-P')){
+ // j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).val("3");
+ // }
+ if (uRFSeriesMap.includes('URF-P')==false) {
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).val("0");
+ }
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
if (alerts == 1) {
if (confirm("閫夋嫨鐨勪繚鏈夎澶嘯鏈�鍚庣偣妫�鏃涓虹┖鎴栧凡缁忚秴杩囦笁涓湀涔嬪墠锛屾槸鍚︾户缁紵")) {
@@ -1021,8 +1154,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();
@@ -1152,22 +1287,32 @@
assetRepairSumPrice = localParseFloat(assetRepairSumPrice);
// 璁$畻瀹為檯鎶ヤ环鎬婚噾棰�
var realprice = mainteReal - assetRepairSumPrice;
+ //URF闄愭鍚堝悓2鏈� LY 20221009 start
// 鏍囧噯浠锋牸鐨勬渶楂樹环鎬婚
var GuidePriceUp = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceUpHidden')).val());
+ // //鏍囧噯浠锋牸鐨勬渶浣庝环鎬婚
+ var GuidePriceDown = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:GuidePriceDownHidden')).val());
GuidePriceUp = localParseFloat(GuidePriceUp);
+ GuidePriceDown = localParseFloat(GuidePriceDown);
for (var i = 0; i < rowcount; i++) {
// 鍘讳笂闄愪环鏍�
var assetListPrice = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val();
+ // //鍙栦笅闄愪环鏍�
+ var assetLowerPrice = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val();
assetListPrice = localParseFloat(assetListPrice);
- if(GuidePriceUp == 0){
- j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Estimate_Cost')).val(0);
+ var Estimate_Cost = 0;
+ if(realprice == GuidePriceUp){
+ Estimate_Cost = assetListPrice;
+ // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Estimate_Cost')).val(0);
+ } else if (realprice == GuidePriceDown){
+ Estimate_Cost = assetLowerPrice;
}else{
- var Estimate_Cost = (realprice * (assetListPrice / GuidePriceUp)).toFixed(2);
- j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Estimate_Cost')).val(Estimate_Cost);
+ Estimate_Cost = (realprice * (assetListPrice / GuidePriceUp)).toFixed(2);
}
-
+ j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Estimate_Cost')).val(Estimate_Cost);
}
+ //URF闄愭鍚堝悓2鏈� LY 20221009 end
}
function getLastContractRate(){
@@ -1185,9 +1330,11 @@
}
}
var allContractRate = '' + 0.00 + '%';
- if( count > 0){
- allContractRate = '' + (Contractrate/count).toFixed(2) + '%';
- }
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
+ // if( count > 0){
+ // allContractRate = '' + (Contractrate/count).toFixed(2) + '%';
+ // }
+ //URF闄愭鍚堝悓2鏈� LY 20220920 end
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Combinedrate')).text(allContractRate);
j$(escapeVfId('allPage:allForm:allBlock:contractInfo:CombinedrateHidden')).val(parseFloat(allContractRate));
@@ -1212,6 +1359,37 @@
return 0;
}
}
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
+ //鑾峰彇缁忛攢鍟嗙殑鍏堟鏍囪瘑
+ function onChDealerUpdateJs(oBj){
+ //鑾峰彇 鎶ヤ环鎻愪氦瀵硅薄 鏄惁涓虹粡閿�鍟�
+ var estimateTarget = j$(escapeVfId('allPage:allForm:allBlock:contract:estimateTarget'))[0].value;
+ if(estimateTarget == '缁忛攢鍟�'){
+ //鍒ゆ柇缁忛攢鍟嗗悕鏄惁涓虹┖
+ var dealerValue = j$(escapeVfId('allPage:allForm:allBlock:contract:dealer')).val();
+ if(dealerValue != ''){
+ //鑾峰彇缁忛攢鍟嗗悕鐨刬d
+ var dealerId = j$(escapeVfId('allPage:allForm:allBlock:contract:dealer_lkid')).val();
+ //鐢变簬salesforce鐨勬煡鎵惧瓧娈垫槸鍙互杈撳叆鐨勶紝鎵�浠ュ垽鏂粬濡傛灉涓虹┖鎴栬�呬负 000000000000000 鐨勬椂鍊欙紝浼犵殑鍙傛暟灏变綅缁忛攢鍟嗕腑鏂囧悕锛屽叾浠栨儏鍐典紶id
+ if(dealerId != '' && dealerId != '000000000000000'){
+ onChDealerUpdate(dealerId);
+ }else{
+ onChDealerUpdate(dealerValue);
+ }
+ }else{
+ onChDealerUpdate('');
+ //j$(escapeVfId('allPage:allForm:allBlock:contract:FirstParagraphEnd'))[0].checked = false;
+ }
+ }
+ }
+ //濡傛灉閫夋嫨鐨勭粡閿�鍟嗕负鍏堟瀵硅薄锛岄偅涔堝仛涓�涓嬫彁绀�
+ function hintAccount(){
+ var xkChecked = j$(escapeVfId('allPage:allForm:allBlock:contract:FirstParagraphEnd'))[0].checked;
+ if(xkChecked){
+ alert('璇锋敞鎰忥紝褰撳墠缁忛攢鍟嗕负鍏堟瀵硅薄銆�');
+ }
+ }
+ //URF闄愭鍚堝悓2鏈� LY 20220920 start
</script>
<apex:form id="allForm">
<apex:inputHidden id="alertStringValue" value="{!alertString}" />
@@ -1231,6 +1409,11 @@
<apex:actionFunction name="decide" action="{!decide}" rerender="allForm" oncomplete="unblockUI();"/>
<apex:actionFunction name="decideCancle" action="{!decideCancle}" rerender="allForm" oncomplete="unblockUI();"/>
<apex:inputHidden id="oldDecideContractDate" value="{!OldContractStartDate}" />
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220920 start -->
+ <apex:actionFunction name="onChDealerUpdate" action="{!onChDealerUpdate}" rerender="contract" onComplete="hintAccount();">
+ <apex:param name="checkDealerId" assignTo="{!checkDealerId}" value="" />
+ </apex:actionFunction>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220920 end -->
<input type="hidden" id="oldContractDate" value="{!estimate.Contract_Start_Date__c}" />
<script type="text/javascript">
//j$(escapeVfId('allPage:allForm:changedAfterPrint')).val('false');
@@ -1250,7 +1433,7 @@
<apex:pageMessages id="pageMessages"></apex:pageMessages>
<!-- update 鍚堝悓鎶ヤ环椤甸潰鐨勪紭鍖� 娣诲姞鈥榓ssetSection鈥� fxk 2021/9/10 Star-->
- <apex:actionFunction name="refreshProductData" action="{!refreshProductData}" rerender="pageMessages,EquipmentGuaranteeFlg,EGFlgassHidden,EquipmentGuaranteeFlgtxt, assetListPriceHidden, productCount3, assetSection, uFRMaxPrice, uFRMinPrice" oncomplete="refreshAsset({!productCount});unblockUI();">
+ <apex:actionFunction name="refreshProductData" action="{!refreshProductData}" rerender="pageMessages,EquipmentGuaranteeFlg,EGFlgassHidden,EquipmentGuaranteeFlgtxt, assetListPriceHidden, productCount3, assetSection, uFRMaxPrice, uFRMinPrice, uFRMaxPrice3, uFRMinPrice3,uRFSeries" oncomplete="refreshAsset({!productCount});unblockUI();">
<apex:param assignTo="{!productIdx}" name="productIdx" value=""/>
</apex:actionFunction>
<!-- update 鍚堝悓鎶ヤ环椤甸潰鐨勪紭鍖� 娣诲姞鈥榓ssetSection鈥� fxk 2021/9/10 End-->
@@ -1318,9 +1501,13 @@
<td width="50%" align="left"> <apex:inputField value="{!estimate.Contract_Esti_Start_Date__c}" required="true" id="startdate" onchange="changeEstiStartdate(this.value);"/>
</td>
</tr>
- <tr>
+ <!-- <tr>
<td width="50%" align="right"><label class="labelCol vfLabelColTextWrap " style="margin-left:22%">鍚堝悓缁撴潫棰勮鏃�</label> </td>
<td width="50%" align="left"> <apex:outputField value="{!estimate.Contract_Esti_End_Date__c}"/> </td>
+ </tr> -->
+ <tr>
+ <td width="50%" align="right"><label class="labelCol vfLabelColTextWrap " style="margin-left:22%">鍚堝悓缁撴潫棰勮鏃�</label> </td>
+ <td width="50%" align="left"> <apex:inputField value="{!estimate.Contract_Esti_End_Date__c}" required="true" id="enddate" /> </td>
</tr>
<tr>
<td align="right">
@@ -1380,17 +1567,41 @@
<td width="50%" align="right"> <label class="labelCol vfLabelColTextWrap " style="margin-left:22%">鍒跺畾鏃�</label></td>
<td width="50%" align="left"> <apex:outputField label="鍒跺畾鏃�" value="{!estimate.CreatedDate}" id="createDateShow"/> </td>
</tr>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 start -->
<tr>
<td width="50%" align="right">
<label class="labelCol vfLabelColTextWrap " style="margin-left:30%"> 缁忛攢鍟嗗悕</label></td>
- <td width="50%" align="left"> <apex:inputField value="{!estimate.Dealer__c}" id="dealer" /> </td>
+ <td width="50%" align="left"> <apex:inputField value="{!estimate.Dealer__c}" id="dealer" onchange="onChDealerUpdateJs(this);return false;" style="float: left;"/> </td>
</tr>
+ <tr>
+ <td width="50%" align="right">
+ <label class="labelCol vfLabelColTextWrap " style="margin-left:30%"> 鍏堟鏍囪瘑锛堢粡閿�鍟嗭級</label></td>
+ <td width="50%" align="left" > <apex:inputCheckbox value="{!estimate.Is_RecognitionModel__c}" id="FirstParagraphEnd" onClick="return false;" /> </td>
+ </tr>
+ <tr>
+ <td width="50%" align="right">
+ <label class="labelCol vfLabelColTextWrap " style="margin-left:22%">URF-V鏈�澶уぇ淇鏁�:</label></td>
+ <td>
+ <apex:inputField value="{!estimate.URF_V_MaxRepairCount__c}" required="false" id="estimateURFVMaxRepairCount" onchange="checkVMaxRepairCount(this.value,{!productCount})" style="margin-left:5px"/>娆�
+ </td>
+ </tr>
+ <tr>
+ <td width="50%" align="right">
+ <label class="labelCol vfLabelColTextWrap " style="margin-left:30%">URF-P鏈�澶уぇ淇鏁�:</label></td>
+ <td width="50%" align="left">
+ <apex:inputField value="{!estimate.URF_P_MaxRepairCount__c}" required="false" id="estimateURFPMaxRepairCount" onchange="checkPMaxRepairCount(this.value,{!productCount})" style="margin-left:5px"/>娆�
+ </td>
+
+ </tr>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 end -->
</table>
<script type="text/javascript">
j$(escapeVfId('allPage:allForm:allBlock:contract:estimateTarget')).children('option[value=]').remove();
resetDealer();
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFVMaxRepairCount')).children('option[value=]').remove();
+ j$(escapeVfId('allPage:allForm:allBlock:contract:estimateURFPMaxRepairCount')).children('option[value=]').remove();
</script>
</apex:outputPanel>
</apex:pageBlockSection>
@@ -1422,13 +1633,20 @@
<tr class="headerRow" height="30px">
<th style="width:25px" class="headerRow booleanColumn"><input type='checkbox' onClick='checkAll(this)'/></th>
<th class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Name.label}</th>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 start -->
+ <th style="width:35px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.URF_Series__c.label}
+ </th>
+ <!-- <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.URF_Maintenance_Contract__c.label}</th> -->
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 end -->
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Asset_situation__c.label}</th>
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.SerialNumber.label}</th>
<th class="headerRow booleanColumn">{!$ObjectType.Asset.fields.EGFlg_fromContract_asset__c.label}</th>
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.InstallDate.label}</th>
<!--add鐐规鏀瑰杽锛氭柊澧炰竴涓偣妫�瀵硅薄澶嶉�夋瀛楁锛岄粯璁や负true 2021.6.8 fxk Star-->
- <th style="width:70px" class="headerRow booleanColumn">
- {!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Check_Object__c.label}</th>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 start -->
+ <!-- <th style="width:70px" class="headerRow booleanColumn">
+ {!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Check_Object__c.label}</th> -->
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 end -->
<!--add鐐规鏀瑰杽锛氭柊澧炰竴涓偣妫�瀵硅薄澶嶉�夋瀛楁锛岄粯璁や负true 2021.6.8 fxk end-->
<th style="width:40px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.IsNew__c.label}</th>
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Department_Name__c.label}</th>
@@ -1473,6 +1691,17 @@
<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 -->
+ <td class="dataCell" width="70px" >
+ <apex:outputText value="{!ar.uFRSerial}" id="uRFSeries"/>
+ </td>
+ <!-- <td class="dataCell" width="70px">
+ <apex:outputField value="{!ar.rec.URF_Maintenance_Contract__r.Management_Code__c}" rendered="{!Not(ar.IsManual)}" id="URF_Contract_No"/>
+ </td> -->
+
+ <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)}" />
</td>
@@ -1490,9 +1719,11 @@
<apex:outputField value="{!ar.rec.InstallDate}" id="InstallDate" rendered="{!Not(ar.IsManual)}" />
</td>
<!--add鐐规鏀瑰杽锛氭柊澧炰竴涓偣妫�瀵硅薄澶嶉�夋瀛楁锛岄粯璁や负true 2021.6.8 fxk Star-->
- <td class="dataCell" width="70px" style="text-align:center" >
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 start -->
+ <!-- <td class="dataCell" width="70px" style="text-align:center" >
<apex:inputCheckbox value="{!ar.mcae.Check_Object__c}" id="assetCheck" disabled="{!ar.CheckRows}"/>
- </td>
+ </td> -->
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 end -->
<!--add鐐规鏀瑰杽锛氭柊澧炰竴涓偣妫�瀵硅薄澶嶉�夋瀛楁锛岄粯璁や负true 2021.6.8 fxk end-->
<td class="dataCell" width="40px" style="text-align:center" >
<apex:inputCheckbox value="{!ar.mcae.IsNew__c}" id="assetNew" disabled="true"/>
@@ -1538,6 +1769,10 @@
<apex:inputHidden value="{!ar.uFRMaxPrice}" id="uFRMaxPrice"/>
<apex:inputHidden value="{!ar.uFRMinPrice}" id="uFRMinPrice"/>
<!-- XLIU-CE7AVC銆愬鎵樸�慤RF闄愭淇悊鍚堝悓鐨勬渶楂樹环鏍间慨鏀� thh 20220509 end -->
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 start -->
+ <apex:inputHidden value="{!ar.uFRMaxPrice3}" id="uFRMaxPrice3"/>
+ <apex:inputHidden value="{!ar.uFRMinPrice3}" id="uFRMinPrice3"/>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 end -->
<apex:inputHidden value="{!ar.mcae.Estimate_List_Price_Page__c}" id="assetListPricePageHidden" />
<apex:inputHidden value="{!ar.rec.CurrentContract_F__r.Estimate_Num__c}" id="Estimate_NumHidden" />
</apex:outputPanel>
@@ -1656,6 +1891,9 @@
<tr class="headerRow" height="30px">
<th style="width:25px" class="headerRow booleanColumn"><input type='checkbox' onClick='checkAll2(this)'/></th>
<th style="width:25%" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Name.label}</th>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 start -->
+ <th style="width:90px" class="headerRow booleanColumn">闄愭绯诲垪<!-- {!$ObjectType.Asset.fields.Product2.ProductURF__r.URFLimitSerial__c.label} --></th>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 end -->
<th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Asset_situation__c.label}</th>
<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>
@@ -1677,12 +1915,21 @@
<apex:repeat value="{!unCheckedAssetsView}" var="assetsView" id="outassetTable2">
<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">
+ <!-- <td class="dataCell" width="25px">
<apex:inputCheckbox value="{!ar.rec_checkBox_c}" id="assetRowCheckbox2" disabled="{!IF(ar.uFRPrice == 0 || ar.rec.IF_Warranty__c = '鍚�', 'true', 'false')}"/>
+ </td> -->
+ <!-- gzw update 20220823 -->
+ <td class="dataCell" width="25px">
+ <apex:inputCheckbox value="{!ar.rec_checkBox_c}" id="assetRowCheckbox2" disabled="{!IF( ar.rec.IF_Warranty__c = '鍚�', 'true', 'false')}"/>
</td>
<td class="dataCell" width="25%">
<apex:outputField value="{!ar.rec.name}" id="assetName"/>
</td>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 start -->
+ <td class="dataCell" width="90px">
+ <!-- <apex:outputField value="{!ar.rec.Product2.ProductURF__r.URFLimitSerial__c}"/> --><apex:outputText value="{!ar.uFRSerial}"/>
+ </td>
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220811 end -->
<td class="dataCell" width="70px">
<apex:outputField value="{!ar.rec.Asset_situation__c}"/>
</td>
@@ -1827,7 +2074,10 @@
<apex:inputHidden value="{!estimate.Combined_rate__c}" id="CombinedrateHidden" />
</td>
<td style="text-align: center">
- <apex:outputField value="{!estimate.Consumption_rate_Forecast__c}" />
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220920 start -->
+ <!-- <apex:outputField value="{!estimate.Consumption_rate_Forecast__c}" /> -->
+ -
+ <!-- URF闄愭鍚堝悓2鏈� LY 20220920 end -->
</td>
<td style="text-align: center">
<apex:outputField value="{!estimate.Estimate_Price_range__c}" />
@@ -2062,7 +2312,7 @@
// 閫夋嫨璁惧鍚庝环鏍煎彉鏇碿heck
if (assIds.length > 0) {
// alert('222222222222' + assIds);
- var sql = "SELECT Id, Maintenance_Price_Month__c,Product2.UFR_Maintenance_Price_Month__c, Posting_Date__c, InstallDate from Asset where Id In(" + assIds + ")";
+ var sql = "SELECT Id, Maintenance_Price_Month__c,Product2.UFR_Maintenance_Price_Month__c, Posting_Date__c, InstallDate,Product2.UFR_Maintenance_Price_Month_3__c from Asset where Id In(" + assIds + ")";
var rt = sforce.connection.query(sql);
var asList = rt.getArray("records");
if (asList != null) {
@@ -2072,7 +2322,10 @@
var asId = asvar["Id"];
// alert('asvar++++' + asvar["Product2"].["ProductURF__r"].["UFR_Maintenance_Price_Month__c"]);
// var mprice = asvar["Maintenance_Price_Month__c"];
- var mprice = asvar["Product2"].UFR_Maintenance_Price_Month__c;
+ //URF闄愭鍚堝悓2鏈� LY 20220811 start
+ //var mprice = asvar["Product2"].UFR_Maintenance_Price_Month__c;
+ var mprice = asvar["Product2"].UFR_Maintenance_Price_Month_3__c;
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
var ptDt = asvar["Posting_Date__c"];
var postingDate = null;
if (ptDt != null && ptDt != '') {
@@ -2110,7 +2363,7 @@
return true;
}
} else {
- var sql = "SELECT Id, Maintenance_Price_Month__c,UFR_Maintenance_Price_Month__c from Product2 where Id In(" + proIds + ")";
+ var sql = "SELECT Id, Maintenance_Price_Month__c,UFR_Maintenance_Price_Month__c,UFR_Maintenance_Price_Month_3__c from Product2 where Id In(" + proIds + ")";
var rt = sforce.connection.query(sql);
var pdList = rt.getArray("records");
if (pdList != null) {
@@ -2118,7 +2371,10 @@
var pdvar = pdList[i];
var pdId = pdvar["Id"];
// var mprice = pdvar["Maintenance_Price_Month__c"];
- var mprice = pdvar["UFR_Maintenance_Price_Month__c"];
+ //URF闄愭鍚堝悓2鏈� LY 20220811 strat
+ //var mprice = pdvar["UFR_Maintenance_Price_Month__c"];
+ var mprice = pdvar["UFR_Maintenance_Price_Month_3__c"];
+ //URF闄愭鍚堝悓2鏈� LY 20220811 end
var priceShow = priceMap.get(pdId);
if (Number(mprice).toFixed(2) != Number(priceShow).toFixed(2)) {
needClearId = true;
--
Gitblit v1.9.1