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/NewRepair.page | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/force-app/main/default/pages/NewRepair.page b/force-app/main/default/pages/NewRepair.page
index 4db1fd5..174fbdc 100644
--- a/force-app/main/default/pages/NewRepair.page
+++ b/force-app/main/default/pages/NewRepair.page
@@ -37,7 +37,7 @@
function (result, event) {
console.log(result);
if(result.message){
- alert(result.message);
+ alert(result.message);
}
if (redirectMode == 'Save') {
window.open('/' + sfId, '_self');
@@ -100,7 +100,9 @@
} else {
payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
}
- debugger
+ if('{!rtTypeId}'){
+ payloadJson.RecordTypeId = '{!rtTypeId}';//Add by zhj for Record Type Issue 20220421
+ }
return payloadJson;
}
@@ -224,11 +226,9 @@
result.Repair_Determine_result_ConfirmationUser__c = e.value;
}
//鏈慨鐞嗗綊杩樼悊鐢�
- //page:form:block:j_id34:17:j_id35:j_id36:2:j_id37
- //page:form:block:j_id34:17:j_id35:j_id36:2:j_id37
- if(document.getElementById('page:form:block:j_id34:17:j_id35:j_id36:2:j_id37')){
- result.Return_Without_Repair_Reason__c = document.getElementById('page:form:block:j_id34:17:j_id35:j_id36:2:j_id37').value;
- }
+ if(api_id_map['Return_Without_Repair_Reason__c']){
+ result.Return_Without_Repair_Reason__c = document.getElementById(api_id_map['Return_Without_Repair_Reason__c']).value!='_\x01_'?document.getElementById(api_id_map['Return_Without_Repair_Reason__c']).value:'';
+ }
console.log(JSON.stringify(result));
return result;
}
@@ -366,7 +366,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="saveRepairProcess('Save')" />
<input class="btn" type="Button" value="淇濆瓨骞舵柊寤�" onclick="saveRepairProcess('SaveAndNew')" />
<apex:commandButton action="{!cancel}" value="鍙栨秷" />
@@ -387,8 +387,12 @@
<!--Each section has layoutFields, let's iterate them as well-->
<apex:repeat value="{!layoutSection.layoutFields}" var="layoutField">
- <apex:inputField html-title="{!layoutField.fieldAPI}" styleClass="PIBackApi PIBackApi_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Repair__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)}"
+ <apex:inputField styleClass="PIBackApi PIBackApi_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Repair__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&&isNewMode}"
required="{!layoutField.isRequired}" />
+ <apex:inputField styleClass="PIBackApi PIBackApi_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Repair__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="{!Repair__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&¬(isNewMode)&&layoutField.fieldAPI=='RecordTypeId'}"
+ />
<apex:pageblocksectionitem rendered="{!layoutField.isPlaceHolder}">
</apex:pageblocksectionitem>
</apex:repeat>
@@ -447,7 +451,10 @@
unblockUI();
};
if(document.querySelector("[data-id='OwnerId']") != null)
- document.querySelector("[data-id='OwnerId']").classList.add("disabledbutton");
+ 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){
@@ -469,7 +476,7 @@
//缁翠慨涓績
if('{!workLocationSelect}' != ''){
- let wlNode = document.getElementById('page:form:block:j_id34:1:j_id35:j_id36:18:j_id37');
+ let wlNode = document.getElementById(api_id_map['work_location_select__c']);
if(wlNode){
wlNode.removeAttribute("disabled")
var o = new Option()
@@ -525,7 +532,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="saveRepairProcess('Save')" />
<input class="btn" type="Button" value="淇濆瓨骞舵柊寤�" onclick="saveRepairProcess('SaveAndNew')" />
<apex:commandButton action="{!cancel}" value="鍙栨秷" />
--
Gitblit v1.9.1