From db0fa56676f63e02a43900891781aa67498f9ea6 Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期一, 15 五月 2023 13:49:04 +0800
Subject: [PATCH] tt

---
 force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml                        |    5 
 force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js                           |    1 
 force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js       |   23 -
 force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js                           |    8 
 force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js                     |   47 --
 force-app/main/default/classes/buttonMaintenanceTaskCtl.cls                                 |   40 ++
 force-app/main/default/lwc/lexMailMessege/lexMailMessege.js                                 |   21 
 force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml               |    5 
 force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js |   41 +-
 force-app/main/default/classes/buttonQISReportCtl.cls                                       |   50 +++
 force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js                       |    3 
 force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js                               |    9 
 force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js                       |    6 
 force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js                 |    6 
 force-app/main/default/classes/buttonRepairQuotationCtl.cls                                 |   16 +
 force-app/main/default/classes/buttonQISSCReportCtl.cls                                     |   13 
 force-app/main/default/lwc/lexAddress/lexAddress.js                                         |    2 
 force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js                                 |  170 +++++------
 force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js                         |    9 
 force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js                                   |    6 
 force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js                     |   10 
 force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js |   34 +-
 force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js                                       |   14 
 force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js                                         |   98 ++++--
 force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js         |    2 
 force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls                       |    5 
 force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js                                 |   18 -
 force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls                        |   25 +
 /dev/null                                                                                   |   22 -
 force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js                                   |    8 
 force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js                     |   13 
 force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js               |   21 -
 force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js               |   27 +
 force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls                        |    6 
 force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js                         |    6 
 35 files changed, 409 insertions(+), 381 deletions(-)

diff --git a/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls b/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls
new file mode 100644
index 0000000..6cd4761
--- /dev/null
+++ b/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls
@@ -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;
+     }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml b/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls b/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls
new file mode 100644
index 0000000..2ce4c10
--- /dev/null
+++ b/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls
@@ -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;
+     }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml b/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonQISReportCtl.cls b/force-app/main/default/classes/buttonQISReportCtl.cls
index 364dfe5..973266e 100644
--- a/force-app/main/default/classes/buttonQISReportCtl.cls
+++ b/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;
diff --git a/force-app/main/default/classes/buttonQISSCReportCtl.cls b/force-app/main/default/classes/buttonQISSCReportCtl.cls
index 8704763..2ae493e 100644
--- a/force-app/main/default/classes/buttonQISSCReportCtl.cls
+++ b/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{
diff --git a/force-app/main/default/classes/buttonRepairQuotationCtl.cls b/force-app/main/default/classes/buttonRepairQuotationCtl.cls
index e7213e6..71aa39d 100644
--- a/force-app/main/default/classes/buttonRepairQuotationCtl.cls
+++ b/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;
diff --git a/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
index 771838e..4c78b64 100644
--- a/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
+++ b/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);
         }
diff --git a/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls b/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
index 3cb0f27..cd124a1 100644
--- a/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
+++ b/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;
      }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASACEditorRepair/__tests__/lexASACEditorRepair.test.js b/force-app/main/default/lwc/lexASACEditorRepair/__tests__/lexASACEditorRepair.test.js
deleted file mode 100644
index 4116118..0000000
--- a/force-app/main/default/lwc/lexASACEditorRepair/__tests__/lexASACEditorRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexASACEditorRepair from 'c/lexASACEditorRepair';
-
-describe('c-lex-asac-editor-repair', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-asac-editor-repair', {
-            is: LexASACEditorRepair
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js b/force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js
index 66db124..230b14c 100644
--- a/force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js
+++ b/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);
         })
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js b/force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js
deleted file mode 100644
index d5c600d..0000000
--- a/force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexASRCEditorRepair from 'c/lexASRCEditorRepair';
-
-describe('c-lex-asrc-editor-repair', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-asrc-editor-repair', {
-            is: LexASRCEditorRepair
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js
index 8387edc..88df15b 100644
--- a/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js
+++ b/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);
         })
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAddress/__tests__/lexAddress.test.js b/force-app/main/default/lwc/lexAddress/__tests__/lexAddress.test.js
deleted file mode 100644
index 668985d..0000000
--- a/force-app/main/default/lwc/lexAddress/__tests__/lexAddress.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexAddress from 'c/lexAddress';
-
-describe('c-lex-address', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-address', {
-            is: LexAddress
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAddress/lexAddress.js b/force-app/main/default/lwc/lexAddress/lexAddress.js
index 49b0dc0..33a766b 100644
--- a/force-app/main/default/lwc/lexAddress/lexAddress.js
+++ b/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');
         }
