| | |
| | | var staticResourcesContact = JSON.parse('{!staticResourceContact}'); |
| | | console.log('{!staticResource}'); |
| | | var VLookUpFields = {! VLookUpFieldsJson}; |
| | | |
| | | |
| | | 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(sobjJson, payloadForNewPI) { |
| | | blockme(); |
| | | if ({!isNewMode} || {!isCloneMode}) { |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveSobjectProcess(save_and_new) { |
| | | EditButton(true); |
| | | if(save_and_new){ |
| | | config.SaveAndNew = true; |
| | | } |
| | |
| | | |
| | | function alertErrorMessage(errorMsg) { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsg = '错误:无效数据。' + '\n' + errorMsg; |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | |
| | | let nodelist = document.querySelectorAll("[data-id]"); |
| | | let result = {} |
| | | result.RecordTypeId = '{!rtTypeId}'; |
| | | //result.RecordTypeId = '{!rtTypeId}'; |
| | | for (let index = 0; index < nodelist.length; index++) { |
| | | if (VLookUpFields.has(nodelist[index].getAttribute("data-id"))) { |
| | | console.log(nodelist[index].id.indexOf('lkwgt')); |
| | |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | 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 QueryAddressFromAWS() { |
| | | AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token); |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveAddressProcess(saveMode) { |
| | | EditButton(true); |
| | | |
| | | disableButtonStatus(); |
| | | redirectMode = saveMode; |
| | |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | //1. Check account value |
| | | let accountNodeId = document.querySelector("[data-id='Customer__c']").id + '_lkid'; |
| | | let accountValue = document.getElementById(accountNodeId).value; |
| | | let searchContactKeyWord = document.querySelector("[data-id='Customer__c']").value; |
| | | let searchContactKeyWord = document.querySelector("[data-id='Contacts__c']").value; |
| | | console.log(accountValue); |
| | | if (accountValue != '000000000000000') { |
| | | let baseUrl = "/apex/SearchContactPage"; |
| | |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <style> |
| | | .disabledbutton { |
| | | pointer-events: none; |
| | | opacity: 0.4; |
| | | } |
| | | </style> |
| | | <script> |
| | | |
| | | var config = {}; |
| | |
| | | return ''; |
| | | } |
| | | |
| | | 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 IsFormTag(tag_name){ |
| | | if (!tag_name) { |
| | | return false; |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveSobjectProcess(save_and_new) { |
| | | EditButton(true); |
| | | if(save_and_new){ |
| | | config.SaveAndNew = true; |
| | | } |
| | |
| | | |
| | | function alertErrorMessage(errorMsg) { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsg = '错误:无效数据。' + '\n' + errorMsg; |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | UpdatePIToAWS(caseJson, payloadForNewPI) |
| | | } |
| | | } |
| | | |
| | | 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 enableButton(obj){ |
| | | obj.classList.remove("btnDisabled"); |
| | |
| | | } |
| | | //按钮点击事件 |
| | | function saveCaseProcess(saveMode) { |
| | | EditButton(true); |
| | | |
| | | disableButtonStatus(); |
| | | redirectMode = saveMode; |
| | | console.log('redirectMode'+redirectMode); |
| | |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> |
| | | <style> |
| | | .disabledbutton { |
| | | pointer-events: none; |
| | | opacity: 0.4; |
| | | } |
| | | </style> |
| | | <script> |
| | | |
| | | var config = {}; |
| | |
| | | var fieldAPIToLabelMap = JSON.parse('{!fieldAPIToLabelMapStr}'); |
| | | console.log('{!staticResource}'); |
| | | var VLookUpFields = {! VLookUpFieldsJson}; |
| | | |
| | | 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(sobjJson, payloadForNewPI) { |
| | | blockme(); |
| | | if ({!isNewMode} || {!isCloneMode}) { |
| | |
| | | window.open('/' + sfId, '_self'); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | function UpdatePIToAWS(sobjJson, payloadForNewPI) { |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveSobjectProcess(save_and_new) { |
| | | EditButton(true); |
| | | |
| | | if(save_and_new){ |
| | | config.SaveAndNew = true; |
| | | } |
| | |
| | | errorMsg = '错误:无效数据。' + '\n' + errorMsg; |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | } |
| | | } |
| | | document.getElementById('topButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | |
| | | jQuery('a[data-id="OwnerId"]').remove(); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | 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"); |
| | | } |
| | | } |
| | | |
| | | var GetEleByClass = function(class_name){ |
| | | let eles = document.getElementsByClassName(class_name); |
| | | if(eles.length > 0) return eles[0]; |
| | |
| | | } |
| | | //按钮点击方法 |
| | | function saveSobjectProcess(save_and_new) { |
| | | EditButton(true); |
| | | if(save_and_new){ |
| | | config.SaveAndNew = true; |
| | | } |
| | |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <style> |
| | | .disabledbutton { |
| | | pointer-events: none; |
| | | opacity: 0.4; |
| | | } |
| | | </style> |
| | | <script> |
| | | |
| | | var config = {}; |
| | |
| | | NewPIToAWS(sobjJson, payloadForNewPI) |
| | | }else { |
| | | UpdatePIToAWS(sobjJson, payloadForNewPI) |
| | | } |
| | | } |
| | | |
| | | 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"); |
| | | } |
| | | } |
| | | |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveSobjectProcess(save_and_new) { |
| | | EditButton(true); |
| | | |
| | | if(save_and_new){ |
| | | config.SaveAndNew = true; |
| | | } |
| | |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | //document.querySelectorAll("[data-id='OwnerId']")[0].classList.add("disabledbutton"); |
| | | // document.querySelectorAll("[data-id='OwnerId']")[1].classList.add("disabledbutton"); |
| | | document.getElementById('topButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | |
| | | jQuery('a[data-id="OwnerId"]').remove(); |
| | | |
| | |
| | | function ProcessPI(leadJson, payloadForNewPI) { |
| | | blockme(); |
| | | if ({!isNewMode} || {!isCloneMode}) { |
| | | NewPIToAWS(leadJson, payloadForNewPI) |
| | | }else { |
| | | UpdatePIToAWS(leadJson, payloadForNewPI) |
| | | } |
| | | NewPIToAWS(leadJson, payloadForNewPI) |
| | | }else { |
| | | UpdatePIToAWS(leadJson, payloadForNewPI) |
| | | } |
| | | } |
| | | |
| | | 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 enableButton(obj) { |
| | | obj.classList.remove("btnDisabled"); |
| | | } |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveLeadProcess(saveMode) { |
| | | EditButton(true); |
| | | |
| | | disableButtonStatus(); |
| | | redirectMode = saveMode; |
| | |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | } |
| | | } |
| | | |
| | | 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"); |
| | | } |
| | | } |
| | | |
| | | var GetEleByClass = function(class_name){ |
| | | let eles = document.getElementsByClassName(class_name); |
| | | if(eles.length > 0) return eles[0]; |
| | |
| | | } else { |
| | | result[field_api_name] = ele.value; |
| | | //关闭QIS理由为无时 |
| | | if(field_api_name == 'Cancel_QIS_Reason__c' && ele.value == '_\x01_'){ |
| | | result[field_api_name] = ''; |
| | | } |
| | | // if(field_api_name == 'Cancel_QIS_Reason__c' && ele.value == '_\x01_'){ |
| | | // result[field_api_name] = ''; |
| | | // } |
| | | } |
| | | |
| | | // let e1 = document.getElementById(api_id_map[field_api_name]); |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveSobjectProcess(save_and_new) { |
| | | EditButton(true); |
| | | |
| | | if(save_and_new){ |
| | | config.SaveAndNew = true; |
| | |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | } |
| | | console.log(api_id_map); |
| | | sfdcPage.appendToOnloadQueue(function () { |
| | | jQuery('option').each(function(i,e){ |
| | | if(e.value == '_\x01_'){ |
| | | e.value = ''; |
| | | } |
| | | }) |
| | | //判断是否为只读选项 |
| | | var layoutSections = JSON.parse('{!layoutSectionsStr}'); |
| | | for (let m = 0; m < layoutSections.length; m++) { |
| | |
| | | config.queryBack(data); |
| | | unblockUI(); |
| | | }; |
| | | 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 insertOrUpdateBack(payloadJson, result, isNewMode) { |
| | | console.log(result); |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveSobjectProcess(save_and_new) { |
| | | EditButton(true); |
| | | if(save_and_new){ |
| | | config.SaveAndNew = true; |
| | | } |
| | |
| | | |
| | | function alertErrorMessage(errorMsg) { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsg = '错误:无效数据。' + '\n' + errorMsg; |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | var redirectMode = 'Save';//1. Save 2. SaveAndNew |
| | | var requiredFieldAPIList = JSON.parse('{!requiredFieldAPIListStr}'); |
| | | var fieldAPIToLabelMap = JSON.parse('{!fieldAPIToLabelMapStr}'); |
| | | var VLookUpFields = new Set(['Hospital_Reference__c', 'Department_Class_Ref__c', 'Daily_Report__c', 'OwnerId','Hospital_Department__c', |
| | | var VLookUpFields = new Set(['Hospital_Reference__c','Consum_Apply__c','Department_Class_Ref__c', 'Daily_Report__c', 'OwnerId','Hospital_Department__c', |
| | | 'Competition_Company_Name__c','Report_OPDPlan__c','Loaner_request_no1__c','Practitioner1__c','Practitioner2__c','Practitioner3__c','Practitioner4__c', |
| | | 'Practitioner5__c','Opportunity1__c', |
| | | 'Opportunity2__c','Product01__c','Product1__c','Product2__c','Product3__c','Product4__c','Product5__c','Order_No__c','Person_In_Charge__c']); |
| | |
| | | // console.log('没有CKEDITOR') |
| | | // } |
| | | |
| | | 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 alertErrorMessage(errorMsg) { |
| | |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:j_id5:msgContent"); |
| | |
| | | |
| | | //点击保存按钮 |
| | | function saveReportProcess(saveMode) { |
| | | EditButton(true); |
| | | |
| | | redirectMode = saveMode; |
| | | console.log('redirectMode' + redirectMode); |
| | | hiddenErrorMsgNode(); |
| | |
| | | } |
| | | |
| | | document.getElementById('topButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | |
| | | let previous_value = {}; |
| | | jQuery(".lookupInput input").each(function(i,e){ |
| | |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <style> |
| | | .disabledbutton { |
| | | pointer-events: none; |
| | | opacity: 0.4; |
| | | } |
| | | </style> |
| | | <script> |
| | | |
| | | var config = {}; |
| | |
| | | NewPIToAWS(sobjJson, payloadForNewPI) |
| | | }else { |
| | | UpdatePIToAWS(sobjJson, payloadForNewPI) |
| | | } |
| | | } |
| | | |
| | | 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"); |
| | | } |
| | | } |
| | | |
| | |
| | | return blankRequiredFields; |
| | | } |
| | | function saveSobjectProcess(save_and_new) { |
| | | EditButton(true); |
| | | |
| | | if(save_and_new){ |
| | | config.SaveAndNew = true; |
| | | } |
| | |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | EditButton(false); |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | |
| | | //replaceSearchContactLookup(); |
| | | //Replace Lead Vlookup Field |
| | | //replaceSearchLeadLookup(); |
| | | document.querySelectorAll("[data-id='OwnerId']")[0].classList.add("disabledbutton"); |
| | | // document.querySelectorAll("[data-id='OwnerId']")[0].classList.add("disabledbutton"); |
| | | // document.querySelectorAll("[data-id='OwnerId']")[1].classList.add("disabledbutton"); |
| | | document.getElementById('topButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | |
| | | jQuery('a[data-id="OwnerId"]').remove(); |
| | | |
| | |
| | | var userVLookUpFields = ['Person_In_Charge__c', 'applyUser__c', 'CC_EmailUser__c', 'Assign_Person__c', 'Consum_Assistant__c', 'Consum_Assistant2__c', 'Consum_Assistant3__c', 'SalesManager__c', 'ZongjianApprovalManager__c', 'BuchangApprovalManagerSales__c', 'TongkuoZongjian__c']; |
| | | var redirectMode = 'Save'; |
| | | |
| | | 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"); |
| | | } |
| | | } |
| | | |
| | | //Redirect Required Parameter |
| | | var redirectCallBack = function redirectCallBack(sfId,errorMessage) { |
| | | if(sfId){ |
| | |
| | | |
| | | //Base Process |
| | | function saveConsumApplyProcess(saveMode) { |
| | | EditButton(true); |
| | | |
| | | redirectMode = saveMode; |
| | | console.log('redirectMode' + redirectMode); |
| | | hiddenErrorMsgNode(); |
| | |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | |
| | | //Hide Error Message |
| | |
| | | var userVLookUpFields = ['Follower_User__c','Consum_Assign_Person__c','Asset_Center_Confirm_Staff__c','Return_Operator__c','Return_wh_chenk_staff__c','Cancel_Mem__c','Lost_item_check_staff__c','Lost_item_check_staff_Final__c']; |
| | | var redirectMode = 'Save'; |
| | | |
| | | 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"); |
| | | } |
| | | } |
| | | |
| | | //Redirect Required Parameter |
| | | var redirectCallBack = function redirectCallBack(sfId, errorMessage) { |
| | | if (sfId) { |
| | |
| | | |
| | | //Base Process |
| | | function saveConsumApplyProcess(saveMode) { |
| | | EditButton(true); |
| | | |
| | | redirectMode = saveMode; |
| | | console.log('redirectMode' + redirectMode); |
| | | hiddenErrorMsgNode(); |
| | |
| | | |
| | | //Alert Error Message |
| | | function alertErrorMessage(errorMsg) { |
| | | let errorMsgNode = document.getElementById("page:form:msgContent"); |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsg = '错误:无效数据。' + '\n' + errorMsg; |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | |
| | | //Hide Error Message |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("page:form:msgContent"); |
| | | let errorMsgNode = document.getElementById("page:form:block:msgContent"); |
| | | errorMsgNode.innerText = ''; |
| | | errorMsgNode.className = ''; |
| | | } |
| | |
| | | <div class="ptBreadcrumb"></div> |
| | | </div> |
| | | <apex:form id="form"> |
| | | <!-- Error Msg--> |
| | | <apex:outputPanel id="errorMsg"> |
| | | <apex:pageMessages id="msgContent" escape="false" /> |
| | | </apex:outputPanel> |
| | | <apex:pageblock > |
| | | <apex:pageblock id="block"> |
| | | <div class="pbHeader"> |
| | | <table cellspacing="0" cellpadding="0" border="0"> |
| | | <tbody> |
| | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <!-- Error Msg--> |
| | | <div style="text-align: center;"> |
| | | <apex:outputPanel id="errorMsg"> |
| | | <apex:pageMessages id="msgContent" escape="false" /> |
| | | </apex:outputPanel> |
| | | </div> |
| | | <!-- Iterate the layoutSections, which is a list of sections --> |
| | | <apex:repeat value="{!layoutSections}" var="layoutSection"> |
| | | <apex:pageBlockSection title="{!layoutSection.name}" collapsible="{!layoutSection.allowCollapse}" columns="{!layoutSection.columns}"> |
| | |
| | | } |
| | | return blankRequiredFields; |
| | | } |
| | | 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"); |
| | | } |
| | | } |
| | | //Base Process |
| | | function saveOnCallProcess(saveMode) { |
| | | EditButton(true); |
| | | redirectMode = saveMode; |
| | | console.log('redirectMode' + redirectMode); |
| | | hiddenErrorMsgNode(); |
| | |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | |
| | | //Hide Error Message |
| | |
| | | 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}) { |
| | |
| | | |
| | | //Base Process |
| | | function saveRentalApplyProcess(saveMode) { |
| | | EditButton(true); |
| | | redirectMode = saveMode; |
| | | console.log('redirectMode' + redirectMode); |
| | | hiddenErrorMsgNode(); |
| | |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | |
| | | //Hide Error Message |
| | |
| | | console.log(JSON.stringify(result)); |
| | | return result; |
| | | } |
| | | |
| | | 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"); |
| | | } |
| | | } |
| | | //Query from AWS |
| | | function QueryRepairFromAWS() { |
| | | AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token); |
| | |
| | | |
| | | //Base Process |
| | | function saveRepairProcess(saveMode) { |
| | | EditButton(true); |
| | | redirectMode = saveMode; |
| | | console.log('redirectMode' + redirectMode); |
| | | hiddenErrorMsgNode(); |
| | |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | unblockUI(); |
| | | EditButton(false); |
| | | } |
| | | |
| | | //Hide Error Message |