tt
twysparks
2023-05-15 db0fa56676f63e02a43900891781aa67498f9ea6
tt
26个文件已删除
30个文件已修改
4个文件已添加
1393 ■■■■ 已修改文件
force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonMaintenanceTaskCtl.cls 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonQISReportCtl.cls 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonQISSCReportCtl.cls 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonRepairQuotationCtl.cls 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditorRepair/__tests__/lexASACEditorRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAddress/__tests__/lexAddress.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAddress/lexAddress.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyRepair/__tests__/lexCopyRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomDelete/__tests__/lexCustomDelete.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js 170 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls
New file
@@ -0,0 +1,25 @@
public with sharing class buttonMaintenanceContractAssetCtl {
    public buttonMaintenanceContractAssetCtl() {
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Maintenance_Contract_Asset__c report =  [SELECT Id  FROM Maintenance_Contract_Asset__c WHERE Id =: recordId LIMIT 1];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.Id = report.Id;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String Id;
     }
}
force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/buttonMaintenanceTaskCtl.cls
New file
@@ -0,0 +1,40 @@
public with sharing class buttonMaintenanceTaskCtl {
    public buttonMaintenanceTaskCtl() {
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Maintenance_Task__c report =  [SELECT Id,Maintenance_Contract__c  FROM Maintenance_Task__c WHERE Id =: recordId LIMIT 1];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.Id = report.Id;
            res.MaintenanceContractC = report.Maintenance_Contract__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static List<Maintenance_Contract__c> selectMaintenanceContract(String Id){
        List<Maintenance_Contract__c> res = new List<Maintenance_Contract__c>();
        try{
            res = [SELECT Id,RecordType_DeveloperName__c,Estimate_Target__c from Maintenance_Contract__c WHERE Id =: Id];
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String MaintenanceContractC;
     }
}
force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/buttonQISReportCtl.cls
@@ -7,7 +7,7 @@
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            QIS_Report__c report =  [SELECT QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1];
            QIS_Report__c report =  [SELECT is_CNBuy__c,isPAE_Profile__c,isAE_Profile__c,Name,QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1];
            res.PAEDetermineC = report.PAE_Determine__c;
            res.PAEDetermineACC = report.PAE_DetermineAC__c;
            res.OCMJudgementC = report.OCM_judgement__c;
@@ -15,7 +15,12 @@
            res.ETQUPLOADSTATUSC = report.ETQ_UPLOAD_STATUS__c;
            res.AEDetermineResultC = report.AE_DetermineResult__c;
            res.Id = report.Id;
            res.Name = report.Name;
            res.QISStatusC = report.QIS_Status__c;
            res.isAEProfileC = report.isAE_Profile__c;
            res.isCNBuyC = report.is_CNBuy__c;
            res.isPAEProfileC = report.isPAE_Profile__c;
            res.userId = UserInfo.getUserId();
            res.email = UserInfo.getUserEmail();
            res.profileId = UserInfo.getProfileId();
@@ -29,7 +34,7 @@
     @AuraEnabled
     public static String updateOSHNogoods(String Id,String email,String userId){
        List<User> user = new List<User>();
        user = [SELECT Id,Alias from User];
        user = [SELECT Id,Alias,Alias__c from User];
        String res ='';
        try {
@@ -134,10 +139,51 @@
         return res;
     }
        // 根据ID修理报价提交
        @AuraEnabled
        public static String updateQisForRCRecieved(String QId,String uid){
            String res='';
           try {
                List<User> user = new List<User>();
                user = [SELECT Id,Alias,Alias__c from User];
               QIS_Report__c rac = new QIS_Report__c();
               rac.Id = QId;
                rac.QIS_Status__c = 'RC检测中';
                rac.OCM_RC_RecievedDate__c = Date.today();
                rac.RC__c = uid;
                rac.RC_Receive_staff__c = user[0].Alias;
                List<User> records = new List<User>();
                records = [SELECT  Id, BuchangApprovalManagerSales__c,JingliApprovalManager__c, BuchangApprovalManager__c, ZongjianApprovalManager__c FROM User WHERE Id=: uid ];
                if (records != null && records.size() > 0 && records[0].BuchangApprovalManagerSales__c != null) {
                    rac.RC_Manager__c = records[0].BuchangApprovalManagerSales__c;
                } else {
                    rac.RC_Manager__c = uid;
                }
                rac.CDS_date__c = Date.today();
                rac.RC_CDS_staff__c = user[0].Alias__c;
                rac.OCSM_Nogoods__c = true;
                update rac;
            } catch (Exception e) {
                System.debug(LoggingLevel.INFO, '*** e: ' + e);
                res = e.getMessage();
            }
            return res;
        }
     public class InitData{
        @AuraEnabled
        public String isAEProfileC;
         @AuraEnabled
        public String isCNBuyC;
         @AuraEnabled
        public String isPAEProfileC;
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String Name;
        @AuraEnabled
        public String QISStatusC;
        @AuraEnabled
        public String userId;
force-app/main/default/classes/buttonQISSCReportCtl.cls
@@ -21,15 +21,18 @@
    // 根据ID修改QIS市场部
    @AuraEnabled
    public static void updateQISSCReport(String Id){
    public static String updateQISSCReport(String QId){
        String s;
        try {
            QIS_SC_Report__c qis_Sc = new QIS_SC_Report__c();
            qis_Sc.Id = Id;
            qis_Sc.Status__c = '已提交';
            update qis_Sc;
            QIS_SC_Report__c qis = new QIS_SC_Report__c();
            qis.Id = QId;
            qis.Status__c = '已提交';
            update qis;
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            s=e.getMessage();
        }
        return s;
    }
    public class InitData{
force-app/main/default/classes/buttonRepairQuotationCtl.cls
@@ -44,7 +44,7 @@
        String res ='';
        try {
            Repair_Quotation__c repair = new Repair_Quotation__c();
            repair.Id = recordid;
            repair.Id = recordId;
            repair.CutPriceStatus_Service__c = '已提交';
            update repair;
        } catch (Exception e) {
@@ -60,7 +60,7 @@
        String res ='';
        try {
            Repair_Quotation__c repair = new Repair_Quotation__c();
            repair.Id = recordid;
            repair.Id = recordId;
            repair.Rental_Apply_Discount_Status__c = '已提交';
            update repair;
        } catch (Exception e) {
@@ -98,6 +98,18 @@
        return res;
    }
     // 查找简档
     @AuraEnabled
     public static List<Profile> initSelectProfile(String profileId){
         List<Profile> res = new List<Profile>();
         try{
             res = [SELECT Id,name FROM Profile WHERE Id=: profileId ];
         }catch(Exception e){
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
    public class InitData{
        @AuraEnabled
        public String Id;
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
@@ -7,7 +7,7 @@
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Maintenance_Contract__c report =  [SELECT URF_Contract__c,RecordTypeId,Is_RecognitionModel__c,Status__c,MC_approval_status__c,Payment_Plan_Sum_First__c,
            Maintenance_Contract__c report =  [SELECT  URF_Contract__c,RecordTypeId,Is_RecognitionModel__c,Status__c,MC_approval_status__c,Payment_Plan_Sum_First__c,
            Contract_quotation_or_not__c,Name,notRenew__c,Contract_print_completed__c,Maintenance_Contract_No__c,
            upload_to_sap_time__c,old_Is_RecognitionModel__c,upload_to_RM_time__c,Is_Recognition_Model_True__c,
            Id,URF_Contract_F__c,RecordType_DeveloperName__c,Estimate_Target__c FROM Maintenance_Contract__c WHERE Id =: recordId LIMIT 1];
@@ -41,10 +41,10 @@
    // 维修合同失单报告
    @AuraEnabled
    public static List<Lost_Report__c> selectRecords(String recordId){
    public static List<Lost_Report__c> selectRecords(String mcId){
        List<Lost_Report__c> res = new List<Lost_Report__c>();
        try{
            res = [SELECT Id,Status__c,Other_Reasons__c,Other__c,Third_Party_Company__c,Third_Party_Contract_Price__c,To_Where__c,Specific_Reasons__c,Maintenance_Contract__c from Lost_Report__c where Maintenance_Contract__c =: recordId ];
            res = [SELECT Id,Status__c,Other_Reasons__c,Other__c,Third_Party_Company__c,Third_Party_Contract_Price__c,To_Where__c,Specific_Reasons__c,Maintenance_Contract__c from Lost_Report__c where Maintenance_Contract__c =: mcId ];
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
@@ -7,10 +7,11 @@
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Inspection_Report__c report =  [SELECT Id,RecordTypeId FROM Inspection_Report__c WHERE Id =: recordId LIMIT 1];
            Inspection_Report__c report =  [SELECT Id,RecordTypeId,RecordType.DeveloperName FROM Inspection_Report__c WHERE Id =: recordId LIMIT 1];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.Id = report.Id;
            res.RecordTypeId = report.RecordTypeId;
            res.RecordType = report.RecordType.DeveloperName;
          
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
@@ -24,5 +25,7 @@
        public String Id;
        @AuraEnabled
        public String RecordTypeId;
        @AuraEnabled
        public String RecordType;
     }
}
force-app/main/default/lwc/lexASACEditorRepair/__tests__/lexASACEditorRepair.test.js
File was deleted
force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js
@@ -64,11 +64,8 @@
                } else {
                    url = "/apex/PAEDecisionRecord?RepairId=" + RepairId + "&RecordTypeIds=" + RecordTypeId;
                }
                window.open(url, '_self');
            }
        }).catch(error => {
            console.log(error);
        })
    }
}
force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js
File was deleted
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js
@@ -46,9 +46,7 @@
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // Intake universal code编辑
@@ -68,8 +66,6 @@
                }
                window.open(url, '_self');
            }
        }).catch(error => {
            console.log(error);
        })
    }
}
force-app/main/default/lwc/lexAddress/__tests__/lexAddress.test.js
File was deleted
force-app/main/default/lwc/lexAddress/lexAddress.js
@@ -59,10 +59,8 @@
    Address() {
        if (this.partArrangementCompleteC != undefined) {
            this.ShowToastEvent('零件已齐备完毕,直返收货地址不能修改!',"error")
            // alert('零件已齐备完毕,直返收货地址不能修改!');
        } else if (this.RepairShippedDateC  != undefined) {
            this.ShowToastEvent('RC修理品已返送,直返收货地址不能修改!',"error")
            // alert('RC修理品已返送,直返收货地址不能修改!');
        } else {
            window.open("/apex/StraightBackAddress?id=" + this.Id, '_self');
        }
force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
@@ -57,7 +57,6 @@
        var status = this.StatusC;
        if (status != '待处理') {
            this.ShowToastEvent("报修子单的状态不是 待处理 无法申请修理", "error")
            // alert('报修子单的状态不是 待处理 无法申请修理');
            return;
        }
        var url = '/apex/ChoiceAsset?Id=' + this.Id + '&Type=Repair';
force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js
File was deleted
force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js
File was deleted
force-app/main/default/lwc/lexCopyRepair/__tests__/lexCopyRepair.test.js
File was deleted
force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js
File was deleted
force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js
@@ -9,15 +9,15 @@
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
import init from '@salesforce/apex/buttonMaintenanceTaskCtl.init';
import selectMaintenanceContract from '@salesforce/apex/buttonMaintenanceTaskCtl.selectMaintenanceContract';
export default class LexCreateReportMaintenanceTask extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;
    RecordTypeDeveloperNameC;
    EstimateTargetC;
    MaintenanceContractC;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -31,7 +31,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -39,31 +38,35 @@
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
                this.EstimateTargetC = result.EstimateTargetC;
                this.MaintenanceContractC = result.MaintenanceContractC;
                this.CreateReport();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 制作报告书
    CreateReport() {
        var MaintenanceContractId = this.Id;
        var RecordTypeName = this.RecordTypeDeveloperNameC;
        var EstimateTarget = this.EstimateTargetC;
        selectMaintenanceContract({
            Id: this.MaintenanceContractC
        }).then(result => {
            console.log(result);
            var MaintenanceContractId = this.MaintenanceContractC;
            var RecordTypeName = result[0].RecordType_DeveloperName__c;
            var EstimateTarget = result[0].Estimate_Target__c;
        var url = '';
        if (EstimateTarget == "经销商" && (RecordTypeName == "NewMaintenance_Contract" || RecordTypeName == "VM_Contract")) {
            url = "/apex/MoreMaintenanceContractPop?Id=" + MaintenanceContractId + "&RecordTypeName=" + RecordTypeName;
        } else {
            url = "http://powerbi.olympus.com.cn/Home/Login";
        }
        window.open(url, '_bank');
            console.log(RecordTypeName);
            console.log(EstimateTarget);
            var url = '';
            if (EstimateTarget == "经销商" && (RecordTypeName == "NewMaintenance_Contract" || RecordTypeName == "VM_Contract")) {
                url = "/apex/MoreMaintenanceContractPop?Id=" + MaintenanceContractId + "&RecordTypeName=" + RecordTypeName;
            } else {
                url = "http://powerbi.olympus.com.cn/Home/Login";
            }
            window.open(url, '_bank');
        })
    }
}
force-app/main/default/lwc/lexCustomDelete/__tests__/lexCustomDelete.test.js
File was deleted
force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
File was deleted
force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
@@ -61,14 +61,9 @@
        }).then(repList => {
            if (repList != null && repList.length > 0) {
                var rp = repList[0];
                if (rp.Status__c != "草案中" &&
                    rp.Status__c != "1.受理完毕(SAP待发送)" &&
                    rp.Status__c != "4.修理品返送阶段"
                ) {
                if (rp.Status__c != "草案中" && rp.Status__c != "1.受理完毕(SAP待发送)" && rp.Status__c != "4.修理品返送阶段") {
                    this.ShowToastEvent("不是草案中,不能删除", "error")
                } else if (rp.Status__c == "4.修理品返送阶段" &&
                    (rp.SAP_Transfer_time__c != undefined || rp.Repair_Ordered_Date__c != undefined)
                ) {
                } else if (rp.Status__c == "4.修理品返送阶段" && (rp.SAP_Transfer_time__c != undefined || rp.Repair_Ordered_Date__c != undefined)) {
                    this.ShowToastEvent("已经发送过SAP,不能删除", "error")
                } else if (this.userID.substring(0, 15) != rp.CreatedById.substring(0, 15) && this.userID.substring(0, 15) != rp.Acc_OwnerId__c.substring(0, 15) && this.userID.substring(0, 15) != rp.FSE_ownerid__c.substring(0, 15)) {
                    this.ShowToastEvent("不是所有人、创建人或FSE主负责人,不能删除", "error")
force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js
File was deleted
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js
@@ -34,7 +34,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -50,18 +49,15 @@
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 继续新服务合同
    CustomNewCopy2() {
        if (this.notRenewC) {
            this.ShowToastEvent("请联系服务商品部!", "error");
            // alert("请联系服务商品部!");
        } else {
            window.open("/" + this.Id + "/e?clone=1&Name=&00N10000002Dx5D=&00N10000002Dx5S=%e5%bc%95%e5%90%88%e4%b8%ad&00NO00000010sDc=&CF00NO00000010hyI=&CF00NO00000010hyI_lkid=&CF00NO00000010hyX=&CF00NO00000010hyX_lkid=&CF00NO00000010hyN=&CF00NO00000010hyN_lkid=&RecordType=01210000000gTYq&00N10000002pmOp=&00N10000006gZDd=&00N10000006gZDe=&00NO00000010hy4=&00N10000002Dx4j=&00N10000002Dx4m=&00N10000002Dx4w=&00N10000002Dx4k=&00N10000002Dx5J=&00N10000002Dx5M=&00N10000002Dx4i=&00N10000002Dx4h=&00N10000002Dx5K=&00N10000003OXdT=&00N100000048zfn=&00N10000002FMsq=&00N10000003OlGF=&00N10000002Dx4r=&00N100000047AY1=&00N100000047AYB=&00N100000047AY6=&00N10000003PCeB=&00N10000005HBNe=&00N10000006plAl=&00N10000002Dx5C=&retURL=%2F" + this.Id + "&saveURL=%2Fapex/SaveMaintenanceByCopy?mid=" + this.Id + "&CF00N100000048Paw=" + this.Name + "&CF00N100000048Paw_lkid=" + this.Id, "_blank");
            window.open("/" + this.Id + "/e?clone=1&Name=&00N10000002Dx5D=&00N10000002Dx5S=%e5%bc%95%e5%90%88%e4%b8%ad&00NO00000010sDc=&CF00NO00000010hyI=&CF00NO00000010hyI_lkid=&CF00NO00000010hyX=&CF00NO00000010hyX_lkid=&CF00NO00000010hyN=&CF00NO00000010hyN_lkid=&RecordType=01210000000gTYq&00N10000002pmOp=&00N10000006gZDd=&00N10000006gZDe=&00NO00000010hy4=&00N10000002Dx4j=&00N10000002Dx4m=&00N10000002Dx4w=&00N10000002Dx4k=&00N10000002Dx5J=&00N10000002Dx5M=&00N10000002Dx4i=&00N10000002Dx4h=&00N10000002Dx5K=&00N10000003OXdT=&00N100000048zfn=&00N10000002FMsq=&00N10000003OlGF=&00N10000002Dx4r=&00N100000047AY1=&00N100000047AYB=&00N100000047AY6=&00N10000003PCeB=&00N10000005HBNe=&00N10000006plAl=&00N10000002Dx5C=&retURL=%2F{!Maintenance_Contract__c.Id}&saveURL=%2Fapex/SaveMaintenanceByCopy?mid=" + this.Id + "&CF00N100000048Paw=" + this.Name + "&CF00N100000048Paw_lkid=" + this.Id, "_blank");
        }
    }
force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
@@ -36,7 +36,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -61,14 +60,13 @@
        }).then(repairs => {
            if (repairs != null && repairs.length > 0) {
                var rp = repairs[0];
                if (rp.Return_Without_Repair_IF__c == 'true') {
                console.log(rp);
                if (rp.Return_Without_Repair_IF__c == true) {
                    this.ShowToastEvent("未修理归还的修理不允许减价申请", "error");
                    // alert("未修理归还的修理不允许减价申请");
                    return;
                } else {
                    if (rp.Return_Without_Repair__c == 'true') {
                    if (rp.Return_Without_Repair__c == true) {
                        this.ShowToastEvent("已经申请未修理返回,如果需要继续修理请取消\"未修理归还申请\"的勾选后再进行减价申请操作", "error");
                        // alert("已经申请未修理返回,如果需要继续修理请取消\"未修理归还申请\"的勾选后再进行减价申请操作");
                        return;
                    }
                }
@@ -93,7 +91,6 @@
                    return;
                }
            })
            location.reload();
        })
    }
force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js
File was deleted
force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js
@@ -17,6 +17,7 @@
    IsLoading = true;
    Id;
    RecordTypeId;
    RecordType;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -38,21 +39,20 @@
                this.IsLoading = false;
                this.Id = result.Id;
                this.RecordTypeId = result.RecordTypeId;
                this.RecordType = result.RecordType;
                this.insPageBtn();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 报告书明细编辑
    insPageBtn() {
        var url;
        if (this.RecordTypeId == '01210000000aLii') {
        if (this.RecordType == 'ContractInspection') {
            url = '/apex/OFSInsReportLayoutForVm';
        } else {
            url = '/apex/OFSInsReportLayout';
force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js
File was deleted
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
@@ -46,16 +46,16 @@
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.InchargeStaffEmailC = result.InchargeStaffEmailC;
                this.Name = result.Name;
                this.HPNameC = result.HPNameC;
                this.DeliveredProductC = result.DeliveredProductC;
                this.RepairProductSerialNoC = result.RepairProductSerialNoC;
                this.ServiceRepairNoC = result.ServiceRepairNoC;
                this.RepairFirstestimatedDateC = result.RepairFirstestimatedDateC;
                this.RepairEstimatedDateC = result.RepairEstimatedDateC;
                this.RCInformationC = result.RCInformationC;
                this.userEmail = result.userEmail;
                this.InchargeStaffEmailC = result.InchargeStaffEmailC == undefined ? "" : result.InchargeStaffEmailC;
                this.Name = result.Name == undefined ? "" : result.Name;
                this.HPNameC = result.HPNameC == undefined ? "" : result.HPNameC;
                this.DeliveredProductC = result.DeliveredProductC == undefined ? "" : result.DeliveredProductC;
                this.RepairProductSerialNoC = result.RepairProductSerialNoC == undefined ? "" : result.RepairProductSerialNoC;
                this.ServiceRepairNoC = result.ServiceRepairNoC == undefined ? "" : result.ServiceRepairNoC;
                this.RepairFirstestimatedDateC = result.RepairFirstestimatedDateC == undefined ? "" : result.RepairFirstestimatedDateC;
                this.RepairEstimatedDateC = result.RepairEstimatedDateC == undefined ? "" : result.RepairEstimatedDateC;
                this.RCInformationC = result.RCInformationC == undefined ? "" : result.RCInformationC;
                this.userEmail = result.userEmail == undefined ? "" : result.userEmail;
                this.mailMessege();
                this.dispatchEvent(new CloseActionScreenEvent());
@@ -70,7 +70,6 @@
    // 报价附件更新的邮件通知
    mailMessege() {
        var Link = "https://ocsm--partial.sandbox.my.salesforce.com/" + this.Id;
        console.log(Link);
        location.href = 'mailto:' + this.InchargeStaffEmailC +
            '?bcc=' + this.userEmail +
force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js
File was deleted
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
@@ -53,9 +53,7 @@
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // OCSM不要报告
@@ -63,29 +61,24 @@
        if (!confirm("不要报告后无法撤回,是否继续?")) {
            return;
        }
        if (this.OCSMAdministrativeReportNumberC != undefined ||
            this.OCSMAdministrativeReportDateC != undefined) {
            this.ShowToastEvent("已经报告的QIS,不可以点击OCSM不要报告。", "error")
            // alert("已经报告的QIS,不可以点击OCSM不要报告。");
            return;
        }
        if (this.AwareDateC != undefined) {
            updateRepair({
                recordId: this.Id
            }).catch(error => {
                if (error.body.pageErrors.length > 0) {
                    var errmsg = error.body.pageErrors[0].message.toString();
                    this.ShowToastEvent(errmsg.join("\n"), "error")
                    // alert(errmsg.join("\n"));
                    return;
            }).then(result => {
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                }
                window.location.reload();
            })
            window.location.reload();
        } else {
            this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error")
            // alert("没有AwareDate或已经OCSM行政报告,请确认。");
            return;
        }
    }
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css
File was deleted
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
@@ -1,101 +1,97 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
import init  from '@salesforce/apex/QISReportController.initForlexRCRecievedButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForRCRecieved';
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/buttonQISReportCtl.init';
import updateQisForRCRecieved from '@salesforce/apex/buttonQISReportCtl.updateQisForRCRecieved';
export default class lexOCSMNogoods extends LightningElement {
    @api recordId;
    err;
    IsLoading = true;
    qisReportId;
    qisStatus;
    isAEProfile;
    isCNBuy;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
    @api recordId;
    str;
    IsLoading = true;
    Id;
    userId;
    QISStatusC;
    isAEProfileC;
    isCNBuyC;
    isPAEProfileC;
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
           }
         }
     }
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
     connectedCallback () {
    connectedCallback() {
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.qisStatus = result.qIStatus;
            this.isAEProfile = result.isAEProfile;
            this.isCNBuy = result.isCNBuy;
            console.log('this.qisStatus='+this.qisStatus);
             if (this.qisStatus!='RC检测申请') {
                const evt = new ShowToastEvent({
                        title : 'OCM服务本部已经收到实物',
                        message: '',
                        variant: 'error'
                    });
                this.dispatchEvent(evt);
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.userId = result.userId;
                this.QISStatusC = result.QISStatusC;
                this.isAEProfileC = result.isAEProfileC;
                this.isPAEProfileC = result.isPAEProfileC;
                this.isCNBuyC = result.isCNBuyC;
                this.OCSMNogoods();
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
             }else{
                 if (this.isAEProfile == null || this.isPAEProfile == null || this.isCNBuy != 'true') {
                     const evt = new ShowToastEvent({
                        title : '安全信息未判定,请联系质量法规部',
                        message: '',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                 }else{
                     this.updateQisSubmit();
                 }
             }
            }
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
        });
            console.log(error);
        })
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                    this.err = result;
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
    //OCSM无实物送达
    OCSMNogoods() {
        if (this.QISStatusC != 'RC检测申请') {
            this.ShowToastEvent("OCM服务本部已经收到实物", "error");
        } else {
            if ((this.isAEProfileC == undefined || this.isPAEProfileC == undefined) && this.isCNBuyC != 'true') {
                this.ShowToastEvent("安全信息未判定,请联系质量法规部", "error");
                var btns = document.getElementsByName('rc_recieved');
                for (var i = 0; i < btns.length; i++) {
                    btns[i].disabled = true;
                    btns[i].className = 'btnDisabled';
                }
            } else {
                updateQisForRCRecieved({
                    QId: this.Id,
                    uid: this.userId
                }).then(result => {
                    console.log(result);
                    if (result.length > 0) {
                        alert(result);
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                this.updateRecordView(this.recordId);
                }).catch(error => {
                            console.log('error='+error);
                }).finally(() => {
                });
                })
            }
        }
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js
File was deleted
force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js
File was deleted
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
@@ -55,11 +55,10 @@
        })
    }
    // 减价申请
    // OSH无实物送达
    OSHNogoods() {
        if (this.QISStatusC != 'OSH检测申请' && this.QISStatusC != '完毕') {
            this.ShowToastEvent("OSH已经收到实物", "error")
            // alert('OSH已经收到实物');
        } else {
            updateOSHNogoods({
                Id: this.Id,
@@ -71,9 +70,6 @@
                    var split = result.split(", ");
                    alert(split[1]);
                }
                location.reload();
            }).catch(error => {
                console.log(error);
            })
        }
    }