diff --git a/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js b/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
index 40da9e3..33dbd59 100644
--- a/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
+++ b/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';
diff --git a/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js b/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js
deleted file mode 100644
index e21bfdf..0000000
--- a/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCopyPIInspectionReport from 'c/lexCopyPIInspectionReport';
-
-describe('c-lex-copy-pi-inspection-report', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-copy-pi-inspection-report', {
-            is: LexCopyPIInspectionReport
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js b/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js
deleted file mode 100644
index 4ecaaab..0000000
--- a/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCopyPIOnCall from 'c/lexCopyPIOnCall';
-
-describe('c-lex-copy-pi-on-call', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-copy-pi-on-call', {
-            is: LexCopyPIOnCall
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCopyRepair/__tests__/lexCopyRepair.test.js b/force-app/main/default/lwc/lexCopyRepair/__tests__/lexCopyRepair.test.js
deleted file mode 100644
index 4f5bab3..0000000
--- a/force-app/main/default/lwc/lexCopyRepair/__tests__/lexCopyRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCopyRepair from 'c/lexCopyRepair';
-
-describe('c-lex-copy-repair', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-copy-repair', {
-            is: LexCopyRepair
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js b/force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js
deleted file mode 100644
index c75ef3d..0000000
--- a/force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCreateReportMaintenanceContract from 'c/lexCreateReportMaintenanceContract';
-
-describe('c-lex-create-report-maintenance-contract', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-create-report-maintenance-contract', {
-            is: LexCreateReportMaintenanceContract
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js b/force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js
index ea1d95a..c965a6b 100644
--- a/force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js
+++ b/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');
+        })
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/__tests__/lexCustomDelete.test.js b/force-app/main/default/lwc/lexCustomDelete/__tests__/lexCustomDelete.test.js
deleted file mode 100644
index fcc78ff..0000000
--- a/force-app/main/default/lwc/lexCustomDelete/__tests__/lexCustomDelete.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCustomDelete from 'c/lexCustomDelete';
-
-describe('c-lex-custom-delete', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-custom-delete', {
-            is: LexCustomDelete
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html b/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
deleted file mode 100644
index 87f391a..0000000
--- a/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<template>
-    <div class="exampleHolder" if:true={IsLoading}>
-        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
-    </div>
-</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
index 0c3c21f..5123b26 100644
--- a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
+++ b/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("涓嶆槸鎵�鏈変汉銆佸垱寤轰汉鎴朏SE涓昏礋璐d汉锛屼笉鑳藉垹闄�", "error")
diff --git a/force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js b/force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js
deleted file mode 100644
index b377bae..0000000
--- a/force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCustomNewCopy2 from 'c/lexCustomNewCopy2';
-
-describe('c-lex-custom-new-copy2', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-custom-new-copy2', {
-            is: LexCustomNewCopy2
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js b/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js
index 2daf585..3f59c5f 100644
--- a/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js
+++ b/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");
         }
     }
 
diff --git a/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js b/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
index a29af3b..f446a53 100644
--- a/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
+++ b/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();
         })
     }
 
