Li Jun
2022-03-17 03523642de0c4f319d90d0aec8a756f9e80e6a7e
PIPLFunctionDeployV2
39个文件已修改
891 ■■■■ 已修改文件
force-app/main/default/aura/NewAgencyContact/NewAgencyContact.cmp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/NewAgencyContact/NewAgencyContactHelper.js 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/ContactTriggerHandler.cls 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NewAndEditContactController.cls 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NewAndEditInquiryFormController.cls 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NewConsumApplyController.cls 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NewConsumApplyEquipSetDetailController.cls 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NewRepairController.cls 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OnCallController.cls 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/RentalApplyController.cls 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/SearchContactController.cls 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/StraightBackAddressController.cls 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewAndEditASEActivity.page 124 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewAndEditAddress.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewAndEditCase.page 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewAndEditContact.page 144 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewAndEditInspectionReport.page 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewAndEditLead.page 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewAndEditQIS.page 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewAndEditTenderinformation.page 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewConsumApply.page 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewConsumApplyEquipmentSetDetail.page 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewOnCall.page 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewRentalApply.page 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NewRepair.page 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/StraightBackAddress.page 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/UploadPdf.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewASEActivityDecryptInfo.page 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewAddressDecryptInfo.page 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewCaseDecryptInfo.page 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewConsumApplyEquipmentSetDetailDecrypt.page 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewDecryptConsumApply.page 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewInquiryFormDecryptInfo.page 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewOnCallDecrypt.page 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewRentalApplyDecrypt.page 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewRepairEncrypt.page 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ViewRepairSubOrderDecryptInfo.page 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/AWSService/AWSService.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/NewAgencyContact/NewAgencyContact.cmp
@@ -9,8 +9,8 @@
    <aura:attribute name="showSpinner" type="Boolean" default = "False"/>
    <aura:attribute name="staticResource" type="Map"/>
    <aura:attribute name="pi_fields_map" type="Map"/>
    <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" />
    <ltng:require scripts="{! $Resource.jquery183minjs }" />
    
    <div class="{! v.container_class}">
        <!-- header -->
force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js
@@ -76,6 +76,10 @@
                                    if(rv.Data && fields.hasOwnProperty(item.field) && fields[item.field].References && fields[item.field].References.map(m=>m.value).indexOf(rv.Data.pidType) > -1){
                                        item.value = pid;
                                    }
                                    if(fields.hasOwnProperty(item.field)){
                                        item.fi = fields[item.field];
                                    }
                                }
                            }
                        }
force-app/main/default/aura/NewAgencyContact/NewAgencyContactHelper.js
@@ -25,24 +25,10 @@
            payloadForNewPI = JSON.stringify(data);
        }
        
        fetch(postURL, {
            method: 'POST',
            body: payloadForNewPI,
            headers: {
                'Content-Type': 'application/json',
                'pi-token': token
            }
        }).then((data) => {
            console.log('data=' + JSON.stringify(data));
            return data.json();
        }).then((result) => {
        AWSService.post(postURL,payloadForNewPI,function(result) {
            //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(result),this.successStatus);
            if(callback) callback(result);
        }).catch(error => {
            console.log('error');
            //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(error),this.failStatus);
            console.log(error);
        });
        },token);
    },
    AwsGet : function(url, data ,callback,token){
        
@@ -56,22 +42,9 @@
            }
        }
        
        fetch(url, {
            method: 'GET',
            headers: {
                'Content-Type': 'application/json',
                'pi-token': token
            }
        }).then((data) => {
            console.log('data=' + JSON.stringify(data));
            return data.json();
        }).then((result) => {
        AWSService.get(url,function(result){
            //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(result),this.successStatus);
            if(callback) callback(result);
        }).catch(error => {
            console.log('error');
            //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(error),this.failStatus);
            console.log(error);
        });
        },token);
    }
})
force-app/main/default/classes/ContactTriggerHandler.cls
@@ -403,10 +403,21 @@
        if(!System.Test.isRunningTest()){
            // NFM606Controller.executeNotFuture('', contactIdList);
            if (contactIdList.size() > 0) {
                NFM606Controller.callout('', contactIdList);
                // NFM606Controller.callout('', contactIdList);
                 //添加future 判断 add for pipl  sushanhu 20220317 start
                 if (!(System.isFuture()||System.isBatch())) {
                    NFM606Controller.callout('', contactIdList);
                }
               //添加future 判断 add for pipl  sushanhu 20220317 end
            }
            if (interfaceUserUpsertContact.size() > 0) {
                NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
                // NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
                //添加future 判断 add for pipl  sushanhu 20220316 start
                if (!(System.isFuture()||System.isBatch())) {
                    NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
                }
               //添加future 判断 add for pipl  sushanhu 20220316 end
            }
        } 
        
force-app/main/default/classes/NewAndEditContactController.cls
@@ -22,7 +22,9 @@
        system.debug(mso);
        mso.remove('sfdc.override');
        PageReference pg = new PageReference('/003/e');
        mso.putAll(mso);
        //pg.getParameters().putAll(mso);
        pg.getParameters().put('RecordType',mso.get('RecordType'));
        pg.getParameters().put('accid',mso.get('accid'));
        pg.getParameters().put('nooverride','1');
        pg.setRedirect(true);
        return pg;
force-app/main/default/classes/NewAndEditInquiryFormController.cls
@@ -46,6 +46,8 @@
            Sobject sobj = Database.query(soql);
            Map<String, String> m = new Map<String, String>();
            sobjId = sobjId.substring(0,sobjId.length()-3);
            m.put((String)sobjId, (String)sobj.get('AWS_Data_Id__c'));
            LookUpOverrideFieldsMapJson = JSON.serialize(m);
force-app/main/default/classes/NewConsumApplyController.cls
@@ -2,10 +2,11 @@
 * @description       : 
 * @author            : ChangeMeIn@UserSettingsUnder.SFDoc
 * @group             : 
 * @last modified on  : 03-10-2022
 * @last modified on  : 03-17-2022
 * @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
**/
global without sharing class NewConsumApplyController {
    public String layoutSectionsStr {get; set;}//for dynamic add readonly attribute
    public List <LayoutDescriberHelper.LayoutSection > layoutSections{set;get;}
    public String awsToken{set;get;}
    public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
@@ -51,6 +52,7 @@
        }
        LayoutDescriberHelper.LayoutWrapper LayoutWrapperValue = LayoutDescriberHelper.describeSectionWithFieldsWrapper(rtTypeId, 'Consum_Apply__c','classic');
        layoutSections = LayoutWrapperValue.layoutSections;
        layoutSectionsStr = JSON.serialize(layoutSections); //for dynamic add readonly attribute
        List<String> requiredFieldAPIList = LayoutWrapperValue.requiredFieldAPIList;
        Map<String,String> fieldAPIToLabelMap = LayoutWrapperValue.fieldAPIToLabelMap;
        requiredFieldAPIListStr = JSON.serialize(requiredFieldAPIList);
force-app/main/default/classes/NewConsumApplyEquipSetDetailController.cls
@@ -1,4 +1,12 @@
/**
 * @description       :
 * @author            : ChangeMeIn@UserSettingsUnder.SFDoc
 * @group             :
 * @last modified on  : 03-17-2022
 * @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
**/
global without sharing class NewConsumApplyEquipSetDetailController {
    public String layoutSectionsStr {get; set;}//for dynamic add readonly attribute
    public List <LayoutDescriberHelper.LayoutSection > layoutSections{set;get;}
    public String awsToken{set;get;}
    public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
@@ -33,6 +41,7 @@
        }
        LayoutDescriberHelper.LayoutWrapper LayoutWrapperValue = LayoutDescriberHelper.describeSectionWithFieldsWrapper(rtTypeId, 'Consum_Apply_Equipment_Set_Detail__c','classic');
        layoutSections = LayoutWrapperValue.layoutSections;
        layoutSectionsStr = JSON.serialize(layoutSections); //for dynamic add readonly attribute
        List<String> requiredFieldAPIList = LayoutWrapperValue.requiredFieldAPIList;
        Map<String,String> fieldAPIToLabelMap = LayoutWrapperValue.fieldAPIToLabelMap;
        requiredFieldAPIListStr = JSON.serialize(requiredFieldAPIList);