force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js
File was deleted
force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js
File was deleted
force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
@@ -57,9 +57,7 @@
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 合同复核
@@ -67,26 +65,22 @@
        if (this.oldIsRecognitionModelC) {
            if (this.uploadToRMTimeC == null) {
                this.ShowToastEvent('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能复核。', "error")
                // alert('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能复核。');
                return;
            } else {
                if (!this.IsRecognitionModelTrueC) {
                    this.ShowToastEvent('当前维修合同没有完成认款,不能进行复核。', "error")
                    // alert('当前维修合同没有完成认款,不能进行复核。');
                    return;
                }
            }
        }
        var status = this.MCApprovalStatusC;
        if (status != 'Draft' && status != 'Reject' && status != undefined) {
            this.ShowToastEvent('复核已经提交,请确认状态。', "success")
            // alert('复核已经提交,请确认状态。');
            this.ShowToastEvent('复核已经提交,请确认状态。', "error")
            return;
        }
        var con_no = this.ContractprintCompletedC;
        if (con_no == '') {
        if (con_no == undefined) {
            this.ShowToastEvent('合同盖章完毕为空,不能提交合同复核申请。', "error")
            // alert('合同盖章完毕为空,不能提交合同复核申请。');
            return;
        }
        if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) {
@@ -97,7 +91,6 @@
        }).catch(error => {
            if (error.body.pageErrors[0] != null) {
                var errmsg = error.body.pageErrors[0].message.toString();
                // alert(errmsg + '_sys');
                this.ShowToastEvent(errmsg + '_sys', "error")
                return;
            }
force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js
File was deleted
force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js
File was deleted
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js
@@ -31,7 +31,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -42,15 +41,12 @@
                this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
                this.EstimateTargetC = result.EstimateTargetC;
                this.QuarterlyReport();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 制作季报
force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
@@ -11,7 +11,7 @@
} from 'lightning/actions';
import init from '@salesforce/apex/buttonRepairQuotationCtl.init';
import updateRepairQuotation03 from '@salesforce/apex/buttonRepairQuotationCtl.updateRepairQuotation03';
import initSelectProfile from '@salesforce/apex/buttonRepairQuotationCtl.initSelectProfile';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
@@ -24,6 +24,7 @@
    RentalApplyDiscountStatusC;
    LoanerRepairSysC;
    profileId;
    profileName;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -49,7 +50,17 @@
                this.RentalApplyDiscountStatusC = result.RentalApplyDiscountStatusC;
                this.LoanerRepairSysC = result.LoanerRepairSysC;
                this.RentalApplyDiscountApproval();
                initSelectProfile({
                    profileId: this.profileId
                }).then(result => {
                    console.log(result);
                    if (result != null) {
                        this.IsLoading = false;
                        this.profileName = result[0].Name;
                        this.RentalApplyDiscountApproval();
                    }
                })
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
@@ -59,23 +70,20 @@
    // 备品减价申请    
    RentalApplyDiscountApproval() {
        var power = this.profileId;
        // 2B2_备品中心检测&仓库管理 00e10000000xnoY
        if (power != '00e10000000xnoY') {
            this.ShowToastEvent("对不起,您没有权限提交此申请!", "error");
            // alert('对不起,您没有权限提交此申请!');
            return;
        }
        var power = this.profileName;
        // if (power != '2B2_备品中心检测&仓库管理') {
        //     this.ShowToastEvent("对不起,您没有权限提交此申请!", "error");
        //     return;
        // }
        var status = this.RentalApplyDiscountStatusC;
        if (status == '审批中') {
            this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error");
            // alert("审批提交成功,当前正在审批请勿再提交!");
            return;
        }
        if (status == '批准') {
            this.ShowToastEvent("审批已批准,请勿再提交!", "error");
            // alert("审批已批准,请勿再提交!");
            return;
        }
        if (status == '草案中' || status == undefined || status == '驳回') {
@@ -91,12 +99,10 @@
                    }
                })
            } else {
                this.ShowToastEvent("请先填写备品减价金额!", "error");
                // alert("请先填写备品减价金额!");
                this.ShowToastEvent("提交失败", "error");
                return;
            }
        }
        location.reload();
    }
    // 弹窗