diff --git a/force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js b/force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js
deleted file mode 100644
index bb52449..0000000
--- a/force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexInsPageBtn from 'c/lexInsPageBtn';
-
-describe('c-lex-ins-page-btn', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-ins-page-btn', {
-            is: LexInsPageBtn
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js b/force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js
index e0c1dbd..ed7e85f 100644
--- a/force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js
+++ b/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';
diff --git a/force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js b/force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js
deleted file mode 100644
index a01145a..0000000
--- a/force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexMailMessege from 'c/lexMailMessege';
-
-describe('c-lex-mail-messege', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-mail-messege', {
-            is: LexMailMessege
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
index cf78f1a..6cbc7d5 100644
--- a/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
+++ b/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 +
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js b/force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js
deleted file mode 100644
index 511b2f0..0000000
--- a/force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexOCSMNoToReportRepair from 'c/lexOCSMNoToReportRepair';
-
-describe('c-lex-ocsm-no-to-report-repair', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-ocsm-no-to-report-repair', {
-            is: LexOCSMNoToReportRepair
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
index 44ef2be..219ac17 100644
--- a/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
+++ b/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("宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮OCSM涓嶈鎶ュ憡銆�", "error")
-            // alert("宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮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鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�", "error")
-            // alert("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�");
             return;
         }
     }
diff --git a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css
deleted file mode 100644
index 635bc6c..0000000
--- a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.outerBorderCss{
-    border: 1px solid #D4D4D4;
-    border-radius : 5px;
-    border-top : 3px solid #565959;
-}
-.borderCss{
-    border: 1px solid #D4D4D4;
-    border-radius : 5px;
-    margin-bottom : 7px;
-    border-top : 3px solid #565959;
-}
-.headerDorderCss{
-    border-top: 1px solid #565959;
-    border-bottom: 1px solid #D4D4D4;
-    padding:3px;
-}
-.centerCss{
-    text-align: center;
-}
-.centerCss .left{
-    margin-left: 100px;
-}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
index f7be272..d9f159f 100644
--- a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
+++ b/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);
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js b/force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js
deleted file mode 100644
index 96ed586..0000000
--- a/force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexOCSMToReportRepair from 'c/lexOCSMToReportRepair';
-
-describe('c-lex-ocsm-to-report-repair', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-ocsm-to-report-repair', {
-            is: LexOCSMToReportRepair
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js b/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js
deleted file mode 100644
index 1e819d2..0000000
--- a/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexOSHNogoods from 'c/lexOSHNogoods';
-
-describe('c-lex-osh-nogoods', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-osh-nogoods', {
-            is: LexOSHNogoods
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
index c8ce47e..388856a 100644
--- a/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
+++ b/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);
             })
         }
     }
diff --git a/force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js b/force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js
deleted file mode 100644
index 7387e21..0000000
--- a/force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexPDFMaintenanceCommission from 'c/lexPDFMaintenanceCommission';
-
-describe('c-lex-pdf-maintenance-commission', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-pdf-maintenance-commission', {
-            is: LexPDFMaintenanceCommission
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js b/force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js
deleted file mode 100644
index 4fb8447..0000000
--- a/force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexPreContractSubmit from 'c/lexPreContractSubmit';
-
-describe('c-lex-pre-contract-submit', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-pre-contract-submit', {
-            is: LexPreContractSubmit
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js b/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
index 1340680..9cb57e1 100644
--- a/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
+++ b/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;
             }
diff --git a/force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js b/force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js
deleted file mode 100644
index 013ddd6..0000000
--- a/force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexProductRepairQuoteRepair from 'c/lexProductRepairQuoteRepair';
-
-describe('c-lex-product-repair-quote-repair', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-product-repair-quote-repair', {
-            is: LexProductRepairQuoteRepair
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js b/force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js
deleted file mode 100644
index 95b6a0e..0000000
--- a/force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexQuarterlyReport from 'c/lexQuarterlyReport';
-
-describe('c-lex-quarterly-report', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-quarterly-report', {
-            is: LexQuarterlyReport
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js
index fc1f1e2..4884575 100644
--- a/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js
+++ b/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(() => {
-
-        });
+        })
     }
 
     // 鍒朵綔瀛f姤
diff --git a/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js b/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
index 07b8885..9ef40cb 100644
--- a/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
+++ b/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("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒", "error");
-            // alert("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒");
             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();
     }
 
     // 寮圭獥
diff --git a/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js b/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
index 2ff072b..2f0f4de 100644
--- a/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
+++ b/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();
         })
     }
 
