Li Jun
2022-04-13 5c01ebbfddb6b8674430b47c22977bea2e350084
force-app/main/default/pages/NewAndEditInspectionReport.page
@@ -59,6 +59,7 @@
                payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
                if (isNewMode || {!isCloneMode}) {
                    payloadJson.AWS_Data_Id__c = r.object[0].dataId;
                    delete payloadJson.OwnerId;
                } else {
                    payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
                }
@@ -186,7 +187,14 @@
            return error_msg;
        }
      function getCKEinstance(api_name){
            let t = jQuery("label[for$='textAreaDelegate_"+api_name+"']").parent().next().find("textarea")[0];
            if(t && t.id){
                return CKEDITOR.instances[t.id]
            }
            return null;
        }
        function getSobjectInformation() {
            let nodelist = document.getElementsByClassName(config.ApiPrefix);
@@ -235,8 +243,9 @@
            }
             //赋值富文本区域
            //科室负责人签字
            if(document.querySelector("[title = 'RTF 編輯器, page:form:block:j_id51:0:j_id52:j_id53:5:j_id54:textAreaDelegate_ResponsiblePerson_Sign__c']")){
                result.ResponsiblePerson_Sign__c = document.querySelector("[title = 'RTF 編輯器, page:form:block:j_id51:0:j_id52:j_id53:5:j_id54:textAreaDelegate_ResponsiblePerson_Sign__c']").contentWindow.document.getElementsByTagName('body')[0].innerHTML
            if(getCKEinstance('ResponsiblePerson_Sign__c')){
                result.ResponsiblePerson_Sign__c = getCKEinstance('ResponsiblePerson_Sign__c').getData()
            }
            if(document.querySelector("[data-id='Reporter__c']")){
                result['Reporter__c'] = document.getElementById(document.querySelector("[data-id='Reporter__c']").children[7].children[0].id + '_lkid').value;