From 1b214a96d371ce90578fb7d6c14eecfcba5f87f0 Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期一, 11 四月 2022 18:52:32 +0800
Subject: [PATCH] Sfdc2PoContactBatch修改
---
force-app/main/default/pages/SelectAssetEstimateVM.page | 37 +++++++++++++++++++------------------
1 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/force-app/main/default/pages/SelectAssetEstimateVM.page b/force-app/main/default/pages/SelectAssetEstimateVM.page
index 6ddfe74..39e8734 100644
--- a/force-app/main/default/pages/SelectAssetEstimateVM.page
+++ b/force-app/main/default/pages/SelectAssetEstimateVM.page
@@ -57,7 +57,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 鎻愪氦鏃剁殑鎻愮ず妗�
@@ -411,8 +421,6 @@
strMoney = month * strMoney + month2 * strMoney;
}
var b = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contract_No')).value();
- var IsRenewal = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':IsRenewal')).value();
- // 20220325 ljh add IsRenewal LJPH-C8FB4P銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 start
var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value();
if(b != ''){
conCCount ++;
@@ -431,10 +439,7 @@
}
//鏈�鍚庣粨鏉熸棩+1骞�
lastendDate.setMonth(lastendDate.getMonth() + 12);
- // 20220325 ljh update IsRenewal 銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 start
- // if (Date.parse(contractStartDate) > Date.parse(lastendDate) ) {
- if (Date.parse(contractStartDate) > Date.parse(lastendDate) && IsRenewal = true) {
- // 20220325 ljh update IsRenewal 銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 end
+ if (Date.parse(contractStartDate) > Date.parse(lastendDate) ) {
oyearCount ++;
}
// 鍙栬仈鍔ㄤ环鏍�
@@ -520,9 +525,7 @@
} else {
strMoney = month * strMoney + month2 * strMoney;
}
- var b = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contract_No')).value();
- var IsRenewal = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':IsRenewal')).value();
- // 20220325 ljh add IsRenewal LJPH-C8FB4P銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗
+ 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 != ''){
conCCount ++;
@@ -540,10 +543,7 @@
}
//鏈�鍚庣粨鏉熸棩+1骞�
lastendDate.setMonth(lastendDate.getMonth() + 12);
- // 20220325 ljh update IsRenewal LJPH-C8FB4P銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 start
- // if (Date.parse(contractStartDate) > Date.parse(lastendDate))
- if (Date.parse(contractStartDate) > Date.parse(lastendDate) && IsRenewal = true) {
- // 20220325 ljh update IsRenewal LJPH-C8FB4P銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 end
+ if (Date.parse(contractStartDate) > Date.parse(lastendDate)) {
oyearCount ++;
}
// 鍙栬仈鍔ㄤ环鏍�
@@ -632,11 +632,15 @@
result = '棣栫鍚堝悓';
}else if(firstCCount > 0 && firstCCount == allcount){
result = '棣栫鍚堝悓';
- }else if(oyearCount > 0 && oyearCount == conCCount){
+ // 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;
// 鍙栨秷閰稿寲姘�
@@ -1546,9 +1550,6 @@
<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"/>
- <!-- 20220325 ljh add LJPH-C8FB4P銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 start -->
- <apex:inputHidden value="{!ar.rec.CurrentContract_F__r.Is_Renewal__c}" id="IsRenewal"/>
- <!-- 20220325 ljh add start LJPH-C8FB4P銆愬鎵樸�戦厤鍚圥BI璁惧瑕嗙洊鐜囩殑鏁版嵁鍑嗗 end -->
<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"/>
--
Gitblit v1.9.1