diff --git a/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js b/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js
deleted file mode 100644
index 2b62f83..0000000
--- a/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexSelectAssetsMaintenance from 'c/lexSelectAssetsMaintenance';
-
-describe('c-lex-select-assets-maintenance', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-select-assets-maintenance', {
-            is: LexSelectAssetsMaintenance
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js
index 21cb5c4..0f622ff 100644
--- a/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js
+++ b/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;
diff --git a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
index ed36fa7..26b7f7d 100644
--- a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
+++ b/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_鎶�鏈帹杩涢儴_闈濻SO') {
             this.ShowToastEvent("瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�", "error");
-            // alert('瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�');
             return;
         }
         var status = this.CutPriceStatusServiceC;
         if (status == '瀹℃壒涓�') {
             this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒", "error");
-            // alert("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒");
             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();
     }
 
     // 寮圭獥
diff --git a/force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js b/force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js
deleted file mode 100644
index fa04967..0000000
--- a/force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexSubmitForApproval from 'c/lexSubmitForApproval';
-
-describe('c-lex-submit-for-approval', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-submit-for-approval', {
-            is: LexSubmitForApproval
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js b/force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js
index aa88e1f..8cb768c 100644
--- a/force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js
+++ b/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");
         })
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js b/force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js
index 2d3938b..db735ab 100644
--- a/force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js
+++ b/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("璇ョ淮淇悎鍚屾姤浠疯繕鍦ㄥ鎵逛腑 鎴� 宸茬粡涓锛屼笉鑳戒腑姝紒")
         }
     }
 
diff --git a/force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js b/force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js
deleted file mode 100644
index 3986cf6..0000000
--- a/force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexUploadToRecognitionModel from 'c/lexUploadToRecognitionModel';
-
-describe('c-lex-upload-to-recognition-model', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-upload-to-recognition-model', {
-            is: LexUploadToRecognitionModel
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
index 6e22dc1..987e871 100644
--- a/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
+++ b/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);
                 })
             }
         }
diff --git a/force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js b/force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js
deleted file mode 100644
index d5f3d47..0000000
--- a/force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexUploadToSap from 'c/lexUploadToSap';
-
-describe('c-lex-upload-to-sap', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-upload-to-sap', {
-            is: LexUploadToSap
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js b/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
index 5bd9188..e06e449 100644
--- a/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
+++ b/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('缁翠慨鍚堝悓绠$悊缂栫爜涓虹┖锛屼笉鑳戒笂浼燬AP銆�', "error")
-            // alert('缁翠慨鍚堝悓绠$悊缂栫爜涓虹┖锛屼笉鑳戒笂浼燬AP銆�');
         } 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('褰撳墠缁翠慨鍚堝悓娌℃湁瀹屾垚璁ゆ锛屼笉鑳戒笂浼燬AP銆�', "error")
-                        // alert('褰撳墠缁翠慨鍚堝悓娌℃湁瀹屾垚璁ゆ锛屼笉鑳戒笂浼燬AP銆�');
                         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);
             }
         }
     }
diff --git a/force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js b/force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js
deleted file mode 100644
index 02e891b..0000000
--- a/force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexYanshoudanRequest from 'c/lexYanshoudanRequest';
-
-describe('c-lex-yanshoudan-request', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-yanshoudan-request', {
-            is: LexYanshoudanRequest
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
index ad1fd9a..97a70c1 100644
--- a/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
+++ b/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 "";
-        }
     }
 
     // 寮圭獥
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css
deleted file mode 100644
index 9acb129..0000000
--- a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.outerBorderCss{
-    border: 1px solid #D4D4D4;
-    border-radius : 5px;
-    border-top : 3px solid #565959;
-}
-.borderCss{
-    border: 1px solid #D4D4D4;
-    border-radius : 5px;
-    margin-bottom : 7px;
-    border-top : 3px solid #565959;
-}
-.headerDorderCss{
-    border-top: 1px solid #565959;
-    border-bottom: 1px solid #D4D4D4;
-    padding:3px;
-}
-.centerCss{
-    text-align: center;
-}
-.centerCss .left{
-    margin-left: 100px;
-}/* sample css file *//* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
index 95bfd52..b35e67a 100644
--- a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
+++ b/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 : '鐘舵�佷负鍙栨秷鐨凲IS鎵嶅彲浠ヨ澶嶅埗骞舵柊寤�',
-                        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('鐘舵�佷负鍙栨秷鐨凲IS鎵嶅彲浠ヨ澶嶅埗骞舵柊寤�', '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);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.1