From 24fda5246494953a232b37547fb50bde77bd9886 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期三, 27 四月 2022 12:03:42 +0800
Subject: [PATCH] PIPLButtonIssueFix

---
 force-app/main/default/pages/NewRentalApply.page |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/pages/NewRentalApply.page b/force-app/main/default/pages/NewRentalApply.page
index 62eb087..0b4e2f5 100644
--- a/force-app/main/default/pages/NewRentalApply.page
+++ b/force-app/main/default/pages/NewRentalApply.page
@@ -67,7 +67,9 @@
             } else {
                 payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
             }
-            debugger
+            if('{!rtTypeId}'){
+                payloadJson.RecordTypeId = '{!rtTypeId}';//Add by zhj for Record Type Issue 20220421
+            }
             return payloadJson;
         }
         //Add Button status start 20220418
@@ -95,6 +97,19 @@
         disableButtonStatus();
         //Add Button status end 20220418 
         // New Or Edit
+
+        function EditButton(isDisabled){
+            var topele = document.getElementById('topButtonRow');
+            var bottomele = document.getElementById('bottomButtonRow');
+
+            if (isDisabled) {
+                topele.classList.add("disabledbutton");
+                bottomele.classList.add("disabledbutton");
+            }else {
+                topele.classList.remove("disabledbutton");
+                bottomele.classList.remove("disabledbutton");
+            }
+        }
         function ProcessPI(rentalApplyJson, payloadForNewPI) {
             blockme();
             if ({!isNewMode} || {!isCloneMode}) {
@@ -287,6 +302,7 @@
 
         //Base Process
         function saveRentalApplyProcess(saveMode) {
+            EditButton(true);
             redirectMode = saveMode;
             console.log('redirectMode' + redirectMode);
             hiddenErrorMsgNode();
@@ -320,6 +336,7 @@
             errorMsgNode.innerText = errorMsg;
             errorMsgNode.className = 'pbError';
             unblockUI();
+            EditButton(false);
         }
 
         //Hide Error Message

--
Gitblit v1.9.1