force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
@@ -48,16 +48,13 @@
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 提交待审批
    SCSubmit() {
        if (this.StatusC != '草案中') {
            this.ShowToastEvent("已经提交审批", "error")
            // alert('已经提交审批');
            return;
        }
@@ -66,15 +63,16 @@
        }
        updateQISSCReport({
            Id: this.Id
            QId: this.Id
        }).then(result => {
            console.log(result);
            if (result.length > 0) {
                var split = result.split(", ");
                alert(split[1]);
            } else {
                this.ShowToastEvent("已提交", "success")
                window.location.reload();
            }
            this.ShowToastEvent("已提交", "success")
            // alert('已提交!')
            window.location.reload();
        })
    }
force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js
File was deleted
force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js
@@ -9,7 +9,7 @@
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
import init from '@salesforce/apex/buttonMaintenanceContractAssetCtl.init';
export default class LexSelectAssetsMaintenance extends LightningElement {
    @api recordId;
force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
@@ -12,6 +12,7 @@
import init from '@salesforce/apex/buttonRepairQuotationCtl.init';
import updateRepairQuotation from '@salesforce/apex/buttonRepairQuotationCtl.updateRepairQuotation';
import updateRepairQuotation02 from '@salesforce/apex/buttonRepairQuotationCtl.updateRepairQuotation02';
import initSelectProfile from '@salesforce/apex/buttonRepairQuotationCtl.initSelectProfile';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
@@ -24,6 +25,7 @@
    Id;
    CutPriceStatusServiceC;
    profileId;
    profileName;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -37,7 +39,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -48,31 +49,40 @@
                this.CutPriceStatusServiceC = result.CutPriceStatusServiceC;
                this.profileId = result.profileId;
                this.ServiceCutPriceApply();
                initSelectProfile({
                    profileId: this.profileId
                }).then(result => {
                    console.log(result);
                    if (result != null) {
                        this.IsLoading = false;
                        this.profileName = result[0].Name;
                        this.ServiceCutPriceApply();
                    }
                })
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        })
    }
    //服务本部减价申请
    ServiceCutPriceApply() {
        var power = this.profileId;
        if (power != '00e10000000xnnz' && power != '00e10000000xno9' && power != '00e10000000NbC4') {
        var power = this.profileName;
        if (power != '2F2A_RC' && power != '2F4_技术推进部' && power != '2F4_技术推进部_非SSO') {
            this.ShowToastEvent("对不起,您没有权限提交此申请!", "error");
            // alert('对不起,您没有权限提交此申请!');
            return;
        }
        var status = this.CutPriceStatusServiceC;
        if (status == '审批中') {
            this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error");
            // alert("审批提交成功,当前正在审批请勿再提交!");
            return;
        }
        if (status == '批准') {
            this.ShowToastEvent("审批已批准,请勿再提交!", "error");
            // alert("审批已批准,请勿再提交!");
            return;
        }
        if (status == '草案中' || status == undefined || status == '驳回') {
@@ -95,12 +105,11 @@
                    alert("提交失败 " + split[1]);
                    return;
                } else {
                    // alert("审批提交成功!");
                    this.ShowToastEvent("审批提交成功!", "success");
                    location.reload();
                }
            })
        }
        location.reload();
    }
    // 弹窗
