From 2d5b6ced9bbcb7a30159fd892b39d27a7e048b82 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期日, 24 四月 2022 09:41:45 +0800
Subject: [PATCH] BatchForAgencyContact
---
force-app/main/default/pages/NewConsumApply.page | 39 ++++++++++++++++++++++++++++++++-------
1 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/force-app/main/default/pages/NewConsumApply.page b/force-app/main/default/pages/NewConsumApply.page
index 73dd489..dfb4666 100644
--- a/force-app/main/default/pages/NewConsumApply.page
+++ b/force-app/main/default/pages/NewConsumApply.page
@@ -2,7 +2,7 @@
@description :
@author : ChangeMeIn@UserSettingsUnder.SFDoc
@group :
- @last modified on : 03-28-2022
+ @last modified on : 03-30-2022
@last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Consum_Apply__c" extensions="NewConsumApplyController" id="page">
@@ -60,10 +60,14 @@
payloadJson.Phone_Number_Encrypt__c = r.object[0].phoneNumberEncrypt;
payloadJson.Direct_Shippment_Address_Encrypt__c = r.object[0].directShippmentAddressEncrypt;
payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
- if (isNewMode) {
+ if (isNewMode || {!isCloneMode}) {
payloadJson.AWS_Data_Id__c = r.object[0].dataId;
+ delete payloadJson.OwnerId;
} else {
payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
+ }
+ if('{!rtTypeId}'){
+ payloadJson.RecordTypeId = '{!rtTypeId}';//Add by zhj for Record Type Issue 20220421
}
return payloadJson;
}
@@ -71,8 +75,7 @@
// New Or Edit
function ProcessPI(consumApplyJson, payloadForNewPI) {
blockme();
- if ({!isNewMode
- }) {
+ if ({!isNewMode} || {!isCloneMode}) {
NewPIToAWS(consumApplyJson, payloadForNewPI)
}else {
UpdatePIToAWS(consumApplyJson, payloadForNewPI)
@@ -381,7 +384,7 @@
<img src="/img/s.gif" alt="" class="minWidth" title="" width="1" height="1" />
<h2 class="mainTitle">鑰楁潗澶囧搧鐢宠缂栬緫</h2>
</td>
- <td class="pbButton" id="topButtonRow">
+ <td class="pbButton" id="topButtonRow" style="pointer-events: none; opacity: 0.4;">
<input class="btn" type="Button" value="淇濆瓨" onclick="saveConsumApplyProcess('Save')" />
<input class="btn" type="Button" value="淇濆瓨骞舵柊寤�" onclick="saveConsumApplyProcess('SaveAndNew')" />
<apex:commandButton action="{!cancel}" value="鍙栨秷" />
@@ -402,8 +405,12 @@
<!--Each section has layoutFields, let's iterate them as well-->
<apex:repeat value="{!layoutSection.layoutFields}" var="layoutField">
- <apex:inputField html-data-id="{!layoutField.fieldAPI}" value="{!Consum_Apply__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)}"
+ <apex:inputField styleClass="PIBackApi PIBackApi_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Consum_Apply__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&&isNewMode}"
required="{!layoutField.isRequired}" />
+ <apex:inputField styleClass="PIBackApi PIBackApi_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Consum_Apply__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&¬(isNewMode)&&layoutField.fieldAPI!='RecordTypeId'}"
+ required="{!layoutField.isRequired}" />
+ <apex:outputField styleClass="PIBackApi PIBackApi_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Consum_Apply__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&¬(isNewMode)&&layoutField.fieldAPI=='RecordTypeId'}"
+ />
<apex:pageblocksectionitem rendered="{!layoutField.isPlaceHolder}">
</apex:pageblocksectionitem>
</apex:repeat>
@@ -413,6 +420,7 @@
<script>
//Append Page
sfdcPage.appendToOnloadQueue(function () {
+ debugger
var layoutSections = JSON.parse('{!layoutSectionsStr}');
for (let m = 0; m < layoutSections.length; m++) {
let layoutSection = layoutSections[m].layoutFields;
@@ -428,6 +436,20 @@
if (e.tagName == 'DIV') {
e.classList.add("disabledbutton");
}
+ // let id = 'page:form:block:j_id34:10:j_id35:j_id36:0:j_id37';
+ // let id2 = 'page:form:block:j_id34:9:j_id35:j_id36:0:j_id37'
+ // let lookUpSuffix = '_lkwgt';
+ // // if(document.getElementById(id)){
+ // // document.getElementById(id).classList.add("disabledbutton");
+ // // document.getElementById(id + lookUpSuffix).classList.add("disabledbutton");
+ // // }
+ // if(document.getElementById(id2)){
+ // document.getElementById(id2 + lookUpSuffix).classList.add("disabledbutton");
+ // }
+ if(document.querySelectorAll("[data-id='Old_Consum_Apply__c']")){
+ document.querySelectorAll("[data-id='Old_Consum_Apply__c']")[0].classList.add("disabledbutton")
+ document.querySelectorAll("[data-id='Old_Consum_Apply__c']")[1].classList.add("disabledbutton")
+ }
}
}
}
@@ -441,6 +463,9 @@
//Replace Vlookup Field
replaceSearchContactLookup();
document.querySelector("[data-id='OwnerId']").classList.add("disabledbutton");
+
+ document.getElementById('topButtonRow').style = '';
+聽 聽 聽 聽 聽 聽 聽document.getElementById('bottomButtonRow').style = '';
let previous_value = {};
jQuery(".lookupInput input").each(function(i,e){
@@ -498,7 +523,7 @@
<tr>
<td class="pbTitle">
<img src="/img/s.gif" alt="" class="minWidth" title="" width="1" height="1" /> </td>
- <td class="pbButtonb" id="bottomButtonRow">
+ <td class="pbButtonb" id="bottomButtonRow" style="pointer-events: none; opacity: 0.4;">
<input class="btn" type="Button" value="淇濆瓨" onclick="saveConsumApplyProcess('Save')" />
<input class="btn" type="Button" value="淇濆瓨骞舵柊寤�" onclick="saveConsumApplyProcess('SaveAndNew')" />
<apex:commandButton action="{!cancel}" value="鍙栨秷" />
--
Gitblit v1.9.1