force-app/main/default/classes/NewRepairController.cls
@@ -4,6 +4,7 @@
 *@Date: 2022-03-10 10:26:47
*/
global without sharing class NewRepairController {
    public String layoutSectionsStr {get; set;}//for dynamic add readonly attribute
    public List <LayoutDescriberHelper.LayoutSection > layoutSections{set;get;}
    public String awsToken{set;get;}
    public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
@@ -55,6 +56,7 @@
        }
        LayoutDescriberHelper.LayoutWrapper LayoutWrapperValue = LayoutDescriberHelper.describeSectionWithFieldsWrapper(rtTypeId, 'Repair__c','classic');
        layoutSections = LayoutWrapperValue.layoutSections;
        layoutSectionsStr = JSON.serialize(layoutSections); //for dynamic add readonly attribute
        List<String> requiredFieldAPIList = LayoutWrapperValue.requiredFieldAPIList;
        Map<String,String> fieldAPIToLabelMap = LayoutWrapperValue.fieldAPIToLabelMap;
        requiredFieldAPIListStr = JSON.serialize(requiredFieldAPIList);
force-app/main/default/classes/OnCallController.cls
@@ -1,4 +1,12 @@
/**
 * @description       :
 * @author            : ChangeMeIn@UserSettingsUnder.SFDoc
 * @group             :
 * @last modified on  : 03-17-2022
 * @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
**/
global without sharing class OnCallController {
    public String layoutSectionsStr {get; set;}//for dynamic add readonly attribute
    public List <LayoutDescriberHelper.LayoutSection > layoutSections{set;get;}
    public String awsToken{set;get;}
    public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
@@ -37,9 +45,11 @@
        }else{
            //新建
            rtTypeId = null;
            obj.put('OwnerId',UserInfo.getUserId());
        }
        LayoutDescriberHelper.LayoutWrapper LayoutWrapperValue = LayoutDescriberHelper.describeSectionWithFieldsWrapper(rtTypeId, 'On_Call__c','classic');
        layoutSections = LayoutWrapperValue.layoutSections;
        layoutSectionsStr = JSON.serialize(layoutSections); //for dynamic add readonly attribute
        List<String> requiredFieldAPIList = LayoutWrapperValue.requiredFieldAPIList;
        Map<String,String> fieldAPIToLabelMap = LayoutWrapperValue.fieldAPIToLabelMap;
        requiredFieldAPIListStr = JSON.serialize(requiredFieldAPIList);
@@ -66,27 +76,26 @@
        On_Call__c onCallInfo = new On_Call__c();
        //自定义格式转换
        for (String fieldAPI: fieldValueMap.keySet()) {
            system.debug('field API'+fieldAPI);
            system.debug('field API='+fieldAPI);
            Schema.DisplayType fielddataType = fieldAPIToTypeMap.get(fieldAPI).getDescribe().getType();  
            String fieldValue = String.valueOf(fieldValueMap.get(fieldAPI)); 
            if(String.isBlank(fieldValue)){
                continue;
            }
            system.debug('Field Type:'+fielddataType+' field Value='+fieldValue);
            if(String.valueOf(fielddataType)=='DATE'){
                onCallInfo.put(fieldAPI, Date.valueOf(String.valueOf(fieldValueMap.get(fieldAPI)).replace('/', '-')));
                onCallInfo.put(fieldAPI,(String.isBlank(fieldValue)||String.isEmpty(fieldValue))? null:Date.valueOf(fieldValue.replace('/', '-')));
            }else if(String.valueOf(fielddataType)=='DATETIME'){
                String dt = String.valueOf(fieldValueMap.get(fieldAPI));
                if(String.isNotBlank(dt)&&dt.contains('T')){
                    dt = dt.replace('T',' ');
                    onCallInfo.put(fieldAPI, Datetime.valueOfGmt(dt));
                }
            }else if(String.valueOf(fielddataType)=='Number'||String.valueOf(fielddataType)=='DOUBLE' ){
                onCallInfo.put(fieldAPI, Decimal.valueOf(String.valueOf(fieldValueMap.get(fieldAPI))));
                if(String.isNotBlank(fieldValue)&&fieldValue.contains('T')){
                    fieldValue = fieldValue.replace('T',' ');
                    onCallInfo.put(fieldAPI, Datetime.valueOfGmt(fieldValue));
                }else{
                    onCallInfo.put(fieldAPI, null);
                }
            }else if(String.valueof(fielddataType)=='CURRENCY'|| String.valueof(fielddataType)=='PERCENT'||String.valueOf(fielddataType)=='Number'||String.valueOf(fielddataType)=='DOUBLE' ){
                onCallInfo.put(fieldAPI, (String.isBlank(fieldValue)||String.isEmpty(fieldValue))?0:Decimal.valueOf(fieldValue));
            } else if(String.valueof(fielddataType)=='BOOLEAN'){
                onCallInfo.put(fieldAPI, fieldValueMap.get(fieldAPI));
            }else {
                onCallInfo.put(fieldAPI, String.valueOf(fieldValueMap.get(fieldAPI)));
            }
                onCallInfo.put(fieldAPI,fieldValue);
            }
        }
        
        //2. Save Record Process
force-app/main/default/classes/RentalApplyController.cls
@@ -2,10 +2,11 @@
 * @description       : 
 * @author            : ChangeMeIn@UserSettingsUnder.SFDoc
 * @group             : 
 * @last modified on  : 03-11-2022
 * @last modified on  : 03-17-2022
 * @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
**/
global without sharing class RentalApplyController {
    public String layoutSectionsStr {get; set;}//for dynamic add readonly attribute
    public List <LayoutDescriberHelper.LayoutSection > layoutSections{set;get;}
    public String awsToken{set;get;}
    public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
@@ -43,9 +44,11 @@
        }else{
            //新建
            rtTypeId = ApexPages.currentPage().getParameters().get('RecordType');
            obj.put('OwnerId',UserInfo.getUserId());
        }
        LayoutDescriberHelper.LayoutWrapper LayoutWrapperValue = LayoutDescriberHelper.describeSectionWithFieldsWrapper(rtTypeId, 'Rental_Apply__c','classic');
        layoutSections = LayoutWrapperValue.layoutSections;
        layoutSectionsStr = JSON.serialize(layoutSections); //for dynamic add readonly attribute
        List<String> requiredFieldAPIList = LayoutWrapperValue.requiredFieldAPIList;
        Map<String,String> fieldAPIToLabelMap = LayoutWrapperValue.fieldAPIToLabelMap;
        requiredFieldAPIListStr = JSON.serialize(requiredFieldAPIList);