force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js
File was deleted
force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js
@@ -30,7 +30,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -44,26 +43,21 @@
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 关闭询价/关闭续签
    SubmitForApproval() {
        var url = '';
        selectRecords({
            recordId: this.Id
            mcId: this.Id
        }).then(result => {
            console.log(result);
            if (result.length > 0) {
                url = "/apex/SubmitForApprovalPage?id=" + result[0].Id;
            } else {
                url = "/apex/SubmitForApprovalPage?mcId=" + this.Id;
            }
            window.open(url, '', 'height=350, width=600, top=200, left=350,location=no');
        }).catch(error => {
            console.log("error");
        })
    }
}
force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js
@@ -55,7 +55,6 @@
    //中止
    Terminal() {
        // sforce.connection.sessionId = this.sessionId;
        if (this.ProcessStatusC == "草案中" ||
            this.ProcessStatusC == "不批准" ||
            this.ProcessStatusC == "批准"
@@ -63,16 +62,13 @@
            updateMaintenanceContract({
                recordId: this.Id
            }).then(result => {
                this.ShowToastEvent("该维修合同报价中止了!", "success");
                // alert("该维修合同报价中止了!")
                window.location.reload();
                this.ShowToastEvent("该维修合同报价中止了!", "success");
            }).catch(error => {
                console.log(error);
            })
        } else {
            this.ShowToastEvent("该维修合同报价还在审批中 或 已经中止,不能中止!", "error");
            // alert("该维修合同报价还在审批中 或 已经中止,不能中止!")
        }
    }
force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js
File was deleted
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
@@ -67,55 +67,38 @@
    uploadToRecognitionModel() {
        if (this.ContractQuotationOrNotC == '还没做报价') {
            this.ShowToastEvent("您还没有做合同报价,不能上传认款合同。", "error") 
            // alert("您还没有做合同报价,不能上传认款合同。");
        } else if (this.MaintenanceContractNoC == undefined) {
            this.ShowToastEvent('合同号码为空,不能上传认款合同。', "error") 
            // alert('合同号码为空,不能上传认款合同。');
        } else if (this.uploadToSapTimeC != undefined) {
            this.ShowToastEvent('已经上传SAP,不能再次上传认款合同。', "error") 
            // alert('已经上传SAP,不能再次上传认款合同。');
        } else if (this.uploadToRMTimeC != undefined) {
            this.ShowToastEvent('已经上传认款合同,不能再次上传认款合同。', "error") 
            // alert('已经上传认款合同,不能再次上传认款合同。');
        } else {
            if (!this.oldIsRecognitionModelC) {
                this.ShowToastEvent('经销商为空或经销商不是先款对象,不需要上传认款合同。', "error") 
                // alert('经销商为空或经销商不是先款对象,不需要上传认款合同。');
            } else if (this.PaymentPlanSumFirstC == undefined) {
                this.ShowToastEvent('第一次计划付款金额不能为空。', "error") 
                // alert('第一次计划付款金额不能为空。');
            } else {
                if (!confirm('请确认是否要上传认款合同。')) {
                    return;
                }
                updateColunm({
                    mcid: this.Id
                }).then(result => {
                    console.log(result);
                    if (result != '1') {
                        this.ShowToastEvent('上传认款合同失败,因为 来年合同相关信息修改失败', "error")
                        // alert('上传认款合同失败,因为 来年合同相关信息修改失败');
                        alert('上传认款合同失败,因为 来年合同相关信息修改失败')
                        location.href = "/" + this.Id;
                    }
                }).catch(error => {
                    console.log(error);
                })
                up2sap({
                    mcid: this.Id
                }).then(rtn => {
                    console.log(rtn);
                    if (rtn == '1') {
                        this.ShowToastEvent("上传认款合同成功", "success")
                        // alert("上传认款合同成功");
                        alert("上传认款合同成功")
                        location.href = "/" + this.Id;
                    } else {
                        this.ShowToastEvent(rtn, "error")
                        // alert(rtn);
                        alert(rtn)
                    }
                }).catch(error => {
                    console.log(error);
                })
            }
        }
force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js
File was deleted
force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
@@ -33,6 +33,7 @@
    urfFlag;
    rtn1;
    rtn;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
@@ -45,7 +46,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -66,32 +66,25 @@
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 上传SAP
    uploadToSap() {
        if (this.MCApprovalStatusC != 'Pass') {
            this.ShowToastEvent("合同复核批准后才可以上传SAP。", "error")
            // alert("合同复核批准后才可以上传SAP。");
        } else if (this.MaintenanceContractNoC == undefined) {
            this.ShowToastEvent('维修合同管理编码为空,不能上传SAP。', "error")
            // alert('维修合同管理编码为空,不能上传SAP。');
        } else if (this.uploadToSapTimeC != undefined) {
            this.ShowToastEvent('已经上传SAP,不能重复上传。', "error")
            // alert('已经上传SAP,不能重复上传。');
        } else {
            if (this.oldIsRecognitionModelC) {
                if (this.uploadToRMTimeC == undefined) {
                    this.ShowToastEvent('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能上传SAP。', "error")
                    // alert('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能上传SAP。');
                    return;
                } else {
                    if (!this.IsRecognitionModelTrueC) {
                        this.ShowToastEvent('当前维修合同没有完成认款,不能上传SAP。', "error")
                        // alert('当前维修合同没有完成认款,不能上传SAP。');
                        return;
                    }
                }
@@ -101,7 +94,6 @@
            }).then(result => {
                if (result != '1') {
                    this.ShowToastEvent('上传SAP失败,因为 来年合同相关信息修改失败', "error")
                    // alert('上传SAP失败,因为 来年合同相关信息修改失败');
                }
            });
            updateFirstContract({
@@ -109,7 +101,6 @@
            }).then(result => {
                if (result != '1') {
                    this.ShowToastEvent(result, "error")
                    // alert(result);
                }
            });
            this.urfFlag = this.URFContractFC;
@@ -130,15 +121,12 @@
                });
                if (this.rtn == '1') {
                    this.ShowToastEvent("上传SAP成功", "success")
                    // alert("上传SAP成功");
                    window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Maintenance_Contract__c/" + this.recordId + "/view");
                    location.href = "/" + this.Id;
                } else {
                    this.ShowToastEvent(this.rtn, "error")
                    // alert(this.rtn);
                }
            } else {
                this.ShowToastEvent(this.rtn1, "error")
                // alert(this.rtn1);
            }
        }
    }