force-app/main/default/classes/SearchContactController.cls
@@ -54,6 +54,18 @@
        return resp;
    }
    @RemoteAction
    public static Response searchContactsNoPI(String contactName) {
        Response resp = new Response();
        resp.status = 'fail';
        List<Contact> conListTemp = new List<Contact>([select Id,Name,Account.Name,Phone,Email from Contact where Name like :contactName]);
        if(conListTemp.size() > 0){
            resp.status = 'success';
            resp.message = JSON.serialize(conListTemp);
        }
        return resp;
    }
    public class Response{
        public String message{set;get;}
        public String status{set;get;}
force-app/main/default/classes/StraightBackAddressController.cls
@@ -100,7 +100,9 @@
     * 开始方法
     */
    public PageReference init(){
        System.debug('RepairId-----'+RepairId);
        String RepairSql = makeTextRepairSql(RepairId);
        System.debug('RepairSql-----'+RepairSql);
        try{
            pc = Database.query(RepairSql);
            system.debug('pc = ' + pc);
@@ -142,6 +144,8 @@
        }catch(exception e){
            //失败提示
            ApexPages.addMessages(e);
            System.debug(e.getMessage());
            System.debug(e.getlineNumber());
        }
        insUpdData = new Address__c();
        newCon = new Contact();
@@ -232,7 +236,7 @@
                        try{
                            //保存数据到修理表中
                            Repair__c rc = new Repair__c();
                            rc.id=RepairId;
                            rc.id = RepairId;
                            rc.Address_AWS_Data_Id__c = tableData[i].address.AWS_Data_Id__c;
                            rc.Contact_AWS_Data_Id__c = contactawsDataId;
                            rc.address_Contacts__c = contactsName;
@@ -350,12 +354,14 @@
            List<Address__c> dataList = Database.query(AddressSql);
            if(dataList != null && dataList.size()> 0){
                indexCou += dataList.size();
                System.debug('dataList-----'+dataList);
                for(Integer i = 0;i<dataList.size();i++){
                    String createID = dataList[i].CreatedByid;
                    createId = createId.substring(0,15);
                    //办事处的地址不可修改
                    if(dataList[i].Address_Classification__c == '办事处'){
                            tableData.add(new AddressData(dataList[i],'none','none','inline'));
                        tableData.add(new AddressData(dataList[i],'none','none','inline'));
                    }else{
                        //只能改自己创建的地址数据,系统管理员、GPI_系统管理员New 没限制
                        if(loginPerson == createId ||loginPerson == '00e10000000dzzG' ||loginPerson == '00e10000000Y3o5'){
@@ -470,7 +476,6 @@
                }
            }
            //判断联系人是否都为空
            if(insUpdData.Contacts__c == null || String.isBlank(insUpdData.Contacts__c)){
                //判断新建联系人是否为空
                if(insUpdData.Create_Contacts__c == null || String.isBlank(insUpdData.Create_Contacts__c)){
force-app/main/default/pages/NewAndEditASEActivity.page
@@ -1,3 +1,10 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="ASEActivity__c" extensions="NewAndEditASEActivityController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
    <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
@@ -72,30 +79,40 @@
            queryBack:function (data) {
                console.log('data = ' + data);
                if(data.object){
                    for(let f in config.AWSToSobjectNonEncryptedMap){
                        let ele = GetEleByClass(config.ApiPrefix + "_"+ config.AWSToSobjectNonEncryptedMap[f]);
                    for(let fi in config.AWSToSobjectNonEncryptedMapKeySet){
                        let f = config.AWSToSobjectNonEncryptedMapKeySet[fi];
                        let ele = document.getElementById(api_id_map[config.AWSToSobjectNonEncryptedMap[f]])
                        if(data.object.hasOwnProperty(f) && ele){
                            
                            // 多选特殊处理
                            if(ele.type == 'select-multiple'){
                               //let me = GetEleByClass(config.ApiPrefix+'_'+field_api_name);
                            if(ele && data.object[f]){
                                let arr = data.object[f].split(';');
                                // 给隐藏的select赋值
                                for(let op of ele.options){
                                    op.selected = arr.indexOf(op.value)>-1;
                                }
                                // 利用按钮给显示的select赋值
                                let ra = document.getElementById(ele.id + '_right_arrow');
                                if(ra){
                                    ra.click();
                                }
                            }
                               if(ele ){
                                   //_unselected
                                   let v = '';
                                   if(data.object[f]){
                                       v = data.object[f];
                                   }
                                   let arr = v.split(';');
                                   for(let opi in ele.options){
                                    let op = ele.options[opi];
                                        if(!op)continue;
                                       op.selected = arr.indexOf(op.value)>-1;
                                   }
                                   let ra = document.getElementById(ele.id + '_right_arrow');
                                   if(ra){
                                       ra.click();
                                   }
                               }
                            }else{
                                ele.value = data.object[f];
                            }
                            if(ele.type.indexOf("select")>-1 && ele.value){
                                jQuery(ele).change()
                            }
                            
                        }
@@ -140,7 +157,8 @@
        }
        var GetEleApiName = function(ele){
            for(let c of ele.classList){
            for(let ci in ele.classList){
                let c = ele.classList[ci];
                if(c.indexOf(config.ApiPrefix+'_')>-1){
                    return c.replace(config.ApiPrefix+'_','');
                }
@@ -167,12 +185,24 @@
            // }
            let phone = document.querySelector(textPhone);
            if(phone && !/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){
                error_msg += ';电话号码错误';
            if(phone ){
                if(phone.value){
                    if(!/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){
                        error_msg += ';电话号码错误';
                    }
                }else{
                    if(phone.previousSibling && phone.previousSibling.className.indexOf('requiredBlock')>-1){
                        error_msg += ';电话号码错误';
                    }
                }
            }
            for(let e of document.getElementsByTagName('select')){
                for(let op of e.options){
            let es = document.getElementsByTagName('select')
            for(let ei in es){
                let e = es[ei];
                for(let opi in e.options){
                    let op = e.options[opi];
                    if(!op)continue;
                    if(op.value == "*****" && op.selected){
                        error_msg += ';下拉框不能主动选择密文选项';
                    }
@@ -211,9 +241,9 @@
                            v = ele.value;
                        }
                        if(v && v != "000000000000000"){
                        // if(v && v != "000000000000000"){
                            result[field_api_name] = v;
                        }
                        // }
                        
                    }
                } else if (ele.type == 'checkbox') {
@@ -316,7 +346,7 @@
            // Check Required Field
            let checkRequiredFieldMsgResult = checkRequiredFieldMsg(sobjJson);
            if (checkRequiredFieldMsgResult) {
                alertErrorMessage('requiredErrorMsg' + checkRequiredFieldMsgResult);
                alertErrorMessage('{!$Label.Input_Required_Field_Msg}' + checkRequiredFieldMsgResult);
                return
            }
            // //3. Prepare the payload for New PI API To AWS - To Do
@@ -394,7 +424,8 @@
        function replaceSearchContactLookup() {
            let lookUpNode = htmlToElement(contactHtmlString);
            console.log(lookUpNode);
            if (!{!isNewMode}) {
            let eleContactValue = document.querySelector("[data-id='ReporterASE__c']").parentNode.parentNode.children[0].value;
            if (!{!isNewMode} || (eleContactValue != '000000000000000')) {
                //1. Query Contact from AWS by AWSDataId
                queryContactName()
            }           
@@ -491,6 +522,16 @@
            </apex:repeat>
            <script>
                sfdcPage.appendToOnloadQueue(function () {
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    //1. Set Last Name label
                    //document.querySelector("[data-id='LastName']").parentNode.parentNode.parentNode.children[2].children[0].innerText = '姓名';
                    //2. Query AWS Data by dataId 
@@ -502,7 +543,36 @@
                    //Replace Vlookup Field
                    replaceSearchContactLookup();
                    document.querySelectorAll("[data-id='OwnerId']")[0].classList.add("disabledbutton");
                    document.querySelectorAll("[data-id='OwnerId']")[1].classList.add("disabledbutton");
                    jQuery('a[data-id="OwnerId"]').remove();
                    jQuery(".lookupInput").each(function(i,e){
                        let je =jQuery(e).find('input');
                        je.attr("readonly","");
                        je.css("background","unset");
                        let dataid = je.attr('data-id');
                        if(['Hospital_Name__c','Department_Class__c','OwnerId'].indexOf(dataid) > -1) return;
                        jQuery(e).children(":last-child").before('<img class="closeIcon" data-id="'+dataid+'" generate="" alt="Clear" src="/s.gif" style="display: inline-block;">');
                    })
                    jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){
                        this.className = "closeIconOn";
                    });
                    jQuery(".lookupInput").on("mouseleave","img[generate]",function(e){
                        this.className = "closeIcon"
                    });
                    jQuery(".lookupInput").on("click","img[generate]",function(e){
                        let id = jQuery("input[data-id='"+jQuery(this).attr("data-id")+ "']").attr("id");
                        let input = document.getElementById(id);
                        if(input){
                            input.value = '';
                            let hidden = document.getElementById(id+'_lkid');
                            if(hidden){
                                hidden.value = '';
                            }
                        }
                    });
                });
            </script>
            <div class="pbBottomButtons">
force-app/main/default/pages/NewAndEditAddress.page
@@ -439,7 +439,7 @@
                        je.css("background","unset");
                        
                        let dataid = je.attr('data-id');
                        if(['OwnerId'].indexOf(dataid) > -1) return;
                        if(['Province__c', 'OwnerId'].indexOf(dataid) > -1) return;
                        jQuery(e).children(":last-child").before('<img class="closeIcon" data-id="'+dataid+'" generate="" alt="Clear" src="/s.gif" style="display: inline-block;">');
                    })
                    
force-app/main/default/pages/NewAndEditCase.page
@@ -320,25 +320,25 @@
            let sfId = document.getElementById(document.querySelector("[data-id='ContactId']").id + '_lkid').value;
            let contactsInfo = JSON.parse('{!contactsInfo}');
            let dataId = contactsInfo[sfId];
            // let queryContactBack = function(data){
            //     //To Do later
            //     console.log('ContactData = ' + data.object);
            let queryContactBack = function(data){
                //To Do later
                console.log('ContactData = ' + data.object);
                
            //     document.querySelector("[data-id='ContactId']").value = data.object.lastName;
            // }
            // AWSService.query(staticResourcesContact.queryUrl, dataId, queryContactBack, staticResources.token);
            let url = staticResourcesContact.queryUrl + '?dataId=' + dataId;
            fetch(url, {
                method: 'GET',
                headers: {
                    'Content-Type': 'application/json',
                    'pi-token': staticResources.token
                }
            }).then((data) => {
                return data.json();
            }).then((result) => {
                document.querySelector("[data-id='ContactId']").value = result.object.lastName;
            })
                document.querySelector("[data-id='ContactId']").value = data.object.lastName;
            }
            AWSService.query(staticResourcesContact.queryUrl, dataId, queryContactBack, staticResources.token);
            // let url = staticResourcesContact.queryUrl + '?dataId=' + dataId;
            // fetch(url, {
            //     method: 'GET',
            //     headers: {
            //         'Content-Type': 'application/json',
            //         'pi-token': staticResources.token
            //     }
            // }).then((data) => {
            //     return data.json();
            // }).then((result) => {
            //     document.querySelector("[data-id='ContactId']").value = result.object.lastName;
            // })
        }
    </script>
    <div class="bPageTitle">
@@ -403,6 +403,16 @@
            </apex:repeat>
            <script>
                sfdcPage.appendToOnloadQueue(function () {
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    //1. Set Last Name label
                    //document.querySelector("[data-id='LastName']").parentNode.parentNode.parentNode.children[2].children[0].innerText = '姓名';
                    //2. Query AWS Data by dataId 
@@ -419,6 +429,38 @@
                    document.querySelector("[data-id='RecordTypeId']").classList.add("disabledbutton");
                    //需要隐藏
                    // document.querySelector("[data-id='SuppliedEmail']").classList.add("displayblock");
                    jQuery('a[data-id="OwnerId"]').remove();
                    jQuery(".lookupInput").each(function(i,e){
                        let je =jQuery(e).find('input');
                        je.attr("readonly","");
                        je.css("background","unset");
                        let dataid = je.attr('data-id');
                        if(['Hospital_Name__c','Department_Class__c','OwnerId'].indexOf(dataid) > -1) return;
                        jQuery(e).children(":last-child").before('<img class="closeIcon" data-id="'+dataid+'" generate="" alt="Clear" src="/s.gif" style="display: inline-block;">');
                    })
                    jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){
                        this.className = "closeIconOn";
                    });
                    jQuery(".lookupInput").on("mouseleave","img[generate]",function(e){
                        this.className = "closeIcon"
                    });
                    jQuery(".lookupInput").on("click","img[generate]",function(e){
                        let id = jQuery("input[data-id='"+jQuery(this).attr("data-id")+ "']").attr("id");
                        let input = document.getElementById(id);
                        if(input){
                            input.value = '';
                            let hidden = document.getElementById(id+'_lkid');
                            if(hidden){
                                hidden.value = '';
                            }
                        }
                    });
                });
            </script>
            <div class="pbBottomButtons">
force-app/main/default/pages/NewAndEditContact.page
@@ -1,9 +1,9 @@
<apex:page standardController="Contact" extensions="NewAndEditContactController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<apex:page standardController="Contact" extensions="NewAndEditContactController" id="page" action="{!PageLoad}">
    <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
    <script>
        
        var config = {};
@@ -71,7 +71,8 @@
            queryBack:function (data) {
                console.log('data = ' + data);
                if(data.object){
                    for(let f of config.AWSToSobjectNonEncryptedMapKeySet){
                    for(let fi in config.AWSToSobjectNonEncryptedMapKeySet){
                        let f = config.AWSToSobjectNonEncryptedMapKeySet[fi];
                        let ele = document.getElementById(api_id_map[config.AWSToSobjectNonEncryptedMap[f]])
                        if(data.object.hasOwnProperty(f) && ele){
                            
@@ -86,32 +87,10 @@
                                   }
                                   
                                   let arr = v.split(';');
                                   // 清空已有选项
                                   /*
                                   let sl = document.getElementById(ele.id + '_selected');
                                   if(sl){
                                       for(let op of sl.options){
                                           op.selected = true;
                                       }
                                       let la = document.getElementById(ele.id + '_left_arrow');
                                       if(la){
                                           la.click();
                                       }
                                   }
                                   
                                   // 赋值新选项
                                   let us = document.getElementById(ele.id + '_unselected');
                                   if(us){
                                       for(let op of us.options){
                                           op.selected = arr.indexOf(op.value)>-1;
                                       }
                                       let ra = document.getElementById(ele.id + '_right_arrow');
                                       if(ra){
                                           ra.click();
                                       }
                                   }*/
                                   for(let op of ele.options){
                                   for(let opi in ele.options){
                                    let op = ele.options[opi];
                                        if(!op)continue;
                                       op.selected = arr.indexOf(op.value)>-1;
                                   }
                                   let ra = document.getElementById(ele.id + '_right_arrow');
@@ -169,7 +148,8 @@
        }
        var GetEleApiName = function(ele){
            for(let c of ele.classList){
            for(let ci in ele.classList){
                let c = ele.classList[ci];
                if(c.indexOf(config.ApiPrefix+'_')>-1){
                    return c.replace(config.ApiPrefix+'_','');
                }
@@ -178,6 +158,9 @@
        }
        function IsFormTag(tag_name){
            if (!tag_name) {
                return false;
            }
            return ['input','select','textarea'].indexOf(tag_name.toLowerCase())>-1;
        }
        
@@ -195,17 +178,37 @@
            let textPhone = "[data-id='Phone']";
            //Email
            let email = document.querySelector(textEmail);
            if(email && email.previousSibling && email.previousSibling.className.indexOf('requiredBlock')>-1 && !/^[\w-]{3,12}@[\da-zA-Z]{2,16}\.[a-zA-Z]+$/.test(email.value)){
                error_msg += ';邮件格式错误';
            if(email ){
                if(email.value){
                    if(!/^[\w-]{3,12}@[\da-zA-Z]{2,16}\.[a-zA-Z]+$/.test(email.value)){
                        error_msg += ';邮件格式错误';
                    }
                }else{
                    if(email.previousSibling && email.previousSibling.className.indexOf('requiredBlock')>-1){
                        error_msg += ';邮件格式错误';
                    }
                }
            }
            let phone = document.querySelector(textPhone);
            if(phone && phone.previousSibling && phone.previousSibling.className.indexOf('requiredBlock')>-1 && !/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){
                error_msg += ';电话号码错误';
            if(phone ){
                if(phone.value){
                    if(!/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){
                        error_msg += ';电话号码错误';
                    }
                }else{
                    if(phone.previousSibling && phone.previousSibling.className.indexOf('requiredBlock')>-1){
                        error_msg += ';电话号码错误';
                    }
                }
            }
            for(let e of document.getElementsByTagName('select')){
                for(let op of e.options){
            let es = document.getElementsByTagName('select')
            for(let ei in es){
                let e = es[ei];
                for(let opi in e.options){
                    let op = e.options[opi];
                    if(!op)continue;
                    if(op.value == "*****" && op.selected){
                        error_msg += ';下拉框不能主动选择密文选项';
                    }
@@ -244,9 +247,9 @@
                            v = ele.value;
                        }
                        if(v && v != "000000000000000"){
                        // if(v && v != "000000000000000"){
                            result[field_api_name] = v;
                        }
                        // }
                        
                    }
                } else if (ele.type == 'checkbox') {
@@ -354,7 +357,7 @@
            // Check Required Field
            let checkRequiredFieldMsgResult = checkRequiredFieldMsg(sobjJson);
            if (checkRequiredFieldMsgResult) {
                alertErrorMessage('requiredErrorMsg' + checkRequiredFieldMsgResult);
                alertErrorMessage('{! $Label.Input_Required_Field_Msg}' + checkRequiredFieldMsgResult);
                return
            }
            // //3. Prepare the payload for New PI API To AWS - To Do
@@ -444,7 +447,8 @@
            <script>
            var init_nodes = document.getElementsByClassName("PIBackApi");
            var api_id_map={};
            for(let e of init_nodes){
            for(let ei in init_nodes){
                let e = init_nodes[ei];
                if(IsFormElement(e)){
                    if(e.getAttribute("multiple") != 'multiple' || e.style.display == 'none' && e.id.indexOf('selected') < 0){
                        api_id_map[GetEleApiName(e)] = e.id;
@@ -454,6 +458,13 @@
            }
            console.log(api_id_map);
            sfdcPage.appendToOnloadQueue(function () {
                jQuery('option').each(function(i,e){
                    if(e.value == '_\x01_'){
                        e.value = '';
                    }
                })
                //1. Set Last Name label
                //document.querySelector("[data-id='LastName']").parentNode.parentNode.parentNode.children[2].children[0].innerText = '姓名';
                //2. Query AWS Data by dataId 
@@ -461,7 +472,62 @@
                if (!{!isNewMode}) {
                    blockme();
                    QuerySobjectFromAWS();
                }else{
                    let ot = jQuery('input[data-id="OwnerId"]');
                    let oi = document.getElementById(ot.attr("id")+'_lkid');
                    ot.val('{!CurrentUserName}');
                    ot.attr("readonly","");
                    ot.css("background","unset");
                    ot.css("border","0");
                    ot.css("outline","0");
                    if(oi){
                        oi.value = '{!CurrentUserId}'
                    }
                }
                jQuery('a[data-id="OwnerId"]').remove();
                jQuery(".lookupInput").each(function(i,e){
                    let je =jQuery(e).find('input');
                    je.attr("readonly","");
                    je.css("background","unset");
                    let dataid = je.attr('data-id');
                    if(['Hospital_Name__c','Department_Class__c','OwnerId'].indexOf(dataid) > -1) return;
                    jQuery(e).children(":last-child").before('<img class="closeIcon" data-id="'+dataid+'" generate="" alt="Clear" src="/s.gif" style="display: inline-block;">');
                })
                jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){
                    this.className = "closeIconOn";
                });
                jQuery(".lookupInput").on("mouseleave","img[generate]",function(e){
                    this.className = "closeIcon"
                });
                jQuery(".lookupInput").on("click","img[generate]",function(e){
                    let id = jQuery("input[data-id='"+jQuery(this).attr("data-id")+ "']").attr("id");
                    let input = document.getElementById(id);
                    if(input){
                        input.value = '';
                        let hidden = document.getElementById(id+'_lkid');
                        if(hidden){
                            hidden.value = '';
                        }
                    }
                });
                var layoutSections = JSON.parse('{!layoutSectionsStr}');
                for (let m = 0; m < layoutSections.length; m++) {
                    let layoutSection = layoutSections[m].layoutFields;
                    for (let n = 0; n < layoutSection.length; n++) {
                        let layoutField = layoutSection[n];
                        if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                            document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                        }
                    }
                }
            });
            </script>
            <div class="pbBottomButtons">
force-app/main/default/pages/NewAndEditInspectionReport.page
@@ -77,7 +77,8 @@
                                   let arr = data.object[f].split(';');
                                   // 给隐藏的select赋值
                                   for(let op of ele.options){
                                   for(let opi in ele.options){
                                       let op = ele.options[opi]
                                       op.selected = arr.indexOf(op.value)>-1;
                                   }
                                   
@@ -205,9 +206,9 @@
                            v = ele.value;
                        }
                        if(v && v != "000000000000000"){
                        //if(v && v != "000000000000000"){
                            result[field_api_name] = v;
                        }
                        //}
                        
                    }
                } else if (ele.type == 'checkbox') {
@@ -316,7 +317,7 @@
            console.log('sobjJson:'+sobjJson);
            console.log('check:'+checkRequiredFieldMsgResult);
            if (checkRequiredFieldMsgResult) {
                alertErrorMessage('requiredErrorMsg' + checkRequiredFieldMsgResult);
                alertErrorMessage('{!$Label.Input_Required_Field_Msg}' + checkRequiredFieldMsgResult);
                return
            }
            // //3. Prepare the payload for New PI API To AWS - To Do
@@ -412,7 +413,58 @@
                    if (!{!isNewMode}) {
                        blockme();
                        QuerySobjectFromAWS();
                    }
                    }else{
                        let ot = jQuery('input[data-id="OwnerId"]');
                        let oi = document.getElementById(ot.attr("id")+'_lkid');
                        ot.val('{!CurrentUserName}');
                        ot.attr("readonly","");
                        ot.css("background","unset");
                        ot.css("border","0");
                        ot.css( "outline","0");
                        jQuery('a[data-id="OwnerId"]').remove();
                        if(oi){
                            oi.value = '{!CurrentUserId}'
                        }
                    }
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    jQuery(".lookupInput").each(function(i,e){
                        let je =jQuery(e).find('input');
                        je.attr("readonly","");
                        je.css("background","unset");
                        let dataid = je.attr('data-id');
                        if(['Hospital_Name__c','Department_Class__c','OwnerId'].indexOf(dataid) > -1) return;
                        jQuery(e).children(":last-child").before('<img class="closeIcon" data-id="'+dataid+'" generate="" alt="Clear" src="/s.gif" style="display: inline-block;">');
                    })
                    jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){
                        this.className = "closeIconOn";
                    });
                    jQuery(".lookupInput").on("mouseleave","img[generate]",function(e){
                        this.className = "closeIcon"
                    });
                    jQuery(".lookupInput").on("click","img[generate]",function(e){
                        let id = jQuery("input[data-id='"+jQuery(this).attr("data-id")+ "']").attr("id");
                        let input = document.getElementById(id);
                        if(input){
                            input.value = '';
                            let hidden = document.getElementById(id+'_lkid');
                            if(hidden){
                                hidden.value = '';
                            }
                        }
                    });
                });
            </script>
            <div class="pbBottomButtons">
force-app/main/default/pages/NewAndEditLead.page
@@ -1,8 +1,8 @@
<apex:page standardController="Lead" extensions="NewAndEditLeadController" id="page">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" />
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" />
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" />
    <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
    <style>
        .disabledbutton {
@@ -20,11 +20,11 @@
        var redirectMode = 'Save';//1. Save 2. SaveAndNew
        var requiredAPIToChangedLabelMap = new Map();
        requiredAPIToChangedLabelMap.set('LastName', '{!PIPL_Name_Label}');
        console.log('{!contactsInfo}');
        var VLookUpFields = new Set(['Hospital_Name__c', 'Department_Class__c', 'Contact_Name__c', 'Campaign__c', 'Lead_Inquiry_form__c', 'Opp_Name_Search__c']);
        function ProcessPI(leadJson, payloadForNewPI) {
            blockme();
            if ({!isNewMode}) {
            if ({!isNewMode
        }) {
            NewPIToAWS(leadJson, payloadForNewPI)
        }else {
            UpdatePIToAWS(leadJson, payloadForNewPI)
@@ -75,24 +75,28 @@
            let textPhone = "[data-id='Phone']";
            //Email
            let email = document.querySelector(textEmail);
            if(email.value!='' && !/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(email.value)){
            if (email.value != '' && !/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(email.value)) {
                error_msg += ';邮件格式错误';
            }
            let phone = document.querySelector(textPhone);
            if(phone.value!='' && !/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){
            if (phone.value != '' && !/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)) {
                error_msg += ';电话号码错误';
            }
            for(let e of document.getElementsByTagName('select')){
                for(let op of e.options){
            let es = document.getElementsByTagName('select')
            for(let ei in es){
                let e = es[ei];
                for(let opi in e.options){
                    let op = e.options[opi];
                    if(!op)continue;
                    if(op.value == "*****" && op.selected){
                        error_msg += ';下拉框不能主动选择密文选项';
                    }
                }
            }
            if(error_msg.length>0 && error_msg[0]== ';'){
            if (error_msg.length > 0 && error_msg[0] == ';') {
                error_msg = error_msg.substring(1);
            }
force-app/main/default/pages/NewAndEditQIS.page
@@ -67,22 +67,28 @@
            queryBack:function (data) {
                console.log('data = ' + data);
                if(data.object){
                    for(let f of config.AWSToSobjectNonEncryptedMapKeySet){
                    for(let fi in config.AWSToSobjectNonEncryptedMapKeySet){
                        let f = config.AWSToSobjectNonEncryptedMapKeySet[fi];
                        let ele = document.getElementById(api_id_map[config.AWSToSobjectNonEncryptedMap[f]])
                        if(data.object.hasOwnProperty(f) && ele){
                            
                            // 多选特殊处理
                            if(ele.type == 'select-multiple'){
                               //let me = GetEleByClass(config.ApiPrefix+'_'+field_api_name);
                               if(ele && data.object[f]){
                                   let arr = data.object[f].split(';');
                                   // 给隐藏的select赋值
                                   for(let op of ele.options){
                                       op.selected = arr.indexOf(op.value)>-1;
                               if(ele ){
                                   //_unselected
                                   let v = '';
                                   if(data.object[f]){
                                       v = data.object[f];
                                   }
                                   
                                   // 利用按钮给显示的select赋值
                                   let arr = v.split(';');
                                   for(let opi in ele.options){
                                    let op = ele.options[opi];
                                        if(!op)continue;
                                       op.selected = arr.indexOf(op.value)>-1;
                                   }
                                   let ra = document.getElementById(ele.id + '_right_arrow');
                                   if(ra){
                                       ra.click();
@@ -106,11 +112,6 @@
                else{
                    console.log('data.object = ' + data.object);
                }
                // document.querySelector("[data-id='LastName']").value = data.object.lastName;
                // document.querySelector("[data-id='Phone']").value = data.object.phone;
                // document.querySelector("[data-id='Email']").value = data.object.email;
            },
            updateMethod:"NewAndEditQISController.saveQISReport",
            insertMethod:"NewAndEditQISController.saveQISReport"
@@ -138,7 +139,8 @@
        }
        var GetEleApiName = function(ele){
            for(let c of ele.classList){
            for(let ci in ele.classList){
                let c = ele.classList[ci];
                if(c.indexOf(config.ApiPrefix+'_')>-1){
                    return c.replace(config.ApiPrefix+'_','');
                }
@@ -147,6 +149,9 @@
        }
        function IsFormTag(tag_name){
            if (!tag_name) {
                return false;
            }
            return ['input','select','textarea'].indexOf(tag_name.toLowerCase())>-1;
        }
        
@@ -173,8 +178,12 @@
                error_msg += ';联系电话格式错误';
            }
            for(let e of document.getElementsByTagName('select')){
                for(let op of e.options){
            let es = document.getElementsByTagName('select')
            for(let ei in es){
                let e = es[ei];
                for(let opi in e.options){
                    let op = e.options[opi];
                    if(!op)continue;
                    if(op.value == "*****" && op.selected){
                        error_msg += ';下拉框不能主动选择密文选项';
                    }
@@ -213,9 +222,9 @@
                            v = ele.value;
                        }
                        if(v && v != "000000000000000"){
                        //if(v && v != "000000000000000"){
                            result[field_api_name] = v;
                        }
                        //}
                        
                    }
                } else if (ele.type == 'checkbox') {
@@ -520,9 +529,12 @@
            <script>
            var init_nodes = document.getElementsByClassName("PIBackApi");
            var api_id_map={};
            for(let e of init_nodes){
            for(let ei in init_nodes){
                let e = init_nodes[ei];
                if(IsFormElement(e)){
                     api_id_map[GetEleApiName(e)] = e.id;
                    if(e.getAttribute("multiple") != 'multiple' || e.style.display == 'none' && e.id.indexOf('selected') < 0){
                        api_id_map[GetEleApiName(e)] = e.id;
                    }
                }
            }
            console.log(api_id_map);
force-app/main/default/pages/NewAndEditTenderinformation.page
@@ -77,7 +77,8 @@
                                   let arr = data.object[f].split(';');
                                   // 给隐藏的select赋值
                                   for(let op of ele.options){
                                   for(let opi in ele.options){
                                       let op = ele.options[opi]
                                       op.selected = arr.indexOf(op.value)>-1;
                                   }
                                   
@@ -203,9 +204,9 @@
                            v = ele.value;
                        }
                        if(v && v != "000000000000000"){
                        //if(v && v != "000000000000000"){
                            result[field_api_name] = v;
                        }
                        //}
                        
                    }
                } else if (ele.type == 'checkbox') {
@@ -314,7 +315,7 @@
            // Check Required Field
            let checkRequiredFieldMsgResult = checkRequiredFieldMsg(sobjJson);
            if (checkRequiredFieldMsgResult) {
                alertErrorMessage('requiredErrorMsg' + checkRequiredFieldMsgResult);
                alertErrorMessage('{!$Label.Input_Required_Field_Msg}' + checkRequiredFieldMsgResult);
                return
            }
            // //3. Prepare the payload for New PI API To AWS - To Do
@@ -410,7 +411,58 @@
                    if (!{!isNewMode}) {
                        bolckme();
                        QuerySobjectFromAWS();
                    }
                    }else{
                        let ot = jQuery('input[data-id="OwnerId"]');
                        let oi = document.getElementById(ot.attr("id")+'_lkid');
                        ot.val('{!CurrentUserName}');
                        ot.attr("readonly","");
                        ot.css("background","unset");
                        ot.css("border","0");
                        ot.css( "outline","0");
                        jQuery('a[data-id="OwnerId"]').remove();
                        if(oi){
                            oi.value = '{!CurrentUserId}'
                        }
                    }
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    jQuery(".lookupInput").each(function(i,e){
                        let je =jQuery(e).find('input');
                        je.attr("readonly","");
                        je.css("background","unset");
                        let dataid = je.attr('data-id');
                        if(['Hospital_Name__c','Department_Class__c','OwnerId'].indexOf(dataid) > -1) return;
                        jQuery(e).children(":last-child").before('<img class="closeIcon" data-id="'+dataid+'" generate="" alt="Clear" src="/s.gif" style="display: inline-block;">');
                    })
                    jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){
                        this.className = "closeIconOn";
                    });
                    jQuery(".lookupInput").on("mouseleave","img[generate]",function(e){
                        this.className = "closeIcon"
                    });
                    jQuery(".lookupInput").on("click","img[generate]",function(e){
                        let id = jQuery("input[data-id='"+jQuery(this).attr("data-id")+ "']").attr("id");
                        let input = document.getElementById(id);
                        if(input){
                            input.value = '';
                            let hidden = document.getElementById(id+'_lkid');
                            if(hidden){
                                hidden.value = '';
                            }
                        }
                    });
                });
            </script>
            <div class="pbBottomButtons">
force-app/main/default/pages/NewConsumApply.page
@@ -2,7 +2,7 @@
  @description       : 
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             : 
  @last modified on  : 03-11-2022
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Consum_Apply__c" extensions="NewConsumApplyController" id="page">
@@ -375,6 +375,16 @@
            <script>
                //Append Page
                sfdcPage.appendToOnloadQueue(function () {
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    //2. Query AWS Data by dataId 
                    console.log('Mode for consumApply Page:' + {!isNewMode});
                    if (!{!isNewMode}) {
force-app/main/default/pages/NewConsumApplyEquipmentSetDetail.page
@@ -1,3 +1,10 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Consum_Apply_Equipment_Set_Detail__c" extensions="NewConsumApplyEquipSetDetailController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
@@ -270,6 +277,16 @@
            <script>
                //Append Page
                sfdcPage.appendToOnloadQueue(function () {
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    //2. Query AWS Data by dataId 
                    console.log('Mode for consumApply Page:' + {!isNewMode});
                    if (!{!isNewMode}) {
force-app/main/default/pages/NewOnCall.page
@@ -1,3 +1,10 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="On_Call__c" extensions="OnCallController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
@@ -268,6 +275,16 @@
            <script>
                //Append Page
                sfdcPage.appendToOnloadQueue(function () {
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    //2. Query AWS Data by dataId 
                    console.log('Mode for onCall Page:' + {!isNewMode});
                    if (!{!isNewMode}) {
force-app/main/default/pages/NewRentalApply.page
@@ -2,7 +2,7 @@
  @description       : 
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             : 
  @last modified on  : 03-11-2022
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Rental_Apply__c" extensions="RentalApplyController" id="page">
@@ -363,6 +363,16 @@
            <script>
                //Append Page
                sfdcPage.appendToOnloadQueue(function () {
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    //2. Query AWS Data by dataId 
                    console.log('Mode for rentalApply Page:' + {!isNewMode});
                    if (!{!isNewMode}) {
force-app/main/default/pages/NewRepair.page
@@ -1,3 +1,10 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Repair__c" extensions="NewRepairController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
@@ -149,7 +156,7 @@
                    result[userVLookUpFields[i]] = userVlookUpNodeValue;
                }               
            }
            result.work_location_select__c = document.querySelector("[id='page:form:j_id30:j_id34:0:j_id35:j_id36:18:j_id37']").value;
            result.work_location_select__c = document.querySelector("[id='page:form:j_id30:j_id34:1:j_id35:j_id36:18:j_id37']").value;
            // result.ProblemDescription__c = document.querySelector("[aria-describedby = 'cke_34']").contentWindow.document.getElementsByTagName('body')[0].innerHTML
            console.log(JSON.stringify(result));
            return result;
@@ -297,6 +304,16 @@
            <script>
                //Append Page
                sfdcPage.appendToOnloadQueue(function () {
                    var layoutSections = JSON.parse('{!layoutSectionsStr}');
                    for (let m = 0; m < layoutSections.length; m++) {
                        let layoutSection = layoutSections[m].layoutFields;
                        for (let n = 0; n < layoutSection.length; n++) {
                            let layoutField = layoutSection[n];
                            if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) {
                                document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField);
                            }
                        }
                    }
                    //2. Query AWS Data by dataId 
                    console.log('Mode for repair Page:' + {!isNewMode});
                    if (!{!isNewMode}) {
force-app/main/default/pages/StraightBackAddress.page
@@ -21,7 +21,7 @@
        //替换vlookup
        var newSearchContactWindow = null;
        window.onload = () => {
        window.onload = function () {
            document.getElementById("tab01").style.height  =  screen.availHeight*0.07+'px';
            document.getElementById("tab02").style.height  =  screen.availHeight*0.53+'px';
            document.getElementById("tab03").style.height  =  screen.availHeight*0.25+'px';
@@ -81,7 +81,7 @@
            let divs = j$(e).find("div.message");
            for (let i = 0; i < divs.length; i++) {
                for (let j = 0; j < divs[i].classList.length; j++) {
                    for(let cls of divs[i].classList){
                    for(let cls in divs[i].classList){
                        if (cls.indexOf('error')>-1) {
                            return true;
                        }
@@ -355,9 +355,14 @@
                    PIData[Id] = temp;
                };
                for(var i=0;i<tableDataStr.length;i++){
                    if(tableDataStr[i].address.AWS_Data_Id__c){
                    if(tableDataStr[i].address.Contacts__r){
                        correct++;
                        AWSService.queryRepair(staticResource.queryUrl,tableDataStr[i].address.AWS_Data_Id__c,tableDataStr[i].address.Id,tableDataStr[i].address.Contacts__r.AWS_Data_Id__c,searchCallBack,staticResource.token);
                        AWSService.queryRepair(staticResource.queryUrl,
                                                tableDataStr[i].address.AWS_Data_Id__c,
                                                tableDataStr[i].address.Id,
                                                tableDataStr[i].address.Contacts__r.AWS_Data_Id__c,
                                                searchCallBack,
                                                staticResource.token);
                    } 
                }
                var interval=self.setInterval(function (){
@@ -379,7 +384,6 @@
                let queryBack = function queryBack(result) {
                    let contacts = result.object;
                    if(contacts == null){
                        console.log('查询联系人的数据 == null')
                        return;
                    }
                    for(var i=0;i<result.object.length;i++){
@@ -442,7 +446,7 @@
                '\n邮编: '+PIData[awsDataId].zipCode+
                '\n详细地址: '+PIData[awsDataId].detailedAddress
            }else{
                piInformation = '联系人: '+
                piInformation = '联系人: null'+
                '\n电话: '+PIData[awsDataId].telephone+
                '\n邮编: '+PIData[awsDataId].zipCode+
                '\n详细地址: '+PIData[awsDataId].detailedAddress
@@ -453,12 +457,9 @@
            let y=window.event.y; 
            createDiv.style.left=x;  
            createDiv.style.top=y;  
            createDiv.style.width = '100px';
            createDiv.style.height = '100px';
            createDiv.style.background="#dddddd";
            createDiv.style.position = "absolute";
            parentNode.appendChild(createDiv);  
            parentNode.style.position = "relative";
        }
        function hidePIDiv(awsDataId){
@@ -635,9 +636,9 @@
                                        <td align="left"  style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
                                            <apex:outputfield value="{!or.address.Customer__c}" />
                                        </td>
                                        <td align="left"  style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" aws-data-id="{!or.address.AWS_Data_Id__c}" >
                                        <td align="left"  style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" aws-data-id="{!or.address.AWS_Data_Id__c}">
                                            <!-- <apex:outputfield value="{!or.address.Contacts__c}" id="{!or.address.Contacts__c}_{!or.address.Id}"/> -->
                                            <a href="#" id="{!or.address.Id}"   aws-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')">{!or.address.Contacts__r.Name}</a>
                                            <a href="#" id="{!or.address.Id}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')"  aws-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}">{!or.address.Contacts__r.Name}</a>
                                        </td>
                                        <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
                                            <apex:outputText value="{!or.address.Telephone__c}" />
force-app/main/default/pages/UploadPdf.page
@@ -96,7 +96,7 @@
                'fileName': fileName })
                , function(result){
                    console.log("result" + JSON.stringify(result));
                    if (result.success == true) {
                    key = result.object;
force-app/main/default/pages/ViewASEActivityDecryptInfo.page
@@ -1,5 +1,13 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="ASEActivity__c" extensions="NewAndEditASEActivityController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
@@ -18,18 +26,16 @@
                    AWSToSobjectEncryptedMap:{!AWSToSobjectEncryptedMapJson}
                };
                var staticResources = JSON.parse('{!staticResource}');
                console.log(staticResources)
                var staticResourcesContact = JSON.parse('{!staticResourceContact}');
                function QuerySobjectFromAWS() {
                    console.log('AWSDataId:'+'{!AWSDataId}')
                    AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token);
                }
                function QueryContactFromAWS() {
                    if('{!contactAWS}' != null && '{!contactAWS}' != ''){
                        console.log('staticResourcesContact .queryUrl' + staticResourcesContact .queryUrl);
                        AWSService.query(staticResourcesContact .queryUrl, '{!contactAWS}', queryContactBack, staticResources.token);
                    }
                }
                var queryContactBack = function queryContactBack(data){
                    if(!data.object){
                        console.log('data.object is ' + data.object);
@@ -56,7 +62,6 @@
                    for(let f in config.AWSToSobjectNonEncryptedMap){
                        let t = "[title='"+config.ApiPrefix+config.AWSToSobjectNonEncryptedMap[f]+"']";
                        let ele = document.querySelector(t);
                        console.log(ele);
                        if(ele){
                            ele.title = '';
                            if(data.object.hasOwnProperty(f)){
@@ -77,7 +82,6 @@
                    console.log('sfdcPage.appendToOnloadQueue')
                    // document.querySelector("[data-id='LastName']").parentNode.parentNode.parentNode.children[0].innerText = '姓名'
                    QuerySobjectFromAWS();
                    QueryContactFromAWS();
                });
            </script>
        </apex:pageblock>
force-app/main/default/pages/ViewAddressDecryptInfo.page
@@ -1,5 +1,6 @@
<apex:page standardController="Address__c" extensions="NewAndEditAddressController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
force-app/main/default/pages/ViewCaseDecryptInfo.page
@@ -1,5 +1,6 @@
<apex:page standardController="Case" extensions="NewAndEditCaseController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
force-app/main/default/pages/ViewConsumApplyEquipmentSetDetailDecrypt.page
@@ -1,5 +1,13 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Consum_Apply_Equipment_Set_Detail__c" extensions="NewConsumApplyEquipSetDetailController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
force-app/main/default/pages/ViewDecryptConsumApply.page
@@ -1,5 +1,13 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Consum_Apply__c" extensions="NewConsumApplyController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
@@ -14,7 +22,7 @@
                    AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token);
                }
                var queryBack = function queryBack(data) {
                    document.querySelector("[id='page:form:pageBlock:pageBlockSection:j_id1:0:j_id2']").innerHTML = data.object.phoneNumber;
                    document.querySelector("[id='page:form:pageBlock:pageBlockSection:j_id2:1:j_id3']").innerHTML = data.object.phoneNumber;
                    document.querySelector("[data-id='direct_shippment_address__c']").innerHTML = data.object.directShippmentAddress;
                };
                sfdcPage.appendToOnloadQueue(function () {
force-app/main/default/pages/ViewInquiryFormDecryptInfo.page
@@ -1,5 +1,6 @@
<apex:page standardController="Inquiry_form__c" extensions="NewAndEditInquiryFormController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
force-app/main/default/pages/ViewOnCallDecrypt.page
@@ -1,4 +1,12 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="On_Call__c" extensions="OnCallController" id="page">
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
@@ -14,7 +22,7 @@
                    AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token);
                }
                var queryBack = function queryBack(data) {
                    document.querySelector("[id='page:form:pageBlock:pageBlockSection:j_id1:0:j_id2']").innerHTML = data.object.callerPhone;
                    document.querySelector("[id='page:form:pageBlock:pageBlockSection:j_id2:1:j_id3']").innerHTML = data.object.callerPhone;
                    document.querySelector("[data-id='Responsible_Person_HP__c']").innerHTML = data.object.responsiblePersonHP;
                };
                sfdcPage.appendToOnloadQueue(function () {
force-app/main/default/pages/ViewRentalApplyDecrypt.page
@@ -1,5 +1,13 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Rental_Apply__c" extensions="RentalApplyController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
@@ -14,7 +22,7 @@
                    AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token);
                }
                var queryBack = function queryBack(data) {
                    document.querySelector("[id='page:form:pageBlock:pageBlockSection:j_id1:1:j_id2']").innerHTML = data.object.phoneNumber;
                    document.querySelector("[id='page:form:pageBlock:pageBlockSection:j_id1:0:j_id2']").innerHTML = data.object.phoneNumber;
                    document.querySelector("[data-id='direct_shippment_address__c']").innerHTML = data.object.directShippmentAddress;
                };
                sfdcPage.appendToOnloadQueue(function () {
force-app/main/default/pages/ViewRepairEncrypt.page
@@ -1,5 +1,13 @@
<!--
  @description       :
  @author            : ChangeMeIn@UserSettingsUnder.SFDoc
  @group             :
  @last modified on  : 03-17-2022
  @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Repair__c" extensions="NewRepairController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
@@ -9,7 +17,6 @@
                </apex:repeat>
            </apex:pageBlockSection>
            <script>
                debugger;
                var staticResources = JSON.parse('{!staticResource}');
                var staticResourceContact = JSON.parse('{!staticResourceContact}');
                var staticResourceAddress = JSON.parse('{!staticResourceAddress}');
@@ -38,7 +45,6 @@
                }
                sfdcPage.appendToOnloadQueue(function () {
                    console.log('sfdcPage.appendToOnloadQueue');
                    debugger;
                    QueryConsumApplyFromAWS();
                });
            </script>
force-app/main/default/pages/ViewRepairSubOrderDecryptInfo.page
@@ -1,5 +1,6 @@
<apex:page standardController="RepairSubOrder__c" extensions="NewAndEditRepairSubOrderController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
force-app/main/default/staticresources/AWSService/AWSService.js
@@ -1,4 +1,4 @@
var  AWSService = {};
let  AWSService = {};
AWSService = {
    sfSessionId : '',
    insertModule : 'Insert AWS ',
@@ -224,6 +224,28 @@
       
   },
   get:function(queryURL, queryback, token) {
        let para = {
            url:queryURL,
            headers: {
                'Content-Type': 'application/json',
                'pi-token': token
            },
            type: "get",
            success: function (data) {
                AWSService.insertCalloutLog(AWSService.queryModule,queryURL,'',JSON.stringify(data),AWSService.successStatus);
                queryback(data);
            },
            error: function (error){
            //错误相关处理 404属于该处理(经测试)
            //还可能是"timeout", "error", "notmodified" 和 "parsererror"。
                AWSService.insertCalloutLog(AWSService.queryModule,queryURL,'',JSON.stringify(error),AWSService.failStatus);
                console.log(error);
            }
        };
        jQuery.ajax(para);
    },
   //update
    post:function(postURL, payloadForNewPI, callback, token) {
       console.log('Process New PI Data');
@@ -381,4 +403,5 @@
           { escape: true }
       );
   }
};
};
window.AWSService = AWSService;