force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js
File was deleted
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
@@ -33,7 +33,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -56,48 +55,14 @@
            recordId: this.Id
        }).then(result => {
            console.log(result);
            if (result.length > 0) {
                var split = result.split(", ");
                alert(split[1]);
            if (result != null) {
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                }
            }
            location.reload();
        }).catch(error => {
            console.log(error);
            alert("已经申请过了,不允许重新申请");
        })
    }
    getConnectDMLErrorMessages(results) {
        var messages = [],
            i = 0,
            len = results.length,
            r;
        for (; i < len; i++) {
            r = results[i];
            if (!r.getBoolean("success")) {
                messages = messages.concat(this.getConnectDMLMessagesOfAResult(r));
            }
        }
        return messages;
    }
    getConnectDMLMessagesOfAResult(res) {
        var messages = [],
            errors = res.getArray("errors"),
            i = 0,
            len = errors.length,
            e;
        for (; i < len; i++) {
            e = errors[i];
            messages.push(e.message + " " + this.getConnectDMLErrorFields(e));
        }
        return messages;
    }
    getConnectDMLErrorFields(error) {
        var fields = error.getArray('fields');
        if (fields.length > 0) {
            return "[" + fields.join(",") + "]"
        } else {
            return "";
        }
    }
    // 弹窗
force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css
File was deleted
force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
@@ -1,52 +1,70 @@
import { LightningElement,wire,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForlexcopyQISButton';
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/buttonQISReportCtl.init';
export default class lexcopyQIS extends LightningElement {
    @api recordId;
    err;
    IsLoading = true;
    qisReportId;
    qisStatus;
    name;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             this.recordId = str;
           }
         }
     }
    @api recordId;
    err;
    IsLoading = true;
    Id;
    QISStatusC;
    Name;
     connectedCallback () {
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.qisStatus = result.qIStatus;
            this.name = result.name;
            if (this.qisStatus != '取消') {
                const evt = new ShowToastEvent({
                        title : '状态为取消的QIS才可以被复制并新建',
                        message: '',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
            }
               var url = "/"+this.qisReportId+"/e?newclone=1&retURL=%2F"+this.qisReportId+" &CF00N100000073PA0="+this.name+"&CF00N100000073PA0_lkid="+this.qisReportId;
               window.open(url);
               this.dispatchEvent(new CloseActionScreenEvent());
            this.Id = result.Id;
            this.QISStatusC = result.QISStatusC;
            this.Name = result.Name;
            this.copyQIS()
            this.dispatchEvent(new CloseActionScreenEvent());
        }).catch(error => {
            console.log('error='+error);
            console.log(error);
        })
    }
    copyQIS() {
        if (this.QISStatusC != '取消') {
            this.ShowToastEvent('状态为取消的QIS才可以被复制并新建', 'error');
            return;
        }
        var url = "/" + this.Id + "/e?newclone=1&retURL=%2F" + this.Id + " &CF00N100000073PA0=" + this.Name + "&CF00N100000073PA0_lkid=" + this.Id;
        window.open(url);
    }
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}